# Licensed under the MIT license. See LICENSE file in the project root for full license information.
# Verify minimum required version
-cmake_minimum_required(VERSION 3.6.2)
+cmake_minimum_required(VERSION 3.15)
cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH is enabled by default.
include(eng/native/configurepaths.cmake)
include(${CLR_ENG_NATIVE_DIR}/configurecompiler.cmake)
-# override some global configs
-if (MSVC)
- add_compile_options(/wd4960 /wd4961 /wd4603 /wd4627 /wd4838 /wd4456 /wd4457 /wd4458 /wd4459 /wd4091 /we4640)
- add_compile_options($<$<COMPILE_LANGUAGE:CXX>:/EHsc>)
- add_compile_options($<$<OR:$<CONFIG:Release>,$<CONFIG:Relwithdebinfo>>:/MT>)
- add_compile_options($<$<OR:$<CONFIG:Debug>,$<CONFIG:Checked>>:/MTd>)
-else (MSVC)
- add_compile_options(-Wno-unused-parameter)
- add_compile_options(-Wno-unused-variable)
- add_compile_options(-Wno-implicit-fallthrough)
+if(CLR_CMAKE_HOST_UNIX)
+ # The -fms-extensions enable the stuff like __if_exists, __declspec(uuid()), etc.
+ add_compile_options(-fms-extensions)
+ #-fms-compatibility Enable full Microsoft Visual C++ compatibility
+ #-fms-extensions Accept some non-standard constructs supported by the Microsoft compiler
add_compile_options(-fvisibility=default)
-endif (MSVC)
+endif(CLR_CMAKE_HOST_UNIX)
+
+if (CMAKE_VERSION VERSION_LESS "3.16")
+ # Provide a no-op polyfill for precompiled headers on old CMake versions
+ function(target_precompile_headers)
+ endfunction()
+endif()
# Register the default component
set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME diagnostics)
# Where _version.h for Windows is generated
if(CLR_CMAKE_HOST_WIN32)
-include_directories(${CLR_ARTIFACTS_OBJ_DIR})
+ include_directories(${CLR_ARTIFACTS_OBJ_DIR})
endif(CLR_CMAKE_HOST_WIN32)
set(CORECLR_SET_RPATH ON)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif(CLR_CMAKE_HOST_WIN32)
-add_definitions(-DUNICODE)
-add_definitions(-D_UNICODE)
-
#--------------------------------------
# FEATURE Defines
#--------------------------------------
-add_definitions(-DFEATURE_CORESYSTEM)
-
if(CLR_CMAKE_HOST_UNIX)
- add_definitions(-DPLATFORM_UNIX=1)
add_definitions(-DFEATURE_PAL)
- add_definitions(-DFEATURE_PAL_ANSI)
endif(CLR_CMAKE_HOST_UNIX)
-if(CLR_CMAKE_HOST_WIN32)
- add_definitions(-DFEATURE_COMINTEROP)
-endif(CLR_CMAKE_HOST_WIN32)
-
-if(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
- add_definitions(-DFEATURE_HIJACK)
-endif(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
-
-if(FEATURE_EVENT_TRACE)
- add_definitions(-DFEATURE_EVENT_TRACE=1)
- add_definitions(-DFEATURE_PERFTRACING=1)
-endif(FEATURE_EVENT_TRACE)
-
-if(CLR_CMAKE_HOST_UNIX_AMD64)
- add_definitions(-DFEATURE_MULTIREG_RETURN)
-endif (CLR_CMAKE_HOST_UNIX_AMD64)
-
-if(CLR_CMAKE_HOST_UNIX AND CLR_CMAKE_TARGET_ARCH_AMD64)
- add_definitions(-DUNIX_AMD64_ABI)
-endif(CLR_CMAKE_HOST_UNIX AND CLR_CMAKE_TARGET_ARCH_AMD64)
-
#-----------------------------------------
# Native Projects
#-----------------------------------------
src\shared\inc\dacprivate.h = src\shared\inc\dacprivate.h
src\shared\inc\dbgenginemetrics.h = src\shared\inc\dbgenginemetrics.h
src\shared\inc\dbgportable.h = src\shared\inc\dbgportable.h
- src\shared\inc\dbgtargetcontext.h = src\shared\inc\dbgtargetcontext.h
src\shared\inc\dbgutil.h = src\shared\inc\dbgutil.h
src\shared\inc\debugmacros.h = src\shared\inc\debugmacros.h
src\shared\inc\debugmacrosext.h = src\shared\inc\debugmacrosext.h
src\shared\inc\yieldprocessornormalized.h = src\shared\inc\yieldprocessornormalized.h
EndProjectSection
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "clr_std", "clr_std", "{33239640-6F4B-4DA4-A780-2F5B26D57EAD}"
- ProjectSection(SolutionItems) = preProject
- src\shared\inc\clr_std\algorithm = src\shared\inc\clr_std\algorithm
- src\shared\inc\clr_std\string = src\shared\inc\clr_std\string
- src\shared\inc\clr_std\type_traits = src\shared\inc\clr_std\type_traits
- src\shared\inc\clr_std\utility = src\shared\inc\clr_std\utility
- src\shared\inc\clr_std\vector = src\shared\inc\clr_std\vector
- EndProjectSection
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "llvm", "llvm", "{06730767-421B-465F-BB63-A3A07D72D7A2}"
ProjectSection(SolutionItems) = preProject
src\shared\inc\llvm\Dwarf.def = src\shared\inc\llvm\Dwarf.def
src\shared\README.txt = src\shared\README.txt
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dbgutil", "src\shared\dbgutil\dbgutil.vcxproj", "{A9A7C879-C320-3327-BB84-16E1322E17AE}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gcdump", "src\shared\gcdump\gcdump.vcxproj", "{20EBC3C4-917C-402D-B778-9A6E3742BF5A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "utilcode", "src\shared\utilcode\utilcode.vcxproj", "{8C35FEF8-1101-38F6-ACD0-462A1EA53A7D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "minipal", "minipal", "{795B7A50-1B1F-406E-94E0-F9B35104EF22}"
ProjectSection(SolutionItems) = preProject
- src\shared\minipal\utils.h = src\shared\minipal\utils.h
+ src\shared\minipal\CMakeLists.txt = src\shared\minipal\CMakeLists.txt
+ src\shared\minipal\dn-u16.h = src\shared\minipal\dn-u16.h
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DbgShim.UnitTests", "src\tests\DbgShim.UnitTests\DbgShim.UnitTests.csproj", "{DD60B7C4-BECC-4C7D-A53B-FCDD4C92B728}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.SymbolManifestGenerator", "src\Microsoft.SymbolManifestGenerator\Microsoft.SymbolManifestGenerator.csproj", "{28B55114-88C0-44B6-BBD8-50C14ED59EE2}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dbgutil", "src\shared\debug\dbgutil\dbgutil.vcxproj", "{A9A7C879-C320-3327-BB84-16E1322E17AE}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "debug", "debug", "{00D9021E-A202-4BCB-9A59-13D5BEEBF423}"
+ ProjectSection(SolutionItems) = preProject
+ src\shared\debug\CMakeLists.txt = src\shared\debug\CMakeLists.txt
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "inc", "inc", "{19663AE5-3EEA-472E-B157-37C2C7C6BACB}"
+ ProjectSection(SolutionItems) = preProject
+ src\shared\debug\inc\dbgtargetcontext.h = src\shared\debug\inc\dbgtargetcontext.h
+ src\shared\debug\inc\dbgutil.h = src\shared\debug\inc\dbgutil.h
+ src\shared\debug\inc\runtimeinfo.h = src\shared\debug\inc\runtimeinfo.h
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dump", "dump", "{3B26AB4F-8129-4DAF-8BB0-A6075663F6D2}"
+ ProjectSection(SolutionItems) = preProject
+ src\shared\debug\inc\dump\dumpcommon.h = src\shared\debug\inc\dump\dumpcommon.h
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Unix", "Unix", "{8944D9BF-69ED-4798-B533-559CAB011B07}"
+ ProjectSection(SolutionItems) = preProject
+ src\shared\minipal\Unix\CMakeLists.txt = src\shared\minipal\Unix\CMakeLists.txt
+ src\shared\minipal\Unix\dn-u16.cpp = src\shared\minipal\Unix\dn-u16.cpp
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Windows", "Windows", "{06FB18BC-F4DD-4DB9-A566-551254CD1064}"
+ ProjectSection(SolutionItems) = preProject
+ src\shared\minipal\Windows\CMakeLists.txt = src\shared\minipal\Windows\CMakeLists.txt
+ src\shared\minipal\Windows\dn-u16.cpp = src\shared\minipal\Windows\dn-u16.cpp
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "native", "native", "{641F00F0-2693-451B-A96A-13E4E115BF0F}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "minipal", "minipal", "{D9A91544-CDF8-4C68-BAD2-47F4968A8652}"
+ ProjectSection(SolutionItems) = preProject
+ src\shared\native\minipal\asansupport.cpp = src\shared\native\minipal\asansupport.cpp
+ src\shared\native\minipal\configure.cmake = src\shared\native\minipal\configure.cmake
+ src\shared\native\minipal\cpufeatures.c = src\shared\native\minipal\cpufeatures.c
+ src\shared\native\minipal\cpufeatures.h = src\shared\native\minipal\cpufeatures.h
+ src\shared\native\minipal\cpuid.h = src\shared\native\minipal\cpuid.h
+ src\shared\native\minipal\entrypoints.h = src\shared\native\minipal\entrypoints.h
+ src\shared\native\minipal\getexepath.h = src\shared\native\minipal\getexepath.h
+ src\shared\native\minipal\minipalconfig.h.in = src\shared\native\minipal\minipalconfig.h.in
+ src\shared\native\minipal\random.c = src\shared\native\minipal\random.c
+ src\shared\native\minipal\random.h = src\shared\native\minipal\random.h
+ src\shared\native\minipal\strings.h = src\shared\native\minipal\strings.h
+ src\shared\native\minipal\time.c = src\shared\native\minipal\time.c
+ src\shared\native\minipal\time.h = src\shared\native\minipal\time.h
+ src\shared\native\minipal\types.h = src\shared\native\minipal\types.h
+ src\shared\native\minipal\unicodedata.c = src\shared\native\minipal\unicodedata.c
+ src\shared\native\minipal\utf8.c = src\shared\native\minipal\utf8.c
+ src\shared\native\minipal\utf8.h = src\shared\native\minipal\utf8.h
+ src\shared\native\minipal\utils.h = src\shared\native\minipal\utils.h
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Checked|Any CPU = Checked|Any CPU
{D52C65C4-2C7D-45E6-9F5C-6F3A96796018}.Release|ARM.ActiveCfg = Release|x86
{D52C65C4-2C7D-45E6-9F5C-6F3A96796018}.Release|ARM64.ActiveCfg = Release|x86
{D52C65C4-2C7D-45E6-9F5C-6F3A96796018}.Release|x64.ActiveCfg = Release|x64
- {D52C65C4-2C7D-45E6-9F5C-6F3A96796018}.Release|x64.Build.0 = Release|x64
{D52C65C4-2C7D-45E6-9F5C-6F3A96796018}.Release|x86.ActiveCfg = Release|x86
{D52C65C4-2C7D-45E6-9F5C-6F3A96796018}.RelWithDebInfo|Any CPU.ActiveCfg = Release|x64
{D52C65C4-2C7D-45E6-9F5C-6F3A96796018}.RelWithDebInfo|Any CPU.Build.0 = Release|x64
{41F59D85-FC36-3015-861B-F177863252BC}.Release|ARM.ActiveCfg = Release|x64
{41F59D85-FC36-3015-861B-F177863252BC}.Release|ARM64.ActiveCfg = Release|x64
{41F59D85-FC36-3015-861B-F177863252BC}.Release|x64.ActiveCfg = Release|x64
- {41F59D85-FC36-3015-861B-F177863252BC}.Release|x64.Build.0 = Release|x64
{41F59D85-FC36-3015-861B-F177863252BC}.Release|x86.ActiveCfg = Release|x64
{41F59D85-FC36-3015-861B-F177863252BC}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|x64
{41F59D85-FC36-3015-861B-F177863252BC}.RelWithDebInfo|ARM.ActiveCfg = RelWithDebInfo|x64
{EEC90A42-CDCD-4EE3-B47D-C109D604E7E2}.Release|ARM.ActiveCfg = Release|x64
{EEC90A42-CDCD-4EE3-B47D-C109D604E7E2}.Release|ARM64.ActiveCfg = Release|x64
{EEC90A42-CDCD-4EE3-B47D-C109D604E7E2}.Release|x64.ActiveCfg = Release|x64
- {EEC90A42-CDCD-4EE3-B47D-C109D604E7E2}.Release|x64.Build.0 = Release|x64
{EEC90A42-CDCD-4EE3-B47D-C109D604E7E2}.Release|x86.ActiveCfg = Release|x64
{EEC90A42-CDCD-4EE3-B47D-C109D604E7E2}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|x64
{EEC90A42-CDCD-4EE3-B47D-C109D604E7E2}.RelWithDebInfo|ARM.ActiveCfg = RelWithDebInfo|x64
{BD779298-8631-3F5D-AA59-82897E5454A7}.Release|ARM.ActiveCfg = Release|x64
{BD779298-8631-3F5D-AA59-82897E5454A7}.Release|ARM64.ActiveCfg = Release|x64
{BD779298-8631-3F5D-AA59-82897E5454A7}.Release|x64.ActiveCfg = Release|x64
- {BD779298-8631-3F5D-AA59-82897E5454A7}.Release|x64.Build.0 = Release|x64
{BD779298-8631-3F5D-AA59-82897E5454A7}.Release|x86.ActiveCfg = Release|x64
{BD779298-8631-3F5D-AA59-82897E5454A7}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|x64
{BD779298-8631-3F5D-AA59-82897E5454A7}.RelWithDebInfo|ARM.ActiveCfg = RelWithDebInfo|x64
{BD779298-8631-3F5D-AA59-82897E5454A7}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{BD779298-8631-3F5D-AA59-82897E5454A7}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{BD779298-8631-3F5D-AA59-82897E5454A7}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Checked|Any CPU.ActiveCfg = Checked|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Checked|ARM.ActiveCfg = Checked|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Checked|ARM64.ActiveCfg = Checked|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Checked|x64.ActiveCfg = Checked|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Checked|x64.Build.0 = Checked|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Checked|x86.ActiveCfg = Checked|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Debug|Any CPU.ActiveCfg = Debug|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Debug|ARM.ActiveCfg = Debug|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Debug|ARM64.ActiveCfg = Debug|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Debug|x64.ActiveCfg = Debug|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Debug|x64.Build.0 = Debug|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Debug|x86.ActiveCfg = Debug|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Release|Any CPU.ActiveCfg = Release|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Release|ARM.ActiveCfg = Release|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Release|ARM64.ActiveCfg = Release|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Release|x64.ActiveCfg = Release|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Release|x64.Build.0 = Release|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.Release|x86.ActiveCfg = Release|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.RelWithDebInfo|ARM.ActiveCfg = RelWithDebInfo|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.RelWithDebInfo|ARM64.ActiveCfg = RelWithDebInfo|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
- {A9A7C879-C320-3327-BB84-16E1322E17AE}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64
{20EBC3C4-917C-402D-B778-9A6E3742BF5A}.Checked|Any CPU.ActiveCfg = Checked|x64
{20EBC3C4-917C-402D-B778-9A6E3742BF5A}.Checked|ARM.ActiveCfg = Checked|x64
{20EBC3C4-917C-402D-B778-9A6E3742BF5A}.Checked|ARM64.ActiveCfg = Checked|x64
{20EBC3C4-917C-402D-B778-9A6E3742BF5A}.Release|ARM.ActiveCfg = Release|x64
{20EBC3C4-917C-402D-B778-9A6E3742BF5A}.Release|ARM64.ActiveCfg = Release|x64
{20EBC3C4-917C-402D-B778-9A6E3742BF5A}.Release|x64.ActiveCfg = Release|x64
- {20EBC3C4-917C-402D-B778-9A6E3742BF5A}.Release|x64.Build.0 = Release|x64
{20EBC3C4-917C-402D-B778-9A6E3742BF5A}.Release|x86.ActiveCfg = Release|x64
{20EBC3C4-917C-402D-B778-9A6E3742BF5A}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|x64
{20EBC3C4-917C-402D-B778-9A6E3742BF5A}.RelWithDebInfo|ARM.ActiveCfg = RelWithDebInfo|x64
{8C35FEF8-1101-38F6-ACD0-462A1EA53A7D}.Release|ARM.ActiveCfg = Release|x64
{8C35FEF8-1101-38F6-ACD0-462A1EA53A7D}.Release|ARM64.ActiveCfg = Release|x64
{8C35FEF8-1101-38F6-ACD0-462A1EA53A7D}.Release|x64.ActiveCfg = Release|x64
- {8C35FEF8-1101-38F6-ACD0-462A1EA53A7D}.Release|x64.Build.0 = Release|x64
{8C35FEF8-1101-38F6-ACD0-462A1EA53A7D}.Release|x86.ActiveCfg = Release|x64
{8C35FEF8-1101-38F6-ACD0-462A1EA53A7D}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|x64
{8C35FEF8-1101-38F6-ACD0-462A1EA53A7D}.RelWithDebInfo|ARM.ActiveCfg = RelWithDebInfo|x64
{E8F133F8-4D20-475D-9D16-2BA236DAB65F}.Debug|x86.Build.0 = Debug|Any CPU
{E8F133F8-4D20-475D-9D16-2BA236DAB65F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E8F133F8-4D20-475D-9D16-2BA236DAB65F}.Release|ARM.ActiveCfg = Release|Any CPU
- {E8F133F8-4D20-475D-9D16-2BA236DAB65F}.Release|ARM.Build.0 = Release|Any CPU
{E8F133F8-4D20-475D-9D16-2BA236DAB65F}.Release|ARM64.ActiveCfg = Release|Any CPU
- {E8F133F8-4D20-475D-9D16-2BA236DAB65F}.Release|ARM64.Build.0 = Release|Any CPU
{E8F133F8-4D20-475D-9D16-2BA236DAB65F}.Release|x64.ActiveCfg = Release|Any CPU
- {E8F133F8-4D20-475D-9D16-2BA236DAB65F}.Release|x64.Build.0 = Release|Any CPU
{E8F133F8-4D20-475D-9D16-2BA236DAB65F}.Release|x86.ActiveCfg = Release|Any CPU
- {E8F133F8-4D20-475D-9D16-2BA236DAB65F}.Release|x86.Build.0 = Release|Any CPU
{E8F133F8-4D20-475D-9D16-2BA236DAB65F}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
{E8F133F8-4D20-475D-9D16-2BA236DAB65F}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
{E8F133F8-4D20-475D-9D16-2BA236DAB65F}.RelWithDebInfo|ARM.ActiveCfg = Release|Any CPU
{28B55114-88C0-44B6-BBD8-50C14ED59EE2}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{28B55114-88C0-44B6-BBD8-50C14ED59EE2}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
{28B55114-88C0-44B6-BBD8-50C14ED59EE2}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Checked|Any CPU.ActiveCfg = Checked|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Checked|Any CPU.Build.0 = Checked|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Checked|ARM.ActiveCfg = Checked|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Checked|ARM.Build.0 = Checked|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Checked|ARM64.ActiveCfg = Checked|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Checked|ARM64.Build.0 = Checked|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Checked|x64.ActiveCfg = Checked|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Checked|x64.Build.0 = Checked|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Checked|x86.ActiveCfg = Checked|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Checked|x86.Build.0 = Checked|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Debug|Any CPU.ActiveCfg = Debug|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Debug|ARM.ActiveCfg = Debug|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Debug|ARM.Build.0 = Debug|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Debug|ARM64.ActiveCfg = Debug|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Debug|ARM64.Build.0 = Debug|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Debug|x64.ActiveCfg = Debug|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Debug|x64.Build.0 = Debug|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Debug|x86.ActiveCfg = Debug|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Debug|x86.Build.0 = Debug|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Release|Any CPU.ActiveCfg = Release|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Release|ARM.ActiveCfg = Release|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Release|ARM64.ActiveCfg = Release|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Release|x64.ActiveCfg = Release|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.Release|x86.ActiveCfg = Release|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.RelWithDebInfo|Any CPU.Build.0 = RelWithDebInfo|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.RelWithDebInfo|ARM.ActiveCfg = RelWithDebInfo|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.RelWithDebInfo|ARM.Build.0 = RelWithDebInfo|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.RelWithDebInfo|ARM64.ActiveCfg = RelWithDebInfo|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.RelWithDebInfo|ARM64.Build.0 = RelWithDebInfo|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64
+ {A9A7C879-C320-3327-BB84-16E1322E17AE}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
{C457CBCD-3A8D-4402-9A2B-693A0390D3F9} = {298AE119-6625-4604-BDE5-0765DC34C856}
{CFCF90E5-91CF-44FD-819D-97F530AEF769} = {19FAB78C-3351-4911-8F0C-8C6056401740}
{41BDFD6D-D165-4D67-BEF6-4E539040D30A} = {7852EDE4-93DF-4DB1-8A86-C521703811AF}
- {33239640-6F4B-4DA4-A780-2F5B26D57EAD} = {41BDFD6D-D165-4D67-BEF6-4E539040D30A}
{06730767-421B-465F-BB63-A3A07D72D7A2} = {41BDFD6D-D165-4D67-BEF6-4E539040D30A}
{6419BA04-6F1A-4D2F-8DE4-5C359E0364A3} = {03479E19-3F18-49A6-910A-F5041E27E7C0}
{870A7AD0-B808-491E-92F6-433BE990B374} = {03479E19-3F18-49A6-910A-F5041E27E7C0}
{2BD55143-B102-4FEC-84AD-DC3B330FA9AC} = {B62728C8-1267-4043-B46F-5537BBAEC692}
{BD779298-8631-3F5D-AA59-82897E5454A7} = {19FAB78C-3351-4911-8F0C-8C6056401740}
{7852EDE4-93DF-4DB1-8A86-C521703811AF} = {19FAB78C-3351-4911-8F0C-8C6056401740}
- {A9A7C879-C320-3327-BB84-16E1322E17AE} = {7852EDE4-93DF-4DB1-8A86-C521703811AF}
{20EBC3C4-917C-402D-B778-9A6E3742BF5A} = {7852EDE4-93DF-4DB1-8A86-C521703811AF}
{8C35FEF8-1101-38F6-ACD0-462A1EA53A7D} = {7852EDE4-93DF-4DB1-8A86-C521703811AF}
{795B7A50-1B1F-406E-94E0-F9B35104EF22} = {7852EDE4-93DF-4DB1-8A86-C521703811AF}
{44F93947-8FD4-4946-8AE5-EF6D25970CC7} = {03479E19-3F18-49A6-910A-F5041E27E7C0}
{C2422836-BA25-4751-9060-7C7890085869} = {03479E19-3F18-49A6-910A-F5041E27E7C0}
{28B55114-88C0-44B6-BBD8-50C14ED59EE2} = {19FAB78C-3351-4911-8F0C-8C6056401740}
+ {A9A7C879-C320-3327-BB84-16E1322E17AE} = {00D9021E-A202-4BCB-9A59-13D5BEEBF423}
+ {00D9021E-A202-4BCB-9A59-13D5BEEBF423} = {7852EDE4-93DF-4DB1-8A86-C521703811AF}
+ {19663AE5-3EEA-472E-B157-37C2C7C6BACB} = {00D9021E-A202-4BCB-9A59-13D5BEEBF423}
+ {3B26AB4F-8129-4DAF-8BB0-A6075663F6D2} = {19663AE5-3EEA-472E-B157-37C2C7C6BACB}
+ {8944D9BF-69ED-4798-B533-559CAB011B07} = {795B7A50-1B1F-406E-94E0-F9B35104EF22}
+ {06FB18BC-F4DD-4DB9-A566-551254CD1064} = {795B7A50-1B1F-406E-94E0-F9B35104EF22}
+ {641F00F0-2693-451B-A96A-13E4E115BF0F} = {7852EDE4-93DF-4DB1-8A86-C521703811AF}
+ {D9A91544-CDF8-4C68-BAD2-47F4968A8652} = {641F00F0-2693-451B-A96A-13E4E115BF0F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {46465737-C938-44FC-BE1A-4CE139EBB5E0}
:: Set the default arguments for build
-set __BuildArch=x64
-if /i "%PROCESSOR_ARCHITECTURE%" == "amd64" set __BuildArch=x64
-if /i "%PROCESSOR_ARCHITECTURE%" == "x86" set __BuildArch=x86
+set __TargetArch=x64
+if /i "%PROCESSOR_ARCHITECTURE%" == "amd64" set __TargetArch=x64
+if /i "%PROCESSOR_ARCHITECTURE%" == "arm64" set __TargetArch=arm64
+if /i "%PROCESSOR_ARCHITECTURE%" == "x86" set __TargetArch=x86
+set __HostArch=
set __BuildType=Debug
-set __BuildOS=Windows_NT
-set __Build=1
+set __TargetOS=Windows_NT
+set __BuildNative=1
set __CI=0
set __Verbosity=minimal
-set __BuildCrossArch=0
-set __CrossArch=
+set __Ninja=0
:: Set the various build properties here so that CMake and MSBuild can pick them up
set "__ProjectDir=%~dp0"
if /i "%1" == "--help" goto Usage
if /i "%1" == "-configuration" (set __BuildType=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
-if /i "%1" == "-architecture" (set __BuildArch=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
+if /i "%1" == "-architecture" (set __TargetArch=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
if /i "%1" == "-verbosity" (set __Verbosity=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
if /i "%1" == "-ci" (set __CI=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
:ArgsDone
-:: Determine if this is a cross-arch build
-
-if /i "%__BuildArch%" == "arm64" (
- set __BuildCrossArch=%__Build%
- set __CrossArch=x64
-)
-
-if /i "%__BuildArch%" == "arm" (
- set __BuildCrossArch=%__Build%
- set __CrossArch=x86
-)
-
+if "%__HostArch%" == "" set __HostArch=%__TargetArch%
if /i "%__BuildType%" == "debug" set __BuildType=Debug
if /i "%__BuildType%" == "release" set __BuildType=Release
:: Set the remaining variables based upon the determined build configuration
set "__RootBinDir=%__ProjectDir%\artifacts"
-set "__BinDir=%__RootBinDir%\bin\%__BuildOS%.%__BuildArch%.%__BuildType%"
-set "__LogDir=%__RootBinDir%\log\%__BuildOS%.%__BuildArch%.%__BuildType%"
+set "__BinDir=%__RootBinDir%\bin\%__TargetOS%.%__TargetArch%.%__BuildType%"
+set "__LogDir=%__RootBinDir%\log\%__TargetOS%.%__TargetArch%.%__BuildType%"
set "__ArtifactsIntermediatesDir=%__RootBinDir%\obj"
-set "__IntermediatesDir=%__ArtifactsIntermediatesDir%\%__BuildOS%.%__BuildArch%.%__BuildType%"
+set "__IntermediatesDir=%__ArtifactsIntermediatesDir%\%__TargetOS%.%__TargetArch%.%__BuildType%"
set "__PackagesBinDir=%__RootBinDir%\packages\%__BuildType%\Shipping"
-set "__CrossComponentBinDir=%__BinDir%"
-set "__CrossCompIntermediatesDir=%__IntermediatesDir%\crossgen"
-if NOT "%__CrossArch%" == "" set __CrossComponentBinDir=%__CrossComponentBinDir%\%__CrossArch%
-
:: Generate path to be set for CMAKE_INSTALL_PREFIX to contain forward slash
set "__CMakeBinDir=%__BinDir%"
set "__CMakeBinDir=%__CMakeBinDir:\=/%"
:: Common msbuild arguments
-set "__CommonBuildArgs=/v:!__Verbosity! /p:Configuration=%__BuildType% /p:BuildArch=%__BuildArch% %__UnprocessedBuildArgs%"
+set "__CommonBuildArgs=/v:!__Verbosity! /p:Configuration=%__BuildType% /p:BuildArch=%__TargetArch% %__UnprocessedBuildArgs%"
if not exist "%__BinDir%" md "%__BinDir%"
if not exist "%__IntermediatesDir%" md "%__IntermediatesDir%"
:: Parse the optdata package versions out of msbuild so that we can pass them on to CMake
set __DotNetCli=%__ProjectDir%\dotnet.cmd
-REM =========================================================================================
-REM ===
-REM === Build Cross-Architecture Native Components (if applicable)
-REM ===
-REM =========================================================================================
-
-if /i %__BuildCrossArch% EQU 1 (
- rem Scope environment changes start {
- setlocal
-
- echo %__MsgPrefix%Commencing build of cross architecture native components for %__BuildOS%.%__BuildArch%.%__BuildType%
-
- :: Set the environment for the native build
- set __VCBuildArch=x86_amd64
- if /i "%__CrossArch%" == "x86" ( set __VCBuildArch=x86 )
-
- echo %__MsgPrefix%Using environment: "%__VCToolsRoot%\vcvarsall.bat" !__VCBuildArch!
- call "%__VCToolsRoot%\vcvarsall.bat" !__VCBuildArch!
- @if defined _echo @echo on
-
- if not exist "%__CrossCompIntermediatesDir%" md "%__CrossCompIntermediatesDir%"
-
- echo Generating Version Header
- set __GenerateVersionLog="%__LogDir%\GenerateVersion.binlog"
- powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" "%__ProjectDir%\eng\CreateVersionFile.proj" /bl:!__GenerateVersionLog! /t:GenerateVersionFiles /restore /p:FileVersionFile=%__RootBinDir%\bin\FileVersion.txt /p:GenerateVersionHeader=true /p:NativeVersionHeaderFile=%__ArtifactsIntermediatesDir%\_version.h %__CommonBuildArgs%
- if not !errorlevel! == 0 (
- echo Generate Version Header FAILED
- goto ExitWithError
- )
- if defined __SkipConfigure goto SkipConfigureCrossBuild
-
- set __CMakeBinDir=%__CrossComponentBinDir%
- set "__CMakeBinDir=!__CMakeBinDir:\=/!"
-
- set "__ManagedBinaryDir=%__RootBinDir%\bin"
- set "__ManagedBinaryDir=!__ManagedBinaryDir:\=/!"
- set __ExtraCmakeArgs="-DCLR_MANAGED_BINARY_DIR=!__ManagedBinaryDir!" "-DCLR_BUILD_TYPE=%__BuildType%" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DCMAKE_SYSTEM_VERSION=10.0" "-DNUGET_PACKAGES=%NUGET_PACKAGES:\=/%"
-
- pushd "%__CrossCompIntermediatesDir%"
- call "%__ProjectDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__CrossCompIntermediatesDir%" %__VSVersion% %__CrossArch% %__BuildOS% !__ExtraCmakeArgs!
- @if defined _echo @echo on
- popd
-
-:SkipConfigureCrossBuild
- if not exist "%__CrossCompIntermediatesDir%\CMakeCache.txt" (
- echo %__MsgPrefix%Error: failed to generate cross-arch components build project!
- goto ExitWithError
- )
- if defined __ConfigureOnly goto SkipCrossCompBuild
-
- set __BuildLog="%__LogDir%\Cross.Build.binlog"
-
- echo running "%CMakePath%" --build %__CrossCompIntermediatesDir% --target install --config %__BuildType% -- /bl:!__BuildLog! !__CommonBuildArgs!
- "%CMakePath%" --build %__CrossCompIntermediatesDir% --target install --config %__BuildType% -- /bl:!__BuildLog! !__CommonBuildArgs!
-
- if not !ERRORLEVEL! == 0 (
- echo %__MsgPrefix%Error: cross-arch components build failed. Refer to the build log files for details:
- echo !__BuildLog!
- goto ExitWithError
- )
-
-:SkipCrossCompBuild
- rem } Scope environment changes end
- endlocal
-)
-
REM =========================================================================================
REM ===
REM === Build the native code
REM ===
REM =========================================================================================
-if %__Build% EQU 1 (
+if %__BuildNative% EQU 1 (
rem Scope environment changes start {
setlocal
- echo %__MsgPrefix%Commencing build of native components for %__BuildOS%.%__BuildArch%.%__BuildType%
+ echo %__MsgPrefix%Commencing build of native components for %__TargetOS%.%__TargetArch%.%__BuildType%
- set __VCBuildArch=x86_amd64
- if /i "%__BuildArch%" == "x86" ( set __VCBuildArch=x86 )
- if /i "%__BuildArch%" == "arm" (
- set __VCBuildArch=x86_arm
- )
- if /i "%__BuildArch%" == "arm64" (
- set __VCBuildArch=x86_arm64
+ REM Set the environment for the native build
+ if /i "%PROCESSOR_ARCHITECTURE%" == "ARM64" (
+ set __VCBuildArch=arm64
+ if /i "%__HostArch%" == "x64" ( set __VCBuildArch=arm64_amd64 )
+ if /i "%__HostArch%" == "x86" ( set __VCBuildArch=arm64_x86 )
+ ) else (
+ set __VCBuildArch=amd64
+ if /i "%__HostArch%" == "x86" ( set __VCBuildArch=amd64_x86 )
+ if /i "%__HostArch%" == "arm64" ( set __VCBuildArch=amd64_arm64 )
)
echo %__MsgPrefix%Using environment: "%__VCToolsRoot%\vcvarsall.bat" !__VCBuildArch!
goto ExitWithError
)
+ if %__Ninja% EQU 1 (
+ set __ExtraCmakeArgs="-DCMAKE_BUILD_TYPE=!__BuildType!"
+ )
+
echo Generating Version Header
set __GenerateVersionLog="%__LogDir%\GenerateVersion.binlog"
- powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" "%__ProjectDir%\eng\CreateVersionFile.proj" /bl:!__GenerateVersionLog! /t:GenerateVersionFiles /restore /p:FileVersionFile=%__RootBinDir%\bin\FileVersion.txt /p:GenerateVersionHeader=true /p:NativeVersionHeaderFile=%__ArtifactsIntermediatesDir%\_version.h %__CommonBuildArgs%
+ powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -File "%__ProjectDir%\eng\common\msbuild.ps1" "%__ProjectDir%\eng\native-prereqs.proj" /bl:!__GenerateVersionLog! /t:BuildPrereqs /restore %__CommonBuildArgs%
if not !errorlevel! == 0 (
echo Generate Version Header FAILED
goto ExitWithError
set "__ManagedBinaryDir=%__RootBinDir%\bin"
set "__ManagedBinaryDir=!__ManagedBinaryDir:\=/!"
- set __ExtraCmakeArgs="-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_MANAGED_BINARY_DIR=!__ManagedBinaryDir!" "-DCLR_BUILD_TYPE=%__BuildType%" "-DCLR_CMAKE_TARGET_ARCH=%__BuildArch%" "-DNUGET_PACKAGES=%NUGET_PACKAGES:\=/%"
+ set __ExtraCmakeArgs=!__ExtraCmakeArgs! "-DCMAKE_SYSTEM_VERSION=10.0" "-DCLR_MANAGED_BINARY_DIR=!__ManagedBinaryDir!" "-DCLR_BUILD_TYPE=%__BuildType%" "-DCLR_CMAKE_TARGET_ARCH=%__TargetArch%" "-DNUGET_PACKAGES=%NUGET_PACKAGES:\=/%"
pushd "%__IntermediatesDir%"
- call "%__ProjectDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__IntermediatesDir%" %__VSVersion% %__BuildArch% %__BuildOS% !__ExtraCmakeArgs!
+ call "%__ProjectDir%\eng\native\gen-buildsys.cmd" "%__ProjectDir%" "%__IntermediatesDir%" %__VSVersion% %__HostArch% %__TargetOS% !__ExtraCmakeArgs!
@if defined _echo @echo on
popd
set "__targetRid=net6.0"
set "__dotnet_sos=%__RootBinDir%\bin\dotnet-sos\%__BuildType%\%__targetRid%"
set "__dotnet_dump=%__RootBinDir%\bin\dotnet-dump\%__BuildType%\%__targetRid%"
-mkdir %__dotnet_sos%\win-%__BuildArch%
-mkdir %__dotnet_sos%\publish\win-%__BuildArch%
-mkdir %__dotnet_dump%\win-%__BuildArch%
-mkdir %__dotnet_dump%\publish\win-%__BuildArch%
-xcopy /y /q /i %__BinDir% %__dotnet_sos%\win-%__BuildArch%
-xcopy /y /q /i %__BinDir% %__dotnet_sos%\publish\win-%__BuildArch%
-xcopy /y /q /i %__BinDir% %__dotnet_dump%\win-%__BuildArch%
-xcopy /y /q /i %__BinDir% %__dotnet_dump%\publish\win-%__BuildArch%
+mkdir %__dotnet_sos%\win-%__TargetArch%
+mkdir %__dotnet_sos%\publish\win-%__TargetArch%
+mkdir %__dotnet_dump%\win-%__TargetArch%
+mkdir %__dotnet_dump%\publish\win-%__TargetArch%
+xcopy /y /q /i %__BinDir% %__dotnet_sos%\win-%__TargetArch%
+xcopy /y /q /i %__BinDir% %__dotnet_sos%\publish\win-%__TargetArch%
+xcopy /y /q /i %__BinDir% %__dotnet_dump%\win-%__TargetArch%
+xcopy /y /q /i %__BinDir% %__dotnet_dump%\publish\win-%__TargetArch%
REM =========================================================================================
REM ===
+++ /dev/null
-<!-- All Rights Reserved. Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
-<Project Sdk="Microsoft.Build.NoTargets">
- <PropertyGroup>
- <TargetFramework>netstandard2.0</TargetFramework>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- <SkipGetTargetFrameworkProperties>false</SkipGetTargetFrameworkProperties>
- </PropertyGroup>
-
- <Target Name="GenerateVersionFiles" DependsOnTargets="GenerateVersionHeader;GenerateVersionSourceFile" />
-
- <Target Name="GenerateVersionHeader" DependsOnTargets="GetAssemblyVersion;AddSourceRevisionToInformationalVersion" Condition="'$(NativeVersionHeaderFile)' != '' and '$(GenerateVersionHeader)' == 'true' and !Exists($(NativeVersionHeaderFile))">
-
- <Error Message="VersionSuffixDateStamp is missing" Condition="'$(VersionSuffixDateStamp)' == ''" />
-
- <PropertyGroup>
- <ProductVersion>$(FileVersion.Replace(".", ","))</ProductVersion>
- </PropertyGroup>
-
- <PropertyGroup>
- <NativeVersionLines>
-<![CDATA[
-#ifndef VER_COMPANYNAME_STR
-#define VER_COMPANYNAME_STR "Microsoft Corporation"
-#endif
-#ifndef VER_PRODUCTNAME_STR
-#define VER_PRODUCTNAME_STR "Microsoft\xae .NET Framework"
-#endif
-#undef VER_PRODUCTVERSION
-#define VER_PRODUCTVERSION $(ProductVersion)
-#undef VER_PRODUCTVERSION_STR
-#define VER_PRODUCTVERSION_STR "$(InformationalVersion)"
-#undef VER_FILEVERSION
-#define VER_FILEVERSION $(ProductVersion)
-#undef VER_FILEVERSION_STR
-#define VER_FILEVERSION_STR "$(FileVersion)"
-#ifndef VER_LEGALCOPYRIGHT_STR
-#define VER_LEGALCOPYRIGHT_STR "\xa9 Microsoft Corporation. All rights reserved."
-#endif
-]]>
- </NativeVersionLines>
- </PropertyGroup>
-
- <WriteLinesToFile File="$(NativeVersionHeaderFile)"
- Lines="$(NativeVersionLines.Replace(';', '%3B'))"
- Overwrite="true"
- WriteOnlyWhenDifferent="true" />
-
- <ItemGroup>
- <FileWrites Include="$(NativeVersionHeaderFile)" />
- </ItemGroup>
-
- <Message Importance="High" Text="Created version file $(NativeVersionHeaderFile)" />
- </Target>
-
- <!-- Non Windows versioning requires to generate a source file and include it on the compilation. -->
- <Target Name="GenerateVersionSourceFile" DependsOnTargets="GetAssemblyVersion;AddSourceRevisionToInformationalVersion" Condition="'$(NativeVersionSourceFile)' != '' and '$(GenerateVersionSourceFile)' == 'true' and !Exists($(NativeVersionHeaderFile))">
-
- <!-- Get Username -->
- <PropertyGroup>
- <VersionUserName Condition="'$(VersionUserName)' == ''">$(USERNAME)</VersionUserName>
- </PropertyGroup>
-
- <Exec Command="whoami" Condition="'$(VersionUserName)' == ''" StandardOutputImportance="Low" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" ConsoleToMSBuild="true">
- <Output TaskParameter="ConsoleOutput" PropertyName="VersionUserName" />
- </Exec>
-
- <!-- Get Hostname -->
- <PropertyGroup>
- <VersionHostName Condition="'$(VersionHostName)' == ''">$(COMPUTERNAME)</VersionHostName>
- </PropertyGroup>
-
- <Exec Command="hostname" Condition="'$(RunningOnUnix)'=='true' AND '$(VersionHostName)'==''" StandardOutputImportance="Low" IgnoreExitCode="true" IgnoreStandardErrorWarningFormat="true" ConsoleToMSBuild="true">
- <Output TaskParameter="ConsoleOutput" PropertyName="VersionHostName" />
- </Exec>
-
- <PropertyGroup>
- <BuiltByString Condition="'$(VersionUserName)' != '' AND '$(VersionHostName)' != ''">$(BuiltByString) %40BuiltBy: $(VersionUserName)-$(VersionHostName)</BuiltByString>
- </PropertyGroup>
-
- <PropertyGroup>
- <!-- SOS (strike.cpp) has a dependency on this variable being public and that it begins with the @(#)Version prefix -->
- <NativeVersionLines>
-<![CDATA[
-char sccsid[] __attribute__((used)) = "@(#)Version $(InformationalVersion)$(BuiltByString)";
- ]]>
- </NativeVersionLines>
- </PropertyGroup>
-
- <WriteLinesToFile File="$(NativeVersionSourceFile)"
- Lines="$(NativeVersionLines.Replace(';', '%3B'))"
- Overwrite="true"
- WriteOnlyWhenDifferent="true" />
-
- <ItemGroup>
- <FileWrites Include="$(NativeVersionSourceFile)" />
- </ItemGroup>
-
- <Message Importance="High" Text="Created version file $(NativeVersionSourceFile)" />
- </Target>
-</Project>
__GenerateVersionLog="$__LogsDir/GenerateVersion.binlog"
"$__RepoRootDir/eng/common/msbuild.sh" \
- $__RepoRootDir/eng/CreateVersionFile.proj \
+ $__RepoRootDir/eng/native-prereqs.proj \
/bl:$__GenerateVersionLog \
- /t:GenerateVersionFiles \
+ /t:BuildPrereqs \
/restore \
- /p:GenerateVersionSourceFile=true \
- /p:NativeVersionSourceFile="$__ArtifactsIntermediatesDir/_version.c" \
/p:Configuration="$__BuildType" \
/p:Platform="$__TargetArch" \
$__UnprocessedBuildArgs
--- /dev/null
+<Project>
+ <Import Project="Sdk.props" Sdk="Microsoft.Build.NoTargets" />
+
+ <PropertyGroup>
+ <TargetFramework>netstandard2.0</TargetFramework>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ <SkipGetTargetFrameworkProperties>false</SkipGetTargetFrameworkProperties>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <NativeVersionFile Condition="$([MSBuild]::IsOsPlatform(Windows))">$(ArtifactsObjDir)_version.h</NativeVersionFile>
+ <NativeVersionFile Condition="!$([MSBuild]::IsOsPlatform(Windows))">$(ArtifactsObjDir)_version.c</NativeVersionFile>
+ <RuntimeVersionFile>$(ArtifactsObjDir)runtime_version.h</RuntimeVersionFile>
+ <AssemblyName>.NET Diagnostics</AssemblyName>
+ </PropertyGroup>
+
+ <Target Name="GenerateRuntimeVersionFile"
+ DependsOnTargets="GenerateNativeVersionFile">
+ <PropertyGroup>
+ <RuntimeVersionFile Condition="'$(RuntimeVersionFile)' == ''">$(ArtifactsObjDir)runtime_version.h</RuntimeVersionFile>
+
+ <_RuntimeVersionFileContents>
+<![CDATA[
+#define RuntimeAssemblyMajorVersion $(MajorVersion)
+#define RuntimeAssemblyMinorVersion $(MinorVersion)
+
+#define RuntimeFileMajorVersion $(FileVersion.Split('.')[0])
+#define RuntimeFileMinorVersion $(FileVersion.Split('.')[1])
+#define RuntimeFileBuildVersion $(FileVersion.Split('.')[2])
+#define RuntimeFileRevisionVersion $(FileVersion.Split('.')[3])
+
+#define RuntimeProductMajorVersion $(Version.Split(".-")[0])
+#define RuntimeProductMinorVersion $(Version.Split(".-")[1])
+#define RuntimeProductPatchVersion $(Version.Split(".-")[2])
+
+#define RuntimeProductVersion $(Version)
+ ]]>
+ </_RuntimeVersionFileContents>
+ </PropertyGroup>
+
+ <MakeDir Directories="$([System.IO.Path]::GetDirectoryName($(RuntimeVersionFile)))" />
+
+ <WriteLinesToFile
+ File="$(RuntimeVersionFile)"
+ Lines="$(_RuntimeVersionFileContents)"
+ Overwrite="true"
+ WriteOnlyWhenDifferent="true" />
+ </Target>
+
+ <Target Name="GenerateNativeSourcelinkFile"
+ Condition="'$(EnableSourceLink)' == 'true'"
+ DependsOnTargets="_CreateIntermediateOutputPath;_CopyGeneratedSourcelinkFile;_VerifyNativeSourceLinkFileExists" />
+
+ <Target Name="_CreateIntermediateOutputPath">
+ <MakeDir Directories="$(IntermediateOutputPath)" />
+ </Target>
+
+ <Target Name="_CopyGeneratedSourcelinkFile"
+ DependsOnTargets="GenerateSourceLinkFile"
+ Inputs="$(SourceLink)" Outputs="$(NativeSourceLinkFile)">
+ <Error Condition="'$(NativeSourceLinkFile)' == ''" Text="Please set NativeSourceLinkFile to forward appropriate information for sourcelink."/>
+ <Copy SourceFiles="$(SourceLink)" DestinationFiles="$(NativeSourceLinkFile)" />
+ </Target>
+
+ <Target Name="_VerifyNativeSourceLinkFileExists"
+ Condition="'$(VerifySourceLinkFileExists)' == true">
+ <Error Condition="!Exists('$(NativeSourceLinkFile)')" Text="Native SourceLink file could not be made available to the native build. Ensure that $(MSBuildProjectName) ran the sourcelink targets."/>
+ </Target>
+
+ <Target Name="BuildPrereqs" BeforeTargets="Build" DependsOnTargets="GenerateRuntimeVersionFile" />
+ <Import Project="Sdk.targets" Sdk="Microsoft.Build.NoTargets" />
+</Project>
# set default iOS simulator deployment target
# keep in sync with SetOSTargetMinVersions in the root Directory.Build.props
- cmakeArgs="-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 $cmakeArgs"
+ cmakeArgs="-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_DEPLOYMENT_TARGET=12.2 $cmakeArgs"
if [[ "$__TargetArch" == x64 ]]; then
cmakeArgs="-DCMAKE_OSX_ARCHITECTURES=\"x86_64\" $cmakeArgs"
elif [[ "$__TargetArch" == arm64 ]]; then
# set default iOS device deployment target
# keep in sync with SetOSTargetMinVersions in the root Directory.Build.props
- cmakeArgs="-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 $cmakeArgs"
+ cmakeArgs="-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_DEPLOYMENT_TARGET=12.2 $cmakeArgs"
if [[ "$__TargetArch" == arm64 ]]; then
cmakeArgs="-DCMAKE_OSX_ARCHITECTURES=\"arm64\" $cmakeArgs"
else
# set default tvOS simulator deployment target
# keep in sync with SetOSTargetMinVersions in the root Directory.Build.props
- cmakeArgs="-DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 $cmakeArgs"
+ cmakeArgs="-DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_DEPLOYMENT_TARGET=12.2 $cmakeArgs"
if [[ "$__TargetArch" == x64 ]]; then
cmakeArgs="-DCMAKE_OSX_ARCHITECTURES=\"x86_64\" $cmakeArgs"
elif [[ "$__TargetArch" == arm64 ]]; then
# set default tvOS device deployment target
# keep in sync with SetOSTargetMinVersions in the root Directory.Build.props
- cmakeArgs="-DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 $cmakeArgs"
+ cmakeArgs="-DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_DEPLOYMENT_TARGET=12.2 $cmakeArgs"
if [[ "$__TargetArch" == arm64 ]]; then
cmakeArgs="-DCMAKE_OSX_ARCHITECTURES=\"arm64\" $cmakeArgs"
else
exit 1
}
-source "$__RepoRootDir/eng/native/init-os-and-arch.sh"
+source "$__RepoRootDir/eng/common/native/init-os-and-arch.sh"
__TargetArch=$arch
__TargetOS=$os
lowerI="$(echo "${1/--/-}" | tr "[:upper:]" "[:lower:]")"
case "$lowerI" in
- -\?|-h|--help)
+ -\?|-h|-help)
usage
exit 1
;;
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
+# We need to set this to Release as there's no way to intercept configuration-specific linker flags
+# for try_compile-style tests (like check_c_source_compiles) and some of the default Debug flags
+# (ie. /INCREMENTAL) conflict with our own flags.
+set(CMAKE_TRY_COMPILE_CONFIGURATION Release)
+
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
+if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.18")
+ include(CheckLinkerFlag)
+endif()
# "configureoptimization.cmake" must be included after CLR_CMAKE_HOST_UNIX has been set.
include(${CMAKE_CURRENT_LIST_DIR}/configureoptimization.cmake)
add_compile_options(-Wno-null-conversion)
add_compile_options(-glldb)
else()
- add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Werror=conversion-null>)
add_compile_options(-g)
endif()
endif()
add_compile_definitions("$<$<OR:$<CONFIG:RELEASE>,$<CONFIG:RELWITHDEBINFO>>:NDEBUG;URTBLDENV_FRIENDLY=Retail>")
if (MSVC)
- add_linker_flag(/guard:cf)
+
+ define_property(TARGET PROPERTY CLR_CONTROL_FLOW_GUARD INHERITED BRIEF_DOCS "Controls the /guard:cf flag presence" FULL_DOCS "Set this property to ON or OFF to indicate if the /guard:cf compiler and linker flag should be present")
+ define_property(TARGET PROPERTY CLR_EH_CONTINUATION INHERITED BRIEF_DOCS "Controls the /guard:ehcont flag presence" FULL_DOCS "Set this property to ON or OFF to indicate if the /guard:ehcont compiler flag should be present")
+ define_property(TARGET PROPERTY CLR_EH_OPTION INHERITED BRIEF_DOCS "Defines the value of the /EH option" FULL_DOCS "Set this property to one of the valid /EHxx options (/EHa, /EHsc, /EHa-, ...)")
+ define_property(TARGET PROPERTY MSVC_WARNING_LEVEL INHERITED BRIEF_DOCS "Define the warning level for the /Wn option" FULL_DOCS "Set this property to one of the valid /Wn options (/W0, /W1, /W2, /W3, /W4)")
+
+ set_property(GLOBAL PROPERTY CLR_CONTROL_FLOW_GUARD ON)
+
+ # Remove the /EHsc from the CXX flags so that the compile options are the only source of truth for that
+ string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ set_property(GLOBAL PROPERTY CLR_EH_OPTION /EHsc)
+
+ add_compile_options($<$<COMPILE_LANGUAGE:CXX>:$<TARGET_PROPERTY:CLR_EH_OPTION>>)
+ add_link_options($<$<BOOL:$<TARGET_PROPERTY:CLR_CONTROL_FLOW_GUARD>>:/guard:cf>)
# Linker flags
#
# The Ninja generator doesn't appear to have the default `/INCREMENTAL:ON` that
# the Visual Studio generator has. Therefore we will override the default for Visual Studio only.
add_linker_flag(/INCREMENTAL:NO DEBUG)
- add_linker_flag(/OPT:REF DEBUG)
+ add_linker_flag(/OPT:NOREF DEBUG)
add_linker_flag(/OPT:NOICF DEBUG)
endif (CMAKE_GENERATOR MATCHES "^Visual Studio.*$")
# Disable the use-after-return check for ASAN on Clang. This is because we have a lot of code that
# depends on the fact that our locals are not saved in a parallel stack, so we can't enable this today.
# If we ever have a way to detect a parallel stack and track its bounds, we can re-enable this check.
- add_compile_options($<$<COMPILE_LANG_AND_ID:C,Clang>:-fsanitize-address-use-after-return=never>)
- add_compile_options($<$<COMPILE_LANG_AND_ID:CXX,Clang>:-fsanitize-address-use-after-return=never>)
+ add_compile_options($<$<COMPILE_LANG_AND_ID:C,Clang,AppleClang>:-fsanitize-address-use-after-return=never>)
+ add_compile_options($<$<COMPILE_LANG_AND_ID:CXX,Clang,AppleClang>:-fsanitize-address-use-after-return=never>)
endif()
endif()
add_definitions(-D__EXTENSIONS__ -D_XPG4_2 -D_POSIX_PTHREAD_SEMANTICS)
elseif(CLR_CMAKE_HOST_OSX AND NOT CLR_CMAKE_HOST_MACCATALYST AND NOT CLR_CMAKE_HOST_IOS AND NOT CLR_CMAKE_HOST_TVOS)
add_definitions(-D_XOPEN_SOURCE)
- add_linker_flag("-Wl,-bind_at_load")
+
+ # the new linker in Xcode 15 (ld_new/ld_prime) deprecated the -bind_at_load flag for macOS which causes a warning
+ # that fails the build since we build with -Werror. Only pass the flag if we need it, i.e. older linkers.
+ check_linker_flag(C "-Wl,-bind_at_load,-fatal_warnings" LINKER_SUPPORTS_BIND_AT_LOAD_FLAG)
+ if(LINKER_SUPPORTS_BIND_AT_LOAD_FLAG)
+ add_linker_flag("-Wl,-bind_at_load")
+ endif()
elseif(CLR_CMAKE_HOST_HAIKU)
add_compile_options($<$<COMPILE_LANGUAGE:ASM>:-Wa,--noexecstack>)
add_linker_flag("-Wl,--no-undefined")
message("Detected SunOS amd64")
elseif(CLR_CMAKE_HOST_HAIKU)
message("Detected Haiku x86_64")
- endif(CLR_CMAKE_HOST_OSX OR CLR_CMAKE_HOST_MACCATALYST)
-endif(CLR_CMAKE_HOST_UNIX)
+ elseif(CLR_CMAKE_HOST_BROWSER)
+ add_definitions(-DHOST_BROWSER)
+ endif()
+elseif(CLR_CMAKE_HOST_WASI)
+ add_definitions(-DHOST_WASI)
+endif()
if (CLR_CMAKE_HOST_WIN32)
add_definitions(-DHOST_WINDOWS)
# Unconditionally define _FILE_OFFSET_BITS as 64 on all platforms.
add_definitions(-D_FILE_OFFSET_BITS=64)
+# Unconditionally define _TIME_BITS as 64 on all platforms.
+add_definitions(-D_TIME_BITS=64)
# Architecture specific files folder name
if (CLR_CMAKE_TARGET_ARCH_AMD64)
# Disable frame pointer optimizations so profilers can get better call stacks
add_compile_options(-fno-omit-frame-pointer)
- # The -fms-extensions enable the stuff like __if_exists, __declspec(uuid()), etc.
- add_compile_options(-fms-extensions)
- #-fms-compatibility Enable full Microsoft Visual C++ compatibility
- #-fms-extensions Accept some non-standard constructs supported by the Microsoft compiler
-
# Make signed arithmetic overflow of addition, subtraction, and multiplication wrap around
# using twos-complement representation (this is normally undefined according to the C++ spec).
add_compile_options(-fwrapv)
set(DISABLE_OVERRIDING_MIN_VERSION_ERROR -Wno-overriding-t-option)
add_link_options(-Wno-overriding-t-option)
if(CLR_CMAKE_HOST_ARCH_ARM64)
- set(MACOS_VERSION_MIN_FLAGS "-target arm64-apple-ios14.2-macabi")
- add_link_options(-target arm64-apple-ios14.2-macabi)
+ set(CLR_CMAKE_MACCATALYST_COMPILER_TARGET "arm64-apple-ios15.0-macabi")
+ add_link_options(-target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET})
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
- set(MACOS_VERSION_MIN_FLAGS "-target x86_64-apple-ios13.5-macabi")
- add_link_options(-target x86_64-apple-ios13.5-macabi)
+ set(CLR_CMAKE_MACCATALYST_COMPILER_TARGET "x86_64-apple-ios15.0-macabi")
+ add_link_options(-target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET})
else()
clr_unknown_arch()
endif()
# These options are intentionally set using the CMAKE_XXX_FLAGS instead of
# add_compile_options so that they take effect on the configuration functions
# in various configure.cmake files.
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MACOS_VERSION_MIN_FLAGS} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MACOS_VERSION_MIN_FLAGS} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}")
- set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${MACOS_VERSION_MIN_FLAGS} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}")
- set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS} ${MACOS_VERSION_MIN_FLAGS} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}")
- set(CMAKE_OBJCXX_FLAGS "${CMAKE_OBJCXX_FLAGS} ${MACOS_VERSION_MIN_FLAGS} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}")
+ set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}")
+ set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS}-target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}")
+ set(CMAKE_OBJCXX_FLAGS "${CMAKE_OBJCXX_FLAGS} -target ${CLR_CMAKE_MACCATALYST_COMPILER_TARGET} ${DISABLE_OVERRIDING_MIN_VERSION_ERROR}")
elseif(CLR_CMAKE_HOST_OSX)
+ set(CMAKE_OSX_DEPLOYMENT_TARGET "12.0")
if(CLR_CMAKE_HOST_ARCH_ARM64)
- set(CMAKE_OSX_DEPLOYMENT_TARGET "11.0")
add_compile_options(-arch arm64)
elseif(CLR_CMAKE_HOST_ARCH_AMD64)
- set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15")
add_compile_options(-arch x86_64)
else()
clr_unknown_arch()
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_ANDROID>)
elseif(CLR_CMAKE_TARGET_LINUX)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_LINUX>)
- if(CLR_CMAKE_TARGET_BROWSER)
- add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_BROWSER>)
- endif()
if(CLR_CMAKE_TARGET_LINUX_MUSL)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_LINUX_MUSL>)
endif()
elseif(CLR_CMAKE_TARGET_HAIKU)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_HAIKU>)
endif()
+ if(CLR_CMAKE_TARGET_BROWSER)
+ add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_BROWSER>)
+ endif()
elseif(CLR_CMAKE_TARGET_WASI)
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_WASI>)
else(CLR_CMAKE_TARGET_UNIX)
# Compile options for targeting windows
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/nologo>) # Suppress Startup Banner
- # /W3 is added by default by CMake, so remove it
- string(REPLACE "/W3" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- string(REPLACE "/W3" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
# [[! Microsoft.Security.SystemsADM.10086 !]] - SDL required warnings
# set default warning level to 4 but allow targets to override it.
- add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/W$<GENEX_EVAL:$<IF:$<BOOL:$<TARGET_PROPERTY:MSVC_WARNING_LEVEL>>,$<TARGET_PROPERTY:MSVC_WARNING_LEVEL>,4>>>)
+ set_property(GLOBAL PROPERTY MSVC_WARNING_LEVEL 4)
+ add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/W$<TARGET_PROPERTY:MSVC_WARNING_LEVEL>>)
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/WX>) # treat warnings as errors
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/Oi>) # enable intrinsics
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/Oy->) # disable suppressing of the creation of frame pointers on the call stack for quicker function calls
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/GS>) # Explicitly enable the buffer security checks
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/fp:precise>) # Enable precise floating point
- # disable C++ RTTI
- # /GR is added by default by CMake, so remove it manually.
- string(REPLACE "/GR " " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ # Disable C++ RTTI
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/FC>) # use full pathnames in diagnostics
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/we4013>) # 'function' undefined - assuming extern returning int.
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/we4102>) # "'%$S' : unreferenced label".
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/we4551>) # Function call missing argument list.
- add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/we4700>) # Local used w/o being initialized.
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/we4640>) # 'instance' : construction of local static object is not thread-safe
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/we4806>) # Unsafe operation involving type 'bool'.
# SDL requires the below warnings to be treated as errors:
# More info: https://liquid.microsoft.com/Web/Object/Read/ms.security/Requirements/Microsoft.Security.SystemsADM.10086
# (Access to that URL restricted to Microsoft employees.)
- add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/we4018>) # 'expression' : signed/unsigned mismatch
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/we4055>) # 'conversion' : from data pointer 'type1' to function pointer 'type2'
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/we4146>) # unary minus operator applied to unsigned type, result still unsigned
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/we4242>) # 'identifier' : conversion from 'type1' to 'type2', possible loss of data
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/Gz>)
endif (CLR_CMAKE_HOST_ARCH_I386)
- add_compile_options($<$<AND:$<COMPILE_LANGUAGE:C,CXX>,$<OR:$<CONFIG:Release>,$<CONFIG:Relwithdebinfo>>>:/GL>)
+ set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
+ set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF)
+ set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_CHECKED OFF)
if (CLR_CMAKE_HOST_ARCH_AMD64)
# The generator expression in the following command means that the /homeparams option is added only for debug builds for C and C++ source files
# enable control-flow-guard support for native components for non-Arm64 builds
# Added using variables instead of add_compile_options to let individual projects override it
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:cf")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:cf")
+ add_compile_options($<$<AND:$<COMPILE_LANGUAGE:C,CXX>,$<BOOL:$<TARGET_PROPERTY:CLR_CONTROL_FLOW_GUARD>>>:/guard:cf>)
# Enable EH-continuation table and CET-compatibility for native components for amd64 builds except for components of the Mono
# runtime. Added some switches using variables instead of add_compile_options to let individual projects override it.
if (CLR_CMAKE_HOST_ARCH_AMD64 AND NOT CLR_CMAKE_RUNTIME_MONO)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /guard:ehcont")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:ehcont")
- set(CMAKE_ASM_MASM_FLAGS "${CMAKE_ASM_MASM_FLAGS} /guard:ehcont")
- add_linker_flag(/guard:ehcont)
+ set_property(GLOBAL PROPERTY CLR_EH_CONTINUATION ON)
+
+ add_compile_options($<$<AND:$<COMPILE_LANGUAGE:C,CXX,ASM_MASM>,$<BOOL:$<TARGET_PROPERTY:CLR_EH_CONTINUATION>>>:/guard:ehcont>)
+ add_link_options($<$<BOOL:$<TARGET_PROPERTY:CLR_EH_CONTINUATION>>:/guard:ehcont>)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /CETCOMPAT")
endif (CLR_CMAKE_HOST_ARCH_AMD64 AND NOT CLR_CMAKE_RUNTIME_MONO)
endif (CLR_CMAKE_TARGET_ARCH_ARM OR CLR_CMAKE_TARGET_ARCH_ARM64)
# Don't display the output header when building RC files.
- add_compile_options($<$<COMPILE_LANGUAGE:RC>:/nologo>)
+ set(CMAKE_RC_FLAGS "${CMAKE_RC_FLAGS} /nologo")
+ # Don't display the output header when building asm files.
+ set(CMAKE_ASM_MASM_FLAGS "${CMAKE_ASM_MASM_FLAGS} /nologo")
endif (MSVC)
# Configure non-MSVC compiler flags that apply to all platforms (unix-like or otherwise)
# Ensure other tools are present
if (CLR_CMAKE_HOST_WIN32)
- if(CLR_CMAKE_HOST_ARCH_ARM)
-
- # Explicitly specify the assembler to be used for Arm32 compile
- file(TO_CMAKE_PATH "$ENV{VCToolsInstallDir}\\bin\\HostX86\\arm\\armasm.exe" CMAKE_ASM_COMPILER)
-
- set(CMAKE_ASM_MASM_COMPILER ${CMAKE_ASM_COMPILER})
- message("CMAKE_ASM_MASM_COMPILER explicitly set to: ${CMAKE_ASM_MASM_COMPILER}")
-
- # Enable generic assembly compilation to avoid CMake generate VS proj files that explicitly
- # use ml[64].exe as the assembler.
- enable_language(ASM)
- set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded "")
- set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL "")
- set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebug "")
- set(CMAKE_ASM_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebugDLL "")
- set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -g <INCLUDES> <FLAGS> -o <OBJECT> <SOURCE>")
-
- elseif(CLR_CMAKE_HOST_ARCH_ARM64)
-
+ if(CLR_CMAKE_HOST_ARCH_ARM64)
# Explicitly specify the assembler to be used for Arm64 compile
- file(TO_CMAKE_PATH "$ENV{VCToolsInstallDir}\\bin\\HostX86\\arm64\\armasm64.exe" CMAKE_ASM_COMPILER)
+ if (CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
+ file(TO_CMAKE_PATH "$ENV{VCToolsInstallDir}\\bin\\Hostarm64\\arm64\\armasm64.exe" CMAKE_ASM_COMPILER)
+ else()
+ file(TO_CMAKE_PATH "$ENV{VCToolsInstallDir}\\bin\\HostX64\\arm64\\armasm64.exe" CMAKE_ASM_COMPILER)
+ endif()
set(CMAKE_ASM_MASM_COMPILER ${CMAKE_ASM_COMPILER})
message("CMAKE_ASM_MASM_COMPILER explicitly set to: ${CMAKE_ASM_MASM_COMPILER}")
get_filename_component(CLR_REPO_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE)
set(CLR_ENG_NATIVE_DIR ${CMAKE_CURRENT_LIST_DIR})
-get_filename_component(CLR_SRC_NATIVE_DIR ${CMAKE_CURRENT_LIST_DIR}/../../src/native ABSOLUTE)
+get_filename_component(CLR_SRC_NATIVE_DIR ${CMAKE_CURRENT_LIST_DIR}/../../src/shared/native ABSOLUTE)
set (CLR_ARTIFACTS_OBJ_DIR "${CLR_REPO_ROOT_DIR}/artifacts/obj")
set (CLR_SOURCELINK_FILE_PATH "${CLR_ARTIFACTS_OBJ_DIR}/native.sourcelink.json")
set(VERSION_HEADER_PATH "${CLR_ARTIFACTS_OBJ_DIR}/_version.h")
set(VERSION_FILE_PATH "${CLR_ARTIFACTS_OBJ_DIR}/_version.c")
set(VERSION_FILE_RC_PATH "${CLR_ARTIFACTS_OBJ_DIR}/NativeVersion.rc")
set(RUNTIME_VERSION_HEADER_PATH "${CLR_ARTIFACTS_OBJ_DIR}/runtime_version.h")
+set(CLR_SHARED_DIR ${CLR_REPO_ROOT_DIR}/src/shared)
endif()
elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL i686)
set(CLR_CMAKE_HOST_UNIX_X86 1)
+ elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL aarch64)
+ set(CLR_CMAKE_HOST_UNIX_ARM64 1)
else()
clr_unknown_arch()
endif()
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL armv6 OR CMAKE_SYSTEM_PROCESSOR STREQUAL armv6l)
set(CLR_CMAKE_HOST_UNIX_ARMV6 1)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL arm64)
- set(CLR_CMAKE_HOST_UNIX_ARM64 1)
+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(CLR_CMAKE_HOST_UNIX_ARM64 1)
+ else()
+ set(CLR_CMAKE_HOST_UNIX_ARM 1)
+ endif()
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL loongarch64)
set(CLR_CMAKE_HOST_UNIX_LOONGARCH64 1)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL riscv64)
if(CLR_CMAKE_TARGET_OS STREQUAL emscripten)
set(CLR_CMAKE_TARGET_UNIX 1)
- set(CLR_CMAKE_TARGET_LINUX 1)
set(CLR_CMAKE_TARGET_BROWSER 1)
endif(CLR_CMAKE_TARGET_OS STREQUAL emscripten)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
+if (CLR_CMAKE_TARGET_ANDROID)
+ # Google requires all the native libraries to be aligned to 16 bytes (for 16k memory page size)
+ # This applies only to 64-bit binaries
+ if(CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_AMD64)
+ add_link_options(LINKER:-z,max-page-size=16384)
+ endif()
+endif()
string(TOLOWER "${CMAKE_BUILD_TYPE}" LOWERCASE_CMAKE_BUILD_TYPE)
if(LOWERCASE_CMAKE_BUILD_TYPE STREQUAL debug)
# Clear _FORTIFY_SOURCE=2, if set
string(REPLACE "-D_FORTIFY_SOURCE=2 " "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE "-D_FORTIFY_SOURCE=2 " "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
endif()
+
+if (CLR_CMAKE_TARGET_ANDROID OR CLR_CMAKE_TARGET_MACCATALYST OR CLR_CMAKE_TARGET_IOS OR CLR_CMAKE_TARGET_TVOS OR CLR_CMAKE_HOST_ARCH_ARMV6)
+ # Some platforms are opted-out from using the in-tree zlib-ng by default:
+ # - Android and iOS-like platforms: concerns about extra binary size
+ # - Armv6: zlib-ng has build breaks
+ set(CLR_CMAKE_USE_SYSTEM_ZLIB 1)
+endif()
if (NOT CLR_CMAKE_HOST_WIN32)
# detect linker
- separate_arguments(ldVersion UNIX_COMMAND "${CMAKE_C_COMPILER} ${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version")
- execute_process(COMMAND ${ldVersion}
+ execute_process(COMMAND sh -c "${CMAKE_C_COMPILER} ${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version | head -1"
ERROR_QUIET
- OUTPUT_VARIABLE ldVersionOutput)
+ OUTPUT_VARIABLE ldVersionOutput
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
if("${ldVersionOutput}" MATCHES "LLD")
set(LD_LLVM 1)
else(CLR_CMAKE_HOST_OSX OR CLR_CMAKE_HOST_MACCATALYST)
set(LD_OSX 1)
endif()
+ message("-- The linker identification is ${ldVersionOutput}")
endif()
# This introspection depends on CMAKE_STRINGS, which is why it's in this file instead of configureplatform
function(clr_unknown_arch)
if (WIN32)
- message(FATAL_ERROR "Only AMD64, ARM64, ARM and I386 are supported. Found: ${CMAKE_SYSTEM_PROCESSOR}")
+ message(FATAL_ERROR "Only AMD64, ARM64, ARM and I386 hosts are supported. Found: ${CMAKE_SYSTEM_PROCESSOR}")
elseif(CLR_CROSS_COMPONENTS_BUILD)
- message(FATAL_ERROR "Only AMD64, I386 host are supported for linux cross-architecture component. Found: ${CMAKE_SYSTEM_PROCESSOR}")
+ message(FATAL_ERROR "Only AMD64, ARM64 and I386 hosts are supported for linux cross-architecture component. Found: ${CMAKE_SYSTEM_PROCESSOR}")
else()
message(FATAL_ERROR "'${CMAKE_SYSTEM_PROCESSOR}' is an unsupported architecture.")
endif()
function(preprocess_file inputFilename outputFilename)
get_compile_definitions(PREPROCESS_DEFINITIONS)
get_include_directories(PREPROCESS_INCLUDE_DIRECTORIES)
+ get_source_file_property(SOURCE_FILE_DEFINITIONS ${inputFilename} COMPILE_DEFINITIONS)
+
+ foreach(DEFINITION IN LISTS SOURCE_FILE_DEFINITIONS)
+ list(APPEND PREPROCESS_DEFINITIONS -D${DEFINITION})
+ endforeach()
+
if (MSVC)
add_custom_command(
OUTPUT ${outputFilename}
COMMENT "Preprocessing ${inputFilename}. Outputting to ${outputFilename}"
)
else()
+ if (CMAKE_CXX_COMPILER_TARGET AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ set(_LOCAL_CROSS_TARGET "--target=${CMAKE_CXX_COMPILER_TARGET}")
+ endif()
add_custom_command(
OUTPUT ${outputFilename}
- COMMAND ${CMAKE_CXX_COMPILER} -E -P ${PREPROCESS_DEFINITIONS} ${PREPROCESS_INCLUDE_DIRECTORIES} -o ${outputFilename} -x c ${inputFilename}
+ COMMAND ${CMAKE_CXX_COMPILER} ${_LOCAL_CROSS_TARGET} -E -P ${PREPROCESS_DEFINITIONS} ${PREPROCESS_INCLUDE_DIRECTORIES} -o ${outputFilename} -x c ${inputFilename}
DEPENDS ${inputFilename}
COMMENT "Preprocessing ${inputFilename}. Outputting to ${outputFilename}"
)
function (get_symbol_file_name targetName outputSymbolFilename)
if (CLR_CMAKE_HOST_UNIX)
if (CLR_CMAKE_TARGET_APPLE)
- set(strip_destination_file $<TARGET_FILE:${targetName}>.dwarf)
+ if (CLR_CMAKE_APPLE_DSYM)
+ set(strip_destination_file $<TARGET_FILE:${targetName}>.dSYM)
+ else ()
+ set(strip_destination_file $<TARGET_FILE:${targetName}>.dwarf)
+ endif ()
else ()
set(strip_destination_file $<TARGET_FILE:${targetName}>.dbg)
endif ()
OUTPUT_VARIABLE DSYMUTIL_HELP_OUTPUT
)
- set(DSYMUTIL_OPTS "--flat")
+ if (NOT CLR_CMAKE_APPLE_DSYM)
+ set(DSYMUTIL_OPTS "--flat")
+ endif ()
if ("${DSYMUTIL_HELP_OUTPUT}" MATCHES "--minimize")
list(APPEND DSYMUTIL_OPTS "--minimize")
endif ()
if (WIN32)
set_target_properties(${targetName} PROPERTIES
COMPILE_PDB_NAME "${targetName}"
- COMPILE_PDB_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}"
+ COMPILE_PDB_OUTPUT_DIRECTORY "$<TARGET_FILE_DIR:${targetName}>"
)
install (FILES "$<TARGET_FILE_DIR:${targetName}>/${targetName}.pdb" DESTINATION ${destination} COMPONENT ${component})
endif()
endif(CLR_CMAKE_HOST_LINUX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS)
endfunction()
-if (CMAKE_VERSION VERSION_LESS "3.12")
- # Polyfill add_compile_definitions when it is unavailable
- function(add_compile_definitions)
- get_directory_property(DIR_COMPILE_DEFINITIONS COMPILE_DEFINITIONS)
- list(APPEND DIR_COMPILE_DEFINITIONS ${ARGV})
- set_directory_properties(PROPERTIES COMPILE_DEFINITIONS "${DIR_COMPILE_DEFINITIONS}")
- endfunction()
-endif()
-
-if (CMAKE_VERSION VERSION_LESS "3.16")
- # Provide a no-op polyfill for precompiled headers on old CMake versions
- function(target_precompile_headers)
- endfunction()
-endif()
-
# add_linker_flag(Flag [Config1 Config2 ...])
function(add_linker_flag Flag)
if (ARGN STREQUAL "")
strip_symbols(${ARGV0} symbolFile)
endif()
endfunction()
+
+# Adhoc sign targetName with the entitlements in entitlementsFile.
+function(adhoc_sign_with_entitlements targetName entitlementsFile)
+ # Add a dependency from a source file for the target on the entitlements file to ensure that the target is rebuilt if only the entitlements file changes.
+ get_target_property(sources ${targetName} SOURCES)
+ list(GET sources 0 firstSource)
+ set_source_files_properties(${firstSource} PROPERTIES OBJECT_DEPENDS ${entitlementsFile})
+
+ add_custom_command(
+ TARGET ${targetName}
+ POST_BUILD
+ COMMAND codesign -s - -f --entitlements ${entitlementsFile} $<TARGET_FILE:${targetName}>)
+endfunction()
)
if /i "%__Os%" == "browser" (
if "%EMSDK_PATH%" == "" (
- if not exist "%__repoRoot%\src\mono\wasm\emsdk" (
+ if not exist "%__repoRoot%\src\mono\browser\emsdk" (
echo Error: Should set EMSDK_PATH environment variable pointing to emsdk root.
exit /B 1
)
- set "EMSDK_PATH=%__repoRoot%\src\mono\wasm\emsdk"
+ set "EMSDK_PATH=%__repoRoot%\src\mono\browser\emsdk"
)
:: replace backslash with forward slash and append last slash
set "EMSDK_PATH=!EMSDK_PATH:\=/!"
if not "!EMSDK_PATH:~-1!" == "/" set "EMSDK_PATH=!EMSDK_PATH!/"
- set __ExtraCmakeParams=%__ExtraCmakeParams% "-DCMAKE_TOOLCHAIN_FILE=!EMSDK_PATH!/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
+ set __ExtraCmakeParams=%__ExtraCmakeParams% "-DCMAKE_TOOLCHAIN_FILE=!EMSDK_PATH!/emscripten/cmake/Modules/Platform/Emscripten.cmake"
set __UseEmcmake=1
)
if /i "%__Os%" == "wasi" (
+ set "__repoRoot=!__repoRoot:\=/!"
+ if not "!__repoRoot:~-1!" == "/" set "__repoRoot=!__repoRoot!/"
if "%WASI_SDK_PATH%" == "" (
if not exist "%__repoRoot%\src\mono\wasi\wasi-sdk" (
- echo Error: Should set WASI_SDK_PATH environment variable pointing to emsdk root.
+ echo Error: Should set WASI_SDK_PATH environment variable pointing to WASI SDK root.
exit /B 1
)
set "WASI_SDK_PATH=!WASI_SDK_PATH:\=/!"
if not "!WASI_SDK_PATH:~-1!" == "/" set "WASI_SDK_PATH=!WASI_SDK_PATH!/"
set __CmakeGenerator=Ninja
- set __ExtraCmakeParams=%__ExtraCmakeParams% -DCLR_CMAKE_TARGET_OS=wasi -DCLR_CMAKE_TARGET_ARCH=wasm "-DWASI_SDK_PREFIX=!WASI_SDK_PATH!" "-DCMAKE_TOOLCHAIN_FILE=!WASI_SDK_PATH!/share/cmake/wasi-sdk.cmake" "-DCMAKE_SYSROOT=!WASI_SDK_PATH!/share/wasi-sysroot"
+ set __ExtraCmakeParams=%__ExtraCmakeParams% -DCLR_CMAKE_TARGET_OS=wasi -DCLR_CMAKE_TARGET_ARCH=wasm "-DWASI_SDK_PREFIX=!WASI_SDK_PATH!" "-DCMAKE_TOOLCHAIN_FILE=!WASI_SDK_PATH!/share/cmake/wasi-sdk-p2.cmake" "-DCMAKE_SYSROOT=!WASI_SDK_PATH!share/wasi-sysroot" "-DCMAKE_CROSSCOMPILING_EMULATOR=node --experimental-wasm-bigint --experimental-wasi-unstable-preview1"
)
) else (
set __ExtraCmakeParams=%__ExtraCmakeParams% "-DCMAKE_SYSTEM_VERSION=10.0"
exit /B 0
) else (
echo The CMake command line differs from the last run. Running CMake again.
- echo %__ExtraCmakeParams% > %__CmdLineOptionsUpToDateFile%
)
- ) else (
- echo %__ExtraCmakeParams% > %__CmdLineOptionsUpToDateFile%
)
)
)
if /i "%__UseEmcmake%" == "1" (
- call "!EMSDK_PATH!/emsdk_env.bat" > nul 2>&1 && emcmake "%CMakePath%" %__ExtraCmakeParams% --no-warn-unused-cli -G "%__CmakeGenerator%" -B %__IntermediatesDir% -S %__SourceDir%
+ call "!EMSDK_PATH!/emsdk_env.cmd" > nul 2>&1 && emcmake "%CMakePath%" %__ExtraCmakeParams% --no-warn-unused-cli -G "%__CmakeGenerator%" -B %__IntermediatesDir% -S %__SourceDir%
) else (
"%CMakePath%" %__ExtraCmakeParams% --no-warn-unused-cli -G "%__CmakeGenerator%" -B %__IntermediatesDir% -S %__SourceDir%
)
+
+if "%errorlevel%" == "0" (
+ echo %__ExtraCmakeParams% > %__CmdLineOptionsUpToDateFile%
+)
+
endlocal
exit /B %errorlevel%
#
scriptroot="$( cd -P "$( dirname "$0" )" && pwd )"
+reporoot="$(cd "$scriptroot"/../..; pwd -P)"
if [[ "$#" -lt 4 ]]; then
echo "Usage..."
cmake_command="$SCAN_BUILD_COMMAND $cmake_command"
fi
+cmake_extra_defines_wasm=()
if [[ "$host_arch" == "wasm" ]]; then
if [[ "$target_os" == "browser" ]]; then
cmake_command="emcmake $cmake_command"
elif [[ "$target_os" == "wasi" ]]; then
- true
+ cmake_extra_defines_wasm=("-DCLR_CMAKE_TARGET_OS=wasi" "-DCLR_CMAKE_TARGET_ARCH=wasm" "-DWASI_SDK_PREFIX=$WASI_SDK_PATH" "-DCMAKE_TOOLCHAIN_FILE=${WASI_SDK_PATH}/share/cmake/wasi-sdk-p2.cmake" "-DCMAKE_SYSROOT=${WASI_SDK_PATH}/share/wasi-sysroot" "-DCMAKE_CROSSCOMPILING_EMULATOR=node --experimental-wasm-bigint --experimental-wasi-unstable-preview1")
else
echo "target_os was not specified"
exit 1
fi
fi
-# We have to be able to build with CMake 3.6.2, so we can't use the -S or -B options
-pushd "$2"
-
$cmake_command \
--no-warn-unused-cli \
-G "$generator" \
"-DCMAKE_INSTALL_PREFIX=$__CMakeBinDir" \
$cmake_extra_defines \
$__UnprocessedCMakeArgs \
- "$1"
+ "${cmake_extra_defines_wasm[@]}" \
+ -S "$1" \
+ -B "$2"
-popd
+# don't add anything after this line so the cmake exit code gets propagated correctly
function(remove_ijw_incompatible_options options updatedOptions)
# IJW isn't compatible with Ehsc, which CMake enables by default
- if(options MATCHES "/EHsc")
- string(REPLACE "/EHsc" "" options "${options}")
- endif()
+ set_property(DIRECTORY PROPERTY CLR_EH_OPTION "")
# IJW isn't compatible with CFG
- if(options MATCHES "/guard:cf")
- string(REPLACE "/guard:cf" "" options "${options}")
- endif()
+ set_property(DIRECTORY PROPERTY CLR_CONTROL_FLOW_GUARD OFF)
# IJW isn't compatible with EHCONT, which requires CFG
- if(options MATCHES "/guard:ehcont")
- string(REPLACE "/guard:ehcont" "" options "${options}")
- endif()
+ set_property(DIRECTORY PROPERTY CLR_EH_CONTINUATION OFF)
# IJW isn't compatible with GR-
if(options MATCHES "/GR-")
add_compile_options(/AI${CLR_SDK_REF_PACK})
+ file(GLOB CLR_SDK_REF_PACK_LIBS "${CLR_SDK_REF_PACK}/*.dll")
+
+ foreach(lib ${CLR_SDK_REF_PACK_LIBS})
+ add_compile_options(/FU${lib})
+ endforeach()
+
list(APPEND LINK_LIBRARIES_ADDITIONAL ijwhost)
endif()
+++ /dev/null
-#!/usr/bin/env bash
-
-# Use uname to determine what the OS is.
-OSName=$(uname -s | tr '[:upper:]' '[:lower:]')
-
-if command -v getprop && getprop ro.product.system.model 2>&1 | grep -qi android; then
- OSName="android"
-fi
-
-case "$OSName" in
-freebsd|linux|netbsd|openbsd|sunos|android|haiku)
- os="$OSName" ;;
-darwin)
- os=osx ;;
-*)
- echo "Unsupported OS $OSName detected!"
- exit 1 ;;
-esac
-
-# On Solaris, `uname -m` is discouraged, see https://docs.oracle.com/cd/E36784_01/html/E36870/uname-1.html
-# and `uname -p` returns processor type (e.g. i386 on amd64).
-# The appropriate tool to determine CPU is isainfo(1) https://docs.oracle.com/cd/E36784_01/html/E36870/isainfo-1.html.
-if [ "$os" = "sunos" ]; then
- if uname -o 2>&1 | grep -q illumos; then
- os="illumos"
- else
- os="solaris"
- fi
- CPUName=$(isainfo -n)
-else
- # For the rest of the operating systems, use uname(1) to determine what the CPU is.
- CPUName=$(uname -m)
-fi
-
-case "$CPUName" in
- arm64|aarch64)
- arch=arm64
- ;;
-
- loongarch64)
- arch=loongarch64
- ;;
-
- riscv64)
- arch=riscv64
- ;;
-
- amd64|x86_64)
- arch=x64
- ;;
-
- armv7l|armv8l)
- if (NAME=""; . /etc/os-release; test "$NAME" = "Tizen"); then
- arch=armel
- else
- arch=arm
- fi
- ;;
-
- armv6l)
- arch=armv6
- ;;
-
- i[3-6]86)
- echo "Unsupported CPU $CPUName detected, build might not succeed!"
- arch=x86
- ;;
-
- s390x)
- arch=s390x
- ;;
-
- ppc64le)
- arch=ppc64le
- ;;
- *)
- echo "Unknown CPU $CPUName detected!"
- exit 1
- ;;
-esac
:: as an argument, it also initializes VC++ build environment and CMakePath.
set "__VCBuildArch="
-if /i "%~1" == "x86" (set __VCBuildArch=x86)
-if /i "%~1" == "x64" (set __VCBuildArch=x86_amd64)
-if /i "%~1" == "arm" (set __VCBuildArch=x86_arm)
-if /i "%~1" == "arm64" (set __VCBuildArch=x86_arm64)
-if /i "%~1" == "wasm" (if /i "%PROCESSOR_ARCHITECTURE%" == "ARM64" (set __VCBuildArch=x86_arm64) else (set __VCBuildArch=x86_amd64))
+if /i "%PROCESSOR_ARCHITECTURE%" == "ARM64" (
+ if /i "%~1" == "x64" ( set __VCBuildArch=arm64_amd64 )
+ if /i "%~1" == "x86" ( set __VCBuildArch=arm64_x86 )
+ if /i "%~1" == "arm64" ( set __VCBuildArch=arm64 )
+ if /i "%~1" == "wasm" ( set __VCBuildArch=arm64 )
+) else (
+ if /i "%~1" == "x64" ( set __VCBuildArch=amd64 )
+ if /i "%~1" == "x86" ( set __VCBuildArch=amd64_x86 )
+ if /i "%~1" == "arm64" ( set __VCBuildArch=amd64_arm64 )
+ if /i "%~1" == "wasm" ( set __VCBuildArch=amd64 )
+)
:: Default to highest Visual Studio version available that has Visual C++ tools.
::
set "__VSWhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
set "__VSCOMNTOOLS="
+if not exist "%__VSWhere%" goto :VSWhereMissing
+
if exist "%__VSWhere%" (
for /f "tokens=*" %%p in (
'"%__VSWhere%" -latest -prerelease -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath'
Please see https://github.com/dotnet/runtime/blob/main/docs/workflow/requirements/windows-requirements.md for build requirements.
exit /b 1
+:VSWhereMissing
+echo %__MsgPrefix%Error: vswhere couldn not be found in Visual Studio Installer directory at "%__VSWhere%"
+exit /b 1
+
:SetVCEnvironment
if "%__VCBuildArch%"=="" exit /b 0
# 2 0x4e8051 in __ubsan_handle_dynamic_type_cache_miss
# 3 0x7f02ce676cd8 in JIT_InitPInvokeFrame(InlinedCallFrame*, void*) /home/steveharter/git/dotnet_coreclr/vm/jithelpers.cpp:6491:9
# 4 0x7f0252bbceb2 (<unknown module>)
-fun:_Z20JIT_InitPInvokeFrameP16InlinedCallFramePv
+fun:_Z20JIT_InitPInvokeFrameP16InlinedCallFrame
if(DARWIN)
if(TARGET_ARCH_NAME MATCHES "^(arm64|x64)$")
- set_cache_value(FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL_EXITCODE 1)
set_cache_value(HAS_POSIX_SEMAPHORES_EXITCODE 1)
set_cache_value(HAVE_BROKEN_FIFO_KEVENT_EXITCODE 1)
set_cache_value(HAVE_BROKEN_FIFO_SELECT_EXITCODE 1)
set_cache_value(HAVE_CLOCK_MONOTONIC_COARSE_EXITCODE 1)
set_cache_value(HAVE_CLOCK_MONOTONIC_EXITCODE 0)
set_cache_value(HAVE_CLOCK_REALTIME_EXITCODE 0)
- set_cache_value(HAVE_CLOCK_THREAD_CPUTIME_EXITCODE 0)
set_cache_value(HAVE_CLOCK_GETTIME_NSEC_NP_EXITCODE 0)
- set_cache_value(HAVE_COMPATIBLE_ACOS_EXITCODE 0)
- set_cache_value(HAVE_COMPATIBLE_ASIN_EXITCODE 0)
- set_cache_value(HAVE_COMPATIBLE_ATAN2_EXITCODE 0)
- set_cache_value(HAVE_COMPATIBLE_EXP_EXITCODE 1)
- set_cache_value(HAVE_COMPATIBLE_ILOGB0_EXITCODE 0)
- set_cache_value(HAVE_COMPATIBLE_ILOGBNAN_EXITCODE 1)
- set_cache_value(HAVE_COMPATIBLE_LOG10_EXITCODE 0)
- set_cache_value(HAVE_COMPATIBLE_LOG_EXITCODE 0)
- set_cache_value(HAVE_COMPATIBLE_POW_EXITCODE 0)
set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 1)
- set_cache_value(HAVE_LARGE_SNPRINTF_SUPPORT_EXITCODE 0)
set_cache_value(HAVE_MMAP_DEV_ZERO_EXITCODE 1)
set_cache_value(HAVE_PROCFS_CTL_EXITCODE 1)
set_cache_value(HAVE_PROCFS_MAPS_EXITCODE 1)
- set_cache_value(HAVE_PROCFS_STATUS_EXITCODE 1)
set_cache_value(HAVE_PROCFS_STAT_EXITCODE 1)
+ set_cache_value(HAVE_PROCFS_STATM_EXITCODE 1)
set_cache_value(HAVE_SCHED_GETCPU_EXITCODE 1)
set_cache_value(HAVE_SCHED_GET_PRIORITY_EXITCODE 0)
- set_cache_value(HAVE_VALID_NEGATIVE_INF_POW_EXITCODE 0)
- set_cache_value(HAVE_VALID_POSITIVE_INF_POW_EXITCODE 0)
set_cache_value(HAVE_WORKING_CLOCK_GETTIME_EXITCODE 0)
set_cache_value(HAVE_WORKING_GETTIMEOFDAY_EXITCODE 0)
set_cache_value(MMAP_ANON_IGNORES_PROTECTION_EXITCODE 1)
set_cache_value(PTHREAD_CREATE_MODIFIES_ERRNO_EXITCODE 1)
set_cache_value(REALPATH_SUPPORTS_NONEXISTENT_FILES_EXITCODE 1)
set_cache_value(SEM_INIT_MODIFIES_ERRNO_EXITCODE 1)
- set_cache_value(SSCANF_SUPPORT_ll_EXITCODE 0)
- set_cache_value(UNGETC_NOT_RETURN_EOF_EXITCODE 1)
set_cache_value(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP_EXITCODE 1)
- set_cache_value(SSCANF_CANNOT_HANDLE_MISSING_EXPONENT_EXITCODE 1)
else()
message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm64 or x64 is supported for OSX cross build!")
endif()
elseif(TARGET_ARCH_NAME MATCHES "^(armel|arm|armv6|arm64|loongarch64|riscv64|s390x|ppc64le|x86|x64)$" OR FREEBSD OR ILLUMOS OR TIZEN OR HAIKU)
- set_cache_value(FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL_EXITCODE 1)
set_cache_value(HAS_POSIX_SEMAPHORES_EXITCODE 0)
set_cache_value(HAVE_CLOCK_MONOTONIC_COARSE_EXITCODE 0)
set_cache_value(HAVE_CLOCK_MONOTONIC_EXITCODE 0)
set_cache_value(HAVE_CLOCK_REALTIME_EXITCODE 0)
- set_cache_value(HAVE_CLOCK_THREAD_CPUTIME_EXITCODE 0)
- set_cache_value(HAVE_COMPATIBLE_ACOS_EXITCODE 0)
- set_cache_value(HAVE_COMPATIBLE_ASIN_EXITCODE 0)
- set_cache_value(HAVE_COMPATIBLE_ATAN2_EXITCODE 0)
- set_cache_value(HAVE_COMPATIBLE_ILOGB0_EXITCODE 1)
- set_cache_value(HAVE_COMPATIBLE_ILOGBNAN_EXITCODE 1)
- set_cache_value(HAVE_COMPATIBLE_LOG10_EXITCODE 0)
- set_cache_value(HAVE_COMPATIBLE_LOG_EXITCODE 0)
- set_cache_value(HAVE_COMPATIBLE_POW_EXITCODE 0)
- set_cache_value(HAVE_LARGE_SNPRINTF_SUPPORT_EXITCODE 0)
set_cache_value(HAVE_MMAP_DEV_ZERO_EXITCODE 0)
set_cache_value(HAVE_PROCFS_CTL_EXITCODE 1)
set_cache_value(HAVE_PROCFS_STAT_EXITCODE 0)
+ set_cache_value(HAVE_PROCFS_STATM_EXITCODE 0)
set_cache_value(HAVE_SCHED_GETCPU_EXITCODE 0)
set_cache_value(HAVE_SCHED_GET_PRIORITY_EXITCODE 0)
- set_cache_value(HAVE_VALID_NEGATIVE_INF_POW_EXITCODE 0)
- set_cache_value(HAVE_VALID_POSITIVE_INF_POW_EXITCODE 0)
set_cache_value(HAVE_WORKING_CLOCK_GETTIME_EXITCODE 0)
set_cache_value(HAVE_WORKING_GETTIMEOFDAY_EXITCODE 0)
set_cache_value(ONE_SHARED_MAPPING_PER_FILEREGION_PER_PROCESS_EXITCODE 1)
set_cache_value(PTHREAD_CREATE_MODIFIES_ERRNO_EXITCODE 1)
set_cache_value(REALPATH_SUPPORTS_NONEXISTENT_FILES_EXITCODE 1)
set_cache_value(SEM_INIT_MODIFIES_ERRNO_EXITCODE 1)
- set_cache_value(HAVE_TERMIOS2_EXITCODE 0)
- set_cache_value(SSCANF_CANNOT_HANDLE_MISSING_EXPONENT_EXITCODE 0)
set_cache_value(HAVE_PROCFS_MAPS_EXITCODE 0)
- set_cache_value(HAVE_PROCFS_STATUS_EXITCODE 0)
if(ALPINE_LINUX)
set_cache_value(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP_EXITCODE 1)
- set_cache_value(SSCANF_SUPPORT_ll_EXITCODE 1)
- set_cache_value(UNGETC_NOT_RETURN_EOF_EXITCODE 1)
- set_cache_value(SSCANF_CANNOT_HANDLE_MISSING_EXPONENT_EXITCODE 0)
else()
set_cache_value(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP_EXITCODE 0)
- set_cache_value(SSCANF_SUPPORT_ll_EXITCODE 0)
- set_cache_value(UNGETC_NOT_RETURN_EOF_EXITCODE 0)
- set_cache_value(SSCANF_CANNOT_HANDLE_MISSING_EXPONENT_EXITCODE 1)
endif()
if (FREEBSD)
set_cache_value(HAVE_BROKEN_FIFO_KEVENT_EXITCODE 1)
set_cache_value(HAVE_PROCFS_MAPS 0)
set_cache_value(HAVE_PROCFS_STAT 0)
- set_cache_value(HAVE_PROCFS_STATUS_EXITCODE 1)
- set_cache_value(UNGETC_NOT_RETURN_EOF 0)
- set_cache_value(HAVE_COMPATIBLE_ILOGBNAN 1)
+ set_cache_value(HAVE_PROCFS_STATM 0)
set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0)
- set_cache_value(HAVE_TERMIOS2_EXITCODE 1)
elseif(ILLUMOS)
- set_cache_value(HAVE_COMPATIBLE_ACOS_EXITCODE 1)
- set_cache_value(HAVE_COMPATIBLE_ASIN_EXITCODE 1)
- set_cache_value(HAVE_COMPATIBLE_ATAN2_EXITCODE 1)
- set_cache_value(HAVE_COMPATIBLE_POW_EXITCODE 1)
- set_cache_value(HAVE_COMPATIBLE_ILOGBNAN_EXITCODE 0)
- set_cache_value(HAVE_COMPATIBLE_LOG10_EXITCODE 1)
- set_cache_value(HAVE_COMPATIBLE_LOG_EXITCODE 1)
- set_cache_value(HAVE_LARGE_SNPRINTF_SUPPORT_EXITCODE 1)
set_cache_value(HAVE_PROCFS_CTL_EXITCODE 0)
- set_cache_value(SSCANF_SUPPORT_ll_EXITCODE 1)
- set_cache_value(UNGETC_NOT_RETURN_EOF_EXITCODE 0)
set_cache_value(COMPILER_SUPPORTS_W_CLASS_MEMACCESS 1)
set_cache_value(HAVE_SET_MAX_VARIABLE 1)
set_cache_value(HAVE_FULLY_FEATURED_PTHREAD_MUTEXES 1)
set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0)
- set_cache_value(HAVE_TERMIOS2_EXITCODE 1)
- set_cache_value(SSCANF_CANNOT_HANDLE_MISSING_EXPONENT_EXITCODE 1)
elseif (TIZEN)
set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0)
elseif(HAIKU)
set_cache_value(HAVE_CLOCK_MONOTONIC_COARSE_EXITCODE 1)
- set_cache_value(HAVE_COMPATIBLE_EXP_EXITCODE 0)
- set_cache_value(HAVE_COMPATIBLE_ILOGBNAN_EXITCODE 0)
set_cache_value(HAVE_PROCFS_STAT_EXITCODE 1)
+ set_cache_value(HAVE_PROCFS_STATM_EXITCODE 1)
endif()
else()
message(FATAL_ERROR "Unsupported platform. OS: ${CMAKE_SYSTEM_NAME}, arch: ${TARGET_ARCH_NAME}")
# TODO: these are taken from macOS, check these whether they're correct for iOS
# some of them are probably not used by what we use from NativeAOT so could be reduced
-set_cache_value(FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL_EXITCODE 1)
set_cache_value(HAS_POSIX_SEMAPHORES_EXITCODE 1)
set_cache_value(HAVE_BROKEN_FIFO_KEVENT_EXITCODE 1)
set_cache_value(HAVE_BROKEN_FIFO_SELECT_EXITCODE 1)
set_cache_value(HAVE_CLOCK_REALTIME_EXITCODE 0)
-set_cache_value(HAVE_CLOCK_THREAD_CPUTIME_EXITCODE 0)
set_cache_value(HAVE_CLOCK_GETTIME_NSEC_NP_EXITCODE 0)
-set_cache_value(HAVE_COMPATIBLE_ACOS_EXITCODE 0)
-set_cache_value(HAVE_COMPATIBLE_ASIN_EXITCODE 0)
-set_cache_value(HAVE_COMPATIBLE_ATAN2_EXITCODE 0)
-set_cache_value(HAVE_COMPATIBLE_EXP_EXITCODE 1)
-set_cache_value(HAVE_COMPATIBLE_ILOGB0_EXITCODE 0)
-set_cache_value(HAVE_COMPATIBLE_ILOGBNAN_EXITCODE 1)
-set_cache_value(HAVE_COMPATIBLE_LOG10_EXITCODE 0)
-set_cache_value(HAVE_COMPATIBLE_LOG_EXITCODE 0)
-set_cache_value(HAVE_COMPATIBLE_POW_EXITCODE 0)
set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 1)
-set_cache_value(HAVE_LARGE_SNPRINTF_SUPPORT_EXITCODE 0)
set_cache_value(HAVE_MMAP_DEV_ZERO_EXITCODE 1)
set_cache_value(HAVE_PROCFS_CTL_EXITCODE 1)
set_cache_value(HAVE_PROCFS_STAT_EXITCODE 1)
+set_cache_value(HAVE_PROCFS_STATM_EXITCODE 1)
set_cache_value(HAVE_SCHED_GET_PRIORITY_EXITCODE 0)
-set_cache_value(HAVE_VALID_NEGATIVE_INF_POW_EXITCODE 0)
-set_cache_value(HAVE_VALID_POSITIVE_INF_POW_EXITCODE 0)
set_cache_value(HAVE_WORKING_CLOCK_GETTIME_EXITCODE 0)
set_cache_value(HAVE_WORKING_GETTIMEOFDAY_EXITCODE 0)
set_cache_value(MMAP_ANON_IGNORES_PROTECTION_EXITCODE 1)
set_cache_value(PTHREAD_CREATE_MODIFIES_ERRNO_EXITCODE 1)
set_cache_value(REALPATH_SUPPORTS_NONEXISTENT_FILES_EXITCODE 1)
set_cache_value(SEM_INIT_MODIFIES_ERRNO_EXITCODE 1)
-set_cache_value(SSCANF_SUPPORT_ll_EXITCODE 0)
-set_cache_value(UNGETC_NOT_RETURN_EOF_EXITCODE 1)
set_cache_value(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP_EXITCODE 1)
-set(CLR_SHARED_DIR ${ROOT_DIR}/src/shared)
+include_directories(inc)
if (CLR_CMAKE_HOST_UNIX)
- include_directories("${CLR_SHARED_DIR}/pal/inc")
- include_directories("${CLR_SHARED_DIR}/pal/inc/rt")
- include_directories("${CLR_SHARED_DIR}/pal/src/safecrt")
+ include_directories("inc/rt")
endif (CLR_CMAKE_HOST_UNIX)
-include_directories(${CLR_SHARED_DIR})
-include_directories(${CLR_SHARED_DIR}/inc)
-include_directories(${CLR_SHARED_DIR}/pal/prebuilt/inc)
-
add_subdirectory(shared)
add_subdirectory(SOS)
-
-if (CLR_CMAKE_HOST_UNIX)
- # This prevents inclusion of standard C compiler headers
- add_compile_options(-nostdinc)
- include_directories(${CLR_SHARED_DIR}/pal/inc/rt/cpp)
-endif(CLR_CMAKE_HOST_UNIX)
-
add_subdirectory(dbgshim)
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
<NoPackageAnalysis>true</NoPackageAnalysis>
<DebugSymbols>true</DebugSymbols>
- <BundledToolsPath>$(ArtifactsDir)bundledtools/</BundledToolsPath>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
- <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(Configuration)' == 'Release'">
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(TargetFramework)' == 'net462'">
- <DebugType>full</DebugType>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(TargetFramework)' != 'net462'">
- <DebugType>portable</DebugType>
+ <BundledToolsPath>$(ArtifactsDir)bundledtools/</BundledToolsPath>
</PropertyGroup>
<Import Project="$(RepositoryEngineeringDir)native\naming.props" />
+include(${CLR_SHARED_DIR}/shared.cmake)
+
if(CLR_CMAKE_HOST_UNIX)
add_subdirectory(lldbplugin)
endif(CLR_CMAKE_HOST_UNIX)
message(STATUS "VSInstallDir: $ENV{VSInstallDir}")
include_directories("$ENV{VSInstallDir}/DIA SDK/include")
- add_compile_options(/FIWarningControl.h) # force include of WarningControl.h
add_compile_options(/Zl) # omit default library name in .OBJ
add_subdirectory(runcommand)
endif(NOT CLR_CMAKE_TARGET_ARCH_ARM64 AND NOT CLR_CMAKE_TARGET_ARCH_ARM)
endif(CLR_CMAKE_HOST_WIN32)
-add_definitions(-D_SECURE_SCL=0)
-
add_compile_definitions(STRESS_LOG_ANALYZER)
add_compile_definitions(DACCESS_COMPILE)
-
-if (NOT CLR_CMAKE_TARGET_ARCH_I386 OR NOT CLR_CMAKE_TARGET_WIN32)
- add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_ARCH>>>:FEATURE_EH_FUNCLETS>)
-endif (NOT CLR_CMAKE_TARGET_ARCH_I386 OR NOT CLR_CMAKE_TARGET_WIN32)
+add_compile_definitions(SOS_INCLUDE)
+add_compile_definitions(DISABLE_CONTRACTS)
add_subdirectory(extensions)
add_subdirectory(SOS.Extensions)
message(STATUS "CLR_CMAKE_HOST_ARCH_AMD64")
add_definitions(-DSOS_TARGET_AMD64=1)
add_definitions(-D_TARGET_WIN64_=1)
- add_definitions(-DDBG_TARGET_64BIT)
+ add_definitions(-DDBG_TARGET_64BIT=1)
+ add_definitions(-DDBG_TARGET_AMD64=1)
add_definitions(-DDBG_TARGET_WIN64=1)
if (CLR_CMAKE_HOST_WIN32)
add_definitions(-DSOS_TARGET_ARM64=1)
endif(CLR_CMAKE_HOST_WIN32)
remove_definitions(-D_TARGET_ARM64_=1)
add_definitions(-D_TARGET_AMD64_)
- add_definitions(-DDBG_TARGET_AMD64)
elseif(CLR_CMAKE_HOST_ARCH_I386)
message(STATUS "CLR_CMAKE_HOST_ARCH_I386")
add_definitions(-DSOS_TARGET_X86=1)
add_definitions(-D_TARGET_X86_=1)
add_definitions(-DTARGET_X86)
- add_definitions(-DDBG_TARGET_32BIT)
+ add_definitions(-DDBG_TARGET_X86=1)
+ add_definitions(-DDBG_TARGET_32BIT=1)
if (CLR_CMAKE_HOST_WIN32)
add_definitions(-DSOS_TARGET_ARM=1)
endif(CLR_CMAKE_HOST_WIN32)
add_definitions(-DSOS_TARGET_ARM=1)
add_definitions(-D_TARGET_WIN32_=1)
add_definitions(-D_TARGET_ARM_=1)
- add_definitions(-DDBG_TARGET_32BIT)
+ add_definitions(-DDBG_TARGET_ARM=1)
+ add_definitions(-DDBG_TARGET_32BIT=1)
elseif(CLR_CMAKE_HOST_ARCH_ARM64)
message(STATUS "CLR_CMAKE_HOST_ARCH_ARM64")
add_definitions(-DSOS_TARGET_ARM64=1)
add_definitions(-D_TARGET_WIN64_=1)
- add_definitions(-DDBG_TARGET_64BIT)
+ add_definitions(-DDBG_TARGET_64BIT=1)
+ add_definitions(-DDBG_TARGET_ARM64=1)
add_definitions(-DDBG_TARGET_WIN64=1)
elseif(CLR_CMAKE_HOST_ARCH_MIPS64)
add_definitions(-DSOS_TARGET_MIPS64=1)
add_definitions(-D_TARGET_WIN64_=1)
- add_definitions(-DDBG_TARGET_64BIT)
+ add_definitions(-DDBG_TARGET_64BIT=1)
+ add_definitions(-DDBG_TARGET_MIPS64=1)
add_definitions(-DDBG_TARGET_WIN64=1)
elseif(CLR_CMAKE_HOST_ARCH_RISCV64)
add_definitions(-DSOS_TARGET_RISCV64=1)
add_definitions(-D_TARGET_WIN64_=1)
- add_definitions(-DDBG_TARGET_64BIT)
+ add_definitions(-DDBG_TARGET_64BIT=1)
+ add_definitions(-DDBG_TARGET_RISCV64=1)
add_definitions(-DDBG_TARGET_WIN64=1)
elseif(CLR_CMAKE_HOST_ARCH_LOONGARCH64)
add_definitions(-DSOS_TARGET_LOONGARCH64=1)
add_definitions(-D_TARGET_WIN64_=1)
- add_definitions(-DDBG_TARGET_64BIT)
+ add_definitions(-DDBG_TARGET_64BIT=1)
+ add_definitions(-DDBG_TARGET_LOONGARCH64=1)
add_definitions(-DDBG_TARGET_WIN64=1)
endif()
extensions
corguids
dbgutil
+ coreclrminipal
${STATIC_MT_CRT_LIB}
${STATIC_MT_CPP_LIB}
${STATIC_MT_VCRT_LIB}
endif(NOT CLR_CMAKE_HOST_ARCH_ARM64 AND NOT CLR_CMAKE_HOST_ARCH_ARM)
else(CLR_CMAKE_HOST_WIN32)
- add_definitions(-DFEATURE_ENABLE_HARDWARE_EXCEPTIONS)
- add_definitions(-DPAL_STDCPP_COMPAT=1)
add_compile_options(-Wno-null-arithmetic)
add_compile_options(-Wno-format)
dbgutil
palrt
coreclrpal
+ coreclrminipal
)
endif(CLR_CMAKE_HOST_WIN32)
#include "ExpressionNode.h"
-#ifndef IfFailRet
+#undef IfFailRet
#define IfFailRet(EXPR) do { Status = (EXPR); if(FAILED(Status)) { return (Status); } } while (0)
-#endif
ICorDebugProcess* ExpressionNode::s_pCorDebugProcess = nullptr;
if(pAbsoluteExpression == NULL || varToExpand == NULL) return FALSE;
// if there is a cast operation, move past it
- WCHAR* pEndCast = _wcschr(varToExpand, L')');
- varToExpand = (pEndCast == NULL) ? varToExpand : pEndCast+1;
+ const WCHAR* pEndCast = _wcschr(varToExpand, L')');
+ varToExpand = (pEndCast == NULL) ? varToExpand : (WCHAR*)(pEndCast+1);
size_t varToExpandLen = _wcslen(varToExpand);
size_t currentExpansionLen = _wcslen(pAbsoluteExpression);
if(pBaseTypeNode == NULL) return Status;
if(fieldExpanded) return Status;
- WCHAR* pEndCast = _wcschr(varToExpand, L')');
- WCHAR* pNonCast = (pEndCast == NULL) ? varToExpand : pEndCast+1;
+ const WCHAR* pEndCast = _wcschr(varToExpand, L')');
+ const WCHAR* pNonCast = (pEndCast == NULL) ? varToExpand : pEndCast+1;
if(_wcscmp(pNonCast, pAbsoluteExpression) != 0)
{
pBaseTypeNode->Expand(varToExpand);
WCHAR* expressionStart = *expression;
DWORD currentCharsParsed = *charactersParsed;
- DWORD identifierLen = (DWORD) _wcscspn(expressionStart, L".[");
+ DWORD identifierLen = (DWORD) wcscspn(expressionStart, L".[");
// if the first character was a . or [ skip over it. Note that we don't
// do this always in case the first WCHAR was part of a surrogate pair
if(identifierLen == 0)
{
- identifierLen = (DWORD) _wcscspn(expressionStart+1, L".[") + 1;
+ identifierLen = (DWORD) wcscspn(expressionStart+1, L".[") + 1;
}
*expression += identifierLen;
WCHAR rootName[mdNameLen];
const WCHAR* pRootName = NULL;
int typeNameLen = (int) _wcslen(pTypeName);
- int genericParamListStart = (int) _wcscspn(pTypeName, L"<");
+ int genericParamListStart = (int) wcscspn(pTypeName, L"<");
if(genericParamListStart != typeNameLen)
{
if(pTypeName[typeNameLen-1] != L'>' || genericParamListStart > mdNameLen)
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
- <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\pal\prebuilt\inc;..\..\inc;..\..\SOS\gcdump;inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\SOS\Strike;..\..\shared;..\..\shared\minipal;..\..\shared\pal\prebuilt\inc;..\..\shared\inc;..\..\shared\gcdump;..\inc;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\DIA SDK\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions>%(AdditionalOptions) /d2Zi+ /Zm200 /ZH:SHA_256 /source-charset:utf-8</AdditionalOptions>
<AssemblerListingLocation>Release/</AssemblerListingLocation>
<BufferSecurityCheck>true</BufferSecurityCheck>
<ClCompile Include="clrma\managedanalysis.cpp" />
<ClCompile Include="dbgengservices.cpp" />
<ClCompile Include="disasm.cpp" />
+ <ClCompile Include="disasmARM.cpp" />
+ <ClCompile Include="disasmLOONGARCH64.cpp" />
+ <ClCompile Include="disasmRISCV64.cpp" />
<ClCompile Include="dllsext.cpp" />
<ClCompile Include="eeheap.cpp" />
<ClCompile Include="ExpressionNode.cpp" />
<Filter>clrma</Filter>
</ClCompile>
<ClCompile Include="sosextensions.cpp" />
+ <ClCompile Include="disasmARM.cpp" />
+ <ClCompile Include="disasmLOONGARCH64.cpp" />
+ <ClCompile Include="disasmRISCV64.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="data.h" />
#include "WatchCmd.h"
-#ifndef IfFailRet
+#undef IfFailRet
#define IfFailRet(EXPR) do { Status = (EXPR); if(FAILED(Status)) { return (Status); } } while (0)
-#endif
_PersistList::~_PersistList()
{
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#pragma once
+
+// 2.x version
+struct MSLAYOUT DacpTieredVersionData_2x
+{
+ enum TieredState
+ {
+ NON_TIERED,
+ TIERED_0,
+ TIERED_1,
+ TIERED_UNKNOWN
+ };
+
+ CLRDATA_ADDRESS NativeCodeAddr;
+ TieredState TieredInfo;
+ CLRDATA_ADDRESS NativeCodeVersionNodePtr;
+};
#include <stdlib.h>
#include <stdint.h>
#include "hostservices.h"
-#include "dbgengservices.h"
#include "exts.h"
extern IMachine* GetTargetMachine(ULONG processorType);
namespace X86GCDump
{
#include "gcdump.h"
+#undef CONTRACTL
+#undef CONTRACTL_END
+#undef NOTHROW
+#undef GC_NOTRIGGER
#undef assert
#define assert(a)
#define CONTRACTL
-#define DAC_ARG(x)
#define CONTRACTL_END
#undef NOTHROW
#define NOTHROW
#undef CONTRACTL_END
#undef NOTHROW
#undef GC_NOTRIGGER
-#undef _ASSERTE
-#define _ASSERTE(a) do {} while (0)
#include "gcdump.cpp"
#include "i386/gcdumpx86.cpp"
return NULL;
}
- hMappedFile = CreateFileMapping (
+ hMappedFile = CreateFileMappingA (
hFile,
NULL,
PAGE_READONLY,
{
if (IsInterrupt())
return;
- DWORD_PTR retAddr;
- DWORD_PTR whereCalled;
+ TADDR retAddr;
+ TADDR whereCalled;
move_xp(retAddr, ptr);
g_targetMachine->IsReturnAddress(retAddr, &whereCalled);
if (whereCalled)
if (bOutput)
ExtOut ("\n");
- DWORD_PTR cxrAddr;
+ TADDR cxrAddr;
CROSS_PLATFORM_CONTEXT cxr;
- DWORD_PTR exrAddr;
+ TADDR exrAddr;
EXCEPTION_RECORD exr;
if (g_targetMachine->GetExceptionContext(ptr,retAddr,&cxrAddr,&cxr,&exrAddr,&exr))
namespace ARMGCDump
{
#undef TARGET_X86
-#undef LIMITED_METHOD_CONTRACT
-#define LIMITED_METHOD_DAC_CONTRACT ((void)0)
-#define SUPPORTS_DAC ((void)0)
#define LF_GCROOTS
#define LL_INFO1000
#define LOG(x)
{
// call managed code?
JITTypes jitType;
- TADDR methodDesc;
TADDR PC = callee;
- TADDR gcinfoAddr;
+ DWORD_PTR methodDesc;
+ DWORD_PTR gcinfoAddr;
PC = GetRealCallTarget(callee);
if (!PC)
namespace ARM64GCDump
{
#undef TARGET_X86
-#undef LIMITED_METHOD_CONTRACT
-#define LIMITED_METHOD_DAC_CONTRACT ((void)0)
-#define SUPPORTS_DAC ((void)0)
#define LF_GCROOTS
#define LL_INFO1000
#define LOG(x)
BOOL bDisplayOffsets,
std::function<void(ULONG*, UINT*, BYTE*)> displayIL) const
{
- TADDR PC = PCBegin;
+ ULONG_PTR PC = PCBegin;
char line[1024];
ULONG lineNum;
ULONG curLine = -1;
{
// call managed code?
JITTypes jitType;
- TADDR methodDesc;
- TADDR IP = callee;
- TADDR gcinfoAddr;
+ DWORD_PTR methodDesc;
+ DWORD_PTR IP = callee;
+ DWORD_PTR gcinfoAddr;
if (!GetCalleeSite (callee, IP))
return 0;
#ifdef _TARGET_AMD64_
// A jump thunk?
- CONTEXT ctx = {0};
+ CONTEXT ctx;
ctx.ContextFlags = (DT_CONTEXT_AMD64 | DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER);
for (unsigned ireg = 0; ireg < 16; ireg++)
// Find the real callee site. Handle JMP instruction.
// Return TRUE if we get the address, FALSE if not.
-BOOL GetCalleeSite (TADDR IP, TADDR &IPCallee)
+BOOL GetCalleeSite (DWORD_PTR IP, DWORD_PTR &IPCallee)
{
while (TRUE) {
unsigned char inst[2];
// GetFinalTarget is based on HandleCall, but avoids printing anything to the output.
// This is currently only called on x64
-eTargetType GetFinalTarget(TADDR callee, TADDR* finalMDorIP)
+eTargetType GetFinalTarget(DWORD_PTR callee, DWORD_PTR* finalMDorIP)
{
// call managed code?
TADDR methodDesc = MDForCall (callee);
#ifdef _TARGET_AMD64_
// A jump thunk?
- CONTEXT ctx = {0};
+ CONTEXT ctx;
ctx.ContextFlags = (DT_CONTEXT_AMD64 | DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER);
ctx.Rip = callee;
// on WOW64 the range valid for code is almost the whole 4GB address space
if (g_ExtData->ReadVirtual(TO_CDADDR(*whereCalled), &addr, sizeof(addr), NULL) == S_OK)
{
- TADDR callee;
+ DWORD_PTR callee;
if (GetCalleeSite(*whereCalled, callee)) {
*whereCalled = callee;
}
// on WOW64 the range valid for code is almost the whole 4GB address space
if (g_ExtData->ReadVirtual(TO_CDADDR(*whereCalled), &addr, sizeof(addr), NULL) == S_OK)
{
- TADDR callee;
- if (GetCalleeSite(*whereCalled,callee)) {
+ DWORD_PTR callee;
+ if (GetCalleeSite(*whereCalled, callee)) {
*whereCalled = callee;
}
return;
struct CallInfo
{
- DWORD_PTR stackPos;
- DWORD_PTR retAddr;
- DWORD_PTR whereCalled;
+ TADDR stackPos;
+ TADDR retAddr;
+ TADDR whereCalled;
};
// Search for a Return address on stack.
-BOOL GetNextRetAddr (DWORD_PTR stackBegin, DWORD_PTR stackEnd,
- CallInfo &callInfo)
+BOOL GetNextRetAddr (DWORD_PTR stackBegin, DWORD_PTR stackEnd, CallInfo &callInfo)
{
for (callInfo.stackPos = stackBegin;
callInfo.stackPos <= stackEnd;
};
// if a EBP frame, return TRUE if EBP has been setup
-void GetFrameBaseHelper (DWORD_PTR IPBegin, DWORD_PTR IPEnd,
- INT_PTR &StackChange)
+void GetFrameBaseHelper (DWORD_PTR IPBegin, DWORD_PTR IPEnd, INT_PTR &StackChange)
{
char line[256];
char *ptr;
{
NextTerm (ptr);
// check the value on stack is a return address.
- DWORD_PTR retAddr;
- DWORD_PTR whereCalled;
+ TADDR retAddr;
+ TADDR whereCalled;
move_xp (retAddr, reg[ESP].value);
int ESPAdjustCount = 0;
while (1)
break;
case IMAGE_FILE_MACHINE_RISCV64:
architecture = "riscv64";
+ break;
case IMAGE_FILE_MACHINE_LOONGARCH64:
architecture = "loongarch64";
break;
#include <windows.h>
#include <winternl.h>
-#if defined(_MSC_VER)
-#pragma warning(disable:4245) // signed/unsigned mismatch
-#pragma warning(disable:4100) // unreferenced formal parameter
-#pragma warning(disable:4201) // nonstandard extension used : nameless struct/union
-#pragma warning(disable:4127) // conditional expression is constant
-#pragma warning(disable:4430) // missing type specifier: C++ doesn't support default-int
-#endif
+#undef CreateProcess
+
#include "strike.h"
#include <wdbgexts.h>
#include <dbgeng.h>
#undef StackTrace
#endif
+#ifndef FEATURE_PAL
+#include "dbgengservices.h"
+#endif
+
#include "platformspecific.h"
// We need to define the target address type. This has to be used in the
#include "util.h"
-#ifndef _ASSERTE
-#ifdef _DEBUG
-#define _ASSERTE(expr) \
- do { if (!(expr) ) { ExtOut(#expr); DebugBreak(); } } while (0)
-#else // _DEBUG
-#define _ASSERTE(expr)
-#endif // _DEBUG else
-#endif // !_ASSERTE
-
#ifdef _MSC_VER
#pragma warning(disable:4244) // conversion from 'unsigned int' to 'unsigned short', possible loss of data
#pragma warning(disable:4189) // local variable is initialized but not referenced
#include "sos.h"
#include "disasm.h"
-
-#ifdef _ASSERTE
-#undef _ASSERTE
-#endif
-
-#define _ASSERTE(a) {;}
-
#include "gcdesc.h"
-
#include "safemath.h"
-
-#undef _ASSERTE
-
-#ifdef _DEBUG
-#define _ASSERTE(expr) \
- do { if (!(expr) ) { ExtErr("_ASSERTE fired:\n\t%s\n", #expr); if (IsDebuggerPresent()) DebugBreak(); } } while (0)
-#else
-#define _ASSERTE(x)
-#endif
-
inline size_t ALIGN_DOWN( size_t val, size_t alignment )
{
// alignment must be a power of 2 for this implementation to work (need modulo otherwise)
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+//=========================================================================
+
+//
+// HillClimbing.h
+//
+// Defines classes for the ThreadPool's HillClimbing concurrency-optimization
+// algorithm.
+//
+
+//=========================================================================
+
+#ifndef _HILLCLIMBING_H
+#define _HILLCLIMBING_H
+
+enum HillClimbingStateTransition
+{
+ Warmup,
+ Initializing,
+ RandomMove,
+ ClimbingMove,
+ ChangePoint,
+ Stabilizing,
+ Starvation, //used by ThreadpoolMgr
+ ThreadTimedOut, //used by ThreadpoolMgr
+ Undefined,
+};
+
+#define HillClimbingLogCapacity 200
+
+struct HillClimbingLogEntry
+{
+ DWORD TickCount;
+ HillClimbingStateTransition Transition;
+ int NewControlSetting;
+ int LastHistoryCount;
+ float LastHistoryMean;
+};
+
+typedef DPTR(HillClimbingLogEntry) PTR_HillClimbingLogEntry;
+
+#endif
return ((sigByte & IMAGE_CEE_CS_CALLCONV_MASK) == (unsigned) conv);
}
-#ifndef IfFailGoto
+#undef IfFailGoto
#define IfFailGoto(EXPR, LABEL) \
do { hr = (EXPR); if(FAILED(hr)) { goto LABEL; } } while (0)
-#endif
-#ifndef IfFailGo
+#undef IfFailGo
#define IfFailGo(EXPR) IfFailGoto(EXPR, ErrExit)
-#endif
-#ifndef IfFailRet
+#undef IfFailRet
#define IfFailRet(EXPR) do { hr = (EXPR); if(FAILED(hr)) { return (hr); } } while (0)
-#endif
-
-#ifndef _ASSERTE
-#define _ASSERTE(expr)
-#endif
HRESULT MDInfo::GetFullNameForMD(PCCOR_SIGNATURE pbSigBlob, ULONG ulSigBlob, LONG *plSigBlobRemaining)
{
#include <unistd.h>
#endif // !FEATURE_PAL
+#define CORDBG_E_NO_IMAGE_AVAILABLE EMAKEHR(0x1c64)
+
typedef HRESULT (STDAPICALLTYPE *OpenVirtualProcessImpl2FnPtr)(ULONG64 clrInstanceId,
IUnknown * pDataTarget,
LPCWSTR pDacModulePath,
#include "strike.h"
#include "util.h"
-#ifndef IfFailRet
+#undef IfFailRet
#define IfFailRet(EXPR) do { HRESULT Status = (EXPR); if(FAILED(Status)) { return (Status); } } while (0)
-#endif
HRESULT SigParser::SkipExactlyOne()
{
//
HRESULT
SigParser::SkipMethodHeaderSignature(
- uint32_t * pcArgs)
+ uint32_t * pcArgs, bool skipReturnType /*= true*/)
{
+ CONTRACTL
+ {
+ INSTANCE_CHECK;
+ NOTHROW;
+ GC_NOTRIGGER;
+ FORBID_FAULT;
+ SUPPORTS_DAC;
+ }
+ CONTRACTL_END
+
HRESULT hr = S_OK;
// Skip calling convention
// Get arg count;
IfFailRet(GetData(pcArgs));
- // Skip return type;
- IfFailRet(SkipExactlyOne());
+ if (skipReturnType)
+ {
+ // Skip return type;
+ IfFailRet(SkipExactlyOne());
+ }
return hr;
} // SigParser::SkipMethodHeaderSignature
#include "sos_md.h"
#define _BLD_CLR 1
-#define SOS_INCLUDE 1
#include "corhlpr.h"
#include "corhlpr.cpp"
#include <stddef.h>
#include <stdexcept>
#include <deque>
-
+#include <set>
+#include <vector>
+#include <map>
+#include <tuple>
+#include <memory>
+#include <functional>
+#include <algorithm>
#include <iostream>
#include <sstream>
+#ifdef HOST_UNIX
+#include <dlfcn.h>
+#endif
#include "strike.h"
#include "sos.h"
// Max number of methods that !dumpmodule -prof will print
const UINT kcMaxMethodDescsForProfiler = 100;
-#include <set>
-#include <vector>
-#include <map>
-#include <tuple>
-#include <memory>
-#include <functional>
-#include <algorithm>
-
BOOL ControlC = FALSE;
WCHAR g_mdName[mdNameLen];
#include "ntinfo.h"
#endif // FEATURE_PAL
-#ifndef IfFailRet
+#undef IfFailRet
#define IfFailRet(EXPR) do { Status = (EXPR); if(FAILED(Status)) { return (Status); } } while (0)
-#endif
#ifdef FEATURE_PAL
ULONG64 IP;
g_ExtRegisters->GetInstructionOffset (&IP);
JITTypes jitType;
- TADDR methodDesc;
- TADDR gcinfoAddr;
+ DWORD_PTR methodDesc;
+ DWORD_PTR gcinfoAddr;
IP2MethodDesc (TO_TADDR(IP), methodDesc, jitType, gcinfoAddr);
if (methodDesc)
{
// We have a DynamicMethod managed object, let us visit the town and paint.
DacpObjectData codeArray;
DacpObjectData tokenArray;
- DWORD_PTR tokenArrayAddr;
+ TADDR tokenArrayAddr;
if (!GatherDynamicInfo (dwDynamicMethodObj, &codeArray, &tokenArray, &tokenArrayAddr))
{
DMLOut("Error gathering dynamic info from object at %s.\n", DMLObject(dwDynamicMethodObj));
}
DWORD *lowerBounds = (DWORD *)alloca(dwRankAllocSize);
- if (!SafeReadMemory(objData.ArrayLowerBoundsPtr, lowerBounds, dwRankAllocSize, NULL))
+ if (!SafeReadMemory(TO_TADDR(objData.ArrayLowerBoundsPtr), lowerBounds, dwRankAllocSize, NULL))
{
ExtOut("Failed to read lower bounds info from the array\n");
return S_OK;
}
DWORD *bounds = (DWORD *)alloca(dwRankAllocSize);
- if (!SafeReadMemory (objData.ArrayBoundsPtr, bounds, dwRankAllocSize, NULL))
+ if (!SafeReadMemory(TO_TADDR(objData.ArrayBoundsPtr), bounds, dwRankAllocSize, NULL))
{
ExtOut("Failed to read bounds info from the array\n");
return S_OK;
DMLOut("Assembly: %s\n", DMLAssembly(module.Assembly));
ExtOut("BaseAddress: %p\n", SOS_PTR(module.ilBase));
- ExtOut("LoaderHeap: %p\n", SOS_PTR(module.pLookupTableHeap));
+ ExtOut("LoaderHeap: %p\n", SOS_PTR(module.LoaderAllocator));
ExtOut("TypeDefToMethodTableMap: %p\n", SOS_PTR(module.TypeDefToMethodTableMap));
ExtOut("TypeRefToMethodTableMap: %p\n", SOS_PTR(module.TypeRefToMethodTableMap));
ExtOut("MethodDefToDescMap: %p\n", SOS_PTR(module.MethodDefToDescMap));
#ifndef FEATURE_PAL
DWORD_PTR OleTlsDataAddr;
if (IsWindowsTarget() && !bSwitchedOutFiber
- && SafeReadMemory(Thread.teb + offsetof(TEB, ReservedForOle),
+ && SafeReadMemory(TO_TADDR(Thread.teb + offsetof(TEB, ReservedForOle)),
&OleTlsDataAddr,
sizeof(OleTlsDataAddr), NULL) && OleTlsDataAddr != 0)
{
DWORD AptState;
- if (SafeReadMemory(OleTlsDataAddr+offsetof(SOleTlsData,dwFlags),
+ if (SafeReadMemory(TO_TADDR(OleTlsDataAddr+offsetof(SOleTlsData,dwFlags)),
&AptState,
sizeof(AptState), NULL))
{
if (!IsMethodDesc(taStartAddr))
{
JITTypes jitType;
- TADDR methodDesc;
- TADDR gcinfoAddr;
+ DWORD_PTR methodDesc;
+ DWORD_PTR gcinfoAddr;
IP2MethodDesc(taStartAddr, methodDesc, jitType, gcinfoAddr);
tmpAddr = methodDesc;
}
if (FAILED(g_ExtData->ReadVirtual(UL64_TO_CDA(addr), &buffer, readBytes, NULL)))
break;
addr += readBytes;
- WCHAR *pt = buffer;
- WCHAR *end = pt;
+ const WCHAR *pt = buffer;
+ const WCHAR *end = pt;
while (pt < &buffer[DT_OS_PAGE_SIZE/2]) {
end = _wcschr (pt, L'\0');
if (end == NULL) {
FileNameForModule(dwAddr, FileName);
// We'd like a short form for this output
- LPWSTR pszFilename = _wcsrchr (FileName, GetTargetDirectorySeparatorW());
+ LPCWSTR pszFilename = _wcsrchr (FileName, GetTargetDirectorySeparatorW());
if (pszFilename == NULL)
{
pszFilename = FileName;
FileNameForModule (dwAddr, FileName);
// We'd like a short form for this output
- LPWSTR pszFilename = _wcsrchr (FileName, GetTargetDirectorySeparatorW());
+ LPCWSTR pszFilename = _wcsrchr (FileName, GetTargetDirectorySeparatorW());
if (pszFilename == NULL)
{
pszFilename = FileName;
}
TADDR taLTOH;
- if (!SafeReadMemory(Thread.lastThrownObjectHandle,
+ if (!SafeReadMemory(TO_TADDR(Thread.lastThrownObjectHandle),
&taLTOH,
sizeof(taLTOH), NULL))
{
}
if (wszNameBuffer[0] != W('\0'))
{
- WCHAR *pJustName = _wcsrchr(wszNameBuffer, GetTargetDirectorySeparatorW());
+ const WCHAR *pJustName = _wcsrchr(wszNameBuffer, GetTargetDirectorySeparatorW());
if (pJustName == NULL)
pJustName = wszNameBuffer - 1;
// returns a module qualified method name
HRESULT hr = g_sos->GetMethodDescName(dwStartAddr, MAX_LONGPATH, wszNameBuffer, NULL);
- WCHAR* pwszMethNameBegin = (hr != S_OK ? NULL : _wcschr(wszNameBuffer, L'!'));
+ const WCHAR* pwszMethNameBegin = (hr != S_OK ? NULL : _wcschr(wszNameBuffer, L'!'));
if (!bModuleNameWorked && hr == S_OK && pwszMethNameBegin != NULL)
{
// if we weren't able to get the module name, but GetMethodDescName returned
UINT Length = 0;
while(1)
{
- if (_wcsncmp(pwszPointer, PSZSEP, ARRAY_SIZE(PSZSEP)-1) != 0)
+ if (wcsncmp(pwszPointer, PSZSEP, ARRAY_SIZE(PSZSEP)-1) != 0)
{
delete [] pwszBuf;
return bRet;
}
- pwszPointer += _wcslen(PSZSEP);
- LPWSTR nextPos = _wcsstr(pwszPointer, PSZSEP);
+ pwszPointer += wcslen(PSZSEP);
+ LPWSTR nextPos = (LPWSTR)wcsstr(pwszPointer, PSZSEP);
if (nextPos == NULL)
{
// Done! Note that we are leaving the function before we add the last
// Note that we don't add a newline because we have this embedded in wszLineBuffer
swprintf_s(wszLineBuffer, ARRAY_SIZE(wszLineBuffer), W(" %p %p %s"), SOS_PTR(-1), SOS_PTR(-1), pwszPointer);
- Length += (UINT)_wcslen(wszLineBuffer);
+ Length += (UINT)wcslen(wszLineBuffer);
if (wszBuffer)
{
return Status;
}
+const std::string
+GetDirectory(const std::string& fileName)
+{
+ size_t last = fileName.rfind(DIRECTORY_SEPARATOR_STR_A);
+ if (last != std::string::npos) {
+ last++;
+ }
+ else {
+ last = 0;
+ }
+ return fileName.substr(0, last);
+}
+
void PrintHelp (__in_z LPCSTR pszCmdName)
{
static LPSTR pText = NULL;
if (pText == NULL) {
#ifndef FEATURE_PAL
HGLOBAL hResource = NULL;
- HRSRC hResInfo = FindResource (g_hInstance, TEXT ("DOCUMENTATION"), TEXT ("TEXT"));
- if (hResInfo) hResource = LoadResource (g_hInstance, hResInfo);
- if (hResource) pText = (LPSTR) LockResource (hResource);
+ HRSRC hResInfo = FindResourceW(g_hInstance, TEXT ("DOCUMENTATION"), TEXT ("TEXT"));
+ if (hResInfo) hResource = LoadResource(g_hInstance, hResInfo);
+ if (hResource) pText = (LPSTR)LockResource(hResource);
if (pText == NULL)
{
ExtErr("Error loading documentation resource\n");
return;
}
#else
- ArrayHolder<char> szSOSModulePath = new char[MAX_LONGPATH + 1];
- UINT cch = MAX_LONGPATH;
- if (!PAL_GetPALDirectoryA(szSOSModulePath, &cch)) {
+ Dl_info info;
+ if (dladdr((PVOID)&PrintHelp, &info) == 0)
+ {
ExtErr("Error: Failed to get SOS module directory\n");
return;
}
-
char lpFilename[MAX_LONGPATH + 12]; // + 12 to make enough room for strcat function.
- strcpy_s(lpFilename, ARRAY_SIZE(lpFilename), szSOSModulePath);
+ strcpy_s(lpFilename, ARRAY_SIZE(lpFilename), GetDirectory(info.dli_fname).c_str());
strcat_s(lpFilename, ARRAY_SIZE(lpFilename), "sosdocsunix.txt");
HANDLE hSosDocFile = CreateFileA(lpFilename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
#ifndef __strike_h__
#define __strike_h__
-#include <minipal/utils.h>
-
-#if defined(_MSC_VER)
-#pragma warning(disable:4245) // signed/unsigned mismatch
-#pragma warning(disable:4100) // unreferenced formal parameter
-#pragma warning(disable:4201) // nonstandard extension used : nameless struct/union
-#pragma warning(disable:4127) // conditional expression is constant
-#pragma warning(disable:6255) // Prefast: alloca indicates failure by raising a stack overflow exception
-#endif
-
-#ifdef PAL_STDCPP_COMPAT
-#define _iswprint PAL_iswprint
-#define _wcslen PAL_wcslen
-#define _wcsncmp PAL_wcsncmp
-#define _wcsrchr PAL_wcsrchr
-#define _wcscmp PAL_wcscmp
-#define _wcschr PAL_wcschr
-#define _wcscspn PAL_wcscspn
-#define _wcscat PAL_wcscat
-#define _wcsstr PAL_wcsstr
-#else // PAL_STDCPP_COMPAT
-#define _iswprint iswprint
-#define _wcslen wcslen
-#define _wcsncmp wcsncmp
-#define _wcsrchr wcsrchr
-#define _wcscmp wcscmp
-#define _wcschr wcschr
-#define _wcscspn wcscspn
-#define _wcscat wcscat
-#define _wcsstr wcsstr
-#endif // !PAL_STDCPP_COMPAT
+#include "warningcontrol.h"
#define ___in _SAL1_Source_(__in, (), _In_)
#define ___out _SAL1_Source_(__out, (), _Out_)
#include <winternl.h>
#include <winver.h>
#include <windows.h>
-
#include <wchar.h>
+#include <minipal/utils.h>
+#include <dn-u16.h>
+
+#define _wcsrchr u16_strrchr
+#define _wcscmp u16_strcmp
+#define _wcsncmp u16_strncmp
+#define _wcschr u16_strchr
+#define _wcscat u16_strcat
+#define _wcsstr u16_strstr
+
+inline size_t __cdecl _wcslen(const WCHAR* str)
+{
+ return u16_strlen(str);
+}
-//#define NOEXTAPI
#define KDEXT_64BIT
#include <wdbgexts.h>
#undef DECLARE_API
#include "host.h"
#include "hostservices.h"
-#ifndef PAL_STDCPP_COMPAT
-#include <malloc.h>
-#endif
-
#ifdef FEATURE_PAL
#ifndef alloca
#define alloca __builtin_alloca
#include "safemath.h"
#include <psapi.h>
-#include <tchar.h>
#include <limits.h>
#ifdef FEATURE_PAL
#include <mach-o/dyld.h>
#endif
-#ifndef IfFailRet
+#undef IfFailRet
#define IfFailRet(EXPR) do { Status = (EXPR); if(FAILED(Status)) { return (Status); } } while (0)
-#endif
#ifndef FEATURE_PAL
HMODULE g_hmoduleSymBinder = nullptr;
#include "disasm.h"
#include <dbghelp.h>
-#include "corhdr.h"
-#include "cor.h"
-#include "dacprivate.h"
-#include "sospriv.h"
-#include "corerror.h"
-#include "safemath.h"
+#include <corhdr.h>
+#include <cor.h>
+#include <dacprivate.h>
+#include "dacprivate2x.h"
+#include <sospriv.h>
+#include <corerror.h>
+#include <safemath.h>
#include <psapi.h>
#include <cordebug.h>
#include <xcordebug.h>
#include <mscoree.h>
-#include <tchar.h>
-#include "gcinfo.h"
+#include <gcinfo.h>
#ifndef STRESS_LOG
#define STRESS_LOG
#endif // STRESS_LOG
#define STRESS_LOG_READONLY
-#include "stresslog.h"
+#include <stresslog.h>
#ifdef FEATURE_PAL
#include <sys/stat.h>
#include <dlfcn.h>
+#include <wctype.h>
#endif // !FEATURE_PAL
-#include "coreclrhost.h"
+#include <coreclrhost.h>
#include <set>
#include <string>
ISOSDacInterface *g_sos = NULL;
ISOSDacInterface15 *g_sos15 = NULL;
-#ifndef IfFailRet
+#undef IfFailRet
#define IfFailRet(EXPR) do { Status = (EXPR); if(FAILED(Status)) { return (Status); } } while (0)
-#endif
// Max number of reverted rejit versions that !dumpmd and !ip2md will print
const UINT kcMaxRevertedRejitData = 10;
LPWSTR FormatTypeName (__out_ecount (maxChars) LPWSTR pszName, UINT maxChars)
{
UINT iStart = 0;
- UINT iLen = (int) _wcslen(pszName);
+ UINT iLen = (int) u16_strlen(pszName);
if (iLen > maxChars)
{
iStart = iLen - maxChars;
{
DWORD offset = vFieldDesc.dwOffset + sizeof(BaseObject);
NameForToken_s (TokenFromRid(vFieldDesc.mb, mdtFieldDef), pImport, g_mdName, mdNameLen, false);
- if (_wcscmp (wszFieldName, g_mdName) == 0)
+ if (u16_strcmp (wszFieldName, g_mdName) == 0)
{
if (pDacpFieldDescData != NULL)
{
BOOL IsObjectArray (DWORD_PTR obj)
{
- DWORD_PTR mtAddr = (TADDR)0;
+ TADDR mtAddr = (TADDR)0;
if (SUCCEEDED(GetMTOfObject(obj, &mtAddr)))
return TO_TADDR(g_special_usefulGlobals.ArrayMethodTable) == mtAddr;
BOOL IsStringObject (size_t obj)
{
- DWORD_PTR mtAddr = (TADDR)0;
+ TADDR mtAddr = (TADDR)0;
if (SUCCEEDED(GetMTOfObject(obj, &mtAddr)))
return TO_TADDR(g_special_usefulGlobals.StringMethodTable) == mtAddr;
}
NameForMT_s(TO_TADDR(walkMT), g_mdName, mdNameLen);
- if (_wcscmp(baseString, g_mdName) == 0)
+ if (u16_strcmp(baseString, g_mdName) == 0)
{
return TRUE;
}
mdToken tkEnclose = mdTokenNil;
WCHAR *pName;
WCHAR *pHead = wszName;
- while ( ((pName = _wcschr (pHead,L'+')) != NULL) ||
- ((pName = _wcschr (pHead,L'/')) != NULL)) {
+ while ( ((pName = (WCHAR*)u16_strchr (pHead,L'+')) != NULL) ||
+ ((pName = (WCHAR*)u16_strchr (pHead,L'/')) != NULL)) {
pName[0] = L'\0';
if (FAILED(pImport->FindTypeDefByName(pHead,tkEnclose,&tkEnclose)))
return;
// See if it is a method
WCHAR *pwzMethod;
- if ((pwzMethod = _wcsrchr(pName, L'.')) == NULL)
+ if ((pwzMethod = (WCHAR*)u16_strrchr(pName, L'.')) == NULL)
return;
if (pwzMethod[-1] == L'.')
* Find the EE data given a name. *
* *
\**********************************************************************/
-HRESULT GetMethodDescsFromName(TADDR ModulePtr, IXCLRDataModule* mod, const char *name, DWORD_PTR **pOut,int *numMethods)
+HRESULT GetMethodDescsFromName(DWORD_PTR ModulePtr, IXCLRDataModule* mod, const char *name, DWORD_PTR **pOut,int *numMethods)
{
if (name == NULL || pOut == NULL || numMethods == NULL)
return E_FAIL;
if (methodCount > 0)
{
- *pOut = new TADDR[methodCount];
+ *pOut = new DWORD_PTR[methodCount];
if (*pOut==NULL)
{
ReportOOM();
{
return true;
}
- // fall through
-
- default:
- if (HIWORD(fileInfo.dwFileVersionMS) >= major)
- {
- return true;
- }
- // fall through
-
- break;
}
- return false;
+ return HIWORD(fileInfo.dwFileVersionMS) >= major;
}
// Returns true if there is a change in the data structures that SOS depends on like
ULONG j,k=0;
for (j = 0; j < wcharsRead; j ++)
{
- if (_iswprint (buffer[j])) {
+ if (iswprint (buffer[j])) {
out[k] = buffer[j];
k ++;
}
break;
}
- if (nCount>15) {
- return _UI64_MAX; // would be an overflow
+ if (nCount > 15) {
+ return UINT64_MAX; // would be an overflow
}
value = value << 4;
numFrameDigits = 1;
}
- size_t totalStringLength = strlen(DMLFormats[type]) + _wcslen(expansionName) + numFrameDigits + _wcslen(simpleName) + 1;
+ size_t totalStringLength = strlen(DMLFormats[type]) + u16_strlen(expansionName) + numFrameDigits + u16_strlen(simpleName) + 1;
if (totalStringLength > ret.GetStrLen())
{
ret.Allocate(static_cast<int>(totalStringLength));
// IDiaReadExeAtOffsetCallback implementation
HRESULT __stdcall PEOffsetMemoryReader::ReadExecutableAt(DWORDLONG fileOffset, DWORD cbData, DWORD* pcbData, BYTE data[])
{
- return SafeReadMemory(m_moduleBaseAddress + fileOffset, data, cbData, pcbData) ? S_OK : E_FAIL;
+ return SafeReadMemory(m_moduleBaseAddress + TO_TADDR(fileOffset), data, cbData, pcbData) ? S_OK : E_FAIL;
}
PERvaMemoryReader::PERvaMemoryReader(TADDR moduleBaseAddress) :
{
if (wszFileName[0] != W('\0'))
{
- WCHAR *pJustName = _wcsrchr(wszFileName, GetTargetDirectorySeparatorW());
+ const WCHAR *pJustName = u16_strrchr(wszFileName, GetTargetDirectorySeparatorW());
if (pJustName == NULL)
pJustName = wszFileName - 1;
methodOutput += (pJustName + 1);
#ifndef __util_h__
#define __util_h__
-#define LIMITED_METHOD_CONTRACT ((void)0)
-
#define CONVERT_FROM_SIGN_EXTENDED(offset) ((ULONG_PTR)(offset))
// So we can use the PAL_TRY_NAKED family of macros without dependencies on utilcode.
typedef LPCSTR LPCUTF8;
typedef LPSTR LPUTF8;
+#include "contract.h"
+#undef NOTHROW
#ifdef FEATURE_PAL
#define NOTHROW
#else
#define TARGET_POINTER_SIZE POINTERSIZE_BYTES
#endif // TARGET_POINTER_SIZE
-#ifndef _ASSERTE
+#undef _ASSERTE
#ifdef _DEBUG
#define _ASSERTE(expr) \
do { if (!(expr) ) { ExtErr("_ASSERTE fired:\n\t%s\n", #expr); if (IsDebuggerPresent()) DebugBreak(); } } while (0)
#else
-#define _ASSERTE(x)
+#define _ASSERTE(expr) ((void)0)
#endif
-#endif // ASSERTE
-#ifdef _DEBUG
-#define ASSERT_CHECK(expr, msg, reason) \
- do { if (!(expr) ) { ExtOut(reason); ExtOut(msg); ExtOut(#expr); DebugBreak(); } } while (0)
-#endif
+#undef _ASSERT
+#define _ASSERT _ASSERTE
// The native symbol reader dll name
#if defined(_AMD64_)
#define NATIVE_SYMBOL_READER_DLL "Microsoft.DiaSymReader.Native.arm64.dll"
#endif
-// PREFIX macros - Begin
-#define PREFIX_ASSUME(_condition)
-// PREFIX macros - End
-
class MethodTable;
#define MD_NOT_YET_LOADED ((DWORD_PTR)-1)
typedef BaseString<char, strlen, strcpy_s> String;
typedef BaseString<WCHAR, _wcslen, wcscpy_s> WString;
-
template<class T>
void Flatten(__out_ecount(len) T *data, unsigned int len)
{
void ReportOOM();
BOOL SafeReadMemory (TADDR offset, PVOID lpBuffer, ULONG cb, PULONG lpcbBytesRead);
-#if !defined(_TARGET_WIN64_) && !defined(_ARM64_) && !defined(_MIPS64_) && !defined(_RISCV64_) && !defined(_LOONGARCH64_)
-// on 64-bit platforms TADDR and CLRDATA_ADDRESS are identical
-inline BOOL SafeReadMemory (CLRDATA_ADDRESS offset, PVOID lpBuffer, ULONG cb, PULONG lpcbBytesRead)
-{ return SafeReadMemory(TO_TADDR(offset), lpBuffer, cb, lpcbBytesRead); }
-#endif
-
BOOL NameForMD_s (DWORD_PTR pMD, __out_ecount (capacity_mdName) WCHAR *mdName, size_t capacity_mdName);
BOOL NameForMT_s (DWORD_PTR MTAddr, __out_ecount (capacity_mdName) WCHAR *mdName, size_t capacity_mdName);
private:
HRESULT PrintCurrentInternalFrame();
};
+
+#undef LIMITED_METHOD_DAC_CONTRACT
+#define LIMITED_METHOD_DAC_CONTRACT ((void)0)
+#undef LIMITED_METHOD_CONTRACT
+#define LIMITED_METHOD_CONTRACT ((void)0)
+#undef WRAPPER_NO_CONTRACT
+#define WRAPPER_NO_CONTRACT ((void)0)
+#undef SUPPORTS_DAC
+#define SUPPORTS_DAC ((void)0)
+
+//////////////////////////////////////////////////////////////////////////////
+// enum CorElementTypeZapSig defines some additional internal ELEMENT_TYPE's
+// values that are only used by ZapSig signatures.
+//////////////////////////////////////////////////////////////////////////////
+typedef enum CorElementTypeZapSig
+{
+ // ZapSig encoding for ELEMENT_TYPE_VAR and ELEMENT_TYPE_MVAR. It is always followed
+ // by the RID of a GenericParam token, encoded as a compressed integer.
+ ELEMENT_TYPE_VAR_ZAPSIG = 0x3b,
+
+ // UNUSED = 0x3c,
+
+ // ZapSig encoding for native value types in IL stubs. IL stub signatures may contain
+ // ELEMENT_TYPE_INTERNAL followed by ParamTypeDesc with ELEMENT_TYPE_VALUETYPE element
+ // type. It acts like a modifier to the underlying structure making it look like its
+ // unmanaged view (size determined by unmanaged layout, blittable, no GC pointers).
+ //
+ // ELEMENT_TYPE_NATIVE_VALUETYPE_ZAPSIG is used when encoding such types to NGEN images.
+ // The signature looks like this: ET_NATIVE_VALUETYPE_ZAPSIG ET_VALUETYPE <token>.
+ // See code:ZapSig.GetSignatureForTypeHandle and code:SigPointer.GetTypeHandleThrowing
+ // where the encoding/decoding takes place.
+ ELEMENT_TYPE_NATIVE_VALUETYPE_ZAPSIG = 0x3d,
+
+ ELEMENT_TYPE_CANON_ZAPSIG = 0x3e, // zapsig encoding for System.__Canon
+ ELEMENT_TYPE_MODULE_ZAPSIG = 0x3f, // zapsig encoding for external module id#
+
+} CorElementTypeZapSig;
+
#include "sigparser.h"
#endif // __util_h__
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//
+// warningcontrol.h
+//
+// KEEP THIS LIST SORTED!
+//
+
+#pragma once
+
+#if defined(_MSC_VER)
+
+#pragma warning(error :4007) // 'main' : must be __cdecl
+#pragma warning(error :4013) // 'function' undefined - assuming extern returning int
+#pragma warning(3 :4092) // sizeof returns 'unsigned long'
+#pragma warning(disable: 4100) // unreferenced formal parameter
+#pragma warning(error :4102) // "'%$S' : unreferenced label"
+#pragma warning(3 :4121) // structure is sensitive to alignment
+#pragma warning(3 :4125) // decimal digit in octal sequence
+#pragma warning(disable :4127) // conditional expression is constant
+#pragma warning(3 :4130) // logical operation on address of string constant
+#pragma warning(3 :4132) // const object should be initialized
+#pragma warning(4 :4177) // pragma data_seg s/b at global scope
+#pragma warning(disable :4201) // nonstandard extension used : nameless struct/union
+#pragma warning(3 :4212) // function declaration used ellipsis
+#pragma warning(disable :4245) // signed/unsigned mismatch
+#pragma warning(disable :4291) // delete not defined for new, c++ exception may cause leak
+#pragma warning(disable :4311) // pointer truncation from '%$S' to '%$S'
+#pragma warning(disable :4312) // '<function-style-cast>' : conversion from '%$S' to '%$S' of greater size
+#pragma warning(disable :4430) // missing type specifier: C++ doesn't support default-int
+#pragma warning(disable :4477) // format string '%$S' requires an argument of type '%$S', but variadic argument %d has type '%$S'
+#pragma warning(3 :4530) // C++ exception handler used, but unwind semantics are not enabled. Specify -GX
+#pragma warning(error :4551) // Function call missing argument list
+#pragma warning(error :4806) // unsafe operation involving type 'bool'
+#pragma warning(disable :6255) // Prefast: alloca indicates failure by raising a stack overflow exception
+
+#if defined(_DEBUG) && (!defined(_MSC_FULL_VER) || (_MSC_FULL_VER <= 181040116))
+// The CLR header file check.h, macro CHECK_MSG_EX, can create unreachable code if the LEAVE_DEBUG_ONLY_CODE
+// macro is not empty (such as it is defined in contract.h) and the _RESULT macro expands to "return".
+// Checked-in compilers used by the TFS-based desktop build (e.g., version 18.10.40116.8) started reporting
+// unreachable code warnings when debugholder.h was changed to no longer #define "return" to something relatively
+// complex. However, newer compilers, such as Visual Studio 2015, used to build the CLR from the open source
+// GitHub repo, still do not report this warning. We don't want to disable this warning for open source build,
+// which will use a newer compiler. Hence, only disable it for older compilers.
+#pragma warning(disable :4702) // unreachable code
+#endif
+
+#endif // defined(_MSC_VER)
include(configure.cmake)
-add_definitions(-DPAL_STDCPP_COMPAT)
-
include_directories(${ROOT_DIR}/src/SOS/inc)
set(SOURCES
#include "debuggerservices.h"
#include "symbolservice.h"
+#ifndef HOST_WINDOWS
+#define _strdup strdup
+#endif
+
interface IRuntime;
enum HostRuntimeFlavor
#include "coreclrhost.h"
#include "extensions.h"
-#include <minipal/getexepath.h>
#include <minipal/utils.h>
+#include <minipal/getexepath.h>
-#ifndef IfFailRet
+#undef IfFailRet
#define IfFailRet(EXPR) do { Status = (EXPR); if(FAILED(Status)) { return (Status); } } while (0)
-#endif
#ifdef FEATURE_PAL
#define TPALIST_SEPARATOR_STR_A ":"
endif(CLR_CMAKE_HOST_OSX)
endif (CORECLR_SET_RPATH)
-add_definitions(-DPAL_STDCPP_COMPAT)
-
set(ENABLE_LLDBPLUGIN ${CLR_CMAKE_HOST_UNIX} CACHE BOOL "Enable building the SOS plugin for LLDB.")
set(REQUIRE_LLDBPLUGIN ${CLR_CMAKE_HOST_LINUX} CACHE BOOL "Require building the SOS plugin for LLDB.")
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)src\SOS\inc;$(SolutionDir)src\SOS\extensions;$(SolutionDir)src\shared\inc;$(SolutionDir)src\shared\pal\inc;$(SolutionDir)src\shared\pal\inc\rt;$(SolutionDir)src\shared\pal\inc\rt\cpp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_AMD64_;_WIN64;AMD64;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;DBG_TARGET_AMD64_UNIX;BIT64=1;PAL_STDCPP_COMPAT;_SECURE_SCL=0;LINUX64;PLATFORM_UNIX=1;FEATURE_PAL;FEATURE_PAL_ANSI;UNIX_AMD64_ABI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_AMD64_;_WIN64;AMD64;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;DBG_TARGET_AMD64_UNIX;BIT64=1;_SECURE_SCL=0;LINUX64;PLATFORM_UNIX=1;FEATURE_PAL;FEATURE_PAL_ANSI;UNIX_AMD64_ABI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BrowseInformation>true</BrowseInformation>
</ClCompile>
<Bscmake>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
-</Project>
\ No newline at end of file
+</Project>
+include(${CLR_SHARED_DIR}/shared.cmake)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
add_definitions(-DFEATURE_NO_HOST)
add_definitions(-DSELF_NO_HOST)
-add_definitions(-D_BLD_CLR)
set(DBGSHIM_SOURCES
dbgshim.cpp
if(CLR_CMAKE_HOST_WIN32)
list(APPEND DBGSHIM_SOURCES
+ securityutil.cpp
+ securitywrapper.cpp
dbgshim.rc
)
preprocess_file(${CMAKE_CURRENT_SOURCE_DIR}/dbgshim.ntdef ${CMAKE_CURRENT_BINARY_DIR}/dbgshim.def)
set(DBGSHIM_LIBRARIES
dbgutil
corguids
+ coreclrminipal
utilcodestaticnohost
)
{
if (lpApplicationGroupId != NULL)
{
- int size = wcslen(lpApplicationGroupId) + 1;
+ int size = u16_strlen(lpApplicationGroupId) + 1;
m_applicationGroupId = new (nothrow) WCHAR[size];
if (m_applicationGroupId == NULL)
{
return E_OUTOFMEMORY;
}
- wcscpy_s(m_applicationGroupId, size, lpApplicationGroupId);
+ u16_strcpy_s(m_applicationGroupId, size, lpApplicationGroupId);
}
DWORD pe = PAL_RegisterForRuntimeStartup(m_processId, m_applicationGroupId, RuntimeStartupHandler, this, &m_unregisterToken);
else
{
// Fallback to loading DBI side-by-side the runtime module
- char *pszLast = strrchr(pszModulePath, DIRECTORY_SEPARATOR_CHAR_A);
+ const char *pszLast = strrchr(pszModulePath, DIRECTORY_SEPARATOR_CHAR_A);
if (pszLast == NULL)
{
_ASSERT(!"InvokeStartupCallback: can find separator in coreclr path\n");
//strip off everything up to and including the last slash in the path to get name
const WCHAR* pModuleName = pModulePath;
- while(wcschr(pModuleName, DIRECTORY_SEPARATOR_CHAR_W) != NULL)
+ while(u16_strchr(pModuleName, DIRECTORY_SEPARATOR_CHAR_W) != NULL)
{
- pModuleName = wcschr(pModuleName, DIRECTORY_SEPARATOR_CHAR_W);
+ pModuleName = u16_strchr(pModuleName, DIRECTORY_SEPARATOR_CHAR_W);
pModuleName++; // pass the slash
}
// above EnumProcessModules calls. If this actually happens, then give
// up on trying to get the whole module list and risk missing the coreclr
// module.
- cbNeeded = min(cbNeeded, cbNeeded2);
+ cbNeeded = std::min(cbNeeded, cbNeeded2);
}
*pCountModules = cbNeeded / sizeof(HMODULE);
LPWSTR* pStringArray = (LPWSTR*) &pOutBuffer[cbEventArrayData];
pStringArray[0] = (WCHAR*) &pOutBuffer[cbEventArrayData + cbStringArrayData];
- wcscpy_s(pStringArray[0], MAX_LONGPATH, clrRuntimeInfo.ClrInfo.RuntimeModulePath);
+ u16_strcpy_s(pStringArray[0], MAX_LONGPATH, clrRuntimeInfo.ClrInfo.RuntimeModulePath);
*pdwArrayLengthOut = 1;
*ppHandleArrayOut = pEventArray;
//
// Notes:
// The null-terminated version string including null, is
-// copied to pVersion on output. Thus *pdwLength == wcslen(pBuffer)+1.
+// copied to pVersion on output. Thus *pdwLength == u16_strlen(pBuffer)+1.
// The version string is an opaque string that can only be passed back to other
// DbgShim APIs.
//-----------------------------------------------------------------------------
if ((piDebuggerVersion == NULL) ||
(pdwPidDebuggee == NULL) ||
(phmodTargetCLR == NULL) ||
- (wcslen(szDebuggeeVersion) < c_iMinVersionStringLen) ||
+ (u16_strlen(szDebuggeeVersion) < c_iMinVersionStringLen) ||
(W(';') != szDebuggeeVersion[c_idxFirstSemi]) ||
(W(';') != szDebuggeeVersion[c_idxSecondSemi]))
{
// Step 2: 'Coreclr.dll' --> 'mscordbi.dll'
//
WCHAR * pCoreClrPath = modulePath;
- WCHAR * pLast = wcsrchr(pCoreClrPath, DIRECTORY_SEPARATOR_CHAR_W);
+ const WCHAR * pLast = u16_strrchr(pCoreClrPath, DIRECTORY_SEPARATOR_CHAR_W);
if (pLast == NULL)
{
ThrowHR(E_FAIL);
AppendDbiDllName(szFullDbiPath);
- szFullCoreClrPath.Set(pCoreClrPath, (COUNT_T)wcslen(pCoreClrPath));
+ szFullCoreClrPath.Set(pCoreClrPath, (COUNT_T)u16_strlen(pCoreClrPath));
}
// have to be a tight estimate, just make sure its >= the biggest possible DAC name
// and it can be calculated statically
DWORD minCchBuffer =
- (DWORD) wcslen(CLR_DAC_MODULE_NAME_W) + (DWORD) wcslen(CORECLR_DAC_MODULE_NAME_W) + // max name
+ (DWORD) u16_strlen(CLR_DAC_MODULE_NAME_W) + (DWORD) u16_strlen(CORECLR_DAC_MODULE_NAME_W) + // max name
10 + // max host arch
10 + // max target arch
40 + // max version
10 + // max build flavor
- (DWORD) wcslen(W("name_host_target_version.flavor.dll")) + // max intermediate formatting chars
+ (DWORD) u16_strlen(W("name_host_target_version.flavor.dll")) + // max intermediate formatting chars
1; // null terminator
// validate the output buffer is larger than our estimate above
#include "sstring.h"
#include <wchar.h>
#include <metahost.h>
+#include <dn-u16.h>
#include "runtimeinfo.h"
#if defined (HOST_WINDOWS) && defined(HOST_X86)
#else
WindowsTarget = TRUE;
#endif
- IndexType = LIBRARY_PROVIDER_INDEX_TYPE::Unknown;
+ IndexType = LIBRARY_PROVIDER_INDEX_TYPE::UnknownIndex;
memset(&RuntimeBuildId, 0, sizeof(RuntimeBuildId));
RuntimeBuildIdSize = 0;
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//
+// GetProductVersionNumber.h
+//
+// Helper function to retrieve the file version number of a file.
+//
+// ======================================================================================
+
+
+
+#ifndef __GetProductVersionNumber_h__
+#define __GetProductVersionNumber_h__
+
+#include "contract.h"
+#include "sstring.h"
+#include "holder.h"
+#include "ex.h"
+
+//---------------------------------------------------------------------------------------
+//
+// Given the full path to an image, return the product version number.
+//
+// Arguments:
+// szFullPath - full path to the image
+// pdwVersionMS - out parameter; return the most significant 4 bytes of the version number according to
+// the VS_FIXEDFILEINFO convention
+// pdwVersionLS - out parameter; return the least significant 4 bytes of the version number according to
+// the VS_FIXEDFILEINFO convention
+//
+// Notes:
+// Throws on error
+
+void inline GetProductVersionNumber(SString &szFullPath, DWORD * pdwVersionMS, DWORD * pdwVersionLS)
+{
+ WRAPPER_NO_CONTRACT;
+#ifndef TARGET_UNIX
+
+ DWORD dwDummy = 0;
+ DWORD dwFileInfoSize = 0;
+
+ // Get the size of all of the file version information.
+ dwFileInfoSize = GetFileVersionInfoSize(szFullPath, &dwDummy);
+ if (dwFileInfoSize == 0)
+ {
+ ThrowLastError();
+ }
+
+ // Create the buffer to store the file information.
+ NewHolder<BYTE> pbFileInfo(new BYTE[dwFileInfoSize]);
+
+ // Actually retrieve the file version information.
+ if (!GetFileVersionInfo(szFullPath, NULL, dwFileInfoSize, pbFileInfo))
+ {
+ ThrowLastError();
+ }
+
+ // Now retrieve only the relevant version information, which will be returned in a VS_FIXEDFILEINFO.
+ UINT uVersionInfoSize = 0;
+ VS_FIXEDFILEINFO * pVersionInfo = NULL;
+
+ if (!VerQueryValue(pbFileInfo, W("\\"), reinterpret_cast<LPVOID *>(&pVersionInfo), &uVersionInfoSize))
+ {
+ ThrowLastError();
+ }
+ _ASSERTE(uVersionInfoSize == sizeof(VS_FIXEDFILEINFO));
+
+ *pdwVersionMS = pVersionInfo->dwProductVersionMS;
+ *pdwVersionLS = pVersionInfo->dwProductVersionLS;
+#else
+ *pdwVersionMS = 0;
+ *pdwVersionLS = 0;
+#endif // TARGET_UNIX
+}
+
+#endif // __GetProductVersionNumber_h__
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+
+#include "stdafx.h"
+
+#include "securityutil.h"
+#include "ex.h"
+
+#include "securitywrapper.h"
+
+// These are the right that we will give to the global section and global events used
+// in communicating between debugger and debugee
+//
+// SECTION_ALL_ACCESS is needed for the IPC block. Unfortunately, we DACL our events and
+// IPC block identically. Or this particular right does not need to bleed into here.
+//
+#ifndef CLR_IPC_GENERIC_RIGHT
+#define CLR_IPC_GENERIC_RIGHT (GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | STANDARD_RIGHTS_ALL | SECTION_ALL_ACCESS)
+#endif
+
+
+//*****************************************************************
+// static helper function
+//
+// helper to form ACL that contains AllowedACE of users of current
+// process and target process
+//
+// [IN] pid - target process id
+// [OUT] ppACL - ACL for the process
+//
+// Clean up -
+// Caller remember to call FreeACL() on *ppACL
+//*****************************************************************
+HRESULT SecurityUtil::GetACLOfPid(DWORD pid, PACL *ppACL)
+{
+ CONTRACTL
+ {
+ NOTHROW;
+ GC_NOTRIGGER;
+ }
+ CONTRACTL_END;
+
+ HRESULT hr = S_OK;
+ _ASSERTE(ppACL);
+ *ppACL = NULL;
+
+ PSID pCurrentProcessSid = NULL;
+ PSID pTargetProcessSid = NULL;
+ PSID pTargetProcessAppContainerSid = NULL;
+ DWORD cSid = 0;
+ DWORD dwAclSize = 0;
+
+ LOG((LF_CORDB, LL_INFO10000,
+ "SecurityUtil::GetACLOfPid on pid : 0x%08x\n",
+ pid));
+
+
+ SidBuffer sidCurrentProcess;
+ SidBuffer sidTargetProcess;
+ SidBuffer sidTargetProcessAppContainer;
+
+ // Get sid for current process.
+ if (SUCCEEDED(sidCurrentProcess.InitFromProcessNoThrow(GetCurrentProcessId())))
+ {
+ pCurrentProcessSid = sidCurrentProcess.GetSid().RawSid();
+ cSid++;
+ }
+
+ // Get sid for target process.
+ if (SUCCEEDED(sidTargetProcess.InitFromProcessNoThrow(pid)))
+ {
+ pTargetProcessSid = sidTargetProcess.GetSid().RawSid();
+ cSid++;
+ }
+
+ //FISHY: what is the scenario where only one of the above calls succeeds?
+ if (cSid == 0)
+ {
+ // failed to get any useful sid. Just return.
+ // need a better error.
+ //
+ hr = E_FAIL;
+ goto exit;
+ }
+
+ hr = sidTargetProcessAppContainer.InitFromProcessAppContainerSidNoThrow(pid);
+ if (FAILED(hr))
+ {
+ goto exit;
+ }
+ else if (hr == S_OK)
+ {
+ pTargetProcessAppContainerSid = sidTargetProcessAppContainer.GetSid().RawSid();
+ cSid++;
+ }
+ else if(hr == S_FALSE) //not an app container, no sid to add
+ {
+ hr = S_OK; // don't leak S_FALSE
+ }
+
+ LOG((LF_CORDB, LL_INFO10000,
+ "SecurityUtil::GetACLOfPid number of sid : 0x%08x\n",
+ cSid));
+
+ // Now allocate space for ACL. First calculate the space is need to hold ACL
+ dwAclSize = sizeof(ACL) + (sizeof(ACCESS_ALLOWED_ACE) - sizeof(DWORD)) * cSid;
+ if (pCurrentProcessSid)
+ {
+ dwAclSize += GetLengthSid(pCurrentProcessSid);
+ }
+ if (pTargetProcessSid)
+ {
+ dwAclSize += GetLengthSid(pTargetProcessSid);
+ }
+ if (pTargetProcessAppContainerSid)
+ {
+ dwAclSize += GetLengthSid(pTargetProcessAppContainerSid);
+ }
+
+ *ppACL = (PACL) new (nothrow) char[dwAclSize];
+ if (*ppACL == NULL)
+ {
+ hr = E_OUTOFMEMORY;
+ goto exit;
+ }
+
+ // Initialize ACL
+ // add each sid to the allowed ace list
+ if (!InitializeAcl(*ppACL, dwAclSize, ACL_REVISION))
+ {
+ hr = HRESULT_FROM_GetLastError();
+ goto exit;
+ }
+
+ if (pCurrentProcessSid)
+ {
+ // add the current process's sid into ACL if we have it
+ if (!AddAccessAllowedAce(*ppACL, ACL_REVISION, CLR_IPC_GENERIC_RIGHT, pCurrentProcessSid))
+ {
+ hr = HRESULT_FROM_GetLastError();
+ goto exit;
+ }
+ }
+
+ if (pTargetProcessSid)
+ {
+ // add the target process's sid into ACL if we have it
+ if (!AddAccessAllowedAce(*ppACL, ACL_REVISION, CLR_IPC_GENERIC_RIGHT, pTargetProcessSid))
+ {
+ hr = HRESULT_FROM_GetLastError();
+ goto exit;
+ }
+ }
+
+ if (pTargetProcessAppContainerSid)
+ {
+ // add the target process's AppContainer's sid into ACL if we have it
+ if (!AddAccessAllowedAce(*ppACL, ACL_REVISION, CLR_IPC_GENERIC_RIGHT, pTargetProcessAppContainerSid))
+ {
+ hr = HRESULT_FROM_GetLastError();
+ goto exit;
+ }
+ }
+
+ // we better to form a valid ACL to return
+ _ASSERTE(IsValidAcl(*ppACL));
+exit:
+ if (FAILED(hr) && *ppACL)
+ {
+ delete [] (reinterpret_cast<char*>(ppACL));
+ }
+ return hr;
+} // SecurityUtil::GetACLOfPid
+
+
+//*****************************************************************
+// static helper function
+//
+// free the ACL allocated by SecurityUtil::GetACLOfPid
+//
+// [IN] pACL - ACL to be freed
+//
+//*****************************************************************
+void SecurityUtil::FreeACL(PACL pACL)
+{
+ CONTRACTL
+ {
+ NOTHROW;
+ GC_NOTRIGGER;
+ }
+ CONTRACTL_END;
+ if (pACL)
+ {
+ delete [] (reinterpret_cast<char*>(pACL));
+ }
+} // SecurityUtil::FreeACL
+
+
+//*****************************************************************
+// constructor
+//
+// [IN] pACL - ACL that this instance of SecurityUtil will held on to
+//
+//*****************************************************************
+SecurityUtil::SecurityUtil(PACL pACL)
+{
+ CONTRACTL
+ {
+ NOTHROW;
+ GC_NOTRIGGER;
+ }
+ CONTRACTL_END;
+ m_pACL = pACL;
+ m_pSacl = NULL;
+ m_fInitialized = false;
+}
+
+//*****************************************************************
+// destructor
+//
+// free the ACL that this instance of SecurityUtil helds on to
+//
+//*****************************************************************
+SecurityUtil::~SecurityUtil()
+{
+ CONTRACTL
+ {
+ NOTHROW;
+ GC_NOTRIGGER;
+ }
+ CONTRACTL_END;
+ FreeACL(m_pACL);
+ FreeACL(m_pSacl);
+}
+
+//*****************************************************************
+// Initialization function
+//
+// form the SecurityDescriptor that will represent the m_pACL
+//
+//*****************************************************************
+HRESULT SecurityUtil::Init()
+{
+ CONTRACTL
+ {
+ NOTHROW;
+ GC_NOTRIGGER;
+ }
+ CONTRACTL_END;
+
+ HRESULT hr = S_OK;
+
+ if (m_pACL)
+ {
+ if (!InitializeSecurityDescriptor(&m_SD, SECURITY_DESCRIPTOR_REVISION))
+ {
+ hr = HRESULT_FROM_GetLastError();
+ return hr;
+ }
+ if (!SetSecurityDescriptorDacl(&m_SD, TRUE, m_pACL, FALSE))
+ {
+ hr = HRESULT_FROM_GetLastError();
+ return hr;
+ }
+
+ m_SA.nLength = sizeof(SECURITY_ATTRIBUTES);
+ m_SA.lpSecurityDescriptor = &m_SD;
+ m_SA.bInheritHandle = FALSE;
+ m_fInitialized = true;
+ }
+ return S_OK;
+}
+
+// ***************************************************************************
+// Initialization functions which will call the normal Init and add a
+// mandatory label entry to the sacl
+//
+// Expects hProcess to be a valid handle to the process which has the desired
+// mandatory label
+// ***************************************************************************
+HRESULT SecurityUtil::Init(HANDLE hProcess)
+{
+ CONTRACTL
+ {
+ NOTHROW;
+ GC_NOTRIGGER;
+ }
+ CONTRACTL_END;
+
+ HRESULT hr = Init();
+ if (FAILED(hr))
+ {
+ return hr;
+ }
+
+ NewArrayHolder<BYTE> pLabel;
+
+ hr = GetMandatoryLabelFromProcess(hProcess, &pLabel);
+ if (FAILED(hr))
+ {
+ return hr;
+ }
+
+ TOKEN_MANDATORY_LABEL * ptml = (TOKEN_MANDATORY_LABEL *) pLabel.GetValue();
+
+ hr = SetSecurityDescriptorMandatoryLabel(ptml->Label.Sid);
+
+ return hr;
+}
+
+
+// ***************************************************************************
+// Given a process, this will put the mandatory label into a buffer and point
+// ppbLabel at the buffer.
+//
+// Caller must free ppbLabel via the array "delete []" operator
+// ***************************************************************************
+HRESULT SecurityUtil::GetMandatoryLabelFromProcess(HANDLE hProcess, LPBYTE * ppbLabel)
+{
+ *ppbLabel = NULL;
+
+ DWORD dwSize = 0;
+ HandleHolder hToken;
+ DWORD err = 0;
+
+ if(!OpenProcessToken(hProcess, TOKEN_QUERY, &hToken))
+ {
+ return HRESULT_FROM_GetLastError();
+ }
+
+ if(!GetTokenInformation(hToken, (TOKEN_INFORMATION_CLASS)TokenIntegrityLevel, NULL, 0, &dwSize))
+ {
+ err = GetLastError();
+ }
+
+ // We need to make sure that GetTokenInformation failed in a predictable manner so we know that
+ // dwSize has the correct buffer size in it.
+ if (err != ERROR_INSUFFICIENT_BUFFER || dwSize == 0)
+ {
+ return HRESULT_FROM_WIN32(err);
+ }
+
+ NewArrayHolder<BYTE> pLabel = new (nothrow) BYTE[dwSize];
+ if (pLabel == NULL)
+ {
+ return E_OUTOFMEMORY;
+ }
+
+ if(!GetTokenInformation(hToken, (TOKEN_INFORMATION_CLASS)TokenIntegrityLevel, pLabel, dwSize, &dwSize))
+ {
+ return HRESULT_FROM_GetLastError();
+ }
+
+ // Our caller will be freeing the memory so use Extract
+ *ppbLabel = pLabel.Extract();
+
+ return S_OK;
+}
+
+//---------------------------------------------------------------------------------------
+//
+// Returns pointer inside the specified mandatory SID to the DWORD representing the
+// integrity level of the process. This DWORD will be one of the
+// SECURITY_MANDATORY_*_RID constants.
+//
+// Arguments:
+// psidIntegrityLevelLabel - [in] PSID in which to find the integrity level.
+//
+// Return Value:
+// Pointer to the RID stored in the specified SID. This RID represents the
+// integrity level of the process
+//
+
+// static
+DWORD * SecurityUtil::GetIntegrityLevelFromMandatorySID(PSID psidIntegrityLevelLabel)
+{
+ CONTRACTL
+ {
+ NOTHROW;
+ GC_NOTRIGGER;
+ }
+ CONTRACTL_END;
+
+ return GetSidSubAuthority(psidIntegrityLevelLabel, (*GetSidSubAuthorityCount(psidIntegrityLevelLabel) - 1));
+}
+
+// Creates a mandatory label ace and sets it to be the entry in the
+// security descriptor's sacl. This assumes there are no other entries
+// in the sacl
+HRESULT SecurityUtil::SetSecurityDescriptorMandatoryLabel(PSID psidIntegrityLevelLabel)
+{
+ CONTRACTL
+ {
+ NOTHROW;
+ GC_NOTRIGGER;
+ }
+ CONTRACTL_END;
+
+ DWORD cbSid = GetLengthSid(psidIntegrityLevelLabel);
+ DWORD cbAceStart = offsetof(SYSTEM_MANDATORY_LABEL_ACE, SidStart);
+ // We are about allocate memory for a ACL and an ACE so we need space for:
+ // 1) the ACL: sizeof(ACL)
+ // 2) the entry: the sid is of variable size, so the SYSTEM_MANDATORY_LABEL_ACE
+ // structure has only the first DWORD of the sid in its definition, to get the
+ // appropriate size we get size without SidStart and add on the actual size of the sid
+ DWORD cbSacl = sizeof(ACL) + cbAceStart + cbSid;
+
+ NewArrayHolder<BYTE> sacl = new (nothrow) BYTE[cbSacl];
+
+ m_pSacl = NULL;
+
+ if (sacl == NULL)
+ {
+ return E_OUTOFMEMORY;
+ }
+ ZeroMemory(sacl.GetValue(), cbSacl);
+ PACL pSacl = reinterpret_cast<ACL *>(sacl.GetValue());
+ SYSTEM_MANDATORY_LABEL_ACE * pLabelAce = reinterpret_cast<SYSTEM_MANDATORY_LABEL_ACE *>(sacl.GetValue() + sizeof(ACL));
+ PSID psid = reinterpret_cast<SID *>(&pLabelAce->SidStart);
+
+ // Our buffer looks like this now: (not drawn to scale)
+ // sacl pSacl pLabelAce psid
+ // - -
+ // | |
+ // | - -
+ // | |
+ // | | -
+ // | - |
+ // - -
+
+ DWORD dwIntegrityLevel = *(GetIntegrityLevelFromMandatorySID(psidIntegrityLevelLabel));
+
+ if (dwIntegrityLevel >= SECURITY_MANDATORY_MEDIUM_RID)
+ {
+ // No need to set the integrity level unless it's lower than medium
+ return S_OK;
+ }
+
+ if(!InitializeAcl(pSacl, cbSacl, ACL_REVISION))
+ {
+ return HRESULT_FROM_GetLastError();
+ }
+
+ pSacl->AceCount = 1;
+
+ pLabelAce->Header.AceType = SYSTEM_MANDATORY_LABEL_ACE_TYPE;
+ pLabelAce->Header.AceSize = WORD(cbAceStart + cbSid);
+ pLabelAce->Mask = SYSTEM_MANDATORY_LABEL_NO_WRITE_UP;
+
+ memcpy(psid, psidIntegrityLevelLabel, cbSid);
+
+ if(!SetSecurityDescriptorSacl(m_SA.lpSecurityDescriptor, TRUE, pSacl, FALSE))
+ {
+ return HRESULT_FROM_GetLastError();
+ }
+
+ // No need to delete the sacl buffer, it will be deleted in the
+ // destructor of this class
+ m_pSacl = (PACL)sacl.Extract();
+ return S_OK;
+}
+
+//*****************************************************************
+// Return SECURITY_ATTRIBUTES that we form in the Init function
+//
+// No clean up is needed after calling this function. The destructor of the
+// instance will do the right thing. Note that this is designed such that
+// we minimize memory allocation, ie the SECURITY_DESCRIPTOR and
+// SECURITY_ATTRIBUTES are embedded in the SecurityUtil instance.
+//
+// Caller should not modify the returned SECURITY_ATTRIBUTES!!!
+//*****************************************************************
+HRESULT SecurityUtil::GetSA(SECURITY_ATTRIBUTES **ppSA)
+{
+ CONTRACTL
+ {
+ NOTHROW;
+ GC_NOTRIGGER;
+ }
+ CONTRACTL_END;
+
+ _ASSERTE(ppSA);
+
+ if (m_fInitialized == false)
+ {
+ _ASSERTE(!"Bad code path!");
+ *ppSA = NULL;
+ return E_FAIL;
+ }
+
+ *ppSA = &m_SA;
+ return S_OK;
+}
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+
+#ifndef SECURITYUTIL_H
+#define SECURITYUTIL_H
+
+#include "winnt.h"
+
+// Security utility class. This is currently used by the debugger right-side and dbgshim to figure out the
+// SECURITY_ATTRIBUTES to use on various IPC objects (named events, etc.).
+// This is pretty debugger specific, and so perhaps doesn't actually belong in utilcode (that's just the most
+// convenient way to share it between mscordbi and dbgshim.dll). This is also a pretty big mess. All of
+// this ACL craziness is already gone in Arrowhead, so it's not a high priority to clean this up.
+class SecurityUtil
+{
+public:
+
+ //
+ // This will generate ACL containing the current process and
+ // an allowed ACE on the target process of the given pid.
+ //
+ // Host should free returned *ppACL by calling FreeACL
+ //
+ static HRESULT GetACLOfPid(DWORD pid, PACL *ppACL);
+
+ static void FreeACL(PACL pACL);
+
+ static HRESULT GetMandatoryLabelFromProcess(HANDLE hProcess, LPBYTE * ppbLabel);
+ static DWORD * GetIntegrityLevelFromMandatorySID(PSID psidIntegrityLevelLabel);
+
+ // instance functions. SecurityUtil is used to minimized memory allocation when converting
+ // pACL to SECURITY_ATTRIBUTES
+ // The needed memory to hold SECURITY_ATTRIBUTES and SECURITY_DESCRIPTOR are embedded
+ // in the SecurityUtil instance.
+ //
+ SecurityUtil(PACL pACL);
+ ~SecurityUtil();
+ HRESULT Init();
+ HRESULT Init(HANDLE pid);
+ HRESULT GetSA(SECURITY_ATTRIBUTES **PPSA);
+private:
+ HRESULT SetSecurityDescriptorMandatoryLabel(PSID psidIntegrityLevelLabel);
+ SECURITY_ATTRIBUTES m_SA;
+ SECURITY_DESCRIPTOR m_SD;
+ PACL m_pACL;
+ // Saved by SetSecurityDescriptorMandatoryLabel so that the memory can be deleted properly
+ PACL m_pSacl;
+ bool m_fInitialized;
+};
+
+#endif // !SECURITYUTIL_H
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//*****************************************************************************
+// File: SecurityWrapper.cpp
+//
+
+//
+// Wrapper around Win32 Security functions
+//
+//*****************************************************************************
+
+#include "stdafx.h"
+
+#include "securitywrapper.h"
+#include "ex.h"
+#include "holder.h"
+
+
+// For GetSidFromProcess*
+#include <tlhelp32.h>
+#include "wtsapi32.h"
+
+
+//-----------------------------------------------------------------------------
+// Constructor for Sid wrapper class.
+// pSid - OS sid to wrap
+//-----------------------------------------------------------------------------
+Sid::Sid(PSID pSid)
+{
+ _ASSERTE(pSid != NULL);
+ m_pSid = pSid;
+}
+
+//-----------------------------------------------------------------------------
+// Aesthetic wrapper for Sid equality
+//-----------------------------------------------------------------------------
+bool Sid::Equals(PSID a, PSID b)
+{
+ return EqualSid(a, b) != 0;
+}
+
+//-----------------------------------------------------------------------------
+// Ctor for SidBuffer class
+//-----------------------------------------------------------------------------
+SidBuffer::SidBuffer()
+{
+ m_pBuffer = NULL;
+}
+
+//-----------------------------------------------------------------------------
+// Dtor for SidBuffer class.
+//-----------------------------------------------------------------------------
+SidBuffer::~SidBuffer()
+{
+ delete [] m_pBuffer;
+}
+
+//-----------------------------------------------------------------------------
+// Get the underlying sid
+// Caller assumes SidBuffer has been initialized.
+//-----------------------------------------------------------------------------
+Sid SidBuffer::GetSid()
+{
+ _ASSERTE(m_pBuffer != NULL);
+ Sid s((PSID) m_pBuffer);
+ return s;
+}
+
+// ----------------------------------------------------------------------------
+// Used by GetSidFromProcessWorker to determine which SID from the
+// process token to use when initializing the SID
+enum SidType
+{
+ // Use TokenOwner: the default owner SID used for newly created objects
+ kOwnerSid,
+
+ // Use TokenUser: the user account from the token
+ kUserSid,
+};
+
+// ----------------------------------------------------------------------------
+// GetSidFromProcessWorker
+//
+// Description:
+// Internal helper. Gets the SID for the given process and given sid type
+//
+// Arguments:
+// * dwProcessId - [in] Process to get SID from
+// * sidType - [in] Type of sid to get (owner or user)
+// * ppSid - [out] SID found. Caller responsible for deleting this memory.
+//
+// Return Value:
+// HRESULT indicating success / failure.
+//
+// Notes:
+// * Caller owns deleting (*ppSid) when done with the SID
+//
+
+HRESULT GetSidFromProcessWorker(DWORD dwProcessId, SidType sidType, PSID *ppSid)
+{
+ CONTRACTL
+ {
+ NOTHROW;
+ GC_NOTRIGGER;
+ }
+ CONTRACTL_END;
+
+ HRESULT hr = S_OK;
+ TOKEN_USER *pTokUser = NULL;
+ HANDLE hProc = INVALID_HANDLE_VALUE;
+ HANDLE hToken = INVALID_HANDLE_VALUE;
+ DWORD dwRetLength = 0;
+ LPVOID pvTokenInfo = NULL;
+ TOKEN_INFORMATION_CLASS tokenInfoClass;
+ PSID pSidFromTokenInfo = NULL;
+ DWORD cbSid;
+ PSID pSid = NULL;
+
+ LOG((LF_CORDB, LL_INFO10000,
+ "SecurityUtil::GetSidFromProcess: 0x%08x\n",
+ dwProcessId));
+
+ _ASSERTE(ppSid);
+ *ppSid = NULL;
+
+ _ASSERTE((sidType == kOwnerSid) || (sidType == kUserSid));
+ tokenInfoClass = (sidType == kOwnerSid) ? TokenOwner : TokenUser;
+
+ hProc = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, dwProcessId);
+
+ if (hProc == NULL)
+ {
+ hr = HRESULT_FROM_GetLastError();
+ goto exit;
+ }
+ if (!OpenProcessToken(hProc, TOKEN_QUERY, &hToken))
+ {
+ hr = HRESULT_FROM_GetLastError();
+ goto exit;
+ }
+
+ // figure out the length
+ GetTokenInformation(hToken, tokenInfoClass, NULL, 0, &dwRetLength);
+ _ASSERTE(dwRetLength);
+
+ pvTokenInfo = new (nothrow) BYTE[dwRetLength];
+ if (pvTokenInfo == NULL)
+ {
+ hr = E_OUTOFMEMORY;
+ goto exit;
+ }
+
+ if (!GetTokenInformation(hToken, tokenInfoClass, pvTokenInfo, dwRetLength, &dwRetLength))
+ {
+ hr = HRESULT_FROM_GetLastError();
+ goto exit;
+ }
+
+ // Copy over the SID
+ pSidFromTokenInfo =
+ (sidType == kOwnerSid) ?
+ ((TOKEN_OWNER *) pvTokenInfo)->Owner :
+ ((TOKEN_USER *) pvTokenInfo)->User.Sid;
+ cbSid = GetLengthSid(pSidFromTokenInfo);
+ pSid = new (nothrow) BYTE[cbSid];
+ if (pSid == NULL)
+ {
+ hr = E_OUTOFMEMORY;
+ }
+ else
+ {
+ if (!CopySid(cbSid, pSid, pSidFromTokenInfo))
+ {
+ hr = HRESULT_FROM_GetLastError();
+ goto exit;
+ }
+ }
+
+ *ppSid = pSid;
+ pSid = NULL;
+
+exit:
+ if (hToken != INVALID_HANDLE_VALUE)
+ {
+ CloseHandle(hToken);
+ }
+ if (hProc != INVALID_HANDLE_VALUE)
+ {
+ // clean up
+ CloseHandle(hProc);
+ }
+ if (pvTokenInfo)
+ {
+ delete [] (reinterpret_cast<BYTE*>(pvTokenInfo));
+ }
+
+ if (pSid)
+ {
+ delete [] (reinterpret_cast<BYTE*>(pSid));
+ }
+
+ LOG((LF_CORDB, LL_INFO10000,
+ "SecurityUtil::GetSidFromProcess return hr : 0x%08x\n",
+ hr));
+
+ return hr;
+}
+
+//-----------------------------------------------------------------------------
+// The functions below initialize this SidBuffer instance with a Sid from
+// the token of the specified process. The first pair use the OWNER sid from
+// the process token if possible; else use the term serv API to find the
+// USER sid from the process token. This seems a little inconsistent, but
+// remains this way for backward compatibility. The second pair consistently
+// use the USER sid (never the OWNER).
+//
+// While the USER and OWNER sid are often the same, they are not always the
+// same. For example, running a process on win2k3 server as a member of the
+// local admin group causes the USER sid to be the logged-on user, and the
+// OWNER sid to be the local admins group. At least, that's how it was on
+// Monday. Expect this to change randomly at unexpected times, as most
+// security-related behavior does.
+//-----------------------------------------------------------------------------
+
+
+// ----------------------------------------------------------------------------
+// SidBuffer::InitFromProcessNoThrow
+//
+// Description:
+// Initialize this SidBuffer instance with a Sid from the token of the specified
+// process. Use the OWNER sid from the process token if possible; else use the term
+// serv API to find the USER sid from the process token. This seems a little
+// inconsistent, but remains this way for backward compatibility.
+//
+// Arguments:
+// * pid - Process ID from which to grab the SID
+//
+// Return Value:
+// HRESULT indicating success / failure
+//
+
+HRESULT SidBuffer::InitFromProcessNoThrow(DWORD pid)
+{
+ CONTRACTL
+ {
+ NOTHROW;
+ GC_NOTRIGGER;
+ }
+ CONTRACTL_END;
+
+ _ASSERTE(m_pBuffer == NULL);
+ HRESULT hr = GetSidFromProcessWorker(pid, kOwnerSid, (PSID *) &m_pBuffer);
+ if (FAILED(hr))
+ {
+ return hr;
+ }
+
+ _ASSERTE(m_pBuffer != NULL);
+ return S_OK;
+}
+
+// See code:SidBuffer::InitFromProcessNoThrow. Throws if there's an error.
+void SidBuffer::InitFromProcess(DWORD pid)
+{
+ CONTRACTL
+ {
+ THROWS;
+ GC_NOTRIGGER;
+ }
+ CONTRACTL_END;
+
+ HRESULT hr = InitFromProcessNoThrow(pid);
+ if (FAILED(hr))
+ {
+ ThrowHR(hr);
+ }
+}
+
+// ----------------------------------------------------------------------------
+// SidBuffer::InitFromProcessAppContainerSidNoThrow
+//
+// Description:
+// Initialize this SidBuffer instance with the TokenAppContainerSid from
+// the process token
+//
+// Arguments:
+// * pid - Process ID from which to grab the SID
+//
+// Return Value:
+// HRESULT indicating success / failure
+// S_FALSE indicates the process isn't in an AppContainer
+//
+HRESULT SidBuffer::InitFromProcessAppContainerSidNoThrow(DWORD pid)
+{
+ HRESULT hr = S_OK;
+ HANDLE hToken = NULL;
+ BOOL fIsLowBox = FALSE;
+
+ HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
+ if (hProcess == NULL)
+ {
+ hr = HRESULT_FROM_GetLastError();
+ goto exit;
+ }
+ if (!OpenProcessToken(hProcess, TOKEN_QUERY, &hToken))
+ {
+ hr = HRESULT_FROM_GetLastError();
+ goto exit;
+ }
+
+ // Define new TOKEN_INFORMATION_CLASS/ TOKEN_APPCONTAINER_INFORMATION members for Win8 since they are not in the DevDiv copy of WinSDK yet
+ typedef enum _TOKEN_INFORMATION_CLASS_WIN8 {
+ TokenIsAppContainer = TokenLogonSid + 1,
+ TokenCapabilities,
+ TokenAppContainerSid
+ } TOKEN_INFORMATION_CLASS_WIN8;
+
+ typedef struct _TOKEN_APPCONTAINER_INFORMATION
+ {
+ PSID TokenPackage;
+ } TOKEN_APPCONTAINER_INFORMATION, *PTOKEN_APPCONTAINER_INFORMATION;
+
+ DWORD size;
+ if (!GetTokenInformation(hToken, (TOKEN_INFORMATION_CLASS)TokenIsAppContainer, &fIsLowBox, sizeof(fIsLowBox), &size))
+ {
+ DWORD gle = GetLastError();
+ if (gle == ERROR_INVALID_PARAMETER || gle == ERROR_INVALID_FUNCTION)
+ {
+ hr = S_FALSE; // We are on an OS which doesn't understand LowBox
+ }
+ else
+ {
+ hr = HRESULT_FROM_WIN32(gle);
+ }
+ goto exit;
+ }
+
+ if (!fIsLowBox)
+ {
+ hr = S_FALSE;
+ goto exit;
+ }
+
+ UCHAR PackSid[SECURITY_MAX_SID_SIZE + sizeof(TOKEN_APPCONTAINER_INFORMATION)];
+ if (!GetTokenInformation(hToken, (TOKEN_INFORMATION_CLASS)TokenAppContainerSid, &PackSid, sizeof(PackSid), &size))
+ {
+ hr = HRESULT_FROM_GetLastError();
+ goto exit;
+ }
+
+ {
+ PTOKEN_APPCONTAINER_INFORMATION pTokPack = (PTOKEN_APPCONTAINER_INFORMATION)&PackSid;
+ PSID pLowBoxPackage = pTokPack->TokenPackage;
+ DWORD dwSidLen = GetLengthSid(pLowBoxPackage);
+ m_pBuffer = new (nothrow) BYTE[dwSidLen];
+ if (m_pBuffer == NULL)
+ {
+ hr = E_OUTOFMEMORY;
+ goto exit;
+ }
+ else
+ {
+ if (!CopySid(dwSidLen, m_pBuffer, pLowBoxPackage))
+ {
+ hr = HRESULT_FROM_GetLastError();
+ delete m_pBuffer;
+ m_pBuffer = NULL;
+ goto exit;
+ }
+ }
+ }
+
+exit:
+ if (hProcess != NULL)
+ {
+ CloseHandle(hProcess);
+ }
+ if (hToken != NULL)
+ {
+ CloseHandle(hToken);
+ }
+
+ return hr;
+}
+
+// ----------------------------------------------------------------------------
+// SidBuffer::InitFromProcessUserNoThrow
+//
+// Description:
+// Initialize this SidBuffer instance with a Sid from the token of the specified
+// process. Use the USER sid from the process token if possible; else use the term
+// serv API to find the USER sid from the process token.
+//
+// Arguments:
+// * pid - Process ID from which to grab the SID
+//
+// Return Value:
+// HRESULT indicating success / failure
+//
+
+HRESULT SidBuffer::InitFromProcessUserNoThrow(DWORD pid)
+{
+ CONTRACTL
+ {
+ NOTHROW;
+ GC_NOTRIGGER;
+ }
+ CONTRACTL_END;
+
+ _ASSERTE(m_pBuffer == NULL);
+ HRESULT hr = GetSidFromProcessWorker(pid, kUserSid, (PSID *) &m_pBuffer);
+ if (FAILED(hr))
+ {
+ return hr;
+ }
+
+ _ASSERTE(m_pBuffer != NULL);
+ return S_OK;
+}
+
+// See code:SidBuffer::InitFromProcessUserNoThrow. Throws if there's an error.
+void SidBuffer::InitFromProcessUser(DWORD pid)
+{
+ CONTRACTL
+ {
+ THROWS;
+ GC_NOTRIGGER;
+ }
+ CONTRACTL_END;
+
+ HRESULT hr = InitFromProcessUserNoThrow(pid);
+ if (FAILED(hr))
+ {
+ ThrowHR(hr);
+ }
+}
+
+//-----------------------------------------------------------------------------
+// Ctor for Dacl class. Wraps a win32 dacl.
+//-----------------------------------------------------------------------------
+Dacl::Dacl(PACL pAcl)
+{
+ m_acl = pAcl;
+}
+
+//-----------------------------------------------------------------------------
+// Get number of ACE (Access Control Entries) in this DACL.
+//-----------------------------------------------------------------------------
+SIZE_T Dacl::GetAceCount()
+{
+ return (SIZE_T) m_acl->AceCount;
+}
+
+//-----------------------------------------------------------------------------
+// Get Raw a ACE at the given index.
+// Caller assumes index is valid (0 <= dwAceIndex < GetAceCount())
+// Throws on error (which should only be if the index is out of bounds).
+//-----------------------------------------------------------------------------
+ACE_HEADER * Dacl::GetAce(SIZE_T dwAceIndex)
+{
+ CONTRACTL {
+ THROWS;
+ GC_NOTRIGGER;
+ } CONTRACTL_END;
+
+ ACE_HEADER * pAce = NULL;
+ BOOL fOk = ::GetAce(m_acl, (DWORD) dwAceIndex, (LPVOID*) &pAce);
+ _ASSERTE(fOk == (pAce != NULL));
+ if (!fOk)
+ {
+ ThrowLastError();
+ }
+ return pAce;
+}
+
+
+
+//-----------------------------------------------------------------------------
+// Ctor for SecurityDescriptor
+//-----------------------------------------------------------------------------
+Win32SecurityDescriptor::Win32SecurityDescriptor()
+{
+ m_pDesc = NULL;
+}
+
+//-----------------------------------------------------------------------------
+// Dtor for security Descriptor.
+//-----------------------------------------------------------------------------
+Win32SecurityDescriptor::~Win32SecurityDescriptor()
+{
+ delete [] ((BYTE*) m_pDesc);
+}
+
+
+
+//-----------------------------------------------------------------------------
+// Get the dacl for this security descriptor.
+//-----------------------------------------------------------------------------
+Dacl Win32SecurityDescriptor::GetDacl()
+{
+ CONTRACTL {
+ THROWS;
+ GC_NOTRIGGER;
+ } CONTRACTL_END;
+
+ _ASSERTE(m_pDesc != NULL);
+
+ BOOL bPresent;
+ BOOL bDaclDefaulted;
+ PACL acl;
+
+ if (GetSecurityDescriptorDacl(m_pDesc, &bPresent, &acl, &bDaclDefaulted) == 0)
+ {
+ ThrowLastError();
+ }
+ if (!bPresent)
+ {
+ // No dacl. We consider this an error because all of the objects we expect
+ // to see should be dacled. If it's not dacled, then it's a malicious user spoofing it.
+ ThrowHR(E_INVALIDARG);
+ }
+
+ Dacl d(acl);
+ return d;
+}
+
+//-----------------------------------------------------------------------------
+// Get the owner from the security descriptor.
+//-----------------------------------------------------------------------------
+HRESULT Win32SecurityDescriptor::GetOwnerNoThrow( PSID* ppSid)
+{
+ CONTRACTL {
+ NOTHROW;
+ GC_NOTRIGGER;
+ } CONTRACTL_END;
+
+ _ASSERTE(m_pDesc != NULL);
+ BOOL bOwnerDefaulted;
+
+ if( ppSid == NULL )
+ {
+ return E_INVALIDARG;
+ }
+
+ if (GetSecurityDescriptorOwner(m_pDesc, ppSid, &bOwnerDefaulted) == 0)
+ {
+ DWORD err = GetLastError();
+ return HRESULT_FROM_WIN32(err);
+ }
+
+ return S_OK;
+}
+Sid Win32SecurityDescriptor::GetOwner()
+{
+ CONTRACTL {
+ THROWS;
+ GC_NOTRIGGER;
+ } CONTRACTL_END;
+
+ PSID pSid;
+ HRESULT hr = GetOwnerNoThrow( &pSid );
+ if( FAILED(hr) )
+ {
+ ThrowHR( hr );
+ }
+
+ Sid s(pSid);
+ return s;
+}
+
+//-----------------------------------------------------------------------------
+// Initialize this instance of a SecurityDescriptor with the SD for the handle.
+// The handle must have READ_CONTROL permissions to do this.
+// Throws on error.
+//-----------------------------------------------------------------------------
+HRESULT Win32SecurityDescriptor::InitFromHandleNoThrow(HANDLE h)
+{
+ CONTRACTL {
+ NOTHROW;
+ GC_NOTRIGGER;
+ } CONTRACTL_END;
+
+ _ASSERTE(m_pDesc == NULL); // only init once.
+
+ DWORD cbNeeded = 0;
+
+ DWORD flags = OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION;
+
+ // Now get the creator's SID. First get the size of the array needed.
+ BOOL fOk = GetKernelObjectSecurity(h, flags, NULL, 0, &cbNeeded);
+ DWORD err = GetLastError();
+
+ // Caller should give us a handle for which this succeeds. First call will
+ // fail w/ InsufficientBuffer.
+ CONSISTENCY_CHECK_MSGF(fOk || (err == ERROR_INSUFFICIENT_BUFFER), ("Failed to get KernelSecurity for object handle=%p.Err=%d\n", h, err));
+
+ PSECURITY_DESCRIPTOR pSD = (PSECURITY_DESCRIPTOR) new(nothrow) BYTE[cbNeeded];
+ if( pSD == NULL )
+ {
+ return E_OUTOFMEMORY;
+ }
+
+ if (GetKernelObjectSecurity(h, flags, pSD, cbNeeded, &cbNeeded) == 0)
+ {
+ // get last error and fail out.
+ err = GetLastError();
+ delete [] ((BYTE*) pSD);
+ return HRESULT_FROM_WIN32(err);
+ }
+
+ m_pDesc = pSD;
+ return S_OK;
+}
+void Win32SecurityDescriptor::InitFromHandle(HANDLE h)
+{
+ CONTRACTL {
+ THROWS;
+ GC_NOTRIGGER;
+ } CONTRACTL_END;
+
+ HRESULT hr = InitFromHandleNoThrow(h);
+ if (FAILED(hr))
+ {
+ ThrowHR(hr);
+ }
+}
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//*****************************************************************************
+// File: SecurityWrapper.h
+//
+// Wrapper around Win32 Security functions
+//
+//*****************************************************************************
+
+
+#ifndef _SECURITY_WRAPPER_H
+#define _SECURITY_WRAPPER_H
+
+#ifdef TARGET_UNIX
+#error This file should not be included on non-Windows platforms.
+#endif
+
+//-----------------------------------------------------------------------------
+// Wrapper around a PSID.
+// This class does not own the memory.
+//-----------------------------------------------------------------------------
+class Sid
+{
+public:
+ // Initial the Sid wrapper around an existing SID.
+ Sid(PSID pSid);
+ static bool Equals(const Sid & a, const Sid & b) { return Equals(a.m_pSid, b.m_pSid); }
+ static bool Equals(const Sid & a, PSID b) { return Equals(a.m_pSid, b); }
+ static bool Equals(PSID a, const Sid & b) { return Equals(a, b.m_pSid); }
+ static bool Equals(PSID a, PSID b);
+
+ PSID RawSid() { return m_pSid; }
+protected:
+ // Pointer to Sid buffer. We don't owner the data.
+ PSID m_pSid;
+};
+
+//-----------------------------------------------------------------------------
+// Wrapper around a PSID with buffer.
+//-----------------------------------------------------------------------------
+class SidBuffer
+{
+public:
+ SidBuffer();
+ ~SidBuffer();
+
+ // Get the underlying sid
+ Sid GetSid();
+
+ // Do we not have a sid? This will be true if init fails.
+ bool IsNull() { return m_pBuffer == NULL; }
+
+ // Go to definitions to see detailed comments
+ HRESULT InitFromProcessNoThrow(DWORD pid);
+ void InitFromProcess(DWORD pid); // throws
+ HRESULT InitFromProcessUserNoThrow(DWORD pid);
+ void InitFromProcessUser(DWORD pid); // throws
+ HRESULT InitFromProcessAppContainerSidNoThrow(DWORD pid);
+
+protected:
+ BYTE * m_pBuffer;
+};
+
+//-----------------------------------------------------------------------------
+// Access Control List.
+//-----------------------------------------------------------------------------
+class Dacl
+{
+public:
+ Dacl(PACL pAcl);
+
+ SIZE_T GetAceCount();
+ ACE_HEADER * GetAce(SIZE_T dwAceIndex);
+protected:
+ PACL m_acl;
+};
+
+//-----------------------------------------------------------------------------
+// Represent a win32 SECURITY_DESCRIPTOR object.
+// (Note there's a "SecurityDescriptor" class in the VM for managed goo,
+// so we prefix this with "Win32" to avoid a naming collision.)
+//-----------------------------------------------------------------------------
+class Win32SecurityDescriptor
+{
+public:
+ Win32SecurityDescriptor();
+ ~Win32SecurityDescriptor();
+
+ HRESULT InitFromHandleNoThrow(HANDLE h);
+ void InitFromHandle(HANDLE h); // throws
+
+ // Gets the owner SID from this SecurityDescriptor.
+ HRESULT GetOwnerNoThrow( PSID* ppSid );
+ Sid GetOwner(); // throws
+ Dacl GetDacl(); // throws
+
+protected:
+ PSECURITY_DESCRIPTOR m_pDesc;
+};
+
+
+#endif // _SECURITY_WRAPPER_H
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//*****************************************************************************
+// stdafx.h
+//
+
+//
+// Common include file for utility code.
+//*****************************************************************************
+#pragma once
+
+#include <switches.h>
+#include <crtwrap.h>
+#include <dn-u16.h>
+
+#define IN_WINFIX_CPP
+
+#include <winwrap.h>
+
+#include "volatile.h"
+#include "static_assert.h"
+
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+// Empty version of the runtime's corcompile.h
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#pragma once
+
+// This class acts a smart pointer which calls the Release method on any object
+// you place in it when the ReleaseHolder class falls out of scope. You may use it
+// just like you would a standard pointer to a COM object (including if (foo),
+// if (!foo), if (foo == 0), etc) except for two caveats:
+// 1. This class never calls AddRef and it always calls Release when it
+// goes out of scope.
+// 2. You should never use & to try to get a pointer to a pointer unless
+// you call Release first, or you will leak whatever this object contains
+// prior to updating its internal pointer.
+template<class T>
+class ReleaseHolder
+{
+public:
+ ReleaseHolder()
+ : m_ptr(nullptr)
+ {}
+
+ ReleaseHolder(T* ptr)
+ : m_ptr(ptr)
+ {}
+
+ ~ReleaseHolder()
+ {
+ Release();
+ }
+
+ void operator=(T *ptr)
+ {
+ Release();
+
+ m_ptr = ptr;
+ }
+
+ T* operator->()
+ {
+ return m_ptr;
+ }
+
+ operator T*()
+ {
+ return m_ptr;
+ }
+
+ void** operator&()
+ {
+ return (void**)&m_ptr;
+ }
+
+ T* GetPtr() const
+ {
+ return m_ptr;
+ }
+
+ T* Detach()
+ {
+ T* pT = m_ptr;
+ m_ptr = nullptr;
+ return pT;
+ }
+
+ void Release()
+ {
+ if (m_ptr != nullptr)
+ {
+ m_ptr->Release();
+ m_ptr = nullptr;
+ }
+ }
+
+private:
+ T* m_ptr;
+};
+
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+/******************************************************************
+* *
+* intsafe.h -- This module defines helper functions to prevent *
+* integer overflow issues. *
+* *
+* *
+******************************************************************/
+#ifndef _INTSAFE_H_INCLUDED_
+#define _INTSAFE_H_INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif
+
+#include <specstrings.h> // for IN, etc.
+
+#define INTSAFE_E_ARITHMETIC_OVERFLOW ((HRESULT)0x80070216L) // 0x216 = 534 = ERROR_ARITHMETIC_OVERFLOW
+
+#ifndef LOWORD
+#define LOWORD(l) ((WORD)(((DWORD_PTR)(l)) & 0xffff))
+#endif
+
+#ifndef HIWORD
+#define HIWORD(l) ((WORD)(((DWORD_PTR)(l)) >> 16))
+#endif
+
+#define HIDWORD(_qw) ((ULONG)((_qw) >> 32))
+#define LODWORD(_qw) ((ULONG)(_qw))
+
+#if defined(MIDL_PASS) || defined(RC_INVOKED) || defined(_M_CEE_PURE) \
+ || defined(TARGET_AMD64) || defined(TARGET_ARM64) || defined(TARGET_S390X) || defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64)
+
+#ifndef UInt32x32To64
+#define UInt32x32To64(a, b) ((uint64_t)((ULONG)(a)) * (uint64_t)((ULONG)(b)))
+#endif
+
+#elif defined(TARGET_X86) || defined(TARGET_ARM)
+
+#ifndef UInt32x32To64
+#define UInt32x32To64(a, b) (uint64_t)((uint64_t)(ULONG)(a) * (ULONG)(b))
+#endif
+
+#else
+
+#error Must define a target architecture.
+
+#endif
+
+#define DWORD_MAX 0xffffffffUL
+
+//
+// It is common for -1 to be used as an error value for various types
+//
+#define USHORT_ERROR (0xffff)
+#define INT_ERROR (-1)
+#define LONG_ERROR (-1L)
+#define UINT_ERROR (0xffffffff)
+#define ULONG_ERROR (0xffffffffUL)
+#ifdef _MSC_VER
+#define ULONGLONG_ERROR (0xffffffffffffffffui64)
+#define HIDWORD_MASK (0xffffffff00000000ui64)
+#else // _MSC_VER
+#define ULONGLONG_ERROR (0xffffffffffffffffULL)
+#define HIDWORD_MASK (0xffffffff00000000ULL)
+#endif // _MSC_VER
+#ifdef HOST_64BIT
+#define SIZET_ERROR ULONGLONG_ERROR
+#else
+#define SIZET_ERROR ULONG_ERROR
+#endif
+
+//
+// We make some assumptions about the sizes of various types. Let's be
+// explicit about those assumptions and check them.
+//
+C_ASSERT(sizeof(unsigned short) == 2);
+C_ASSERT(sizeof(unsigned int) == 4);
+C_ASSERT(sizeof(ULONG) == 4);
+
+//
+// INT -> signed char conversion
+//
+__inline
+HRESULT
+IntToSignedChar(
+ IN INT iOperand,
+ OUT signed char* pch)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pch = 0;
+
+ if ((iOperand >= -128) && (iOperand <= 127))
+ {
+ *pch = (signed char)iOperand;
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// INT -> UCHAR conversion
+//
+__inline
+HRESULT
+IntToUChar(
+ IN INT iOperand,
+ OUT UCHAR* pch)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pch = 0;
+
+ if ((iOperand >= 0) && (iOperand <= 255))
+ {
+ *pch = (UCHAR)iOperand;
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// LONG -> UCHAR conversion
+//
+__inline
+HRESULT
+LongToUChar(
+ IN LONG lOperand,
+ OUT UCHAR* pch)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pch = 0;
+
+ if ((lOperand >= 0) && (lOperand <= 255))
+ {
+ *pch = (UCHAR)lOperand;
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// __inline is not sufficient. __forceinline is necessary.
+// If the function is not inlined and you link .objs compiled with different compiler switches,
+// you get one or the other function arbitrarily chosen.
+//
+// INT -> CHAR conversion
+//
+__forceinline
+HRESULT
+IntToChar(
+ IN INT iOperand,
+ OUT CHAR* pch)
+{
+#ifdef _CHAR_UNSIGNED
+ return IntToUChar(iOperand, (UCHAR*)pch);
+#else
+ return IntToSignedChar(iOperand, (signed char*)pch);
+#endif
+}
+
+//
+// INT -> USHORT conversion
+//
+__inline
+HRESULT
+IntToUShort(
+ IN INT iOperand,
+ OUT USHORT* pusResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pusResult = USHORT_ERROR;
+
+ if ((iOperand >= 0) && (iOperand <= USHRT_MAX))
+ {
+ *pusResult = (USHORT)iOperand;
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// INT -> UINT conversion
+//
+__inline
+HRESULT
+IntToUInt(
+ IN INT iOperand,
+ OUT UINT* puResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *puResult = UINT_ERROR;
+
+ if (iOperand >= 0)
+ {
+ *puResult = (UINT)iOperand;
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// INT -> ULONG conversion
+//
+__inline
+HRESULT
+IntToULong(
+ IN INT iOperand,
+ OUT ULONG* pulResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pulResult = ULONG_ERROR;
+
+ if (iOperand >= 0)
+ {
+ *pulResult = (ULONG)iOperand;
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// INT -> ULONGLONG conversion
+//
+__inline
+HRESULT
+IntToULongLong(
+ IN INT iOperand,
+ OUT ULONGLONG* pullResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pullResult = ULONG_ERROR;
+
+ if (iOperand >= 0)
+ {
+ *pullResult = (ULONGLONG)iOperand;
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// UINT -> signed char conversion
+//
+__inline
+HRESULT
+UIntToSignedChar(
+ IN UINT uOperand,
+ OUT signed char* pch)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pch = 0;
+
+ if (uOperand <= 127)
+ {
+ *pch = (signed char)uOperand;
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// UINT -> UCHAR conversion
+//
+__inline
+HRESULT
+UIntToUChar(
+ IN UINT uOperand,
+ OUT UCHAR* pch)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pch = 0;
+
+ if (uOperand <= 255)
+ {
+ *pch = (UCHAR)uOperand;
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// UINT -> BYTE conversion
+//
+#define UIntToByte UIntToUChar
+
+//
+// __inline is not sufficient. __forceinline is necessary.
+// If the function is not inlined and you link .objs compiled with different compiler switches,
+// you get one or the other function arbitrarily chosen.
+//
+// UINT -> CHAR conversion
+//
+__forceinline
+HRESULT
+UIntToChar(
+ IN UINT uOperand,
+ OUT CHAR* pch)
+{
+#ifdef _CHAR_UNSIGNED
+ return UIntToUChar(uOperand, (UCHAR*)pch);
+#else
+ return UIntToSignedChar(uOperand, (signed char*)pch);
+#endif // _CHAR_UNSIGNED
+}
+
+//
+// UINT -> INT conversion
+//
+__inline
+HRESULT
+UIntToInt(
+ IN UINT uOperand,
+ OUT INT* piResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *piResult = INT_ERROR;
+
+ if (uOperand <= INT_MAX)
+ {
+ *piResult = (INT)uOperand;
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// UINT -> LONG conversion
+//
+__inline
+HRESULT
+UIntToLong(
+ IN UINT Operand,
+ OUT LONG* Result)
+{
+ if (Operand <= INT32_MAX)
+ {
+ *Result = (LONG)Operand;
+ return S_OK;
+ }
+ else
+ {
+ *Result = LONG_ERROR;
+ return INTSAFE_E_ARITHMETIC_OVERFLOW;
+ }
+}
+
+//
+// UINT -> ULONG conversion
+//
+__inline
+HRESULT
+UIntToULong(
+ IN UINT uOperand,
+ OUT ULONG* pulResult)
+{
+ *pulResult = (ULONG)uOperand;
+
+ return S_OK;
+}
+
+//
+// ULONG -> UCHAR conversion
+//
+__inline
+HRESULT
+ULongToSignedChar(
+ IN ULONG ulOperand,
+ OUT signed char* pch)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pch = 0;
+
+ if (ulOperand <= 127)
+ {
+ *pch = (signed char)ulOperand;
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// ULONG -> UCHAR conversion
+//
+__inline
+HRESULT
+ULongToUChar(
+ IN ULONG ulOperand,
+ OUT unsigned char* pch)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pch = 0;
+
+ if (ulOperand <= 255)
+ {
+ *pch = (unsigned char)ulOperand;
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// __inline is not sufficient. __forceinline is necessary.
+// If the function is not inlined and you link .objs compiled with different compiler switches,
+// you get one or the other function arbitrarily chosen.
+//
+// ULONG -> CHAR conversion
+//
+__forceinline
+HRESULT
+ULongToChar(
+ IN ULONG ulOperand,
+ OUT CHAR* pch)
+{
+#ifdef _CHAR_UNSIGNED
+ return ULongToUChar(ulOperand, (unsigned char*)pch);
+#else
+ return ULongToSignedChar(ulOperand, (signed char*)pch);
+#endif // _CHAR_UNSIGNED
+}
+
+//
+// ULONG -> USHORT conversion
+//
+__inline
+HRESULT
+ULongToUShort(
+ IN ULONG ulOperand,
+ OUT USHORT* pusResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pusResult = USHORT_ERROR;
+
+ if (ulOperand <= USHRT_MAX)
+ {
+ *pusResult = (USHORT)ulOperand;
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// ULONG -> INT conversion
+//
+__inline
+HRESULT
+ULongToInt(
+ IN ULONG ulOperand,
+ OUT INT* piResult)
+{
+ if (ulOperand <= INT_MAX)
+ {
+ *piResult = (INT)ulOperand;
+ return S_OK;
+ }
+ else
+ {
+ *piResult = INT_ERROR;
+ return INTSAFE_E_ARITHMETIC_OVERFLOW;
+ }
+}
+
+//
+// ULONG -> UINT conversion
+//
+__inline
+HRESULT
+ULongToUInt(
+ IN ULONG ulOperand,
+ OUT UINT* puResult)
+{
+ *puResult = (UINT)ulOperand;
+
+ return S_OK;
+}
+
+//
+// ULONG -> LONG conversion
+//
+__inline
+HRESULT
+ULongToLong(
+ IN ULONG Operand,
+ OUT LONG* Result)
+{
+ if (Operand <= INT32_MAX)
+ {
+ *Result = (LONG)Operand;
+ return S_OK;
+ }
+ else
+ {
+ *Result = LONG_ERROR;
+ return INTSAFE_E_ARITHMETIC_OVERFLOW;
+ }
+}
+
+//
+// ULONGLONG -> INT conversion
+//
+__inline
+HRESULT
+ULongLongToInt(
+ IN ULONGLONG ullOperand,
+ OUT INT* piResult)
+{
+ if (ullOperand <= INT_MAX)
+ {
+ *piResult = (INT)ullOperand;
+ return S_OK;
+ }
+ else
+ {
+ *piResult = INT_ERROR;
+ return INTSAFE_E_ARITHMETIC_OVERFLOW;
+ }
+}
+
+//
+// ULONGLONG -> LONG conversion
+//
+__inline
+HRESULT
+ULongLongToLong(
+ IN ULONGLONG Operand,
+ OUT LONG* Result)
+{
+ if (Operand <= INT32_MAX)
+ {
+ *Result = (LONG)Operand;
+ return S_OK;
+ }
+ else
+ {
+ *Result = LONG_ERROR;
+ return INTSAFE_E_ARITHMETIC_OVERFLOW;
+ }
+}
+
+//
+// UINT -> USHORT conversion
+//
+__inline
+HRESULT
+UIntToUShort(
+ IN UINT uOperand,
+ OUT USHORT* pusResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pusResult = USHORT_ERROR;
+
+ if (uOperand <= USHRT_MAX)
+ {
+ *pusResult = (USHORT)uOperand;
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// ULONGLONG -> USHORT conversion
+//
+__inline
+HRESULT
+ULongLongToUShort(
+ IN ULONGLONG ullOperand,
+ OUT USHORT* pusResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ USHORT usResult = USHORT_ERROR;
+
+ if (ullOperand <= USHRT_MAX)
+ {
+ usResult = (USHORT)ullOperand;
+ hr = S_OK;
+ }
+ *pusResult = usResult;
+
+ return hr;
+}
+
+//
+// ULONGLONG -> ULONG conversion
+//
+__inline
+HRESULT
+ULongLongToULong(
+ IN ULONGLONG ullOperand,
+ OUT ULONG* pulResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pulResult = ULONG_ERROR;
+
+ if (ullOperand <= UINT32_MAX)
+ {
+ *pulResult = (ULONG)ullOperand;
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// UINT_PTR -> ULONG conversion
+// ULONG_PTR -> ULONG conversion
+//
+#ifdef HOST_64BIT
+
+#define UIntPtrToULong ULongLongToULong
+#define ULongPtrToULong ULongLongToULong
+
+#else
+
+__inline
+HRESULT
+UIntPtrToULong(
+ IN UINT_PTR Operand,
+ OUT ULONG* pResult)
+{
+ *pResult = (ULONG)Operand;
+ return S_OK;
+}
+
+__inline
+HRESULT
+ULongPtrToULong(
+ IN ULONG_PTR Operand,
+ OUT ULONG* pResult)
+{
+ *pResult = (ULONG)Operand;
+ return S_OK;
+}
+
+#endif
+
+//
+// ULONGLONG -> UINT conversion
+//
+__inline
+HRESULT
+ULongLongToUInt(
+ IN ULONGLONG ullOperand,
+ OUT UINT* puResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *puResult = UINT_ERROR;
+
+ if (ullOperand <= UINT_MAX)
+ {
+ *puResult = (UINT)ullOperand;
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// UINT_PTR -> UINT conversion
+// ULONG_PTR -> UINT conversion
+//
+#ifdef HOST_64BIT
+
+#define UIntPtrToUInt ULongLongToUInt
+#define ULongPtrToUInt ULongLongToUInt
+
+#else
+
+__inline
+HRESULT
+UIntPtrToUInt(
+ IN UINT_PTR Operand,
+ OUT UINT* pResult)
+{
+ *pResult = (UINT)Operand;
+ return S_OK;
+}
+
+__inline
+HRESULT
+ULongPtrToUInt(
+ IN ULONG_PTR Operand,
+ OUT UINT* pResult)
+{
+ *pResult = (UINT)Operand;
+ return S_OK;
+}
+
+#endif
+
+//
+// * -> BYTE conversion (BYTE is always unsigned char)
+//
+#define IntToByte IntToUChar
+#define UIntToByte UIntToUChar
+#define LongToByte LongToUChar
+#define ULongToByte ULongToUChar
+
+//
+// * -> WORD conversion (WORD is always unsigned short)
+//
+#define IntToWord IntToUShort
+#define LongToWord LongToUShort
+#define LongLongToWord LongLongToUShort
+#define UIntToWord UIntToUShort
+#define ULongToWord ULongToUShort
+#define ULongLongToWord ULongLongToUShort
+#define UIntPtrToWord UIntPtrToUShort
+#define ULongPtrToWord ULongPtrToUShort
+#define SizeTToWord SizeTToUShort
+#define SIZETToWord SIZETToUShort
+
+//
+// WORD -> * conversion (WORD is always unsigned short)
+//
+#define WordToUChar UShortToUChar
+#define WordToByte UShortToByte
+#define WordToChar UShortToChar
+#define WordToSignedChar UShortToSignedChar
+#define WordToInt UShortToInt
+#define WordToLong UShortToLong
+#define WordToLongLong UShortToLongLong
+#define WordToIntPtr UShortToIntPtr
+#define WordToLongPtr UShortToLongPtr
+
+//
+// * -> DWORD conversion (DWORD is always ULONG)
+//
+#define CharToDWord CharToULong
+#define SignedCharToDWord SignedCharToULong
+#define ShortToDWord ShortToULong
+#define IntToDWord IntToULong
+#define LongToDWord LongToULong
+#define LongLongToDWord LongLongToULong
+#define UIntToDWord UIntToULong
+#define ULongLongToDWord ULongLongToULong
+#define IntPtrToDWord IntPtrToULong
+#define LongPtrToDWord LongPtrToULong
+#define UIntPtrToDWord UIntPtrToULong
+#define ULongPtrToDWord ULongPtrToULong
+#define SizeTToDWord SizeTToULong
+#define SIZETToDWord SIZETToULong
+
+//
+// DWORD -> * conversion (DWORD is always ULONG)
+//
+#define DWordToChar ULongToChar
+#define DWordToUChar ULongToUChar
+#define DWordToByte ULongToByte
+#define DWordToSignedChar ULongToSignedChar
+#define DWordToUShort ULongToUShort
+#define DWordToUInt ULongToUInt
+#define DWordToInt ULongToInt
+#define DWordToLong ULongToLong
+#define DWordToLongLong ULongToLongLong
+#define DWordToIntPtr ULongToIntPtr
+#define DWordToLongPtr ULongToLongPtr
+
+
+//
+// * -> UINT_PTR conversion (UINT_PTR is UINT on Win32, ULONGLONG on Win64)
+//
+#ifdef HOST_64BIT
+#define CharToUIntPtr CharToULongLong
+#define SignedCharToUIntPtr SignedCharToULongLong
+#define ShortToUIntPtr ShortToULongLong
+#define IntToUIntPtr IntToULongLong
+#define LongToUIntPtr LongToULongLong
+#define LongLongToUIntPtr LongLongToULongLong
+#define IntPtrToUIntPtr IntPtrToULongLong
+#define LongPtrToUIntPtr LongPtrToULongLong
+#else
+#define CharToUIntPtr CharToUInt
+#define SignedCharToUIntPtr SignedCharToUInt
+#define ShortToUIntPtr ShortToUInt
+
+__inline
+HRESULT
+IntToUIntPtr(
+ IN INT iOperand,
+ OUT UINT_PTR* puResult)
+{
+ return IntToUInt(iOperand, (UINT*)puResult);
+}
+
+#define LongToUIntPtr LongToUInt
+#define LongLongToUIntPtr LongLongToUInt
+
+#define IntPtrToUIntPtr IntPtrToUInt
+#define LongPtrToUIntPtr LongPtrToUInt
+#endif
+
+__inline
+HRESULT
+ULongLongToUIntPtr(
+ IN ULONGLONG ullOperand,
+ OUT UINT_PTR* puResult)
+{
+#ifdef HOST_64BIT
+ *puResult = ullOperand;
+ return S_OK;
+#else
+ return ULongLongToUInt(ullOperand, (UINT*)puResult);
+#endif
+}
+
+
+//
+// UINT_PTR -> * conversion (UINT_PTR is UINT on Win32, ULONGLONG on Win64)
+//
+#ifdef HOST_64BIT
+#define UIntPtrToUShort ULongLongToUShort
+#define UIntPtrToInt ULongLongToInt
+#define UIntPtrToLong ULongLongToLong
+#define UIntPtrToLongLong ULongLongToLongLong
+#define UIntPtrToIntPtr ULongLongToIntPtr
+#define UIntPtrToLongPtr ULongLongToLongPtr
+#else
+
+__inline
+HRESULT
+UIntPtrToUShort(
+ IN UINT_PTR uOperand,
+ OUT USHORT* pusResult)
+{
+ return UIntToUShort((UINT)uOperand, pusResult);
+}
+
+__inline
+HRESULT
+UIntPtrToInt(
+ IN UINT_PTR uOperand,
+ OUT INT* piResult)
+{
+ return UIntToInt((UINT)uOperand, piResult);
+}
+
+__inline
+HRESULT
+UIntPtrToLong(
+ IN UINT_PTR Operand,
+ OUT LONG* Result)
+{
+ return UIntToLong((UINT)Operand, Result);
+}
+
+#define UIntPtrToLongLong UIntToLongLong
+#define UIntPtrToIntPtr UIntToIntPtr
+#define UIntPtrToLongPtr UIntToLongPtr
+#endif
+
+
+//
+// * -> ULONG_PTR conversion (ULONG_PTR is ULONG on Win32, ULONGLONG on Win64)
+//
+#ifdef HOST_64BIT
+#define CharToULongPtr CharToULongLong
+#define SignedCharToULongPtr SignedCharToULongLong
+#define ShortToULongPtr ShortToULongLong
+#define IntToULongPtr IntToULongLong
+#define LongToULongPtr LongToULongLong
+#define LongLongToULongPtr LongLongToULongLong
+#define IntPtrToULongPtr IntPtrToULongLong
+#define LongPtrToULongPtr LongPtrToULongLong
+#else
+#define CharToULongPtr CharToULong
+#define SignedCharToULongPtr SignedCharToULong
+#define ShortToULongPtr ShortToULong
+
+__inline
+HRESULT
+IntToULongPtr(
+ IN INT iOperand,
+ OUT ULONG_PTR* pulResult)
+{
+ return IntToULong(iOperand, (ULONG*)pulResult);
+}
+
+#define LongToULongPtr LongToULong
+#define LongLongToULongPtr LongLongToULong
+
+#define IntPtrToULongPtr IntPtrToULong
+#define LongPtrToULongPtr LongPtrToULong
+#endif
+
+__inline
+HRESULT
+ULongLongToULongPtr(
+ IN ULONGLONG ullOperand,
+ OUT ULONG_PTR* pulResult)
+{
+#ifdef HOST_64BIT
+ *pulResult = ullOperand;
+ return S_OK;
+#else
+ return ULongLongToULong(ullOperand, (ULONG*)pulResult);
+#endif
+}
+
+
+//
+// ULONG_PTR -> * conversion (ULONG_PTR is ULONG on Win32, ULONGLONG on Win64)
+//
+#ifdef HOST_64BIT
+#define ULongPtrToUShort ULongLongToUShort
+#define ULongPtrToInt ULongLongToInt
+#define ULongPtrToLong ULongLongToLong
+#define ULongPtrToLongLong ULongLongToLongLong
+#define ULongPtrToIntPtr ULongLongToIntPtr
+#define ULongPtrToLongPtr ULongLongToLongPtr
+#else
+
+__inline
+HRESULT
+ULongPtrToUShort(
+ IN ULONG_PTR ulOperand,
+ OUT USHORT* pusResult)
+{
+ return ULongToUShort((ULONG)ulOperand, pusResult);
+}
+
+__inline
+HRESULT
+ULongPtrToInt(
+ IN ULONG_PTR ulOperand,
+ OUT INT* piResult)
+{
+ return ULongToInt((ULONG)ulOperand, piResult);
+}
+
+__inline
+HRESULT
+ULongPtrToLong(
+ IN ULONG_PTR Operand,
+ OUT LONG* Result)
+{
+ return ULongToLong((ULONG)Operand, Result);
+}
+
+#define ULongPtrToLongLong ULongToLongLong
+#define ULongPtrToIntPtr ULongToIntPtr
+#define ULongPtrToLongPtr ULongToLongPtr
+#endif
+
+//
+// * -> size_t conversion (size_t is always UINT_PTR)
+//
+#define CharToSizeT CharToUIntPtr
+#define SignedCharToSizeT SignedCharToUIntPtr
+#define ShortToSizeT ShortToUIntPtr
+#define IntToSizeT IntToUIntPtr
+#define LongToSizeT LongToUIntPtr
+#define LongLongToSizeT LongLongToUIntPtr
+#define ULongLongToSizeT ULongLongToUIntPtr
+#define IntPtrToSizeT IntPtrToUIntPtr
+#define LongPtrToSizeT LongPtrToUIntPtr
+
+//
+// size_t -> * conversion (size_t is always UINT_PTR)
+//
+#define SizeTToUShort UIntPtrToUShort
+#define SizeTToUInt UIntPtrToUInt
+#define SizeTToULong UIntPtrToULong
+#define SizeTToInt UIntPtrToInt
+#define SizeTToLong UIntPtrToLong
+#define SizeTToLongLong UIntPtrToLongLong
+#define SizeTToIntPtr UIntPtrToIntPtr
+#define SizeTToLongPtr UIntPtrToLongPtr
+
+//
+// * -> SIZE_T conversion (SIZE_T is always ULONG_PTR)
+//
+#define CharToSIZET CharToULongPtr
+#define SignedCharToSIZET SignedCharToULongPtr
+#define ShortToSIZET ShortToULongPtr
+#define IntToSIZET IntToULongPtr
+#define LongToSIZET LongToULongPtr
+#define LongLongToSIZET LongLongToULongPtr
+#define IntPtrToSIZET IntPtrToULongPtr
+#define LongPtrToSIZET LongPtrToULongPtr
+#define ULongLongToSIZET ULongLongToULongPtr
+
+//
+// SIZE_T -> * conversion (SIZE_T is always ULONG_PTR)
+//
+#define SIZETToUShort ULongPtrToUShort
+#define SIZETToUInt ULongPtrToUInt
+#define SIZETToULong ULongPtrToULong
+#define SIZETToUIntPtr ULongPtrToUIntPtr
+#define SIZETToULongPtr ULongPtrToULongPtr
+#define SIZETToInt ULongPtrToInt
+#define SIZETToLong ULongPtrToLong
+#define SIZETToLongLong ULongPtrToLongLong
+#define SIZETToIntPtr ULongPtrToIntPtr
+#define SIZETToLongPtr ULongPtrToLongPtr
+
+//
+// * -> DWORD_PTR conversion (DWORD_PTR is always ULONG_PTR)
+//
+#define CharToDWordPtr CharToULongPtr
+#define SignedCharToDWordPtr SignedCharToULongPtr
+#define ShortToDWordPtr ShortToULongPtr
+#define IntToDWordPtr IntToULongPtr
+#define LongToDWordPtr LongToULongPtr
+#define LongLongToDWordPtr LongLongToULongPtr
+#define ULongLongToDWordPtr ULongLongToULongPtr
+#define IntPtrToDWordPtr IntPtrToULongPtr
+#define LongPtrToDWordPtr LongPtrToULongPtr
+
+//
+// DWORD_PTR -> * conversion (DWORD_PTR is always ULONG_PTR)
+//
+#define DWordPtrToUShort ULongPtrToUShort
+#define DWordPtrToUInt ULongPtrToUInt
+#define DWordPtrToULong ULongPtrToULong
+#define DWordPtrToDWord ULongPtrToDWord
+#define DWordPtrToInt ULongPtrToInt
+#define DWordPtrToLong ULongPtrToLong
+#define DWordPtrToLongLong ULongPtrToLongLong
+#define DWordPtrToIntPtr ULongPtrToIntPtr
+#define DWordPtrToLongPtr ULongPtrToLongPtr
+
+//
+// USHORT addition
+//
+__inline
+HRESULT
+UShortAdd(
+ IN USHORT usAugend,
+ IN USHORT usAddend,
+ OUT USHORT* pusResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pusResult = USHORT_ERROR;
+
+ if (((USHORT)(usAugend + usAddend)) >= usAugend)
+ {
+ *pusResult = (usAugend + usAddend);
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// WORD addtition
+//
+#define WordAdd UShortAdd
+
+//
+// UINT addition
+//
+__inline
+HRESULT
+UIntAdd(
+ IN UINT uAugend,
+ IN UINT uAddend,
+ OUT UINT* puResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *puResult = UINT_ERROR;
+
+ if ((uAugend + uAddend) >= uAugend)
+ {
+ *puResult = (uAugend + uAddend);
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// UINT_PTR addition
+//
+#define UIntPtrAdd SizeTAdd
+
+//
+// ULONG addition
+//
+__inline
+HRESULT
+ULongAdd(
+ IN ULONG ulAugend,
+ IN ULONG ulAddend,
+ OUT ULONG* pulResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pulResult = ULONG_ERROR;
+
+ if ((ulAugend + ulAddend) >= ulAugend)
+ {
+ *pulResult = (ulAugend + ulAddend);
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// ULONG_PTR addition
+//
+#ifdef HOST_64BIT
+#define ULongPtrAdd ULongLongAdd
+#else
+__inline
+HRESULT
+ULongPtrAdd(
+ IN ULONG_PTR ulAugend,
+ IN ULONG_PTR ulAddend,
+ OUT ULONG_PTR* pulResult)
+{
+ return ULongAdd((ULONG)ulAugend, (ULONG)ulAddend, (ULONG*)pulResult);
+}
+#endif // HOST_64BIT
+
+//
+// DWORD addition
+//
+#define DWordAdd ULongAdd
+
+//
+// DWORD_PTR addition
+//
+#define DWordPtrAdd ULongPtrAdd
+
+//
+// size_t addition
+//
+__inline
+HRESULT
+SizeTAdd(
+ IN size_t Augend,
+ IN size_t Addend,
+ OUT size_t* pResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pResult = SIZET_ERROR;
+
+ if ((Augend + Addend) >= Augend)
+ {
+ *pResult = (Augend + Addend);
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// SIZE_T addition
+//
+#define SIZETAdd ULongPtrAdd
+
+//
+// ULONGLONG addition
+//
+__inline
+HRESULT
+ULongLongAdd(
+ IN ULONGLONG ullAugend,
+ IN ULONGLONG ullAddend,
+ OUT ULONGLONG* pullResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pullResult = ULONGLONG_ERROR;
+
+ if ((ullAugend + ullAddend) >= ullAugend)
+ {
+ *pullResult = (ullAugend + ullAddend);
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// USHORT subtraction
+//
+__inline
+HRESULT
+UShortSub(
+ IN USHORT usMinuend,
+ IN USHORT usSubtrahend,
+ OUT USHORT* pusResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pusResult = USHORT_ERROR;
+
+ if (usMinuend >= usSubtrahend)
+ {
+ *pusResult = (usMinuend - usSubtrahend);
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// WORD subtraction
+//
+#define WordSub UShortSub
+
+
+//
+// UINT subtraction
+//
+__inline
+HRESULT
+UIntSub(
+ IN UINT uMinuend,
+ IN UINT uSubtrahend,
+ OUT UINT* puResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *puResult = UINT_ERROR;
+
+ if (uMinuend >= uSubtrahend)
+ {
+ *puResult = (uMinuend - uSubtrahend);
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// UINT_PTR subtraction
+//
+#define UIntPtrSub SizeTSub
+
+//
+// ULONG subtraction
+//
+__inline
+HRESULT
+ULongSub(
+ IN ULONG ulMinuend,
+ IN ULONG ulSubtrahend,
+ OUT ULONG* pulResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pulResult = ULONG_ERROR;
+
+ if (ulMinuend >= ulSubtrahend)
+ {
+ *pulResult = (ulMinuend - ulSubtrahend);
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// ULONG_PTR subtraction
+//
+#ifdef HOST_64BIT
+#define ULongPtrSub ULongLongSub
+#else
+__inline
+HRESULT
+ULongPtrSub(
+ IN ULONG_PTR ulMinuend,
+ IN ULONG_PTR ulSubtrahend,
+ OUT ULONG_PTR* pulResult)
+{
+ return ULongSub((ULONG)ulMinuend, (ULONG)ulSubtrahend, (ULONG*)pulResult);
+}
+#endif // HOST_64BIT
+
+
+//
+// DWORD subtraction
+//
+#define DWordSub ULongSub
+
+//
+// DWORD_PTR subtraction
+//
+#define DWordPtrSub ULongPtrSub
+
+//
+// size_t subtraction
+//
+__inline
+HRESULT
+SizeTSub(
+ IN size_t Minuend,
+ IN size_t Subtrahend,
+ OUT size_t* pResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pResult = SIZET_ERROR;
+
+ if (Minuend >= Subtrahend)
+ {
+ *pResult = (Minuend - Subtrahend);
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// SIZE_T subtraction
+//
+#define SIZETSub ULongPtrSub
+
+//
+// ULONGLONG subtraction
+//
+__inline
+HRESULT
+ULongLongSub(
+ IN ULONGLONG ullMinuend,
+ IN ULONGLONG ullSubtrahend,
+ OUT ULONGLONG* pullResult)
+{
+ HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
+ *pullResult = ULONGLONG_ERROR;
+
+ if (ullMinuend >= ullSubtrahend)
+ {
+ *pullResult = (ullMinuend - ullSubtrahend);
+ hr = S_OK;
+ }
+
+ return hr;
+}
+
+//
+// USHORT multiplication
+//
+__inline
+HRESULT
+UShortMult(
+ IN USHORT usMultiplicand,
+ IN USHORT usMultiplier,
+ OUT USHORT* pusResult)
+{
+ ULONG ulResult = ((ULONG)usMultiplicand) * (ULONG)usMultiplier;
+
+ return ULongToUShort(ulResult, pusResult);
+}
+
+//
+// WORD multiplication
+//
+#define WordMult UShortMult
+
+//
+// UINT multiplication
+//
+__inline
+HRESULT
+UIntMult(
+ IN UINT uMultiplicand,
+ IN UINT uMultiplier,
+ OUT UINT* puResult)
+{
+ ULONGLONG ull64Result = UInt32x32To64(uMultiplicand, uMultiplier);
+
+ return ULongLongToUInt(ull64Result, puResult);
+}
+
+//
+// ULONG multiplication
+//
+__inline
+HRESULT
+ULongMult(
+ IN ULONG ulMultiplicand,
+ IN ULONG ulMultiplier,
+ OUT ULONG* pulResult)
+{
+ ULONGLONG ull64Result = UInt32x32To64(ulMultiplicand, ulMultiplier);
+
+ return ULongLongToULong(ull64Result, pulResult);
+}
+
+//
+// DWORD multiplication
+//
+#define DWordMult ULongMult
+
+//
+// DWORD_PTR multiplication
+//
+#define DWordPtrMult ULongPtrMult
+
+#endif // _INTSAFE_H_INCLUDED_
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//
+
+//
+// ===========================================================================
+// File: oaidl.h
+//
+// ===========================================================================
+
+#ifndef __OAIDL_H__
+#define __OAIDL_H__
+
+// Pointer to IErrorInfo is still used in non-Windows code
+// Prevent accidentally using its member
+struct IErrorInfo;
+
+#endif //__OAIDL_H__
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#include "palrt.h"
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#include "palrt.h"
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//
+
+//
+// ===========================================================================
+// File: tlhelp32.h
+//
+// ===========================================================================
+// dummy tlhelp32.h for PAL
+
+#include "palrt.h"
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//
+
+//
+// ===========================================================================
+// File: windows.h
+//
+// ===========================================================================
+// dummy winapifamily.h for PAL
+
+#ifndef _INC_WINAPIFAMILY
+#define _INC_WINAPIFAMILY
+
+//
+// Windows APIs can be placed in a partition represented by one of the below bits. The
+// WINAPI_FAMILY value determines which partitions are available to the client code.
+//
+
+#define WINAPI_PARTITION_DESKTOP 0x00000001
+#define WINAPI_PARTITION_APP 0x00000002
+
+// A family may be defined as the union of multiple families. WINAPI_FAMILY should be set
+// to one of these values.
+#define WINAPI_FAMILY_APP WINAPI_PARTITION_APP
+#define WINAPI_FAMILY_DESKTOP_APP (WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_APP)
+
+// Provide a default for WINAPI_FAMILY if needed.
+#ifndef WINAPI_FAMILY
+#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
+#endif
+
+// Macro to determine if a partition is enabled
+#define WINAPI_FAMILY_PARTITION(Partition) ((WINAPI_FAMILY & Partition) == Partition)
+
+// Macro to determine if only one partition is enabled from a set
+#define WINAPI_FAMILY_ONE_PARTITION(PartitionSet, Partition) ((WINAPI_FAMILY & PartitionSet) == Partition)
+
+#endif
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//
+
+//
+// ===========================================================================
+// File: winternl.h
+//
+// ===========================================================================
+// dummy winternl.h for PAL
+
+#include "palrt.h"
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//
+
+//
+// ===========================================================================
+// File: winver.h
+//
+// ===========================================================================
+// winver.h for PAL
+// Included in .rc files.
+
+#define VS_VERSION_INFO 1
+#define VS_FFI_FILEFLAGSMASK 0x0000003FL
+
+#define VS_FF_DEBUG 0x00000001L
+#define VS_FF_PRERELEASE 0x00000002L
+#define VS_FF_PATCHED 0x00000004L
+#define VS_FF_PRIVATEBUILD 0x00000008L
+#define VS_FF_INFOINFERRED 0x00000010L
+#define VS_FF_SPECIALBUILD 0x00000020L
+
+#define VFT_UNKNOWN 0x00000000L
+#define VFT_APP 0x00000001L
+#define VFT_DLL 0x00000002L
+
+#define VFT2_UNKNOWN 0x00000000L
+
+#define VOS__WINDOWS32 0x00000004L
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+// Empty version of the runtime's stacktrace.h
+include_directories(${CLR_SRC_NATIVE_DIR})
+
if (CLR_CMAKE_HOST_UNIX)
add_subdirectory(pal)
endif(CLR_CMAKE_HOST_UNIX)
+add_subdirectory(minipal)
+
+include(shared.cmake)
+
add_subdirectory(inc)
-add_subdirectory(dbgutil)
+add_subdirectory(debug)
if (CLR_CMAKE_HOST_UNIX)
- # This prevents inclusion of standard C compiler headers
- add_compile_options(-nostdinc)
- include_directories(${CLR_SHARED_DIR}/pal/inc/rt/cpp)
add_subdirectory(palrt)
endif(CLR_CMAKE_HOST_UNIX)
It is also shared by the dbgshim and SOS components.
-Updated last on 2/7/2022 from the runtime repo commit hash: 4c662b16e3e6fe688f9bbff2a9423fdee799ecfe
-
-runtime/src/coreclr/inc -> diagnostics/src/shared/inc
-runtime/src/coreclr/debug/dbgutil -> diagnostics/src/shared/dbgutil
-runtime/src/coreclr/debug/inc/dbgutil.h -> diagnostics/src/shared/inc/dbgutil.h
-runtime/src/coreclr/debug/inc/dbgtargetcontext.h -> diagnostics/src/shared/inc/dbgtargetcontext.h
-runtime/src/coreclr/debug/inc/runtimeinfo.h -> diagnostics/src/shared/inc/runtimeinfo.h
-runtime/src/coreclr/gcdump -> diagnostics/src/shared/gcdump
-runtime/src/coreclr/gcinfo/gcinfodumper.cpp -> diagnostics/src/shared/gcdump/gcinfodumper.cpp
-runtime/src/coreclr/vm/gcinfodecoder.cpp -> diagnostics/src/shared/gcdump/gcinfodecoder.cpp
-runtime/src/coreclr/gc/gcdesc.h -> diagnostics/src/shared/inc/gcdesc.h
-runtime/src/coreclr/vm/hillclimbing.h -> diagnostics/src/shared/inc/hillclimbing.h
-runtime/src/coreclr/dlls/mscorrc/resource.h -> diagnostics/src/shared/inc/resource.h
-runtime/src/coreclr/hosts/inc/coreclrhost.h -> diagnostics/src/shared/inc/coreclrhost.h
-runtime/src/native/minipal -> diagnostics/src/shared/minipal
-runtime/src/coreclr/pal -> diagnostics/src/shared/pal
-runtime/src/coreclr/palrt -> diagnostics/src/shared/palrt
-runtime/src/coreclr/utilcode -> diagnostics/src/shared/utilcode
+Updated last on 8/14/2024 from the runtime repo commit hash: 96bcf7150deba280a070c6a4d85ca0640e405278
+
+runtime/src/coreclr/inc -> diagnostics/src/shared/inc
+runtime/src/coreclr/debug/dbgutil -> diagnostics/src/shared/debug/dbgutil
+runtime/src/coreclr/debug/inc/dump/dumpcommon.h -> diagnostics/src/shared/debug/inc/dump/dumpcommon.h
+runtime/src/coreclr/debug/inc/dbgutil.h -> diagnostics/src/shared/debug/inc/dbgutil.h
+runtime/src/coreclr/debug/inc/dbgtargetcontext.h -> diagnostics/src/shared/debug/inc/dbgtargetcontext.h
+runtime/src/coreclr/debug/inc/runtimeinfo.h -> diagnostics/src/shared/debug/inc/runtimeinfo.h
+runtime/src/coreclr/gcdump -> diagnostics/src/shared/gcdump
+runtime/src/coreclr/gcinfo/gcinfodumper.cpp -> diagnostics/src/shared/gcinfo/gcinfodumper.cpp
+runtime/src/coreclr/vm/gcinfodecoder.cpp -> diagnostics/src/shared/vm/gcinfodecoder.cpp
+runtime/src/coreclr/gc/gcdesc.h -> diagnostics/src/shared/gc/gcdesc.h
+runtime/src/coreclr/dlls/mscorrc/resource.h -> diagnostics/src/shared/dlls/mscorrc/resource.h
+runtime/src/coreclr/hosts/inc/coreclrhost.h -> diagnostics/src/shared/hosts/inc/coreclrhost.h
+runtime/src/coreclr/minipal -> diagnostics/src/shared/minipal
+runtime/src/coreclr/pal -> diagnostics/src/shared/pal
+runtime/src/coreclr/palrt -> diagnostics/src/shared/palrt
+runtime/src/coreclr/utilcode -> diagnostics/src/shared/utilcode
+
+runtime/src/native/minipal -> diagnostics/src/shared/native/minipal
+
+runtime/src/coreclr/utilcode/sigparser.cpp -> diagnostics/src/SOS/Strike/sigparser.cpp - contracts removed
+runtime/src/coreclr/gcdump -> diagnostics/src/shared/gcdump/gcdump.cpp - SOS can't include utilcode.h
+runtime/src/coreclr/gcdump -> diagnostics/src/shared/gcdump/i386/gcdumpx86.cpp - SOS can't include utilcode.h
+runtime/src/coreclr/gcdump -> diagnostics/src/shared/palrt/bstr.cpp - needed by dbgshim
+
+HAVE_PROCFS_MAPS is needed by diagnostics/src/shared/pal/src/thread/process.cpp:
+
+diagnostics/src/shared/pal/src/configure.cmake
+diagnostics/src/shared/pal/src/config.h.in
+diagnostics/eng/native/tryrun.cmake
+
+There are a lot of include and source files that need to be carefully merged from the runtime because
+there is functions that the diagnostics repo doesn't need (i.e. Mutexes) and functions that were removed
+from the runtime PAL that the diagnostics repo needs (i.e. RemoveDirectoryA).
+
+diagnostics\src\shared\inc\arrayholder.h - needs #pragma once
+diagnostics\src\shared\inc\daccess.h - mostly stripped down except for macros the other shared/inc files need, TADDR needs to be ULONG_PTR for x86
+diagnostics\src\shared\inc\ex.h - stripped some parts of the EX_* macros out
+diagnostics\src\shared\inc\holder.h - needs ReleaseHolder #ifndef SOS_INCLUDE out
+diagnostics\src\shared\inc\predeftlsslot.h - SOS needs all the old enums for older runtimes
+
+diagnostics\src\shared\utilcode\clrhost_nodependencies.cpp - remove DbgIsExecutable()
+diagnostics\src\shared\utilcode\debug.cpp
+diagnostics\src\shared\utilcode\ex.cpp
+diagnostics\src\shared\utilcode\util_nodependencies.cpp - gone except OutputDebugStringUtf8()
+diagnostics\src\shared\utilcode\hostimpl.cpp - remove ClrSleepEx()
+diagnostics\src\shared\utilcode\pedecoder.cpp - remove ForceRelocForDLL()
+
+diagnostics\src\shared\pal\src\debug\debug.cpp - careful merging
+diagnostics\src\shared\pal\src\file\directory.cpp - add RemoveDirectoryA for SOS
+diagnostics\src\shared\pal\src\handlemgr\handleapi.cpp
+
+diagnostics\src\shared\pal\src\safecrt\vsprintf.cpp - vsprintf/vsnprintf needed for SOS %S
+diagnostics\src\shared\pal\src\safecrt\mbusafecrt.cpp - need _safecrt_cfltcvt for vsprintf/vsnprint support
+diagnostics\src\shared\pal\src\safecrt\mbusafecrt_internal.h
+
+For swprintf/vswprintf support needed by SOS (files not part of the runtime anymore):
+
+diagnostics/src/shared/pal/src/safecrt/output.inl
+diagnostics/src/shared/pal/src/safecrt/safecrt_output_l.cpp
+diagnostics/src/shared/pal/src/safecrt/safecrt_output_s.cpp
+diagnostics/src/shared/pal/src/safecrt/safecrt_woutput_s.cpp
+diagnostics/src/shared/pal/src/safecrt/swprintf.cpp
+diagnostics/src/shared/pal/src/safecrt/vswprint.cpp
+diagnostics/src/shared/pal/src/safecrt/xtoa_s.cpp
+diagnostics/src/shared/pal/src/safecrt/xtow_s.cpp
+diagnostics/src/shared/pal/src/safecrt/xtox_s.inl
--- /dev/null
+include(${CMAKE_CURRENT_LIST_DIR}/clrfeatures.cmake)
+
+add_compile_definitions($<$<BOOL:$<TARGET_PROPERTY:DAC_COMPONENT>>:DACCESS_COMPILE>)
+
+if (CLR_CMAKE_TARGET_ARCH_ARM64)
+ if (CLR_CMAKE_TARGET_UNIX)
+ add_definitions(-DFEATURE_EMULATE_SINGLESTEP)
+ endif()
+ add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_ARCH>>>:FEATURE_MULTIREG_RETURN>)
+elseif (CLR_CMAKE_TARGET_ARCH_ARM)
+ if (CLR_CMAKE_HOST_WIN32 AND NOT DEFINED CLR_CROSS_COMPONENTS_BUILD)
+ # Set this to ensure we can use Arm SDK for Desktop binary linkage when doing native (Arm32) build
+ add_definitions(-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE)
+ add_definitions(-D_ARM_WORKAROUND_)
+ endif (CLR_CMAKE_HOST_WIN32 AND NOT DEFINED CLR_CROSS_COMPONENTS_BUILD)
+ add_definitions(-DFEATURE_EMULATE_SINGLESTEP)
+elseif (CLR_CMAKE_TARGET_ARCH_RISCV64)
+ add_definitions(-DFEATURE_EMULATE_SINGLESTEP)
+ add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_ARCH>>>:FEATURE_MULTIREG_RETURN>)
+endif (CLR_CMAKE_TARGET_ARCH_ARM64)
+
+if (CLR_CMAKE_TARGET_UNIX)
+
+ if (CLR_CMAKE_TARGET_ARCH_AMD64)
+ add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_ARCH>>>:UNIX_AMD64_ABI>)
+ add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_ARCH>>>:FEATURE_MULTIREG_RETURN>)
+ elseif (CLR_CMAKE_TARGET_ARCH_ARM)
+ add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_ARCH>>>:UNIX_ARM_ABI>)
+ elseif (CLR_CMAKE_TARGET_ARCH_I386)
+ add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_ARCH>>>:UNIX_X86_ABI>)
+ elseif (CLR_CMAKE_TARGET_ARCH_LOONGARCH64)
+ add_definitions(-DFEATURE_EMULATE_SINGLESTEP)
+ endif()
+
+endif(CLR_CMAKE_TARGET_UNIX)
+
+if (CLR_CMAKE_TARGET_APPLE AND CLR_CMAKE_TARGET_ARCH_ARM64)
+ add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_ARCH>>>:OSX_ARM64_ABI>)
+endif(CLR_CMAKE_TARGET_APPLE AND CLR_CMAKE_TARGET_ARCH_ARM64)
+
+if(CLR_CMAKE_TARGET_LINUX_MUSL)
+ # musl-libc doesn't have fixed stack limit, this define disables some stack pointer
+ # sanity checks in debug / checked build that rely on a fixed stack limit
+ add_definitions(-DNO_FIXED_STACK_LIMIT)
+endif(CLR_CMAKE_TARGET_LINUX_MUSL)
+
+add_definitions(-DDEBUGGING_SUPPORTED)
+add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:DAC_COMPONENT>>>:PROFILING_SUPPORTED>)
+add_compile_definitions($<$<BOOL:$<TARGET_PROPERTY:DAC_COMPONENT>>:PROFILING_SUPPORTED_DATA>)
+
+if(CLR_CMAKE_HOST_WIN32)
+ add_definitions(-DWIN32)
+ add_definitions(-D_WIN32)
+ add_definitions(-DWINVER=0x0602)
+ add_definitions(-D_WIN32_WINNT=0x0602)
+ add_definitions(-DWIN32_LEAN_AND_MEAN)
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+ add_compile_definitions(NOMINMAX)
+endif(CLR_CMAKE_HOST_WIN32)
+
+if (NOT (CLR_CMAKE_TARGET_ARCH_I386 AND CLR_CMAKE_TARGET_UNIX))
+ add_compile_definitions(FEATURE_METADATA_UPDATER)
+endif()
+if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64 OR (CLR_CMAKE_TARGET_ARCH_I386 AND CLR_CMAKE_TARGET_WIN32))
+ add_compile_definitions(FEATURE_REMAP_FUNCTION)
+endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64 OR (CLR_CMAKE_TARGET_ARCH_I386 AND CLR_CMAKE_TARGET_WIN32))
+
+if(CLR_CMAKE_TARGET_WIN32 AND CLR_CMAKE_TARGET_ARCH_AMD64)
+add_compile_definitions(OUT_OF_PROCESS_SETTHREADCONTEXT)
+endif(CLR_CMAKE_TARGET_WIN32 AND CLR_CMAKE_TARGET_ARCH_AMD64)
+
+if(NOT CLR_CMAKE_TARGET_ARCH_I386)
+ add_definitions(-DFEATURE_PORTABLE_SHUFFLE_THUNKS)
+endif()
+
+if(CLR_CMAKE_TARGET_UNIX OR NOT CLR_CMAKE_TARGET_ARCH_I386)
+ add_definitions(-DFEATURE_INSTANTIATINGSTUB_AS_IL)
+endif()
+
+add_compile_definitions(FEATURE_CODE_VERSIONING)
+add_definitions(-DFEATURE_COLLECTIBLE_TYPES)
+
+if(CLR_CMAKE_TARGET_WIN32)
+ add_definitions(-DFEATURE_COMINTEROP)
+ add_definitions(-DFEATURE_COMINTEROP_APARTMENT_SUPPORT)
+ add_definitions(-DFEATURE_COMINTEROP_UNMANAGED_ACTIVATION)
+ add_definitions(-DFEATURE_IJW) # C++/CLI managed/native interop support
+endif(CLR_CMAKE_TARGET_WIN32)
+
+add_definitions(-DFEATURE_BASICFREEZE)
+add_definitions(-DFEATURE_CORECLR)
+if(FEATURE_DBGIPC)
+ add_definitions(-DFEATURE_DBGIPC_TRANSPORT_DI)
+ add_definitions(-DFEATURE_DBGIPC_TRANSPORT_VM)
+endif(FEATURE_DBGIPC)
+add_definitions(-DFEATURE_DEFAULT_INTERFACES)
+if(FEATURE_AUTO_TRACE)
+ add_compile_definitions(FEATURE_AUTO_TRACE)
+endif(FEATURE_AUTO_TRACE)
+if(FEATURE_EVENT_TRACE)
+ add_compile_definitions(FEATURE_EVENT_TRACE)
+ add_definitions(-DFEATURE_PERFTRACING)
+else(FEATURE_EVENT_TRACE)
+ add_custom_target(eventing_headers) # add a dummy target to avoid checking for FEATURE_EVENT_TRACE in multiple places
+endif(FEATURE_EVENT_TRACE)
+if(FEATURE_GDBJIT)
+ add_definitions(-DFEATURE_GDBJIT)
+endif()
+if(FEATURE_GDBJIT_FRAME)
+ add_definitions(-DFEATURE_GDBJIT_FRAME)
+endif(FEATURE_GDBJIT_FRAME)
+if(FEATURE_GDBJIT_LANGID_CS)
+ add_definitions(-DFEATURE_GDBJIT_LANGID_CS)
+endif(FEATURE_GDBJIT_LANGID_CS)
+if(FEATURE_GDBJIT_SYMTAB)
+ add_definitions(-DFEATURE_GDBJIT_SYMTAB)
+endif(FEATURE_GDBJIT_SYMTAB)
+if(CLR_CMAKE_TARGET_LINUX)
+ add_definitions(-DFEATURE_EVENTSOURCE_XPLAT)
+endif(CLR_CMAKE_TARGET_LINUX)
+# NetBSD doesn't implement this feature
+if(NOT CLR_CMAKE_TARGET_NETBSD)
+ add_definitions(-DFEATURE_HIJACK)
+endif(NOT CLR_CMAKE_TARGET_NETBSD)
+add_definitions(-DFEATURE_ICASTABLE)
+if (CLR_CMAKE_TARGET_WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386 OR CLR_CMAKE_TARGET_ARCH_ARM64))
+ add_definitions(-DFEATURE_INTEROP_DEBUGGING)
+endif (CLR_CMAKE_TARGET_WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386 OR CLR_CMAKE_TARGET_ARCH_ARM64))
+if(FEATURE_INTERPRETER)
+ add_compile_definitions(FEATURE_INTERPRETER)
+endif(FEATURE_INTERPRETER)
+
+if (CLR_CMAKE_TARGET_WIN32)
+ add_definitions(-DFEATURE_ISYM_READER)
+endif(CLR_CMAKE_TARGET_WIN32)
+
+if(FEATURE_MERGE_JIT_AND_ENGINE)
+ add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_FEATURE_MERGE_JIT_AND_ENGINE>>>:FEATURE_MERGE_JIT_AND_ENGINE>)
+endif(FEATURE_MERGE_JIT_AND_ENGINE)
+add_compile_definitions(FEATURE_MULTICOREJIT)
+if(CLR_CMAKE_TARGET_UNIX)
+ add_definitions(-DFEATURE_PAL_ANSI)
+endif(CLR_CMAKE_TARGET_UNIX)
+if(CLR_CMAKE_TARGET_LINUX AND CLR_CMAKE_HOST_LINUX)
+ add_definitions(-DFEATURE_PERFMAP)
+endif(CLR_CMAKE_TARGET_LINUX AND CLR_CMAKE_HOST_LINUX)
+if(CLR_CMAKE_TARGET_FREEBSD)
+ add_compile_definitions(FEATURE_PERFMAP)
+endif(CLR_CMAKE_TARGET_FREEBSD)
+if(CLR_CMAKE_TARGET_APPLE)
+ add_compile_definitions(FEATURE_PERFMAP)
+endif(CLR_CMAKE_TARGET_APPLE)
+
+if(FEATURE_COMWRAPPERS)
+ add_compile_definitions(FEATURE_COMWRAPPERS)
+endif(FEATURE_COMWRAPPERS)
+
+if(FEATURE_OBJCMARSHAL)
+ add_compile_definitions(FEATURE_OBJCMARSHAL)
+endif()
+
+add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:DAC_COMPONENT>>>:FEATURE_PROFAPI_ATTACH_DETACH>)
+
+add_definitions(-DFEATURE_READYTORUN)
+
+set(FEATURE_READYTORUN 1)
+
+add_compile_definitions(FEATURE_REJIT)
+
+if (CLR_CMAKE_HOST_UNIX AND CLR_CMAKE_TARGET_UNIX)
+ add_definitions(-DFEATURE_REMOTE_PROC_MEM)
+endif (CLR_CMAKE_HOST_UNIX AND CLR_CMAKE_TARGET_UNIX)
+
+if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_ARCH_ARM64)
+ add_definitions(-DFEATURE_STUBS_AS_IL)
+endif ()
+if (FEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION)
+ add_definitions(-DFEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION)
+endif(FEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION)
+add_definitions(-DFEATURE_SVR_GC)
+add_definitions(-DFEATURE_SYMDIFF)
+add_compile_definitions(FEATURE_TIERED_COMPILATION)
+if (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_LOONGARCH64 OR CLR_CMAKE_TARGET_ARCH_RISCV64)
+ add_compile_definitions(FEATURE_ON_STACK_REPLACEMENT)
+endif (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_LOONGARCH64 OR CLR_CMAKE_TARGET_ARCH_RISCV64)
+add_compile_definitions(FEATURE_PGO)
+if (CLR_CMAKE_TARGET_WIN32)
+ add_definitions(-DFEATURE_TYPEEQUIVALENCE)
+endif(CLR_CMAKE_TARGET_WIN32)
+if (CLR_CMAKE_TARGET_ARCH_AMD64)
+ # Enable the AMD64 Unix struct passing JIT-EE interface for all AMD64 platforms, to enable altjit.
+ add_definitions(-DUNIX_AMD64_ABI_ITF)
+endif (CLR_CMAKE_TARGET_ARCH_AMD64)
+add_definitions(-DFEATURE_USE_ASM_GC_WRITE_BARRIERS)
+if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_LOONGARCH64 OR CLR_CMAKE_TARGET_ARCH_RISCV64)
+ add_definitions(-DFEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP)
+endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_LOONGARCH64 OR CLR_CMAKE_TARGET_ARCH_RISCV64)
+if(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_LOONGARCH64 OR CLR_CMAKE_TARGET_ARCH_RISCV64)
+ add_definitions(-DFEATURE_MANUALLY_MANAGED_CARD_BUNDLES)
+endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64 OR CLR_CMAKE_TARGET_ARCH_LOONGARCH64 OR CLR_CMAKE_TARGET_ARCH_RISCV64)
+
+add_definitions(-D_SECURE_SCL=0)
+add_definitions(-DUNICODE)
+add_definitions(-D_UNICODE)
+
+if(CLR_CMAKE_TARGET_WIN32)
+ if (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
+ add_definitions(-DFEATURE_DATABREAKPOINT)
+ endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
+endif(CLR_CMAKE_TARGET_WIN32)
+
+if (NOT CLR_CMAKE_TARGET_ARCH_I386 OR NOT CLR_CMAKE_TARGET_WIN32)
+ add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_ARCH>>>:FEATURE_EH_FUNCLETS>)
+endif (NOT CLR_CMAKE_TARGET_ARCH_I386 OR NOT CLR_CMAKE_TARGET_WIN32)
+
+if (CLR_CMAKE_TARGET_WIN32 AND (CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_ARM64))
+ add_definitions(-DFEATURE_SPECIAL_USER_MODE_APC)
+endif()
+
+
+# Use this function to enable building with a specific target OS and architecture set of defines
+# This is known to work for the set of defines used by the JIT and gcinfo, it is not likely correct for
+# other components of the runtime
+function(set_target_definitions_to_custom_os_and_arch)
+ set(oneValueArgs TARGET OS ARCH)
+ cmake_parse_arguments(TARGETDETAILS "" "${oneValueArgs}" "" ${ARGN})
+
+ set_target_properties(${TARGETDETAILS_TARGET} PROPERTIES IGNORE_DEFAULT_TARGET_ARCH TRUE)
+ set_target_properties(${TARGETDETAILS_TARGET} PROPERTIES IGNORE_DEFAULT_TARGET_OS TRUE)
+
+ if ((TARGETDETAILS_OS MATCHES "^unix"))
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_UNIX)
+ if (TARGETDETAILS_ARCH STREQUAL "x64")
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE UNIX_AMD64_ABI)
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE FEATURE_MULTIREG_RETURN)
+ elseif ((TARGETDETAILS_ARCH STREQUAL "arm") OR (TARGETDETAILS_ARCH STREQUAL "armel"))
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE UNIX_ARM_ABI)
+ elseif (TARGETDETAILS_ARCH STREQUAL "x86")
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE UNIX_X86_ABI)
+ elseif (TARGETDETAILS_ARCH STREQUAL "arm64")
+ elseif (TARGETDETAILS_ARCH STREQUAL "loongarch64")
+ endif()
+ if ((TARGETDETAILS_ARCH STREQUAL "arm64") AND (TARGETDETAILS_OS STREQUAL "unix_osx"))
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_APPLE)
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE OSX_ARM64_ABI)
+ endif()
+ if (TARGETDETAILS_OS STREQUAL "unix_osx")
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_APPLE)
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_OSX)
+ endif()
+ if (TARGETDETAILS_OS STREQUAL "unix_anyos")
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_UNIX_ANYOS)
+ endif()
+ elseif (TARGETDETAILS_OS MATCHES "^win")
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_WINDOWS)
+ endif((TARGETDETAILS_OS MATCHES "^unix"))
+
+ if (TARGETDETAILS_ARCH STREQUAL "x86")
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_X86)
+ elseif(TARGETDETAILS_ARCH STREQUAL "x64")
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_64BIT)
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_AMD64)
+ elseif(TARGETDETAILS_ARCH STREQUAL "arm64")
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_64BIT)
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_ARM64)
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE FEATURE_MULTIREG_RETURN)
+ elseif(TARGETDETAILS_ARCH STREQUAL "loongarch64")
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_64BIT)
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_LOONGARCH64)
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE FEATURE_MULTIREG_RETURN)
+ elseif((TARGETDETAILS_ARCH STREQUAL "arm") OR (TARGETDETAILS_ARCH STREQUAL "armel"))
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_ARM)
+ elseif((TARGETDETAILS_ARCH STREQUAL "riscv64"))
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_64BIT)
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE TARGET_RISCV64)
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE FEATURE_MULTIREG_RETURN)
+ endif()
+
+ if (TARGETDETAILS_ARCH STREQUAL "armel")
+ target_compile_definitions(${TARGETDETAILS_TARGET} PRIVATE ARM_SOFTFP)
+ endif()
+endfunction()
--- /dev/null
+if(CLR_CMAKE_TARGET_TIZEN_LINUX)
+ set(FEATURE_GDBJIT_LANGID_CS 1)
+endif()
+
+if(NOT DEFINED FEATURE_EVENT_TRACE)
+ set(FEATURE_EVENT_TRACE 1)
+endif(NOT DEFINED FEATURE_EVENT_TRACE)
+
+if(NOT DEFINED FEATURE_PERFTRACING AND FEATURE_EVENT_TRACE)
+ set(FEATURE_PERFTRACING 1)
+endif(NOT DEFINED FEATURE_PERFTRACING AND FEATURE_EVENT_TRACE)
+
+if(NOT DEFINED FEATURE_DBGIPC)
+ if(CLR_CMAKE_TARGET_UNIX)
+ set(FEATURE_DBGIPC 1)
+ endif()
+endif(NOT DEFINED FEATURE_DBGIPC)
+
+if(NOT DEFINED FEATURE_INTERPRETER)
+ set(FEATURE_INTERPRETER 0)
+endif(NOT DEFINED FEATURE_INTERPRETER)
+
+if(NOT DEFINED FEATURE_STANDALONE_GC)
+ set(FEATURE_STANDALONE_GC 1)
+endif(NOT DEFINED FEATURE_STANDALONE_GC)
+
+if(NOT DEFINED FEATURE_AUTO_TRACE)
+ set(FEATURE_AUTO_TRACE 0)
+endif(NOT DEFINED FEATURE_AUTO_TRACE)
+
+if(NOT DEFINED FEATURE_SINGLE_FILE_DIAGNOSTICS)
+ set(FEATURE_SINGLE_FILE_DIAGNOSTICS 1)
+endif(NOT DEFINED FEATURE_SINGLE_FILE_DIAGNOSTICS)
+
+if (CLR_CMAKE_TARGET_WIN32 OR CLR_CMAKE_TARGET_UNIX)
+ set(FEATURE_COMWRAPPERS 1)
+endif()
+
+if (CLR_CMAKE_TARGET_APPLE)
+ set(FEATURE_OBJCMARSHAL 1)
+endif()
+++ /dev/null
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-if(CLR_CMAKE_HOST_WIN32)
- #use static crt
- set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded)
-endif(CLR_CMAKE_HOST_WIN32)
-
-if(CLR_CMAKE_HOST_WIN32 OR CLR_CMAKE_HOST_OSX)
- include_directories(${CLR_SHARED_DIR}/inc/llvm)
-endif(CLR_CMAKE_HOST_WIN32 OR CLR_CMAKE_HOST_OSX)
-
-add_definitions(-DPAL_STDCPP_COMPAT)
-
-if(CLR_CMAKE_TARGET_LINUX_MUSL)
- add_definitions(-DTARGET_LINUX_MUSL)
-endif(CLR_CMAKE_TARGET_LINUX_MUSL)
-
-set(DBGUTIL_SOURCES
- dbgutil.cpp
-)
-
-if(NOT DEFINED CLR_CMAKE_HOST_OSX)
- list(APPEND DBGUTIL_SOURCES
- elfreader.cpp
- )
-endif(NOT DEFINED CLR_CMAKE_HOST_OSX)
-
-if(CLR_CMAKE_TARGET_OSX)
- list(APPEND DBGUTIL_SOURCES
- machoreader.cpp
- )
-endif(CLR_CMAKE_TARGET_OSX)
-
-add_library(dbgutil STATIC ${DBGUTIL_SOURCES})
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//*****************************************************************************
-// dbgutil.cpp
-//
-
-//
-//*****************************************************************************
-
-//
-// Various common helpers for PE resource reading used by multiple debug components.
-//
-
-#include <dbgutil.h>
-#include "corerror.h"
-#include <assert.h>
-#include <stdio.h>
-
-#ifdef HOST_WINDOWS
-
-// Returns the RVA of the resource section for the module specified by the given data target and module base.
-// Returns failure if the module doesn't have a resource section.
-//
-// Arguments
-// pDataTarget - dataTarget for the process we are inspecting
-// moduleBaseAddress - base address of a module we should inspect
-// pwImageFileMachine - updated with the Machine from the IMAGE_FILE_HEADER
-// pdwResourceSectionRVA - updated with the resultant RVA on success
-HRESULT GetMachineAndResourceSectionRVA(ICorDebugDataTarget* pDataTarget,
- ULONG64 moduleBaseAddress,
- WORD* pwImageFileMachine,
- DWORD* pdwResourceSectionRVA)
-{
- // Fun code ahead... below is a hand written PE decoder with some of the file offsets hardcoded.
- // It supports no more than what we absolutely have to to get to the resources we need. Any of the
- // magic numbers used below can be determined by using the public documentation on the web.
- //
- // Yes utilcode has a PE decoder, no it does not support reading its data through a datatarget
- // It was easier to inspect the small portion that I needed than to shove an abstraction layer under
- // our utilcode and then make sure everything still worked.
-
- // SECURITY WARNING: all data provided by the data target should be considered untrusted.
- // Do not allow malicious data to cause large reads, memory allocations, buffer overflow,
- // or any other undesirable behavior.
-
- HRESULT hr = S_OK;
-
- // at offset 3c in the image is a 4 byte file pointer that indicates where the PE signature is
- IMAGE_DOS_HEADER dosHeader;
- hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress, (BYTE*)&dosHeader, sizeof(dosHeader));
-
- // verify there is a 4 byte PE signature there
- DWORD peSigFilePointer = 0;
- if (SUCCEEDED(hr))
- {
- peSigFilePointer = dosHeader.e_lfanew;
- DWORD peSig = 0;
- hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + peSigFilePointer, (BYTE*)&peSig, 4);
- if (SUCCEEDED(hr) && peSig != IMAGE_NT_SIGNATURE)
- {
- hr = E_FAIL; // PE signature not present
- }
- }
-
- // after the signature is a 20 byte image file header
- // we need to parse this to figure out the target architecture
- IMAGE_FILE_HEADER imageFileHeader = {};
- if (SUCCEEDED(hr))
- {
- hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + peSigFilePointer + 4, (BYTE*)&imageFileHeader, IMAGE_SIZEOF_FILE_HEADER);
- }
-
- WORD optHeaderMagic = 0;
- DWORD peOptImageHeaderFilePointer = 0;
- if (SUCCEEDED(hr))
- {
- if(pwImageFileMachine != NULL)
- {
- *pwImageFileMachine = imageFileHeader.Machine;
- }
-
- // 4 bytes after the signature is the 20 byte image file header
- // 24 bytes after the signature is the image-only header
- // at the beginning of the image-only header is a 2 byte magic number indicating its format
- peOptImageHeaderFilePointer = peSigFilePointer + IMAGE_SIZEOF_FILE_HEADER + sizeof(DWORD);
- hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + peOptImageHeaderFilePointer, (BYTE*)&optHeaderMagic, 2);
- }
-
- // Either 112 or 128 bytes after the beginning of the image-only header is an 8 byte resource table
- // depending on whether the image is PE32 or PE32+
- DWORD resourceSectionRVA = 0;
- if (SUCCEEDED(hr))
- {
- if (optHeaderMagic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) // PE32
- {
- IMAGE_OPTIONAL_HEADER32 header32;
- hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + peOptImageHeaderFilePointer,
- (BYTE*)&header32, sizeof(header32));
- if (SUCCEEDED(hr))
- {
- resourceSectionRVA = header32.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress;
- }
- }
- else if (optHeaderMagic == IMAGE_NT_OPTIONAL_HDR64_MAGIC) //PE32+
- {
- IMAGE_OPTIONAL_HEADER64 header64;
- hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + peOptImageHeaderFilePointer,
- (BYTE*)&header64, sizeof(header64));
- if (SUCCEEDED(hr))
- {
- resourceSectionRVA = header64.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress;
- }
- }
- else
- {
- hr = E_FAIL; // Invalid PE
- }
- }
-
- *pdwResourceSectionRVA = resourceSectionRVA;
- return S_OK;
-}
-
-HRESULT GetResourceRvaFromResourceSectionRva(ICorDebugDataTarget* pDataTarget,
- ULONG64 moduleBaseAddress,
- DWORD resourceSectionRva,
- DWORD type,
- DWORD name,
- DWORD language,
- DWORD* pResourceRva,
- DWORD* pResourceSize)
-{
- HRESULT hr = S_OK;
- DWORD nameTableRva = 0;
- DWORD langTableRva = 0;
- DWORD resourceDataEntryRva = 0;
- *pResourceRva = 0;
- *pResourceSize = 0;
-
- // The resource section begins with a resource directory that indexes all the resources by type.
- // Each entry it points to is another resource directory that indexes all the same type
- // resources by name. And each entry in that table points to another resource directory that indexes
- // all the same type/name resources by language. Entries in the final table give the RVA of the actual
- // resource.
- // Note all RVAs in this section are relative to the beginning of the resource section,
- // not the beginning of the image.
-
- hr = GetNextLevelResourceEntryRVA(pDataTarget, type, moduleBaseAddress, resourceSectionRva, &nameTableRva);
-
-
- if (SUCCEEDED(hr))
- {
- nameTableRva += resourceSectionRva;
- hr = GetNextLevelResourceEntryRVA(pDataTarget, name, moduleBaseAddress, nameTableRva, &langTableRva);
-
- }
- if (SUCCEEDED(hr))
- {
- langTableRva += resourceSectionRva;
- hr = GetNextLevelResourceEntryRVA(pDataTarget, language, moduleBaseAddress, langTableRva, &resourceDataEntryRva);
- }
-
- // The resource data entry has the first 4 bytes indicating the RVA of the resource
- // The next 4 bytes indicate the size of the resource
- if (SUCCEEDED(hr))
- {
- resourceDataEntryRva += resourceSectionRva;
- IMAGE_RESOURCE_DATA_ENTRY dataEntry;
- hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + resourceDataEntryRva,
- (BYTE*)&dataEntry, sizeof(dataEntry));
- *pResourceRva = dataEntry.OffsetToData;
- *pResourceSize = dataEntry.Size;
- }
-
- return hr;
-}
-
-HRESULT GetResourceRvaFromResourceSectionRvaByName(ICorDebugDataTarget* pDataTarget,
- ULONG64 moduleBaseAddress,
- DWORD resourceSectionRva,
- DWORD type,
- LPCWSTR pwszName,
- DWORD language,
- DWORD* pResourceRva,
- DWORD* pResourceSize)
-{
- HRESULT hr = S_OK;
- DWORD nameTableRva = 0;
- DWORD langTableRva = 0;
- DWORD resourceDataEntryRva = 0;
- *pResourceRva = 0;
- *pResourceSize = 0;
-
- // The resource section begins with a resource directory that indexes all the resources by type.
- // Each entry it points to is another resource directory that indexes all the same type
- // resources by name. And each entry in that table points to another resource directory that indexes
- // all the same type/name resources by language. Entries in the final table give the RVA of the actual
- // resource.
- // Note all RVAs in this section are relative to the beginning of the resource section,
- // not the beginning of the image.
- hr = GetNextLevelResourceEntryRVA(pDataTarget, type, moduleBaseAddress, resourceSectionRva, &nameTableRva);
-
-
- if (SUCCEEDED(hr))
- {
- nameTableRva += resourceSectionRva;
- hr = GetNextLevelResourceEntryRVAByName(pDataTarget, pwszName, moduleBaseAddress, nameTableRva, resourceSectionRva, &langTableRva);
- }
- if (SUCCEEDED(hr))
- {
- langTableRva += resourceSectionRva;
- hr = GetNextLevelResourceEntryRVA(pDataTarget, language, moduleBaseAddress, langTableRva, &resourceDataEntryRva);
- }
-
- // The resource data entry has the first 4 bytes indicating the RVA of the resource
- // The next 4 bytes indicate the size of the resource
- if (SUCCEEDED(hr))
- {
- resourceDataEntryRva += resourceSectionRva;
- IMAGE_RESOURCE_DATA_ENTRY dataEntry;
- hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + resourceDataEntryRva,
- (BYTE*)&dataEntry, sizeof(dataEntry));
- *pResourceRva = dataEntry.OffsetToData;
- *pResourceSize = dataEntry.Size;
- }
-
- return hr;
-}
-
-// Traverses down one level in the PE resource tree structure
-//
-// Arguments:
-// pDataTarget - the data target for inspecting this process
-// id - the id of the next node in the resource tree you want
-// moduleBaseAddress - the base address of the module being inspected
-// resourceDirectoryRVA - the base address of the beginning of the resource directory for this
-// level of the tree
-// pNextLevelRVA - out - The RVA for the next level tree directory or the RVA of the resource entry
-//
-// Returns:
-// S_OK if succesful or an appropriate failing HRESULT
-HRESULT GetNextLevelResourceEntryRVA(ICorDebugDataTarget* pDataTarget,
- DWORD id,
- ULONG64 moduleBaseAddress,
- DWORD resourceDirectoryRVA,
- DWORD* pNextLevelRVA)
-{
- *pNextLevelRVA = 0;
- HRESULT hr = S_OK;
-
- // A resource directory which consists of
- // a header followed by a number of entries. In the header at offset 12 is
- // the number entries identified by name, followed by the number of entries
- // identified by ID at offset 14. Both are 2 bytes.
- // This method only supports locating entries by ID, not by name
- IMAGE_RESOURCE_DIRECTORY resourceDirectory;
- hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + resourceDirectoryRVA, (BYTE*)&resourceDirectory, sizeof(resourceDirectory));
-
-
-
- // The ith resource directory entry is at offset 16 + 8i from the beginning of the resource
- // directory table
- WORD numNameEntries;
- WORD numIDEntries;
- if (SUCCEEDED(hr))
- {
- numNameEntries = resourceDirectory.NumberOfNamedEntries;
- numIDEntries = resourceDirectory.NumberOfIdEntries;
-
- for (WORD i = numNameEntries; i < numNameEntries + numIDEntries; i++)
- {
- IMAGE_RESOURCE_DIRECTORY_ENTRY entry;
- hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + resourceDirectoryRVA + sizeof(resourceDirectory) + sizeof(entry)*i,
- (BYTE*)&entry, sizeof(entry));
- if (FAILED(hr))
- {
- break;
- }
- if (entry.Id == id)
- {
- *pNextLevelRVA = entry.OffsetToDirectory;
- break;
- }
- }
- }
-
- // If we didn't find the entry
- if (SUCCEEDED(hr) && *pNextLevelRVA == 0)
- {
- hr = E_FAIL;
- }
-
- return hr; // resource not found
-}
-
-// Traverses down one level in the PE resource tree structure
-//
-// Arguments:
-// pDataTarget - the data target for inspecting this process
-// name - the name of the next node in the resource tree you want
-// moduleBaseAddress - the base address of the module being inspected
-// resourceDirectoryRVA - the base address of the beginning of the resource directory for this
-// level of the tree
-// resourceSectionRVA - the rva of the beginning of the resource section of the PE file
-// pNextLevelRVA - out - The RVA for the next level tree directory or the RVA of the resource entry
-//
-// Returns:
-// S_OK if succesful or an appropriate failing HRESULT
-HRESULT GetNextLevelResourceEntryRVAByName(ICorDebugDataTarget* pDataTarget,
- LPCWSTR pwzName,
- ULONG64 moduleBaseAddress,
- DWORD resourceDirectoryRva,
- DWORD resourceSectionRva,
- DWORD* pNextLevelRva)
-{
- HRESULT hr = S_OK;
- DWORD nameLength = (DWORD)wcslen(pwzName);
- WCHAR entryName[50];
- assert(nameLength < 50); // this implementation won't support matching a name longer
- // than 50 characters. We only look up the hard coded name
- // of the debug resource in clr.dll though, so it shouldn't be
- // an issue. Increase this count if we ever want to look up
- // larger names
- if (nameLength >= 50)
- {
- hr = E_FAIL; // invalid name length
- }
-
- // A resource directory which consists of
- // a header followed by a number of entries. In the header at offset 12 is
- // the number entries identified by name, followed by the number of entries
- // identified by ID at offset 14. Both are 2 bytes.
- // This method only supports locating entries by ID, not by name
- IMAGE_RESOURCE_DIRECTORY resourceDirectory = { 0 };
- if (SUCCEEDED(hr))
- {
- hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + resourceDirectoryRva, (BYTE*)&resourceDirectory, sizeof(resourceDirectory));
- }
-
- // The ith resource directory entry is at offset 16 + 8i from the beginning of the resource
- // directory table
- if (SUCCEEDED(hr))
- {
- WORD numNameEntries = resourceDirectory.NumberOfNamedEntries;
- for (WORD i = 0; i < numNameEntries; i++)
- {
- IMAGE_RESOURCE_DIRECTORY_ENTRY entry;
- hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + resourceDirectoryRva + sizeof(resourceDirectory) + sizeof(entry)*i,
- (BYTE*)&entry, sizeof(entry));
- if (FAILED(hr))
- {
- break;
- }
-
- // the NameRVAOrID field points to a UTF16 string with a 2 byte length in front of it
- // read the 2 byte length first. The doc of course doesn't mention this, but the RVA is
- // relative to the base of the resource section and needs the leading bit stripped.
- WORD entryNameLength = 0;
- hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + resourceSectionRva +
- entry.NameOffset, (BYTE*)&entryNameLength, sizeof(entryNameLength));
- if (FAILED(hr))
- {
- break;
- }
- if (entryNameLength != nameLength)
- {
- continue; // names aren't the same length, not a match
- }
-
- // read the rest of the string data and check for a match
- hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + resourceSectionRva +
- entry.NameOffset + 2, (BYTE*)entryName, entryNameLength*sizeof(WCHAR));
- if (FAILED(hr))
- {
- break;
- }
- if (memcmp(entryName, pwzName, entryNameLength*sizeof(WCHAR)) == 0)
- {
- *pNextLevelRva = entry.OffsetToDirectory;
- break;
- }
- }
- }
-
- if (SUCCEEDED(hr) && *pNextLevelRva == 0)
- {
- hr = E_FAIL; // resource not found
- }
-
- return hr;
-}
-
-#endif // HOST_WINDOWS
-
-// A small wrapper that reads from the data target and throws on error
-HRESULT ReadFromDataTarget(ICorDebugDataTarget* pDataTarget,
- ULONG64 addr,
- BYTE* pBuffer,
- ULONG32 bytesToRead)
-{
- //PRECONDITION(CheckPointer(pDataTarget));
- //PRECONDITION(CheckPointer(pBuffer));
-
- HRESULT hr = S_OK;
- ULONG32 bytesReadTotal = 0;
- ULONG32 bytesRead = 0;
- do
- {
- if (FAILED(pDataTarget->ReadVirtual((CORDB_ADDRESS)(addr + bytesReadTotal),
- pBuffer,
- bytesToRead - bytesReadTotal,
- &bytesRead)))
- {
- hr = CORDBG_E_READVIRTUAL_FAILURE;
- break;
- }
- bytesReadTotal += bytesRead;
- } while (bytesRead != 0 && (bytesReadTotal < bytesToRead));
-
- // If we can't read all the expected memory, then fail
- if (SUCCEEDED(hr) && (bytesReadTotal != bytesToRead))
- {
- hr = HRESULT_FROM_WIN32(ERROR_PARTIAL_COPY);
- }
-
- return hr;
-}
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Checked|x64">
- <Configuration>Checked</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="RelWithDebInfo|x64">
- <Configuration>RelWithDebInfo</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <ItemGroup>
- <Text Include="CMakeLists.txt" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="dbgutil.cpp" />
- <ClCompile Include="elfreader.cpp" />
- <ClCompile Include="machoreader.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="elfreader.h" />
- <ClInclude Include="machoreader.h" />
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{A9A7C879-C320-3327-BB84-16E1322E17AE}</ProjectGuid>
- <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
- <Keyword>Win32Proj</Keyword>
- <Platform>x64</Platform>
- <ProjectName>dbgutil</ProjectName>
- <VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v142</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Checked|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v141</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v141</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v141</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ArtifactsObjDir)Windows_NT.x64.Debug\src\SOS\dbgutil\Debug\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">dbgutil.dir\Debug\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">dbgutil</TargetName>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.lib</TargetExt>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Checked|x64'">$(ArtifactsObjDir)Windows_NT.x64.Debug\src\SOS\dbgutil\Checked\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Checked|x64'">dbgutil.dir\Checked\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Checked|x64'">dbgutil</TargetName>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Checked|x64'">.lib</TargetExt>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ArtifactsObjDir)Windows_NT.x64.Debug\src\SOS\dbgutil\Release\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">dbgutil.dir\Release\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">dbgutil</TargetName>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.lib</TargetExt>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">$(ArtifactsObjDir)Windows_NT.x64.Debug\src\SOS\dbgutil\RelWithDebInfo\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">dbgutil.dir\RelWithDebInfo\</IntDir>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">dbgutil</TargetName>
- <TargetExt Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">.lib</TargetExt>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>$(RepoRoot)artifacts\obj;$(RepoRoot)src\shared;$(RepoRoot)src\shared\inc;$(RepoRoot)src\shared\pal\prebuilt\inc;$(RepoRoot)src\shared\pal\inc;$(RepoRoot)src\shared\pal\inc\rt;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>%(AdditionalOptions) /d2Zi+ /Zm200 /ZH:SHA_256 /source-charset:utf-8 /homeparams</AdditionalOptions>
- <AssemblerListingLocation>Debug/</AssemblerListingLocation>
- <BufferSecurityCheck>true</BufferSecurityCheck>
- <CompileAs>CompileAsCpp</CompileAs>
- <ControlFlowGuard>Guard</ControlFlowGuard>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4960;4961;4603;4627;4838;4456;4457;4458;4459;4091</DisableSpecificWarnings>
- <ExceptionHandling>Async</ExceptionHandling>
- <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
- <ForcedIncludeFiles>WarningControl.h</ForcedIncludeFiles>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <MinimalRebuild>false</MinimalRebuild>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <OmitDefaultLibName>true</OmitDefaultLibName>
- <OmitFramePointers>false</OmitFramePointers>
- <Optimization>Disabled</Optimization>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <RuntimeTypeInfo>false</RuntimeTypeInfo>
- <StringPooling>true</StringPooling>
- <StructMemberAlignment>8Bytes</StructMemberAlignment>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TreatSpecificWarningsAsErrors>$(TreatSpecificWarningsAsErrors);4640</TreatSpecificWarningsAsErrors>
- <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
- <TreatWarningAsError>true</TreatWarningAsError>
- <UndefinePreprocessorDefinitions>_MT</UndefinePreprocessorDefinitions>
- <UseFullPaths>true</UseFullPaths>
- <WarningLevel>Level3</WarningLevel>
- <PreprocessorDefinitions>DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- <BrowseInformation>true</BrowseInformation>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <MASM>
- <PreprocessorDefinitions>DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>%(AdditionalOptions) /ZH:SHA_256</AdditionalOptions>
- <IncludePaths>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(IncludePaths)</IncludePaths>
- </MASM>
- <Midl>
- <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
- <HeaderFileName>%(Filename).h</HeaderFileName>
- <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
- <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
- <ProxyFileName>%(Filename)_p.c</ProxyFileName>
- </Midl>
- <Lib>
- <AdditionalOptions>%(AdditionalOptions) /machine:x64 /IGNORE:4221</AdditionalOptions>
- </Lib>
- <Bscmake>
- <PreserveSbr>true</PreserveSbr>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Checked|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>%(AdditionalOptions) /d2Zi+ /Zm200 /ZH:SHA_256 /source-charset:utf-8</AdditionalOptions>
- <AssemblerListingLocation>Checked/</AssemblerListingLocation>
- <BufferSecurityCheck>true</BufferSecurityCheck>
- <CompileAs>CompileAsCpp</CompileAs>
- <ControlFlowGuard>Guard</ControlFlowGuard>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4960;4961;4603;4627;4838;4456;4457;4458;4459;4091</DisableSpecificWarnings>
- <ExceptionHandling>Async</ExceptionHandling>
- <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
- <ForcedIncludeFiles>WarningControl.h</ForcedIncludeFiles>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <MinimalRebuild>false</MinimalRebuild>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <OmitDefaultLibName>true</OmitDefaultLibName>
- <OmitFramePointers>false</OmitFramePointers>
- <Optimization>MinSpace</Optimization>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <RuntimeTypeInfo>false</RuntimeTypeInfo>
- <StringPooling>true</StringPooling>
- <StructMemberAlignment>8Bytes</StructMemberAlignment>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TreatSpecificWarningsAsErrors>$(TreatSpecificWarningsAsErrors);4640</TreatSpecificWarningsAsErrors>
- <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
- <TreatWarningAsError>true</TreatWarningAsError>
- <UndefinePreprocessorDefinitions>_MT</UndefinePreprocessorDefinitions>
- <UseFullPaths>true</UseFullPaths>
- <WarningLevel>Level3</WarningLevel>
- <PreprocessorDefinitions>DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR="Checked";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>WIN32;DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR=\"Checked\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <MASM>
- <PreprocessorDefinitions>DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR="Checked";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>%(AdditionalOptions) /ZH:SHA_256</AdditionalOptions>
- <IncludePaths>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(IncludePaths)</IncludePaths>
- </MASM>
- <Midl>
- <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
- <HeaderFileName>%(Filename).h</HeaderFileName>
- <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
- <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
- <ProxyFileName>%(Filename)_p.c</ProxyFileName>
- </Midl>
- <Lib>
- <AdditionalOptions>%(AdditionalOptions) /machine:x64 /IGNORE:4221</AdditionalOptions>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>%(AdditionalOptions) /d2Zi+ /Zm200 /ZH:SHA_256 /source-charset:utf-8</AdditionalOptions>
- <AssemblerListingLocation>Release/</AssemblerListingLocation>
- <BufferSecurityCheck>true</BufferSecurityCheck>
- <CompileAs>CompileAsCpp</CompileAs>
- <ControlFlowGuard>Guard</ControlFlowGuard>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4960;4961;4603;4627;4838;4456;4457;4458;4459;4091</DisableSpecificWarnings>
- <ExceptionHandling>Async</ExceptionHandling>
- <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
- <ForcedIncludeFiles>WarningControl.h</ForcedIncludeFiles>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <MinimalRebuild>false</MinimalRebuild>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <OmitDefaultLibName>true</OmitDefaultLibName>
- <OmitFramePointers>false</OmitFramePointers>
- <Optimization>MinSpace</Optimization>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <RuntimeTypeInfo>false</RuntimeTypeInfo>
- <StringPooling>true</StringPooling>
- <StructMemberAlignment>8Bytes</StructMemberAlignment>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TreatSpecificWarningsAsErrors>$(TreatSpecificWarningsAsErrors);4640</TreatSpecificWarningsAsErrors>
- <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
- <TreatWarningAsError>true</TreatWarningAsError>
- <UndefinePreprocessorDefinitions>_MT</UndefinePreprocessorDefinitions>
- <UseFullPaths>true</UseFullPaths>
- <WarningLevel>Level3</WarningLevel>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PreprocessorDefinitions>NDEBUG;URTBLDENV_FRIENDLY=Retail;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR="Release";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;URTBLDENV_FRIENDLY=Retail;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <MASM>
- <PreprocessorDefinitions>NDEBUG;URTBLDENV_FRIENDLY=Retail;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR="Release";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>%(AdditionalOptions) /ZH:SHA_256</AdditionalOptions>
- <IncludePaths>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(IncludePaths)</IncludePaths>
- </MASM>
- <Midl>
- <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
- <HeaderFileName>%(Filename).h</HeaderFileName>
- <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
- <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
- <ProxyFileName>%(Filename)_p.c</ProxyFileName>
- </Midl>
- <Lib>
- <AdditionalOptions>%(AdditionalOptions) /machine:x64 /IGNORE:4221</AdditionalOptions>
- <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
- </Lib>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalOptions>%(AdditionalOptions) /d2Zi+ /Zm200 /ZH:SHA_256 /source-charset:utf-8</AdditionalOptions>
- <AssemblerListingLocation>RelWithDebInfo/</AssemblerListingLocation>
- <BufferSecurityCheck>true</BufferSecurityCheck>
- <CompileAs>CompileAsCpp</CompileAs>
- <ControlFlowGuard>Guard</ControlFlowGuard>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4960;4961;4603;4627;4838;4456;4457;4458;4459;4091</DisableSpecificWarnings>
- <ExceptionHandling>Async</ExceptionHandling>
- <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
- <ForcedIncludeFiles>WarningControl.h</ForcedIncludeFiles>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <MinimalRebuild>false</MinimalRebuild>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <OmitDefaultLibName>true</OmitDefaultLibName>
- <OmitFramePointers>false</OmitFramePointers>
- <Optimization>MinSpace</Optimization>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <RuntimeTypeInfo>false</RuntimeTypeInfo>
- <StringPooling>true</StringPooling>
- <StructMemberAlignment>8Bytes</StructMemberAlignment>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TreatSpecificWarningsAsErrors>$(TreatSpecificWarningsAsErrors);4640</TreatSpecificWarningsAsErrors>
- <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
- <TreatWarningAsError>true</TreatWarningAsError>
- <UndefinePreprocessorDefinitions>_MT</UndefinePreprocessorDefinitions>
- <UseFullPaths>true</UseFullPaths>
- <WarningLevel>Level3</WarningLevel>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PreprocessorDefinitions>NDEBUG;URTBLDENV_FRIENDLY=Retail;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR="RelWithDebInfo";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;URTBLDENV_FRIENDLY=Retail;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR=\"RelWithDebInfo\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
- <MASM>
- <PreprocessorDefinitions>NDEBUG;URTBLDENV_FRIENDLY=Retail;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR="RelWithDebInfo";%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalOptions>%(AdditionalOptions) /ZH:SHA_256</AdditionalOptions>
- <IncludePaths>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(IncludePaths)</IncludePaths>
- </MASM>
- <Midl>
- <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
- <HeaderFileName>%(Filename).h</HeaderFileName>
- <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
- <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
- <ProxyFileName>%(Filename)_p.c</ProxyFileName>
- </Midl>
- <Lib>
- <AdditionalOptions>%(AdditionalOptions) /machine:x64 /IGNORE:4221</AdditionalOptions>
- <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
- </Lib>
- </ItemDefinitionGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
- </ImportGroup>
-</Project>
\ No newline at end of file
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#include <windows.h>
-#include <clrdata.h>
-#include <cor.h>
-#include <cordebug.h>
-#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
-#include "elfreader.h"
-#include "arrayholder.h"
-
-#define Elf_Ehdr ElfW(Ehdr)
-#define Elf_Phdr ElfW(Phdr)
-#define Elf_Shdr ElfW(Shdr)
-#define Elf_Nhdr ElfW(Nhdr)
-#define Elf_Dyn ElfW(Dyn)
-#define Elf_Sym ElfW(Sym)
-
-#if TARGET_64BIT
-#define PRIx PRIx64
-#define PRIu PRIu64
-#define PRId PRId64
-#define PRIA "016"
-#define PRIxA PRIA PRIx
-#else
-#define PRIx PRIx32
-#define PRIu PRIu32
-#define PRId PRId32
-#define PRIA "08"
-#define PRIxA PRIA PRIx
-#endif
-
-#ifndef HOST_WINDOWS
-static const char ElfMagic[] = { 0x7f, 'E', 'L', 'F', '\0' };
-#endif
-
-#ifdef HOST_UNIX
-
-class ElfReaderFromFile : public ElfReader
-{
-private:
- struct ProgramHeader
- {
- uint64_t Start;
- uint64_t End;
- uint64_t FileOffset;
- };
- PAL_FILE* m_file;
- std::vector<ProgramHeader> m_programHeaders;
-
-public:
- ElfReaderFromFile() : ElfReader(true),
- m_file(NULL)
- {
- }
-
- virtual ~ElfReaderFromFile()
- {
- if (m_file != NULL)
- {
- PAL_fclose(m_file);
- m_file = NULL;
- }
- }
-
- bool OpenFile(const WCHAR* modulePath)
- {
- _ASSERTE(m_file == NULL);
- m_file = _wfopen(modulePath, W("rb"));
- return m_file != NULL;
- }
-
- uint64_t GetFileOffset(uint64_t address)
- {
- for (const ProgramHeader& header : m_programHeaders)
- {
- if (address >= header.Start && address < header.End)
- {
- return address - header.Start + header.FileOffset;
- }
- }
- return 0;
- }
-
- virtual void VisitProgramHeader(uint64_t loadbias, uint64_t baseAddress, ElfW(Phdr)* phdr)
- {
- switch (phdr->p_type)
- {
- case PT_LOAD:
- ProgramHeader header;
- header.Start = loadbias + phdr->p_vaddr;
- header.End = loadbias + phdr->p_vaddr + phdr->p_memsz;
- header.FileOffset = phdr->p_offset;
- m_programHeaders.push_back(header);
- break;
- }
- }
-
- virtual bool ReadMemory(void* address, void* buffer, size_t size)
- {
- if (m_file == NULL)
- {
- return false;
- }
- if (PAL_fseek(m_file, (LONG_PTR)address, SEEK_SET) != 0)
- {
- return false;
- }
- size_t read = PAL_fread(buffer, 1, size, m_file);
- return read > 0;
- }
-};
-
-//
-// Entry point to get an export symbol from a module file
-//
-extern "C" bool
-TryReadSymbolFromFile(const WCHAR* modulePath, const char* symbolName, BYTE* buffer, ULONG32 size)
-{
- ElfReaderFromFile reader;
- if (reader.OpenFile(modulePath))
- {
- if (reader.PopulateForSymbolLookup(0))
- {
- uint64_t symbolOffset;
- if (reader.TryLookupSymbol(symbolName, &symbolOffset))
- {
- symbolOffset = reader.GetFileOffset(symbolOffset);
- if (symbolOffset != 0)
- {
- return reader.ReadMemory((void*)symbolOffset, buffer, size);
- }
- }
- }
- }
- return false;
-}
-
-//
-// Entry point to get the ELF file's build id
-//
-extern "C" bool
-TryGetBuildIdFromFile(const WCHAR* modulePath, BYTE* buffer, ULONG bufferSize, PULONG pBuildSize)
-{
- ElfReaderFromFile reader;
- if (reader.OpenFile(modulePath))
- {
- if (reader.EnumerateProgramHeaders(0, nullptr, nullptr))
- {
- if (reader.GetBuildId(buffer, bufferSize, pBuildSize))
- {
- return true;
- }
- }
- if (reader.GetBuildIdFromSectionHeader(0, buffer, bufferSize, pBuildSize))
- {
- return true;
- }
- }
- return false;
-}
-
-#endif // HOST_UNIX
-
-typedef bool (*ReadMemoryCallback)(void* address, void* buffer, size_t size);
-
-class ElfReaderWithCallback : public ElfReader
-{
-private:
- ReadMemoryCallback m_readMemory;
-
-public:
- ElfReaderWithCallback(ReadMemoryCallback readMemory) : ElfReader(false),
- m_readMemory(readMemory)
- {
- }
-
- virtual ~ElfReaderWithCallback()
- {
- }
-
-private:
- virtual bool ReadMemory(void* address, void* buffer, size_t size)
- {
- return m_readMemory(address, buffer, size);
- }
-};
-
-//
-// Entry point to get an export symbol
-//
-extern "C" bool
-TryGetSymbolWithCallback(ReadMemoryCallback readMemory, uint64_t baseAddress, const char* symbolName, uint64_t* symbolAddress)
-{
- ElfReaderWithCallback reader(readMemory);
- if (reader.PopulateForSymbolLookup(baseAddress))
- {
- uint64_t symbolOffset;
- if (reader.TryLookupSymbol(symbolName, &symbolOffset))
- {
- *symbolAddress = baseAddress + symbolOffset;
- return true;
- }
- }
- *symbolAddress = 0;
- return false;
-}
-
-class ElfReaderExport : public ElfReader
-{
-private:
- ICorDebugDataTarget* m_dataTarget;
-
-public:
- ElfReaderExport(ICorDebugDataTarget* dataTarget) : ElfReader(false),
- m_dataTarget(dataTarget)
- {
- dataTarget->AddRef();
- }
-
- virtual ~ElfReaderExport()
- {
- m_dataTarget->Release();
- }
-
-private:
- virtual bool ReadMemory(void* address, void* buffer, size_t size)
- {
- uint32_t read = 0;
- return SUCCEEDED(m_dataTarget->ReadVirtual(reinterpret_cast<CLRDATA_ADDRESS>(address), reinterpret_cast<PBYTE>(buffer), (uint32_t)size, &read));
- }
-};
-
-//
-// Main entry point to get an export symbol
-//
-extern "C" bool
-TryGetSymbol(ICorDebugDataTarget* dataTarget, uint64_t baseAddress, const char* symbolName, uint64_t* symbolAddress)
-{
- ElfReaderExport reader(dataTarget);
- if (reader.PopulateForSymbolLookup(baseAddress))
- {
- uint64_t symbolOffset;
- if (reader.TryLookupSymbol(symbolName, &symbolOffset))
- {
- *symbolAddress = baseAddress + symbolOffset;
- return true;
- }
- }
- *symbolAddress = 0;
- return false;
-}
-
-
-//
-// Get the build id of the module from a data target
-//
-extern "C" bool
-TryGetBuildId(ICorDebugDataTarget* dataTarget, uint64_t baseAddress, BYTE* buffer, ULONG bufferSize, PULONG pBuildSize)
-{
- ElfReaderExport reader(dataTarget);
- if (reader.EnumerateProgramHeaders(baseAddress, nullptr, nullptr))
- {
- return reader.GetBuildId(buffer, bufferSize, pBuildSize);
- }
- return false;
-}
-
-//
-// ELF reader constructor/destructor
-//
-
-ElfReader::ElfReader(bool isFileLayout) :
- m_isFileLayout(isFileLayout),
- m_gnuHashTableAddr(nullptr),
- m_stringTableAddr(nullptr),
- m_stringTableSize(0),
- m_symbolTableAddr(nullptr),
- m_buckets(nullptr),
- m_chainsAddress(nullptr),
- m_noteStart(0),
- m_noteEnd(0)
-{
- memset(&m_hashTable, 0, sizeof(m_hashTable));
-}
-
-ElfReader::~ElfReader()
-{
- if (m_buckets != nullptr) {
- free(m_buckets);
- }
-}
-
-//
-// Initialize the ELF reader from a module the base address. This function
-// caches the info neccessary in the ElfReader class look up symbols.
-//
-bool
-ElfReader::PopulateForSymbolLookup(uint64_t baseAddress)
-{
- Trace("PopulateForSymbolLookup: base %" PRIA PRIx64 "\n", baseAddress);
- Elf_Dyn* dynamicAddr = nullptr;
- uint64_t loadbias = 0;
-
- // Enumerate program headers searching for the PT_DYNAMIC header, etc.
- if (!EnumerateProgramHeaders(
- baseAddress,
-#ifdef TARGET_LINUX_MUSL
- // On linux-musl, the below dynamic entries for hash, string table, etc. are
- // RVAs instead of absolute address like on all other Linux distros. Get
- // the "loadbias" (basically the base address of the module) and add to
- // these RVAs.
- &loadbias,
-#else
- nullptr,
-#endif
- &dynamicAddr))
- {
- return false;
- }
-
- if (dynamicAddr == nullptr) {
- return false;
- }
-
- // Search for dynamic entries
- for (;;)
- {
- Elf_Dyn dyn;
- if (!ReadMemory(dynamicAddr, &dyn, sizeof(dyn))) {
- Trace("ERROR: ReadMemory(%p, %" PRIx ") dyn FAILED\n", dynamicAddr, sizeof(dyn));
- return false;
- }
- Trace("DSO: dyn %p tag %" PRId " (%" PRIx ") d_ptr %" PRIxA "\n", dynamicAddr, dyn.d_tag, dyn.d_tag, dyn.d_un.d_ptr);
- if (dyn.d_tag == DT_NULL) {
- break;
- }
- else if (dyn.d_tag == DT_GNU_HASH) {
- m_gnuHashTableAddr = (void*)(dyn.d_un.d_ptr + loadbias);
- }
- else if (dyn.d_tag == DT_STRTAB) {
- m_stringTableAddr = (void*)(dyn.d_un.d_ptr + loadbias);
- }
- else if (dyn.d_tag == DT_STRSZ) {
- m_stringTableSize = (int)dyn.d_un.d_ptr;
- }
- else if (dyn.d_tag == DT_SYMTAB) {
- m_symbolTableAddr = (void*)(dyn.d_un.d_ptr + loadbias);
- }
- dynamicAddr++;
- }
-
- if (m_gnuHashTableAddr == nullptr || m_stringTableAddr == nullptr || m_symbolTableAddr == nullptr) {
- Trace("ERROR: hash, string or symbol table address not found\n");
- return false;
- }
-
- // Initialize the hash table
- if (!InitializeGnuHashTable()) {
- return false;
- }
-
- return true;
-}
-
-//
-// Symbol table support
-//
-
-bool
-ElfReader::TryLookupSymbol(std::string symbolName, uint64_t* symbolOffset)
-{
- std::vector<int32_t> symbolIndexes;
- if (GetPossibleSymbolIndex(symbolName, symbolIndexes)) {
- Elf_Sym symbol;
- for (int32_t possibleLocation : symbolIndexes)
- {
- if (GetSymbol(possibleLocation, &symbol))
- {
- std::string possibleName;
- if (GetStringAtIndex(symbol.st_name, possibleName))
- {
- if (symbolName.compare(possibleName) == 0)
- {
- *symbolOffset = symbol.st_value;
- Trace("TryLookupSymbol found '%s' at offset %" PRIxA " in %d\n", symbolName.c_str(), *symbolOffset, symbol.st_shndx);
- return true;
- }
- }
- }
- }
- }
- Trace("TryLookupSymbol '%s' not found\n", symbolName.c_str());
- *symbolOffset = 0;
- return false;
-}
-
-bool
-ElfReader::GetSymbol(int32_t index, Elf_Sym* symbol)
-{
- int symSize = sizeof(Elf_Sym);
- if (!ReadMemory((char*)m_symbolTableAddr + (index * symSize), symbol, symSize)) {
- return false;
- }
- return true;
-}
-
-//
-// Hash (GNU) hash table support
-//
-
-bool
-ElfReader::InitializeGnuHashTable()
-{
- if (!ReadMemory(m_gnuHashTableAddr, &m_hashTable, sizeof(m_hashTable))) {
- Trace("ERROR: InitializeGnuHashTable hashtable ReadMemory(%p) FAILED\n", m_gnuHashTableAddr);
- return false;
- }
- if (m_hashTable.BucketCount <= 0 || m_hashTable.SymbolOffset == 0) {
- Trace("ERROR: InitializeGnuHashTable invalid BucketCount or SymbolOffset\n");
- return false;
- }
- m_buckets = (int32_t*)malloc(m_hashTable.BucketCount * sizeof(int32_t));
- if (m_buckets == nullptr) {
- return false;
- }
- void* bucketsAddress = (char*)m_gnuHashTableAddr + sizeof(GnuHashTable) + (m_hashTable.BloomSize * sizeof(size_t));
- if (!ReadMemory(bucketsAddress, m_buckets, m_hashTable.BucketCount * sizeof(int32_t))) {
- Trace("ERROR: InitializeGnuHashTable buckets ReadMemory(%p) FAILED\n", bucketsAddress);
- return false;
- }
- m_chainsAddress = (char*)bucketsAddress + (m_hashTable.BucketCount * sizeof(int32_t));
- return true;
-}
-
-bool
-ElfReader::GetPossibleSymbolIndex(const std::string& symbolName, std::vector<int32_t>& symbolIndexes)
-{
- uint32_t hash = Hash(symbolName);
- int i = m_buckets[hash % m_hashTable.BucketCount] - m_hashTable.SymbolOffset;
- Trace("GetPossibleSymbolIndex hash %08x index: %d BucketCount %d SymbolOffset %08x\n", hash, i, m_hashTable.BucketCount, m_hashTable.SymbolOffset);
- for (;; i++)
- {
- int32_t chainVal;
- if (!GetChain(i, &chainVal)) {
- Trace("ERROR: GetPossibleSymbolIndex GetChain FAILED\n");
- return false;
- }
- if ((chainVal & 0xfffffffe) == (hash & 0xfffffffe))
- {
- symbolIndexes.push_back(i + m_hashTable.SymbolOffset);
- }
- if ((chainVal & 0x1) == 0x1)
- {
- break;
- }
- }
- return true;
-}
-
-uint32_t
-ElfReader::Hash(const std::string& symbolName)
-{
- uint32_t h = 5381;
- for (unsigned int i = 0; i < symbolName.length(); i++)
- {
- h = (h << 5) + h + symbolName[i];
- }
- return h;
-}
-
-bool
-ElfReader::GetChain(int index, int32_t* chain)
-{
- return ReadMemory((char*)m_chainsAddress + (index * sizeof(int32_t)), chain, sizeof(int32_t));
-}
-
-//
-// String table support
-//
-
-bool
-ElfReader::GetStringAtIndex(int index, std::string& result)
-{
- while(true)
- {
- if (index > m_stringTableSize) {
- Trace("ERROR: GetStringAtIndex index %d > string table size\n", index);
- return false;
- }
- char ch;
- void* address = (char*)m_stringTableAddr + index;
- if (!ReadMemory(address, &ch, sizeof(ch))) {
- Trace("ERROR: GetStringAtIndex ReadMemory(%p) FAILED\n", address);
- return false;
- }
- if (ch == '\0') {
- break;
- }
- result.append(1, ch);
- index++;
- }
- return true;
-}
-
-size_t Align4(size_t x) { return (x + 3) & ~3; }
-
-bool
-ElfReader::GetBuildId(BYTE* buffer, ULONG bufferSize, PULONG pBuildSize)
-{
- _ASSERTE(pBuildSize != nullptr);
-
- if (m_noteStart != 0)
- {
- _ASSERTE(m_noteEnd != 0);
- uint64_t address = m_noteStart;
- while (address < m_noteEnd)
- {
- Elf_Nhdr nhdr;
- if (!ReadMemory((PVOID)address, &nhdr, sizeof(nhdr)))
- {
- return false;
- }
- size_t nhdrSize = sizeof(Elf_Nhdr) + Align4(nhdr.n_namesz) + Align4(nhdr.n_descsz);
- Trace("GetBuildId: type %d size %08x\n", nhdr.n_type, nhdrSize);
- if (nhdr.n_type == NT_GNU_BUILD_ID)
- {
- ArrayHolder<BYTE> nhdrBuffer = new BYTE[nhdrSize];
- if (!ReadMemory((PVOID)address, nhdrBuffer, nhdrSize))
- {
- return false;
- }
- const char* name = (const char*)(nhdrBuffer.GetPtr() + sizeof(Elf_Nhdr));
- Trace("GetBuildId: name %s\n", name);
- if (strncmp(name, ELF_NOTE_GNU, Align4(nhdr.n_namesz)) == 0)
- {
- *pBuildSize = nhdr.n_descsz;
- memcpy_s(buffer, bufferSize, nhdrBuffer.GetPtr() + sizeof(Elf_Nhdr) + Align4(nhdr.n_namesz), nhdr.n_descsz);
-
- Trace("GetBuildId: found id size %d\n", *pBuildSize);
- return true;
- }
- }
- address += nhdrSize;
- }
- }
- return false;
-}
-
-#ifdef HOST_UNIX
-
-bool
-ElfReader::GetBuildIdFromSectionHeader(uint64_t baseAddress, BYTE* buffer, ULONG bufferSize, PULONG pBuildSize)
-{
- Elf_Ehdr ehdr;
- if (!ReadHeader(baseAddress, ehdr)) {
- return false;
- }
- if (ehdr.e_shoff == 0 || ehdr.e_shnum <= 0) {
- return false;
- }
- Elf_Shdr* shdrAddr = reinterpret_cast<Elf_Shdr*>(baseAddress + ehdr.e_shoff);
- for (int sectionIndex = 0; sectionIndex < ehdr.e_shnum; sectionIndex++, shdrAddr++)
- {
- Elf_Shdr sh;
- if (!ReadMemory(shdrAddr, &sh, sizeof(sh))) {
- Trace("GetBuildIdFromSectionHeader: %2d shdr %p ReadMemory FAILED\n", sectionIndex, shdrAddr);
- return false;
- }
- Trace("GetBuildIdFromSectionHeader: %2d shdr %p type %2d (%x) addr %016lx offset %016lx size %016lx link %08x info %08x name %4d\n",
- sectionIndex, shdrAddr, sh.sh_type, sh.sh_type, sh.sh_addr, sh.sh_offset, sh.sh_size, sh.sh_link, sh.sh_info, sh.sh_name);
-
- if (sh.sh_type == SHT_NOTE)
- {
- m_noteStart = baseAddress + sh.sh_offset;
- m_noteEnd = baseAddress + sh.sh_offset + sh.sh_size;
- if (GetBuildId(buffer, bufferSize, pBuildSize))
- {
- return true;
- }
- }
- }
- return false;
-}
-
-//
-// Enumerate all the ELF info starting from the root program header. This
-// function doesn't cache any state in the ElfReader class.
-//
-bool
-ElfReader::EnumerateElfInfo(Elf_Phdr* phdrAddr, int phnum)
-{
- Trace("EnumerateElfInfo: phdr %p phnum %d\n", phdrAddr, phnum);
-
- if (phdrAddr == nullptr || phnum <= 0) {
- return false;
- }
- uint64_t baseAddress = (uint64_t)phdrAddr - sizeof(Elf_Ehdr);
- Elf_Dyn* dynamicAddr = nullptr;
-
- // Enumerate program headers searching for the PT_DYNAMIC header, etc.
- if (!EnumerateProgramHeaders(phdrAddr, phnum, baseAddress, nullptr, &dynamicAddr)) {
- return false;
- }
- return EnumerateLinkMapEntries(dynamicAddr);
-}
-
-//
-// Enumerate through the dynamic debug link map entries
-//
-bool
-ElfReader::EnumerateLinkMapEntries(Elf_Dyn* dynamicAddr)
-{
- if (dynamicAddr == nullptr) {
- return false;
- }
-
- // Search dynamic entries for DT_DEBUG (r_debug entry)
- struct r_debug* rdebugAddr = nullptr;
- for (;;)
- {
- Elf_Dyn dyn;
- if (!ReadMemory(dynamicAddr, &dyn, sizeof(dyn))) {
- Trace("ERROR: ReadMemory(%p, %" PRIx ") dyn FAILED\n", dynamicAddr, sizeof(dyn));
- return false;
- }
- Trace("DSO: dyn %p tag %" PRId " (%" PRIx ") d_ptr %" PRIxA "\n", dynamicAddr, dyn.d_tag, dyn.d_tag, dyn.d_un.d_ptr);
- if (dyn.d_tag == DT_NULL) {
- break;
- }
- else if (dyn.d_tag == DT_DEBUG) {
- rdebugAddr = reinterpret_cast<struct r_debug*>(dyn.d_un.d_ptr);
- }
- dynamicAddr++;
- }
-
- Trace("DSO: rdebugAddr %p\n", rdebugAddr);
- if (rdebugAddr == nullptr) {
- return false;
- }
-
- struct r_debug debugEntry;
- if (!ReadMemory(rdebugAddr, &debugEntry, sizeof(debugEntry))) {
- Trace("ERROR: ReadMemory(%p, %" PRIx ") r_debug FAILED\n", rdebugAddr, sizeof(debugEntry));
- return false;
- }
-
- // Add the DSO link_map entries
- for (struct link_map* linkMapAddr = debugEntry.r_map; linkMapAddr != nullptr;)
- {
- struct link_map map;
- if (!ReadMemory(linkMapAddr, &map, sizeof(map))) {
- Trace("ERROR: ReadMemory(%p, %" PRIx ") link_map FAILED\n", linkMapAddr, sizeof(map));
- return false;
- }
- // Read the module's name and make sure the memory is added to the core dump
- std::string moduleName;
- if (map.l_name != 0)
- {
- for (int i = 0; i < PATH_MAX; i++)
- {
- char ch;
- if (!ReadMemory(map.l_name + i, &ch, sizeof(ch))) {
- Trace("DSO: ReadMemory link_map name %p + %d FAILED\n", map.l_name, i);
- break;
- }
- if (ch == '\0') {
- break;
- }
- moduleName.append(1, ch);
- }
- }
- Trace("\nDSO: link_map entry %p l_ld %p l_addr (Ehdr) %p l_name %p %s\n", linkMapAddr, map.l_ld, map.l_addr, map.l_name, moduleName.c_str());
-
- // Call the derived class for each module
- VisitModule(map.l_addr, moduleName);
-
- linkMapAddr = map.l_next;
- }
-
- return true;
-}
-
-#endif // HOST_UNIX
-
-bool
-ElfReader::ReadHeader(uint64_t baseAddress, Elf_Ehdr& ehdr)
-{
- if (!ReadMemory((void*)baseAddress, &ehdr, sizeof(Elf_Ehdr))) {
- Trace("ERROR: EnumerateProgramHeaders ReadMemory(%p, %" PRIx ") ehdr FAILED\n", (void*)baseAddress, sizeof(Elf_Ehdr));
- return false;
- }
- if (memcmp(ehdr.e_ident, ElfMagic, strlen(ElfMagic)) != 0) {
- Trace("ERROR: EnumerateProgramHeaders Invalid elf header signature\n");
- return false;
- }
- _ASSERTE(ehdr.e_phentsize == sizeof(Elf_Phdr));
-#ifdef TARGET_64BIT
- _ASSERTE(ehdr.e_ident[EI_CLASS] == ELFCLASS64);
-#else
- _ASSERTE(ehdr.e_ident[EI_CLASS] == ELFCLASS32);
-#endif
- _ASSERTE(ehdr.e_ident[EI_DATA] == ELFDATA2LSB);
- int phnum = ehdr.e_phnum;
-#ifdef PN_XNUM
- _ASSERTE(phnum != PN_XNUM);
-#endif
- if (ehdr.e_phoff == 0 || phnum <= 0) {
- return false;
- }
- Trace("ELF: type %d mach 0x%x ver %d flags 0x%x phnum %d phoff %" PRIxA " phentsize 0x%02x shnum %d shoff %" PRIxA " shentsize 0x%02x shstrndx %d\n",
- ehdr.e_type, ehdr.e_machine, ehdr.e_version, ehdr.e_flags, phnum, ehdr.e_phoff, ehdr.e_phentsize, ehdr.e_shnum, ehdr.e_shoff, ehdr.e_shentsize, ehdr.e_shstrndx);
- return true;
-}
-
-bool
-ElfReader::EnumerateProgramHeaders(uint64_t baseAddress, uint64_t* ploadbias, Elf_Dyn** pdynamicAddr)
-{
- Elf_Ehdr ehdr;
- if (!ReadHeader(baseAddress, ehdr)) {
- return false;
- }
- Elf_Phdr* phdrAddr = reinterpret_cast<Elf_Phdr*>(baseAddress + ehdr.e_phoff);
- return EnumerateProgramHeaders(phdrAddr, ehdr.e_phnum, baseAddress, ploadbias, pdynamicAddr);
-}
-
-//
-// Enumerate and find the dynamic program header entry
-//
-bool
-ElfReader::EnumerateProgramHeaders(Elf_Phdr* phdrAddr, int phnum, uint64_t baseAddress, uint64_t* ploadbias, Elf_Dyn** pdynamicAddr)
-{
- uint64_t loadbias = baseAddress;
-
- // Calculate the load bias from the PT_LOAD program headers
- for (int i = 0; i < phnum; i++)
- {
- Elf_Phdr ph;
- if (!ReadMemory(phdrAddr + i, &ph, sizeof(ph))) {
- Trace("ERROR: ReadMemory(%p, %" PRIx ") phdr FAILED\n", phdrAddr + i, sizeof(ph));
- return false;
- }
- if (ph.p_type == PT_LOAD && ph.p_offset == 0) {
- loadbias -= ph.p_vaddr;
- Trace("PHDR: loadbias %" PRIA PRIx64 "\n", loadbias);
- break;
- }
- }
-
- if (ploadbias != nullptr) {
- *ploadbias = loadbias;
- }
-
- // Enumerate all the program headers
- for (int i = 0; i < phnum; i++)
- {
- Elf_Phdr ph;
- if (!ReadMemory(phdrAddr + i, &ph, sizeof(ph))) {
- Trace("ERROR: ReadMemory(%p, %" PRIx ") phdr FAILED\n", phdrAddr + i, sizeof(ph));
- return false;
- }
- Trace("PHDR: %p type %d (%x) vaddr %" PRIxA " memsz %" PRIxA " paddr %" PRIxA " filesz %" PRIxA " offset %" PRIxA " align %" PRIxA "\n",
- phdrAddr + i, ph.p_type, ph.p_type, ph.p_vaddr, ph.p_memsz, ph.p_paddr, ph.p_filesz, ph.p_offset, ph.p_align);
-
- switch (ph.p_type)
- {
- case PT_NOTE:
- m_noteStart = loadbias + ph.p_vaddr;
- m_noteEnd = loadbias + ph.p_vaddr + ph.p_memsz;
- break;
-
- case PT_DYNAMIC:
- if (pdynamicAddr != nullptr)
- {
- if (m_isFileLayout)
- {
- *pdynamicAddr = reinterpret_cast<Elf_Dyn*>(loadbias + ph.p_offset);
- }
- else
- {
- *pdynamicAddr = reinterpret_cast<Elf_Dyn*>(loadbias + ph.p_vaddr);
- }
- }
- break;
- }
-
- // Give any derived classes a chance at the program header
- VisitProgramHeader(loadbias, baseAddress, &ph);
- }
-
- return true;
-}
-
-#ifdef HOST_WINDOWS
-
-/* ELF 32bit header */
-Elf32_Ehdr::Elf32_Ehdr()
-{
- e_ident[EI_MAG0] = ElfMagic[0];
- e_ident[EI_MAG1] = ElfMagic[1];
- e_ident[EI_MAG2] = ElfMagic[2];
- e_ident[EI_MAG3] = ElfMagic[3];
- e_ident[EI_CLASS] = ELFCLASS32;
- e_ident[EI_DATA] = ELFDATA2LSB;
- e_ident[EI_VERSION] = EV_CURRENT;
- e_ident[EI_OSABI] = ELFOSABI_NONE;
- e_ident[EI_ABIVERSION] = 0;
- for (int i = EI_PAD; i < EI_NIDENT; ++i) {
- e_ident[i] = 0;
- }
- e_type = ET_REL;
-#if defined(TARGET_X86)
- e_machine = EM_386;
-#elif defined(TARGET_ARM)
- e_machine = EM_ARM;
-#endif
- e_flags = 0;
- e_version = 1;
- e_entry = 0;
- e_phoff = 0;
- e_ehsize = sizeof(Elf32_Ehdr);
- e_phentsize = 0;
- e_phnum = 0;
-}
-
-/* ELF 64bit header */
-Elf64_Ehdr::Elf64_Ehdr()
-{
- e_ident[EI_MAG0] = ElfMagic[0];
- e_ident[EI_MAG1] = ElfMagic[1];
- e_ident[EI_MAG2] = ElfMagic[2];
- e_ident[EI_MAG3] = ElfMagic[3];
- e_ident[EI_CLASS] = ELFCLASS64;
- e_ident[EI_DATA] = ELFDATA2LSB;
- e_ident[EI_VERSION] = EV_CURRENT;
- e_ident[EI_OSABI] = ELFOSABI_NONE;
- e_ident[EI_ABIVERSION] = 0;
- for (int i = EI_PAD; i < EI_NIDENT; ++i) {
- e_ident[i] = 0;
- }
- e_type = ET_REL;
-#if defined(TARGET_AMD64)
- e_machine = EM_X86_64;
-#elif defined(TARGET_ARM64)
- e_machine = EM_AARCH64;
-#elif defined(TARGET_LOONGARCH64)
- e_machine = EM_LOONGARCH;
-#elif defined(TARGET_RISCV64)
- e_machine = EM_RISCV;
-#endif
- e_flags = 0;
- e_version = 1;
- e_entry = 0;
- e_phoff = 0;
- e_ehsize = sizeof(Elf64_Ehdr);
- e_phentsize = 0;
- e_phnum = 0;
-}
-
-#endif // HOST_WINDOWS
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#include <elf.h>
-#ifdef HOST_UNIX
-#include <link.h>
-#endif // HOST_UNIX
-#include <string>
-#include <vector>
-
-#if TARGET_64BIT
-#define TARGET_WORDSIZE 64
-#else
-#define TARGET_WORDSIZE 32
-#endif
-
-#ifndef ElfW
-/* We use this macro to refer to ELF types independent of the native wordsize.
- `ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */
-#define ElfW(type) _ElfW (Elf, TARGET_WORDSIZE, type)
-#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t)
-#define _ElfW_1(e,w,t) e##w##t
-#endif
-
-typedef struct {
- int32_t BucketCount;
- int32_t SymbolOffset;
- int32_t BloomSize;
- int32_t BloomShift;
-} GnuHashTable;
-
-class ElfReader
-{
-private:
- bool m_isFileLayout;
- void* m_gnuHashTableAddr; // DT_GNU_HASH
- void* m_stringTableAddr; // DT_STRTAB
- int m_stringTableSize; // DT_STRSIZ
- void* m_symbolTableAddr; // DT_SYMTAB
-
- GnuHashTable m_hashTable; // gnu hash table info
- int32_t* m_buckets; // gnu hash table buckets
- void* m_chainsAddress;
-
- uint64_t m_noteStart;
- uint64_t m_noteEnd;
-
-public:
- ElfReader(bool isFileLayout);
- virtual ~ElfReader();
- bool PopulateForSymbolLookup(uint64_t baseAddress);
- bool TryLookupSymbol(std::string symbolName, uint64_t* symbolOffset);
- bool GetBuildId(BYTE* buffer, ULONG bufferSize, PULONG pBuildSize);
-#ifdef HOST_UNIX
- bool EnumerateElfInfo(ElfW(Phdr)* phdrAddr, int phnum);
- bool GetBuildIdFromSectionHeader(uint64_t baseAddress, BYTE* buffer, ULONG bufferSize, PULONG pBuildSize);
-#endif
- bool EnumerateProgramHeaders(uint64_t baseAddress, uint64_t* ploadbias = nullptr, ElfW(Dyn)** pdynamicAddr = nullptr);
-
-private:
- bool GetSymbol(int32_t index, ElfW(Sym)* symbol);
- bool InitializeGnuHashTable();
- bool GetPossibleSymbolIndex(const std::string& symbolName, std::vector<int32_t>& symbolIndexes);
- uint32_t Hash(const std::string& symbolName);
- bool GetChain(int index, int32_t* chain);
- bool GetStringAtIndex(int index, std::string& result);
- bool ReadHeader(uint64_t baseAddress, ElfW(Ehdr)& ehdr);
- bool EnumerateProgramHeaders(ElfW(Phdr)* phdrAddr, int phnum, uint64_t baseAddress, uint64_t* ploadbias, ElfW(Dyn)** pdynamicAddr);
-#ifdef HOST_UNIX
- bool EnumerateLinkMapEntries(ElfW(Dyn)* dynamicAddr);
-#endif
-#ifdef __FreeBSD__
- virtual void VisitModule(caddr_t baseAddress, std::string& moduleName) { };
-#else
- virtual void VisitModule(uint64_t baseAddress, std::string& moduleName) { };
-#endif
- virtual void VisitProgramHeader(uint64_t loadbias, uint64_t baseAddress, ElfW(Phdr)* phdr) { };
- virtual bool ReadMemory(void* address, void* buffer, size_t size) = 0;
- virtual void Trace(const char* format, ...) { };
- virtual void TraceVerbose(const char* format, ...) { };
-};
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#include <windows.h>
-#include <clrdata.h>
-#include <cor.h>
-#include <cordebug.h>
-#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
-#include <arrayholder.h>
-#include "machoreader.h"
-
-#if TARGET_64BIT
-#define PRIx PRIx64
-#define PRIu PRIu64
-#define PRId PRId64
-#define PRIA "016"
-#define PRIxA PRIA PRIx
-#else
-#define PRIx PRIx32
-#define PRIu PRIu32
-#define PRId PRId32
-#define PRIA "08"
-#define PRIxA PRIA PRIx
-#endif
-
-class MachOReaderFromFile : public MachOReader
-{
-private:
- PAL_FILE* m_file;
-
-public:
- MachOReaderFromFile() :
- m_file(NULL)
- {
- }
-
- virtual ~MachOReaderFromFile()
- {
- }
-
- bool OpenFile(const WCHAR* modulePath)
- {
- _ASSERTE(m_file == NULL);
- m_file = _wfopen(modulePath, W("rb"));
- return m_file != NULL;
- }
-
- virtual bool ReadMemory(void* address, void* buffer, size_t size)
- {
- if (m_file == NULL)
- {
- return false;
- }
- if (PAL_fseek(m_file, (LONG)(intptr_t)address, SEEK_SET) != 0)
- {
- return false;
- }
- size_t read = PAL_fread(buffer, 1, size, m_file);
- return read > 0;
- }
-};
-
-//
-// Entry point to get an export symbol from a module file
-//
-extern "C" bool
-TryReadSymbolFromFile(const WCHAR* modulePath, const char* symbolName, BYTE* buffer, ULONG32 size)
-{
- MachOReaderFromFile reader;
- if (reader.OpenFile(modulePath))
- {
- MachOModule module(reader, true, 0);
- if (module.ReadHeader())
- {
- uint64_t symbolOffset;
- if (module.TryLookupSymbol(symbolName, &symbolOffset))
- {
- return reader.ReadMemory((void*)symbolOffset, buffer, size);
- }
- }
- }
- return false;
-}
-
-//
-// Entry point to get the MachO file's build id
-//
-extern "C" bool
-TryGetBuildIdFromFile(const WCHAR* modulePath, BYTE* buffer, ULONG bufferSize, PULONG pBuildSize)
-{
- MachOReaderFromFile reader;
- if (reader.OpenFile(modulePath))
- {
- MachOModule module(reader, true, 0);
- return module.GetBuildId(buffer, bufferSize, pBuildSize);
- }
- return false;
-}
-
-typedef bool (*ReadMemoryCallback)(void* address, void* buffer, size_t size);
-
-class MachOReaderWithCallback : public MachOReader
-{
-private:
- ReadMemoryCallback m_readMemory;
-
-public:
- MachOReaderWithCallback(ReadMemoryCallback readMemory) :
- m_readMemory(readMemory)
- {
- }
-
- virtual ~MachOReaderWithCallback()
- {
- }
-
-private:
- virtual bool ReadMemory(void* address, void* buffer, size_t size)
- {
- return m_readMemory(address, buffer, size);
- }
-};
-
-//
-// Entry point to get an export symbol
-//
-extern "C" bool
-TryGetSymbolWithCallback(ReadMemoryCallback readMemory, uint64_t baseAddress, const char* symbolName, uint64_t* symbolAddress)
-{
- MachOReaderWithCallback reader(readMemory);
- MachOModule module(reader, false, baseAddress);
- if (module.ReadHeader())
- {
- uint64_t symbolOffset;
- if (module.TryLookupSymbol(symbolName, &symbolOffset))
- {
- *symbolAddress = symbolOffset;
- return true;
- }
- }
- *symbolAddress = 0;
- return false;
-}
-
-class MachOReaderExport : public MachOReader
-{
-private:
- ICorDebugDataTarget* m_dataTarget;
-
-public:
- MachOReaderExport(ICorDebugDataTarget* dataTarget) :
- m_dataTarget(dataTarget)
- {
- dataTarget->AddRef();
- }
-
- virtual ~MachOReaderExport()
- {
- m_dataTarget->Release();
- }
-
-private:
- virtual bool ReadMemory(void* address, void* buffer, size_t size)
- {
- uint32_t read = 0;
- return SUCCEEDED(m_dataTarget->ReadVirtual(reinterpret_cast<CLRDATA_ADDRESS>(address), reinterpret_cast<PBYTE>(buffer), (uint32_t)size, &read));
- }
-};
-
-//
-// Main entry point to get an export symbol
-//
-extern "C" bool
-TryGetSymbol(ICorDebugDataTarget* dataTarget, uint64_t baseAddress, const char* symbolName, uint64_t* symbolAddress)
-{
- MachOReaderExport reader(dataTarget);
- MachOModule module(reader, false, baseAddress);
- if (module.ReadHeader())
- {
- uint64_t symbolOffset;
- if (module.TryLookupSymbol(symbolName, &symbolOffset))
- {
- *symbolAddress = symbolOffset;
- return true;
- }
- }
- *symbolAddress = 0;
- return false;
-}
-
-//
-// Get the build id of the module from a data target
-//
-extern "C" bool
-TryGetBuildId(ICorDebugDataTarget* dataTarget, uint64_t baseAddress, BYTE* buffer, ULONG bufferSize, PULONG pBuildSize)
-{
- MachOReaderExport reader(dataTarget);
- MachOModule module(reader, false, baseAddress);
- return module.GetBuildId(buffer, bufferSize, pBuildSize);
-}
-
-//--------------------------------------------------------------------
-// MachO module
-//--------------------------------------------------------------------
-
-MachOModule::MachOModule(MachOReader& reader, bool isFileLayout, mach_vm_address_t baseAddress, mach_header_64* header, std::string* name) :
- m_reader(reader),
- m_isFileLayout(isFileLayout),
- m_baseAddress(baseAddress),
- m_loadBias(0),
- m_commands(nullptr),
- m_symtabCommand(nullptr),
- m_nlists(nullptr),
- m_strtabAddress(0)
-{
- if (header != nullptr) {
- m_header = *header;
- }
- if (name != nullptr) {
- m_name = *name;
- }
-}
-
-MachOModule::~MachOModule()
-{
- if (m_commands != nullptr) {
- free(m_commands);
- m_commands = nullptr;
- }
- if (m_nlists != nullptr) {
- free(m_nlists);
- m_nlists = nullptr;
- }
-}
-
-bool
-MachOModule::ReadHeader()
-{
- _ASSERTE(sizeof(m_header) == sizeof(mach_header_64));
- if (!m_reader.ReadMemory((void*)m_baseAddress, &m_header, sizeof(mach_header_64)))
- {
- m_reader.Trace("ERROR: failed to read header at %p\n", (void*)m_baseAddress);
- return false;
- }
- m_reader.Trace("ReadHeader: magic %08x cputype %08x ncmds %d sizeofcmds %d\n", m_header.magic, m_header.cputype, m_header.ncmds, m_header.sizeofcmds);
- return m_header.magic == 0xfeedfacf;
-}
-
-bool
-MachOModule::TryLookupSymbol(const char* symbolName, uint64_t* symbolValue)
-{
- _ASSERTE(symbolValue != nullptr);
-
- if (ReadSymbolTable())
- {
- _ASSERTE(m_nlists != nullptr);
- _ASSERTE(m_strtabAddress != 0);
-
- // First, search just the "external" export symbols
- if (TryLookupSymbol(m_dysymtabCommand->iextdefsym, m_dysymtabCommand->nextdefsym, symbolName, symbolValue))
- {
- m_reader.Trace("SYM: Found '%s' in external symbols\n", symbolName);
- return true;
- }
- m_reader.Trace("SYM: Missed '%s' in external symbols\n", symbolName);
-
- // If not found in external symbols, search all of them
- if (TryLookupSymbol(0, m_symtabCommand->nsyms, symbolName, symbolValue))
- {
- m_reader.Trace("SYM: Found '%s' in all symbols\n", symbolName);
- return true;
- }
- m_reader.Trace("SYM: Missed '%s' in all symbols\n", symbolName);
- }
- *symbolValue = 0;
- return false;
-}
-
-bool
-MachOModule::TryLookupSymbol(int start, int nsyms, const char* symbolName, uint64_t* symbolValue)
-{
- for (int i = 0; i < nsyms; i++)
- {
- std::string name = GetSymbolName(start + i);
-
- // Skip the leading underscores to match Linux externs
- const char* currentName = name.length() > 0 && name[0] == '_' ? name.c_str() + 1 : name.c_str();
-
- // Does this symbol match?
- if (strcmp(currentName, symbolName) == 0)
- {
- *symbolValue = m_loadBias + m_nlists[start + i].n_value;
- return true;
- }
- }
- *symbolValue = 0;
- return false;
-}
-
-bool
-MachOModule::GetBuildId(BYTE* buffer, ULONG bufferSize, PULONG pBuildSize)
-{
- _ASSERTE(pBuildSize != nullptr);
- if (ReadHeader())
- {
- if (ReadLoadCommands())
- {
- if (m_uuidCommand != nullptr)
- {
- *pBuildSize = sizeof(m_uuidCommand->uuid);
- memcpy_s(buffer, bufferSize, m_uuidCommand->uuid, *pBuildSize);
- return true;
- }
- }
- }
- return false;
-}
-
-bool
-MachOModule::EnumerateSegments()
-{
- if (!ReadLoadCommands())
- {
- return false;
- }
- _ASSERTE(!m_segments.empty());
-
- for (const segment_command_64* segment : m_segments)
- {
- m_reader.VisitSegment(*this, *segment);
-
- const section_64* section = (section_64*)((uint64_t)segment + sizeof(segment_command_64));
-
- for (int s = 0; s < segment->nsects; s++, section++)
- {
- m_reader.VisitSection(*this, *section);
- }
- }
- return true;
-}
-
-bool
-MachOModule::ReadLoadCommands()
-{
- if (m_commands == nullptr)
- {
- // Read load commands
- void* commandsAddress = (void*)(m_baseAddress + sizeof(mach_header_64));
- m_commands = (load_command*)malloc(m_header.sizeofcmds);
- if (m_commands == nullptr)
- {
- m_reader.Trace("ERROR: Failed to allocate %d byte load commands\n", m_header.sizeofcmds);
- return false;
- }
- if (!m_reader.ReadMemory(commandsAddress, m_commands, m_header.sizeofcmds))
- {
- m_reader.Trace("ERROR: Failed to read load commands at %p of %d\n", commandsAddress, m_header.sizeofcmds);
- return false;
- }
- load_command* command = m_commands;
-
- for (int i = 0; i < m_header.ncmds; i++)
- {
- m_reader.TraceVerbose("CMD: load command cmd %02x (%d) size %d\n", command->cmd, command->cmd, command->cmdsize);
-
- switch (command->cmd)
- {
- case LC_UUID:
- m_uuidCommand = (uuid_command*)command;
- break;
-
- case LC_SYMTAB:
- m_symtabCommand = (symtab_command*)command;
- break;
-
- case LC_DYSYMTAB:
- m_dysymtabCommand = (dysymtab_command*)command;
- break;
-
- case LC_SEGMENT_64:
- segment_command_64* segment = (segment_command_64*)command;
- m_segments.push_back(segment);
-
- // Calculate the load bias for the module. This is the value to add to the vmaddr of a
- // segment to get the actual address.
- if (!m_isFileLayout)
- {
- if (strcmp(segment->segname, SEG_TEXT) == 0)
- {
- m_loadBias = m_baseAddress - segment->vmaddr;
- }
- }
-
- m_reader.TraceVerbose("CMD: vmaddr %016llx vmsize %016llx fileoff %016llx filesize %016llx nsects %d max %c%c%c init %c%c%c %02x %s\n",
- segment->vmaddr,
- segment->vmsize,
- segment->fileoff,
- segment->filesize,
- segment->nsects,
- (segment->maxprot & VM_PROT_READ) ? 'r' : '-',
- (segment->maxprot & VM_PROT_WRITE) ? 'w' : '-',
- (segment->maxprot & VM_PROT_EXECUTE) ? 'x' : '-',
- (segment->initprot & VM_PROT_READ) ? 'r' : '-',
- (segment->initprot & VM_PROT_WRITE) ? 'w' : '-',
- (segment->initprot & VM_PROT_EXECUTE) ? 'x' : '-',
- segment->flags,
- segment->segname);
-
- section_64* section = (section_64*)((uint64_t)segment + sizeof(segment_command_64));
- for (int s = 0; s < segment->nsects; s++, section++)
- {
- m_reader.TraceVerbose(" addr %016llx size %016llx off %08x align %02x flags %02x %s\n",
- section->addr,
- section->size,
- section->offset,
- section->align,
- section->flags,
- section->sectname);
- }
- break;
- }
- // Get next load command
- command = (load_command*)((char*)command + command->cmdsize);
- }
- m_reader.TraceVerbose("CMD: load bias %016llx\n", m_loadBias);
- }
-
- return true;
-}
-
-bool
-MachOModule::ReadSymbolTable()
-{
- if (m_nlists == nullptr)
- {
- if (!ReadLoadCommands())
- {
- return false;
- }
- _ASSERTE(m_symtabCommand != nullptr);
- _ASSERTE(m_strtabAddress == 0);
-
- m_reader.TraceVerbose("SYM: symoff %08x nsyms %d stroff %08x strsize %d iext %d next %d iundef %d nundef %d extref %d nextref %d\n",
- m_symtabCommand->symoff,
- m_symtabCommand->nsyms,
- m_symtabCommand->stroff,
- m_symtabCommand->strsize,
- m_dysymtabCommand->iextdefsym,
- m_dysymtabCommand->nextdefsym,
- m_dysymtabCommand->iundefsym,
- m_dysymtabCommand->nundefsym,
- m_dysymtabCommand->extrefsymoff,
- m_dysymtabCommand->nextrefsyms);
-
- // Read the entire symbol part of symbol table. An array of "nlist" structs.
- void* symbolTableAddress = (void*)GetAddressFromFileOffset(m_symtabCommand->symoff);
- size_t symtabSize = sizeof(nlist_64) * m_symtabCommand->nsyms;
- m_nlists = (nlist_64*)malloc(symtabSize);
- if (m_nlists == nullptr)
- {
- m_reader.Trace("ERROR: Failed to allocate %zu byte symtab\n", symtabSize);
- return false;
- }
- if (!m_reader.ReadMemory(symbolTableAddress, m_nlists, symtabSize))
- {
- m_reader.Trace("ERROR: Failed to read symtab at %p of %zu\n", symbolTableAddress, symtabSize);
- return false;
- }
-
- // Save the symbol string table address.
- m_strtabAddress = GetAddressFromFileOffset(m_symtabCommand->stroff);
- }
- return true;
-}
-
-uint64_t
-MachOModule::GetAddressFromFileOffset(uint32_t offset)
-{
- _ASSERTE(!m_segments.empty());
- if (!m_isFileLayout)
- {
- for (const segment_command_64* segment : m_segments)
- {
- if (offset >= segment->fileoff && offset < (segment->fileoff + segment->filesize))
- {
- return m_loadBias + offset + segment->vmaddr - segment->fileoff;
- }
- }
- }
- return m_loadBias + offset;
-}
-
-std::string
-MachOModule::GetSymbolName(int index)
-{
- uint64_t symbolNameAddress = m_strtabAddress + m_nlists[index].n_un.n_strx;
- std::string result;
- while (true)
- {
- char c = 0;
- if (!m_reader.ReadMemory((void*)symbolNameAddress, &c, sizeof(char)))
- {
- m_reader.Trace("ERROR: Failed to read string table at %p\n", (void*)symbolNameAddress);
- break;
- }
- if (c == '\0')
- {
- break;
- }
- result.append(1, c);
- symbolNameAddress++;
- }
- return result;
-}
-
-//--------------------------------------------------------------------
-// MachO reader
-//--------------------------------------------------------------------
-
-MachOReader::MachOReader()
-{
-}
-
-bool
-MachOReader::EnumerateModules(mach_vm_address_t address, mach_header_64* header)
-{
- _ASSERTE(header->magic == MH_MAGIC_64);
- _ASSERTE(header->filetype == MH_DYLINKER);
-
- MachOModule dylinker(*this, false, address, header);
-
- // Search for symbol for the dyld image info cache
- uint64_t dyldInfoAddress = 0;
- if (!dylinker.TryLookupSymbol("dyld_all_image_infos", &dyldInfoAddress))
- {
- Trace("ERROR: Can not find the _dyld_all_image_infos symbol\n");
- return false;
- }
-
- // Read the all image info from the dylinker image
- dyld_all_image_infos dyldInfo;
-
- if (!ReadMemory((void*)dyldInfoAddress, &dyldInfo, sizeof(dyld_all_image_infos)))
- {
- Trace("ERROR: Failed to read dyld_all_image_infos at %p\n", (void*)dyldInfoAddress);
- return false;
- }
- std::string dylinkerPath;
- if (!ReadString(dyldInfo.dyldPath, dylinkerPath))
- {
- Trace("ERROR: Failed to read name at %p\n", dyldInfo.dyldPath);
- return false;
- }
- dylinker.SetName(dylinkerPath);
- Trace("MOD: %016llx %08x %s\n", dylinker.BaseAddress(), dylinker.Header().flags, dylinker.Name().c_str());
- VisitModule(dylinker);
-
- void* imageInfosAddress = (void*)dyldInfo.infoArray;
- size_t imageInfosSize = dyldInfo.infoArrayCount * sizeof(dyld_image_info);
- Trace("MOD: infoArray %p infoArrayCount %d\n", dyldInfo.infoArray, dyldInfo.infoArrayCount);
-
- ArrayHolder<dyld_image_info> imageInfos = new (std::nothrow) dyld_image_info[dyldInfo.infoArrayCount];
- if (imageInfos == nullptr)
- {
- Trace("ERROR: Failed to allocate %zu byte image infos\n", imageInfosSize);
- return false;
- }
- if (!ReadMemory(imageInfosAddress, imageInfos, imageInfosSize))
- {
- Trace("ERROR: Failed to read dyld_all_image_infos at %p\n", imageInfosAddress);
- return false;
- }
- for (int i = 0; i < dyldInfo.infoArrayCount; i++)
- {
- mach_vm_address_t imageAddress = (mach_vm_address_t)imageInfos[i].imageLoadAddress;
- const char* imageFilePathAddress = imageInfos[i].imageFilePath;
-
- std::string imagePath;
- if (!ReadString(imageFilePathAddress, imagePath))
- {
- Trace("ERROR: Failed to read image name at %p\n", imageFilePathAddress);
- continue;
- }
- MachOModule module(*this, false, imageAddress, nullptr, &imagePath);
- if (!module.ReadHeader())
- {
- continue;
- }
- Trace("MOD: %016llx %08x %s\n", imageAddress, module.Header().flags, imagePath.c_str());
- VisitModule(module);
- }
- return true;
-}
-
-bool
-MachOReader::ReadString(const char* address, std::string& str)
-{
- for (int i = 0; i < MAX_LONGPATH; i++)
- {
- char c = 0;
- if (!ReadMemory((void*)(address + i), &c, sizeof(char)))
- {
- Trace("ERROR: Failed to read string at %p\n", (void*)(address + i));
- return false;
- }
- if (c == '\0')
- {
- break;
- }
- str.append(1, c);
- }
- return true;
-}
\ No newline at end of file
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#include <mach/mach.h>
-#include <mach-o/loader.h>
-#include <mach-o/nlist.h>
-#include <mach-o/dyld_images.h>
-#include <string>
-#include <vector>
-
-class MachOReader;
-
-class MachOModule
-{
- friend MachOReader;
-private:
- MachOReader& m_reader;
- bool m_isFileLayout;
- mach_vm_address_t m_baseAddress;
- mach_vm_address_t m_loadBias;
- mach_header_64 m_header;
- std::string m_name;
- load_command* m_commands;
- std::vector<segment_command_64*> m_segments;
- uuid_command* m_uuidCommand;
- symtab_command* m_symtabCommand;
- dysymtab_command* m_dysymtabCommand;
- nlist_64* m_nlists;
- uint64_t m_strtabAddress;
-
-public:
- MachOModule(MachOReader& reader, bool isFileLayout, mach_vm_address_t baseAddress, mach_header_64* header = nullptr, std::string* name = nullptr);
- ~MachOModule();
-
- inline mach_vm_address_t BaseAddress() const { return m_baseAddress; }
- inline mach_vm_address_t LoadBias() const { return m_loadBias; }
- inline const mach_header_64& Header() const { return m_header; }
- inline const std::string& Name() const { return m_name; }
-
- bool ReadHeader();
- bool TryLookupSymbol(const char* symbolName, uint64_t* symbolValue);
- bool TryLookupSymbol(int start, int nsyms, const char* symbolName, uint64_t* symbolValue);
- bool GetBuildId(BYTE* buffer, ULONG bufferSize, PULONG pBuildSize);
- bool EnumerateSegments();
-
-private:
- inline void SetName(std::string& name) { m_name = name; }
-
- bool ReadSymbolTable();
- bool ReadLoadCommands();
- uint64_t GetAddressFromFileOffset(uint32_t offset);
- std::string GetSymbolName(int index);
-};
-
-class MachOReader
-{
- friend MachOModule;
-public:
- MachOReader();
- bool EnumerateModules(mach_vm_address_t address, mach_header_64* header);
-
-private:
- bool ReadString(const char* address, std::string& str);
- virtual void VisitModule(MachOModule& module) { };
- virtual void VisitSegment(MachOModule& module, const segment_command_64& segment) { };
- virtual void VisitSection(MachOModule& module, const section_64& section) { };
- virtual bool ReadMemory(void* address, void* buffer, size_t size) = 0;
- virtual void Trace(const char* format, ...) { };
- virtual void TraceVerbose(const char* format, ...) { };
-};
--- /dev/null
+add_subdirectory(dbgutil)
--- /dev/null
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+if(CLR_CMAKE_HOST_WIN32)
+ #use static crt
+ set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded)
+endif(CLR_CMAKE_HOST_WIN32)
+
+if(CLR_CMAKE_HOST_WIN32 OR CLR_CMAKE_HOST_OSX)
+ include_directories(${CLR_SHARED_DIR}/inc/llvm)
+endif(CLR_CMAKE_HOST_WIN32 OR CLR_CMAKE_HOST_OSX)
+
+if(CLR_CMAKE_TARGET_LINUX_MUSL)
+ add_definitions(-DTARGET_LINUX_MUSL)
+endif(CLR_CMAKE_TARGET_LINUX_MUSL)
+
+set(DBGUTIL_SOURCES
+ dbgutil.cpp
+)
+
+if(NOT DEFINED CLR_CMAKE_HOST_OSX)
+ list(APPEND DBGUTIL_SOURCES
+ elfreader.cpp
+ )
+endif(NOT DEFINED CLR_CMAKE_HOST_OSX)
+
+if(CLR_CMAKE_TARGET_OSX)
+ list(APPEND DBGUTIL_SOURCES
+ machoreader.cpp
+ )
+endif(CLR_CMAKE_TARGET_OSX)
+
+add_library(dbgutil STATIC ${DBGUTIL_SOURCES})
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//*****************************************************************************
+// dbgutil.cpp
+//
+
+//
+//*****************************************************************************
+
+//
+// Various common helpers for PE resource reading used by multiple debug components.
+//
+
+#include <dbgutil.h>
+#include "corerror.h"
+#include <assert.h>
+#include <stdio.h>
+#include <memory>
+#include <dn-u16.h>
+#include "corhlpr.h"
+
+#ifdef HOST_WINDOWS
+
+namespace
+{
+ HRESULT GetMachineAndDirectoryAddress(ICorDebugDataTarget* dataTarget,
+ ULONG64 moduleBaseAddress,
+ uint8_t imageDirectory,
+ WORD* imageFileMachine,
+ DWORD* directoryRVA)
+ {
+ // Fun code ahead... below is a hand written PE decoder with some of the file offsets hardcoded.
+ // It supports no more than what we absolutely have to get to the PE directory we need. Any of the
+ // magic numbers used below can be determined by using the public documentation on the web.
+ //
+ // Yes utilcode has a PE decoder, no it does not support reading its data through a datatarget
+ // It was easier to inspect the small portion that I needed than to shove an abstraction layer under
+ // our utilcode and then make sure everything still worked.
+
+ // SECURITY WARNING: all data provided by the data target should be considered untrusted.
+ // Do not allow malicious data to cause large reads, memory allocations, buffer overflow,
+ // or any other undesirable behavior.
+
+ HRESULT hr = S_OK;
+
+ // at offset 3c in the image is a 4 byte file pointer that indicates where the PE signature is
+ IMAGE_DOS_HEADER dosHeader;
+ hr = ReadFromDataTarget(dataTarget, moduleBaseAddress, (BYTE*)&dosHeader, sizeof(dosHeader));
+
+ // verify there is a 4 byte PE signature there
+ DWORD peSigFilePointer = 0;
+ if (SUCCEEDED(hr))
+ {
+ peSigFilePointer = dosHeader.e_lfanew;
+ DWORD peSig = 0;
+ hr = ReadFromDataTarget(dataTarget, moduleBaseAddress + peSigFilePointer, (BYTE*)&peSig, 4);
+ if (SUCCEEDED(hr) && peSig != IMAGE_NT_SIGNATURE)
+ {
+ hr = E_FAIL; // PE signature not present
+ }
+ }
+
+ // after the signature is a 20 byte image file header
+ // we need to parse this to figure out the target architecture
+ IMAGE_FILE_HEADER imageFileHeader = {};
+ if (SUCCEEDED(hr))
+ {
+ hr = ReadFromDataTarget(dataTarget, moduleBaseAddress + peSigFilePointer + 4, (BYTE*)&imageFileHeader, IMAGE_SIZEOF_FILE_HEADER);
+ }
+
+ WORD optHeaderMagic = 0;
+ DWORD peOptImageHeaderFilePointer = 0;
+ if (SUCCEEDED(hr))
+ {
+ if(imageFileMachine != NULL)
+ {
+ *imageFileMachine = imageFileHeader.Machine;
+ }
+
+ // 4 bytes after the signature is the 20 byte image file header
+ // 24 bytes after the signature is the image-only header
+ // at the beginning of the image-only header is a 2 byte magic number indicating its format
+ peOptImageHeaderFilePointer = peSigFilePointer + IMAGE_SIZEOF_FILE_HEADER + sizeof(DWORD);
+ hr = ReadFromDataTarget(dataTarget, moduleBaseAddress + peOptImageHeaderFilePointer, (BYTE*)&optHeaderMagic, 2);
+ }
+
+ // Either 112 or 128 bytes after the beginning of the image-only header is an 8 byte resource table
+ // depending on whether the image is PE32 or PE32+
+ DWORD sectionRVA = 0;
+ if (SUCCEEDED(hr))
+ {
+ if (optHeaderMagic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) // PE32
+ {
+ IMAGE_OPTIONAL_HEADER32 header32;
+ hr = ReadFromDataTarget(dataTarget, moduleBaseAddress + peOptImageHeaderFilePointer,
+ (BYTE*)&header32, sizeof(header32));
+ if (SUCCEEDED(hr))
+ {
+ sectionRVA = header32.DataDirectory[imageDirectory].VirtualAddress;
+ }
+ }
+ else if (optHeaderMagic == IMAGE_NT_OPTIONAL_HDR64_MAGIC) //PE32+
+ {
+ IMAGE_OPTIONAL_HEADER64 header64;
+ hr = ReadFromDataTarget(dataTarget, moduleBaseAddress + peOptImageHeaderFilePointer,
+ (BYTE*)&header64, sizeof(header64));
+ if (SUCCEEDED(hr))
+ {
+ sectionRVA = header64.DataDirectory[imageDirectory].VirtualAddress;
+ }
+ }
+ else
+ {
+ hr = E_FAIL; // Invalid PE
+ }
+ }
+
+ *directoryRVA = sectionRVA;
+ return hr;
+ }
+}
+
+// Returns the RVA of the resource section for the module specified by the given data target and module base.
+// Returns failure if the module doesn't have a resource section.
+//
+// Arguments
+// pDataTarget - dataTarget for the process we are inspecting
+// moduleBaseAddress - base address of a module we should inspect
+// pwImageFileMachine - updated with the Machine from the IMAGE_FILE_HEADER
+// pdwResourceSectionRVA - updated with the resultant RVA on success
+HRESULT GetMachineAndResourceSectionRVA(ICorDebugDataTarget* pDataTarget,
+ ULONG64 moduleBaseAddress,
+ WORD* pwImageFileMachine,
+ DWORD* pdwResourceSectionRVA)
+{
+ return GetMachineAndDirectoryAddress(pDataTarget, moduleBaseAddress, IMAGE_DIRECTORY_ENTRY_RESOURCE, pwImageFileMachine, pdwResourceSectionRVA);
+}
+
+HRESULT GetResourceRvaFromResourceSectionRva(ICorDebugDataTarget* pDataTarget,
+ ULONG64 moduleBaseAddress,
+ DWORD resourceSectionRva,
+ DWORD type,
+ DWORD name,
+ DWORD language,
+ DWORD* pResourceRva,
+ DWORD* pResourceSize)
+{
+ HRESULT hr = S_OK;
+ DWORD nameTableRva = 0;
+ DWORD langTableRva = 0;
+ DWORD resourceDataEntryRva = 0;
+ *pResourceRva = 0;
+ *pResourceSize = 0;
+
+ // The resource section begins with a resource directory that indexes all the resources by type.
+ // Each entry it points to is another resource directory that indexes all the same type
+ // resources by name. And each entry in that table points to another resource directory that indexes
+ // all the same type/name resources by language. Entries in the final table give the RVA of the actual
+ // resource.
+ // Note all RVAs in this section are relative to the beginning of the resource section,
+ // not the beginning of the image.
+
+ hr = GetNextLevelResourceEntryRVA(pDataTarget, type, moduleBaseAddress, resourceSectionRva, &nameTableRva);
+
+
+ if (SUCCEEDED(hr))
+ {
+ nameTableRva += resourceSectionRva;
+ hr = GetNextLevelResourceEntryRVA(pDataTarget, name, moduleBaseAddress, nameTableRva, &langTableRva);
+
+ }
+ if (SUCCEEDED(hr))
+ {
+ langTableRva += resourceSectionRva;
+ hr = GetNextLevelResourceEntryRVA(pDataTarget, language, moduleBaseAddress, langTableRva, &resourceDataEntryRva);
+ }
+
+ // The resource data entry has the first 4 bytes indicating the RVA of the resource
+ // The next 4 bytes indicate the size of the resource
+ if (SUCCEEDED(hr))
+ {
+ resourceDataEntryRva += resourceSectionRva;
+ IMAGE_RESOURCE_DATA_ENTRY dataEntry;
+ hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + resourceDataEntryRva,
+ (BYTE*)&dataEntry, sizeof(dataEntry));
+ *pResourceRva = dataEntry.OffsetToData;
+ *pResourceSize = dataEntry.Size;
+ }
+
+ return hr;
+}
+
+HRESULT GetResourceRvaFromResourceSectionRvaByName(ICorDebugDataTarget* pDataTarget,
+ ULONG64 moduleBaseAddress,
+ DWORD resourceSectionRva,
+ DWORD type,
+ LPCWSTR pwszName,
+ DWORD language,
+ DWORD* pResourceRva,
+ DWORD* pResourceSize)
+{
+ HRESULT hr = S_OK;
+ DWORD nameTableRva = 0;
+ DWORD langTableRva = 0;
+ DWORD resourceDataEntryRva = 0;
+ *pResourceRva = 0;
+ *pResourceSize = 0;
+
+ // The resource section begins with a resource directory that indexes all the resources by type.
+ // Each entry it points to is another resource directory that indexes all the same type
+ // resources by name. And each entry in that table points to another resource directory that indexes
+ // all the same type/name resources by language. Entries in the final table give the RVA of the actual
+ // resource.
+ // Note all RVAs in this section are relative to the beginning of the resource section,
+ // not the beginning of the image.
+ hr = GetNextLevelResourceEntryRVA(pDataTarget, type, moduleBaseAddress, resourceSectionRva, &nameTableRva);
+
+
+ if (SUCCEEDED(hr))
+ {
+ nameTableRva += resourceSectionRva;
+ hr = GetNextLevelResourceEntryRVAByName(pDataTarget, pwszName, moduleBaseAddress, nameTableRva, resourceSectionRva, &langTableRva);
+ }
+ if (SUCCEEDED(hr))
+ {
+ langTableRva += resourceSectionRva;
+ hr = GetNextLevelResourceEntryRVA(pDataTarget, language, moduleBaseAddress, langTableRva, &resourceDataEntryRva);
+ }
+
+ // The resource data entry has the first 4 bytes indicating the RVA of the resource
+ // The next 4 bytes indicate the size of the resource
+ if (SUCCEEDED(hr))
+ {
+ resourceDataEntryRva += resourceSectionRva;
+ IMAGE_RESOURCE_DATA_ENTRY dataEntry;
+ hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + resourceDataEntryRva,
+ (BYTE*)&dataEntry, sizeof(dataEntry));
+ *pResourceRva = dataEntry.OffsetToData;
+ *pResourceSize = dataEntry.Size;
+ }
+
+ return hr;
+}
+
+// Traverses down one level in the PE resource tree structure
+//
+// Arguments:
+// pDataTarget - the data target for inspecting this process
+// id - the id of the next node in the resource tree you want
+// moduleBaseAddress - the base address of the module being inspected
+// resourceDirectoryRVA - the base address of the beginning of the resource directory for this
+// level of the tree
+// pNextLevelRVA - out - The RVA for the next level tree directory or the RVA of the resource entry
+//
+// Returns:
+// S_OK if successful or an appropriate failing HRESULT
+HRESULT GetNextLevelResourceEntryRVA(ICorDebugDataTarget* pDataTarget,
+ DWORD id,
+ ULONG64 moduleBaseAddress,
+ DWORD resourceDirectoryRVA,
+ DWORD* pNextLevelRVA)
+{
+ *pNextLevelRVA = 0;
+ HRESULT hr = S_OK;
+
+ // A resource directory which consists of
+ // a header followed by a number of entries. In the header at offset 12 is
+ // the number entries identified by name, followed by the number of entries
+ // identified by ID at offset 14. Both are 2 bytes.
+ // This method only supports locating entries by ID, not by name
+ IMAGE_RESOURCE_DIRECTORY resourceDirectory;
+ hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + resourceDirectoryRVA, (BYTE*)&resourceDirectory, sizeof(resourceDirectory));
+
+
+
+ // The ith resource directory entry is at offset 16 + 8i from the beginning of the resource
+ // directory table
+ WORD numNameEntries;
+ WORD numIDEntries;
+ if (SUCCEEDED(hr))
+ {
+ numNameEntries = resourceDirectory.NumberOfNamedEntries;
+ numIDEntries = resourceDirectory.NumberOfIdEntries;
+
+ for (WORD i = numNameEntries; i < numNameEntries + numIDEntries; i++)
+ {
+ IMAGE_RESOURCE_DIRECTORY_ENTRY entry;
+ hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + resourceDirectoryRVA + sizeof(resourceDirectory) + sizeof(entry)*i,
+ (BYTE*)&entry, sizeof(entry));
+ if (FAILED(hr))
+ {
+ break;
+ }
+ if (entry.Id == id)
+ {
+ *pNextLevelRVA = entry.OffsetToDirectory;
+ break;
+ }
+ }
+ }
+
+ // If we didn't find the entry
+ if (SUCCEEDED(hr) && *pNextLevelRVA == 0)
+ {
+ hr = E_FAIL;
+ }
+
+ return hr; // resource not found
+}
+
+// Traverses down one level in the PE resource tree structure
+//
+// Arguments:
+// pDataTarget - the data target for inspecting this process
+// name - the name of the next node in the resource tree you want
+// moduleBaseAddress - the base address of the module being inspected
+// resourceDirectoryRVA - the base address of the beginning of the resource directory for this
+// level of the tree
+// resourceSectionRVA - the rva of the beginning of the resource section of the PE file
+// pNextLevelRVA - out - The RVA for the next level tree directory or the RVA of the resource entry
+//
+// Returns:
+// S_OK if successful or an appropriate failing HRESULT
+HRESULT GetNextLevelResourceEntryRVAByName(ICorDebugDataTarget* pDataTarget,
+ LPCWSTR pwzName,
+ ULONG64 moduleBaseAddress,
+ DWORD resourceDirectoryRva,
+ DWORD resourceSectionRva,
+ DWORD* pNextLevelRva)
+{
+ HRESULT hr = S_OK;
+ DWORD nameLength = (DWORD)u16_strlen(pwzName);
+ WCHAR entryName[50];
+ assert(nameLength < 50); // this implementation won't support matching a name longer
+ // than 50 characters. We only look up the hard coded name
+ // of the debug resource in clr.dll though, so it shouldn't be
+ // an issue. Increase this count if we ever want to look up
+ // larger names
+ if (nameLength >= 50)
+ {
+ hr = E_FAIL; // invalid name length
+ }
+
+ // A resource directory which consists of
+ // a header followed by a number of entries. In the header at offset 12 is
+ // the number entries identified by name, followed by the number of entries
+ // identified by ID at offset 14. Both are 2 bytes.
+ // This method only supports locating entries by ID, not by name
+ IMAGE_RESOURCE_DIRECTORY resourceDirectory = { 0 };
+ if (SUCCEEDED(hr))
+ {
+ hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + resourceDirectoryRva, (BYTE*)&resourceDirectory, sizeof(resourceDirectory));
+ }
+
+ // The ith resource directory entry is at offset 16 + 8i from the beginning of the resource
+ // directory table
+ if (SUCCEEDED(hr))
+ {
+ WORD numNameEntries = resourceDirectory.NumberOfNamedEntries;
+ for (WORD i = 0; i < numNameEntries; i++)
+ {
+ IMAGE_RESOURCE_DIRECTORY_ENTRY entry;
+ hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + resourceDirectoryRva + sizeof(resourceDirectory) + sizeof(entry)*i,
+ (BYTE*)&entry, sizeof(entry));
+ if (FAILED(hr))
+ {
+ break;
+ }
+
+ // the NameRVAOrID field points to a UTF16 string with a 2 byte length in front of it
+ // read the 2 byte length first. The doc of course doesn't mention this, but the RVA is
+ // relative to the base of the resource section and needs the leading bit stripped.
+ WORD entryNameLength = 0;
+ hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + resourceSectionRva +
+ entry.NameOffset, (BYTE*)&entryNameLength, sizeof(entryNameLength));
+ if (FAILED(hr))
+ {
+ break;
+ }
+ if (entryNameLength != nameLength)
+ {
+ continue; // names aren't the same length, not a match
+ }
+
+ // read the rest of the string data and check for a match
+ hr = ReadFromDataTarget(pDataTarget, moduleBaseAddress + resourceSectionRva +
+ entry.NameOffset + 2, (BYTE*)entryName, entryNameLength*sizeof(WCHAR));
+ if (FAILED(hr))
+ {
+ break;
+ }
+ if (memcmp(entryName, pwzName, entryNameLength*sizeof(WCHAR)) == 0)
+ {
+ *pNextLevelRva = entry.OffsetToDirectory;
+ break;
+ }
+ }
+ }
+
+ if (SUCCEEDED(hr) && *pNextLevelRva == 0)
+ {
+ hr = E_FAIL; // resource not found
+ }
+
+ return hr;
+}
+
+#endif // HOST_WINDOWS
+
+// A small wrapper that reads from the data target and throws on error
+HRESULT ReadFromDataTarget(ICorDebugDataTarget* pDataTarget,
+ ULONG64 addr,
+ BYTE* pBuffer,
+ ULONG32 bytesToRead)
+{
+ //PRECONDITION(CheckPointer(pDataTarget));
+ //PRECONDITION(CheckPointer(pBuffer));
+
+ HRESULT hr = S_OK;
+ ULONG32 bytesReadTotal = 0;
+ ULONG32 bytesRead = 0;
+ do
+ {
+ if (FAILED(pDataTarget->ReadVirtual((CORDB_ADDRESS)(addr + bytesReadTotal),
+ pBuffer,
+ bytesToRead - bytesReadTotal,
+ &bytesRead)))
+ {
+ hr = CORDBG_E_READVIRTUAL_FAILURE;
+ break;
+ }
+ bytesReadTotal += bytesRead;
+ } while (bytesRead != 0 && (bytesReadTotal < bytesToRead));
+
+ // If we can't read all the expected memory, then fail
+ if (SUCCEEDED(hr) && (bytesReadTotal != bytesToRead))
+ {
+ hr = HRESULT_FROM_WIN32(ERROR_PARTIAL_COPY);
+ }
+
+ return hr;
+}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Checked|x64">
+ <Configuration>Checked</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="RelWithDebInfo|x64">
+ <Configuration>RelWithDebInfo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <ItemGroup>
+ <Text Include="CMakeLists.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="dbgutil.cpp" />
+ <ClCompile Include="elfreader.cpp" />
+ <ClCompile Include="machoreader.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="elfreader.h" />
+ <ClInclude Include="machoreader.h" />
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{A9A7C879-C320-3327-BB84-16E1322E17AE}</ProjectGuid>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ <Keyword>Win32Proj</Keyword>
+ <Platform>x64</Platform>
+ <ProjectName>dbgutil</ProjectName>
+ <VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Checked|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ArtifactsObjDir)Windows_NT.x64.Debug\src\SOS\dbgutil\Debug\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">dbgutil.dir\Debug\</IntDir>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">dbgutil</TargetName>
+ <TargetExt Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.lib</TargetExt>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Checked|x64'">$(ArtifactsObjDir)Windows_NT.x64.Debug\src\SOS\dbgutil\Checked\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Checked|x64'">dbgutil.dir\Checked\</IntDir>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Checked|x64'">dbgutil</TargetName>
+ <TargetExt Condition="'$(Configuration)|$(Platform)'=='Checked|x64'">.lib</TargetExt>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ArtifactsObjDir)Windows_NT.x64.Debug\src\SOS\dbgutil\Release\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">dbgutil.dir\Release\</IntDir>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">dbgutil</TargetName>
+ <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.lib</TargetExt>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">$(ArtifactsObjDir)Windows_NT.x64.Debug\src\SOS\dbgutil\RelWithDebInfo\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">dbgutil.dir\RelWithDebInfo\</IntDir>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">dbgutil</TargetName>
+ <TargetExt Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">.lib</TargetExt>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(RepoRoot)artifacts\obj;$(RepoRoot)src\shared;$(RepoRoot)src\shared\inc;$(RepoRoot)src\shared\pal\prebuilt\inc;$(RepoRoot)src\shared\pal\inc;$(RepoRoot)src\shared\pal\inc\rt;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalOptions>%(AdditionalOptions) /d2Zi+ /Zm200 /ZH:SHA_256 /source-charset:utf-8 /homeparams</AdditionalOptions>
+ <AssemblerListingLocation>Debug/</AssemblerListingLocation>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <CompileAs>CompileAsCpp</CompileAs>
+ <ControlFlowGuard>Guard</ControlFlowGuard>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4960;4961;4603;4627;4838;4456;4457;4458;4459;4091</DisableSpecificWarnings>
+ <ExceptionHandling>Async</ExceptionHandling>
+ <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
+ <ForcedIncludeFiles>WarningControl.h</ForcedIncludeFiles>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <OmitDefaultLibName>true</OmitDefaultLibName>
+ <OmitFramePointers>false</OmitFramePointers>
+ <Optimization>Disabled</Optimization>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <StringPooling>true</StringPooling>
+ <StructMemberAlignment>8Bytes</StructMemberAlignment>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TreatSpecificWarningsAsErrors>$(TreatSpecificWarningsAsErrors);4640</TreatSpecificWarningsAsErrors>
+ <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <UndefinePreprocessorDefinitions>_MT</UndefinePreprocessorDefinitions>
+ <UseFullPaths>true</UseFullPaths>
+ <WarningLevel>Level3</WarningLevel>
+ <PreprocessorDefinitions>DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <BrowseInformation>true</BrowseInformation>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN32;_DEBUG;DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <MASM>
+ <PreprocessorDefinitions>DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalOptions>%(AdditionalOptions) /ZH:SHA_256</AdditionalOptions>
+ <IncludePaths>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(IncludePaths)</IncludePaths>
+ </MASM>
+ <Midl>
+ <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
+ <HeaderFileName>%(Filename).h</HeaderFileName>
+ <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
+ <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
+ <ProxyFileName>%(Filename)_p.c</ProxyFileName>
+ </Midl>
+ <Lib>
+ <AdditionalOptions>%(AdditionalOptions) /machine:x64 /IGNORE:4221</AdditionalOptions>
+ </Lib>
+ <Bscmake>
+ <PreserveSbr>true</PreserveSbr>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Checked|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalOptions>%(AdditionalOptions) /d2Zi+ /Zm200 /ZH:SHA_256 /source-charset:utf-8</AdditionalOptions>
+ <AssemblerListingLocation>Checked/</AssemblerListingLocation>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <CompileAs>CompileAsCpp</CompileAs>
+ <ControlFlowGuard>Guard</ControlFlowGuard>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4960;4961;4603;4627;4838;4456;4457;4458;4459;4091</DisableSpecificWarnings>
+ <ExceptionHandling>Async</ExceptionHandling>
+ <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
+ <ForcedIncludeFiles>WarningControl.h</ForcedIncludeFiles>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <OmitDefaultLibName>true</OmitDefaultLibName>
+ <OmitFramePointers>false</OmitFramePointers>
+ <Optimization>MinSpace</Optimization>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <StringPooling>true</StringPooling>
+ <StructMemberAlignment>8Bytes</StructMemberAlignment>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TreatSpecificWarningsAsErrors>$(TreatSpecificWarningsAsErrors);4640</TreatSpecificWarningsAsErrors>
+ <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <UndefinePreprocessorDefinitions>_MT</UndefinePreprocessorDefinitions>
+ <UseFullPaths>true</UseFullPaths>
+ <WarningLevel>Level3</WarningLevel>
+ <PreprocessorDefinitions>DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR="Checked";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN32;DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR=\"Checked\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <MASM>
+ <PreprocessorDefinitions>DEBUG;_DEBUG;_DBG;URTBLDENV_FRIENDLY=Checked;BUILDENV_CHECKED=1;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR="Checked";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalOptions>%(AdditionalOptions) /ZH:SHA_256</AdditionalOptions>
+ <IncludePaths>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(IncludePaths)</IncludePaths>
+ </MASM>
+ <Midl>
+ <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
+ <HeaderFileName>%(Filename).h</HeaderFileName>
+ <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
+ <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
+ <ProxyFileName>%(Filename)_p.c</ProxyFileName>
+ </Midl>
+ <Lib>
+ <AdditionalOptions>%(AdditionalOptions) /machine:x64 /IGNORE:4221</AdditionalOptions>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalOptions>%(AdditionalOptions) /d2Zi+ /Zm200 /ZH:SHA_256 /source-charset:utf-8</AdditionalOptions>
+ <AssemblerListingLocation>Release/</AssemblerListingLocation>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <CompileAs>CompileAsCpp</CompileAs>
+ <ControlFlowGuard>Guard</ControlFlowGuard>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4960;4961;4603;4627;4838;4456;4457;4458;4459;4091</DisableSpecificWarnings>
+ <ExceptionHandling>Async</ExceptionHandling>
+ <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
+ <ForcedIncludeFiles>WarningControl.h</ForcedIncludeFiles>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <OmitDefaultLibName>true</OmitDefaultLibName>
+ <OmitFramePointers>false</OmitFramePointers>
+ <Optimization>MinSpace</Optimization>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <StringPooling>true</StringPooling>
+ <StructMemberAlignment>8Bytes</StructMemberAlignment>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TreatSpecificWarningsAsErrors>$(TreatSpecificWarningsAsErrors);4640</TreatSpecificWarningsAsErrors>
+ <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <UndefinePreprocessorDefinitions>_MT</UndefinePreprocessorDefinitions>
+ <UseFullPaths>true</UseFullPaths>
+ <WarningLevel>Level3</WarningLevel>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PreprocessorDefinitions>NDEBUG;URTBLDENV_FRIENDLY=Retail;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR="Release";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN32;NDEBUG;URTBLDENV_FRIENDLY=Retail;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <MASM>
+ <PreprocessorDefinitions>NDEBUG;URTBLDENV_FRIENDLY=Retail;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR="Release";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalOptions>%(AdditionalOptions) /ZH:SHA_256</AdditionalOptions>
+ <IncludePaths>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(IncludePaths)</IncludePaths>
+ </MASM>
+ <Midl>
+ <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
+ <HeaderFileName>%(Filename).h</HeaderFileName>
+ <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
+ <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
+ <ProxyFileName>%(Filename)_p.c</ProxyFileName>
+ </Midl>
+ <Lib>
+ <AdditionalOptions>%(AdditionalOptions) /machine:x64 /IGNORE:4221</AdditionalOptions>
+ <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalOptions>%(AdditionalOptions) /d2Zi+ /Zm200 /ZH:SHA_256 /source-charset:utf-8</AdditionalOptions>
+ <AssemblerListingLocation>RelWithDebInfo/</AssemblerListingLocation>
+ <BufferSecurityCheck>true</BufferSecurityCheck>
+ <CompileAs>CompileAsCpp</CompileAs>
+ <ControlFlowGuard>Guard</ControlFlowGuard>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4960;4961;4603;4627;4838;4456;4457;4458;4459;4091</DisableSpecificWarnings>
+ <ExceptionHandling>Async</ExceptionHandling>
+ <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
+ <ForcedIncludeFiles>WarningControl.h</ForcedIncludeFiles>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <OmitDefaultLibName>true</OmitDefaultLibName>
+ <OmitFramePointers>false</OmitFramePointers>
+ <Optimization>MinSpace</Optimization>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <StringPooling>true</StringPooling>
+ <StructMemberAlignment>8Bytes</StructMemberAlignment>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TreatSpecificWarningsAsErrors>$(TreatSpecificWarningsAsErrors);4640</TreatSpecificWarningsAsErrors>
+ <TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <UndefinePreprocessorDefinitions>_MT</UndefinePreprocessorDefinitions>
+ <UseFullPaths>true</UseFullPaths>
+ <WarningLevel>Level3</WarningLevel>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <PreprocessorDefinitions>NDEBUG;URTBLDENV_FRIENDLY=Retail;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR="RelWithDebInfo";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN32;NDEBUG;URTBLDENV_FRIENDLY=Retail;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR=\"RelWithDebInfo\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <MASM>
+ <PreprocessorDefinitions>NDEBUG;URTBLDENV_FRIENDLY=Retail;_AMD64_;_WIN64;AMD64;BIT64=1;_TARGET_64BIT_=1;_TARGET_AMD64_=1;DBG_TARGET_64BIT=1;DBG_TARGET_AMD64=1;DBG_TARGET_WIN64=1;WIN32;_WIN32;WINVER=0x0602;_WIN32_WINNT=0x0602;WIN32_LEAN_AND_MEAN=1;_CRT_SECURE_NO_WARNINGS;;FEATURE_COMINTEROP;FEATURE_HIJACK;_SECURE_SCL=0;CMAKE_INTDIR="RelWithDebInfo";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalOptions>%(AdditionalOptions) /ZH:SHA_256</AdditionalOptions>
+ <IncludePaths>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(IncludePaths)</IncludePaths>
+ </MASM>
+ <Midl>
+ <AdditionalIncludeDirectories>..\..\SOS\dbgutil;..\..\pal\prebuilt\inc;..\..\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
+ <HeaderFileName>%(Filename).h</HeaderFileName>
+ <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
+ <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
+ <ProxyFileName>%(Filename)_p.c</ProxyFileName>
+ </Midl>
+ <Lib>
+ <AdditionalOptions>%(AdditionalOptions) /machine:x64 /IGNORE:4221</AdditionalOptions>
+ <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
+ </Lib>
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
+ </ImportGroup>
+</Project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup />
+</Project>
\ No newline at end of file
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#include <windows.h>
+#include <clrdata.h>
+#include <cor.h>
+#include <cordebug.h>
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
+#include "elfreader.h"
+#include "arrayholder.h"
+
+#define Elf_Ehdr ElfW(Ehdr)
+#define Elf_Phdr ElfW(Phdr)
+#define Elf_Shdr ElfW(Shdr)
+#define Elf_Nhdr ElfW(Nhdr)
+#define Elf_Dyn ElfW(Dyn)
+#define Elf_Sym ElfW(Sym)
+
+#if TARGET_64BIT
+#define PRIx PRIx64
+#define PRIu PRIu64
+#define PRId PRId64
+#define PRIA "016"
+#define PRIxA PRIA PRIx
+#else
+#define PRIx PRIx32
+#define PRIu PRIu32
+#define PRId PRId32
+#define PRIA "08"
+#define PRIxA PRIA PRIx
+#endif
+
+#ifndef HOST_WINDOWS
+static const char ElfMagic[] = { 0x7f, 'E', 'L', 'F', '\0' };
+#endif
+
+#ifdef HOST_UNIX
+
+class ElfReaderFromFile : public ElfReader
+{
+private:
+ struct ProgramHeader
+ {
+ uint64_t Start;
+ uint64_t End;
+ uint64_t FileOffset;
+ };
+ FILE* m_file;
+ std::vector<ProgramHeader> m_programHeaders;
+
+public:
+ ElfReaderFromFile() : ElfReader(true),
+ m_file(NULL)
+ {
+ }
+
+ virtual ~ElfReaderFromFile()
+ {
+ if (m_file != NULL)
+ {
+ fclose(m_file);
+ m_file = NULL;
+ }
+ }
+
+ bool OpenFile(const WCHAR* modulePath)
+ {
+ _ASSERTE(m_file == NULL);
+ m_file = _wfopen(modulePath, W("rb"));
+ return m_file != NULL;
+ }
+
+ uint64_t GetFileOffset(uint64_t address)
+ {
+ for (const ProgramHeader& header : m_programHeaders)
+ {
+ if (address >= header.Start && address < header.End)
+ {
+ return address - header.Start + header.FileOffset;
+ }
+ }
+ return 0;
+ }
+
+ virtual void VisitProgramHeader(uint64_t loadbias, uint64_t baseAddress, ElfW(Phdr)* phdr)
+ {
+ switch (phdr->p_type)
+ {
+ case PT_LOAD:
+ ProgramHeader header;
+ header.Start = loadbias + phdr->p_vaddr;
+ header.End = loadbias + phdr->p_vaddr + phdr->p_memsz;
+ header.FileOffset = phdr->p_offset;
+ m_programHeaders.push_back(header);
+ break;
+ }
+ }
+
+ virtual bool ReadMemory(void* address, void* buffer, size_t size)
+ {
+ if (m_file == NULL)
+ {
+ return false;
+ }
+ if (fseek(m_file, (LONG_PTR)address, SEEK_SET) != 0)
+ {
+ return false;
+ }
+ size_t read = fread(buffer, 1, size, m_file);
+ return read > 0;
+ }
+};
+
+//
+// Entry point to get an export symbol from a module file
+//
+extern "C" bool
+TryReadSymbolFromFile(const WCHAR* modulePath, const char* symbolName, BYTE* buffer, ULONG32 size)
+{
+ ElfReaderFromFile reader;
+ if (reader.OpenFile(modulePath))
+ {
+ if (reader.PopulateForSymbolLookup(0))
+ {
+ uint64_t symbolOffset;
+ if (reader.TryLookupSymbol(symbolName, &symbolOffset))
+ {
+ symbolOffset = reader.GetFileOffset(symbolOffset);
+ if (symbolOffset != 0)
+ {
+ return reader.ReadMemory((void*)symbolOffset, buffer, size);
+ }
+ }
+ }
+ }
+ return false;
+}
+
+//
+// Entry point to get the ELF file's build id
+//
+extern "C" bool
+TryGetBuildIdFromFile(const WCHAR* modulePath, BYTE* buffer, ULONG bufferSize, PULONG pBuildSize)
+{
+ ElfReaderFromFile reader;
+ if (reader.OpenFile(modulePath))
+ {
+ if (reader.EnumerateProgramHeaders(0, nullptr, nullptr))
+ {
+ if (reader.GetBuildId(buffer, bufferSize, pBuildSize))
+ {
+ return true;
+ }
+ }
+ if (reader.GetBuildIdFromSectionHeader(0, buffer, bufferSize, pBuildSize))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+#endif // HOST_UNIX
+
+typedef bool (*ReadMemoryCallback)(void* address, void* buffer, size_t size);
+
+class ElfReaderWithCallback : public ElfReader
+{
+private:
+ ReadMemoryCallback m_readMemory;
+
+public:
+ ElfReaderWithCallback(ReadMemoryCallback readMemory) : ElfReader(false),
+ m_readMemory(readMemory)
+ {
+ }
+
+ virtual ~ElfReaderWithCallback()
+ {
+ }
+
+private:
+ virtual bool ReadMemory(void* address, void* buffer, size_t size)
+ {
+ return m_readMemory(address, buffer, size);
+ }
+};
+
+//
+// Entry point to get an export symbol
+//
+extern "C" bool
+TryGetSymbolWithCallback(ReadMemoryCallback readMemory, uint64_t baseAddress, const char* symbolName, uint64_t* symbolAddress)
+{
+ ElfReaderWithCallback reader(readMemory);
+ if (reader.PopulateForSymbolLookup(baseAddress))
+ {
+ uint64_t symbolOffset;
+ if (reader.TryLookupSymbol(symbolName, &symbolOffset))
+ {
+ *symbolAddress = baseAddress + symbolOffset;
+ return true;
+ }
+ }
+ *symbolAddress = 0;
+ return false;
+}
+
+class ElfReaderExport : public ElfReader
+{
+private:
+ ICorDebugDataTarget* m_dataTarget;
+
+public:
+ ElfReaderExport(ICorDebugDataTarget* dataTarget) : ElfReader(false),
+ m_dataTarget(dataTarget)
+ {
+ dataTarget->AddRef();
+ }
+
+ virtual ~ElfReaderExport()
+ {
+ m_dataTarget->Release();
+ }
+
+private:
+ virtual bool ReadMemory(void* address, void* buffer, size_t size)
+ {
+ uint32_t read = 0;
+ return SUCCEEDED(m_dataTarget->ReadVirtual(reinterpret_cast<CLRDATA_ADDRESS>(address), reinterpret_cast<PBYTE>(buffer), (uint32_t)size, &read));
+ }
+};
+
+//
+// Main entry point to get an export symbol
+//
+extern "C" bool
+TryGetSymbol(ICorDebugDataTarget* dataTarget, uint64_t baseAddress, const char* symbolName, uint64_t* symbolAddress)
+{
+ ElfReaderExport elfreader(dataTarget);
+ if (elfreader.PopulateForSymbolLookup(baseAddress))
+ {
+ uint64_t symbolOffset;
+ if (elfreader.TryLookupSymbol(symbolName, &symbolOffset))
+ {
+ *symbolAddress = baseAddress + symbolOffset;
+ return true;
+ }
+ }
+ *symbolAddress = 0;
+ return false;
+}
+
+
+//
+// Get the build id of the module from a data target
+//
+extern "C" bool
+TryGetBuildId(ICorDebugDataTarget* dataTarget, uint64_t baseAddress, BYTE* buffer, ULONG bufferSize, PULONG pBuildSize)
+{
+ ElfReaderExport reader(dataTarget);
+ if (reader.EnumerateProgramHeaders(baseAddress, nullptr, nullptr))
+ {
+ return reader.GetBuildId(buffer, bufferSize, pBuildSize);
+ }
+ return false;
+}
+
+//
+// ELF reader constructor/destructor
+//
+
+ElfReader::ElfReader(bool isFileLayout) :
+ m_isFileLayout(isFileLayout),
+ m_gnuHashTableAddr(nullptr),
+ m_stringTableAddr(nullptr),
+ m_stringTableSize(0),
+ m_symbolTableAddr(nullptr),
+ m_buckets(nullptr),
+ m_chainsAddress(nullptr),
+ m_noteStart(0),
+ m_noteEnd(0)
+{
+ memset(&m_hashTable, 0, sizeof(m_hashTable));
+}
+
+ElfReader::~ElfReader()
+{
+ if (m_buckets != nullptr) {
+ free(m_buckets);
+ }
+}
+
+//
+// Initialize the ELF reader from a module the base address. This function
+// caches the info necessary in the ElfReader class look up symbols.
+//
+bool
+ElfReader::PopulateForSymbolLookup(uint64_t baseAddress)
+{
+ Trace("PopulateForSymbolLookup: base %" PRIA PRIx64 "\n", baseAddress);
+ Elf_Dyn* dynamicAddr = nullptr;
+ uint64_t loadbias = 0;
+
+ // Enumerate program headers searching for the PT_DYNAMIC header, etc.
+ if (!EnumerateProgramHeaders(
+ baseAddress,
+#if defined(TARGET_LINUX_MUSL) || defined(TARGET_RISCV64)
+ // On musl based platforms (Alpine) and RISCV64 (VisionFive2 board),
+ // the below dynamic entries for hash,
+ // string table, etc. are RVAs instead of absolute address like on all
+ // other Linux distros. Get the "loadbias" (basically the base address
+ // of the module) and add to these RVAs.
+ &loadbias,
+#else
+ nullptr,
+#endif
+ &dynamicAddr))
+ {
+ return false;
+ }
+
+ if (dynamicAddr == nullptr) {
+ return false;
+ }
+
+ // Search for dynamic entries
+ for (;;)
+ {
+ Elf_Dyn dyn;
+ if (!ReadMemory(dynamicAddr, &dyn, sizeof(dyn))) {
+ Trace("ERROR: ReadMemory(%p, %" PRIx ") dyn FAILED\n", dynamicAddr, sizeof(dyn));
+ return false;
+ }
+ Trace("DSO: dyn %p tag %" PRId " (%" PRIx ") d_ptr %" PRIxA "\n", dynamicAddr, dyn.d_tag, dyn.d_tag, dyn.d_un.d_ptr);
+ if (dyn.d_tag == DT_NULL) {
+ break;
+ }
+ else if (dyn.d_tag == DT_GNU_HASH) {
+ m_gnuHashTableAddr = (void*)(dyn.d_un.d_ptr + loadbias);
+ }
+ else if (dyn.d_tag == DT_STRTAB) {
+ m_stringTableAddr = (void*)(dyn.d_un.d_ptr + loadbias);
+ }
+ else if (dyn.d_tag == DT_STRSZ) {
+ m_stringTableSize = (int)dyn.d_un.d_ptr;
+ }
+ else if (dyn.d_tag == DT_SYMTAB) {
+ m_symbolTableAddr = (void*)(dyn.d_un.d_ptr + loadbias);
+ }
+ dynamicAddr++;
+ }
+
+ if (m_gnuHashTableAddr == nullptr || m_stringTableAddr == nullptr || m_symbolTableAddr == nullptr) {
+ Trace("ERROR: hash, string or symbol table address not found\n");
+ return false;
+ }
+
+ // Initialize the hash table
+ if (!InitializeGnuHashTable()) {
+ return false;
+ }
+
+ return true;
+}
+
+//
+// Symbol table support
+//
+
+bool
+ElfReader::TryLookupSymbol(std::string symbolName, uint64_t* symbolOffset)
+{
+ std::vector<int32_t> symbolIndexes;
+ if (GetPossibleSymbolIndex(symbolName, symbolIndexes)) {
+ Elf_Sym symbol;
+ for (int32_t possibleLocation : symbolIndexes)
+ {
+ if (GetSymbol(possibleLocation, &symbol))
+ {
+ std::string possibleName;
+ if (GetStringAtIndex(symbol.st_name, possibleName))
+ {
+ if (symbolName.compare(possibleName) == 0)
+ {
+ *symbolOffset = symbol.st_value;
+ Trace("TryLookupSymbol found '%s' at offset %" PRIxA " in %d\n", symbolName.c_str(), *symbolOffset, symbol.st_shndx);
+ return true;
+ }
+ }
+ }
+ }
+ }
+ Trace("TryLookupSymbol '%s' not found\n", symbolName.c_str());
+ *symbolOffset = 0;
+ return false;
+}
+
+bool
+ElfReader::GetSymbol(int32_t index, Elf_Sym* symbol)
+{
+ int symSize = sizeof(Elf_Sym);
+ if (!ReadMemory((char*)m_symbolTableAddr + (index * symSize), symbol, symSize)) {
+ return false;
+ }
+ return true;
+}
+
+//
+// Hash (GNU) hash table support
+//
+
+bool
+ElfReader::InitializeGnuHashTable()
+{
+ if (!ReadMemory(m_gnuHashTableAddr, &m_hashTable, sizeof(m_hashTable))) {
+ Trace("ERROR: InitializeGnuHashTable hashtable ReadMemory(%p) FAILED\n", m_gnuHashTableAddr);
+ return false;
+ }
+ if (m_hashTable.BucketCount <= 0 || m_hashTable.SymbolOffset == 0) {
+ Trace("ERROR: InitializeGnuHashTable invalid BucketCount or SymbolOffset\n");
+ return false;
+ }
+ m_buckets = (int32_t*)malloc(m_hashTable.BucketCount * sizeof(int32_t));
+ if (m_buckets == nullptr) {
+ return false;
+ }
+ void* bucketsAddress = (char*)m_gnuHashTableAddr + sizeof(GnuHashTable) + (m_hashTable.BloomSize * sizeof(size_t));
+ if (!ReadMemory(bucketsAddress, m_buckets, m_hashTable.BucketCount * sizeof(int32_t))) {
+ Trace("ERROR: InitializeGnuHashTable buckets ReadMemory(%p) FAILED\n", bucketsAddress);
+ return false;
+ }
+ m_chainsAddress = (char*)bucketsAddress + (m_hashTable.BucketCount * sizeof(int32_t));
+ return true;
+}
+
+bool
+ElfReader::GetPossibleSymbolIndex(const std::string& symbolName, std::vector<int32_t>& symbolIndexes)
+{
+ uint32_t hash = Hash(symbolName);
+ int i = m_buckets[hash % m_hashTable.BucketCount] - m_hashTable.SymbolOffset;
+ Trace("GetPossibleSymbolIndex hash %08x index: %d BucketCount %d SymbolOffset %08x\n", hash, i, m_hashTable.BucketCount, m_hashTable.SymbolOffset);
+ for (;; i++)
+ {
+ int32_t chainVal;
+ if (!GetChain(i, &chainVal)) {
+ Trace("ERROR: GetPossibleSymbolIndex GetChain FAILED\n");
+ return false;
+ }
+ if ((chainVal & 0xfffffffe) == (hash & 0xfffffffe))
+ {
+ symbolIndexes.push_back(i + m_hashTable.SymbolOffset);
+ }
+ if ((chainVal & 0x1) == 0x1)
+ {
+ break;
+ }
+ }
+ return true;
+}
+
+uint32_t
+ElfReader::Hash(const std::string& symbolName)
+{
+ uint32_t h = 5381;
+ for (unsigned int i = 0; i < symbolName.length(); i++)
+ {
+ h = (h << 5) + h + symbolName[i];
+ }
+ return h;
+}
+
+bool
+ElfReader::GetChain(int index, int32_t* chain)
+{
+ return ReadMemory((char*)m_chainsAddress + (index * sizeof(int32_t)), chain, sizeof(int32_t));
+}
+
+//
+// String table support
+//
+
+bool
+ElfReader::GetStringAtIndex(int index, std::string& result)
+{
+ while(true)
+ {
+ if (index > m_stringTableSize) {
+ Trace("ERROR: GetStringAtIndex index %d > string table size\n", index);
+ return false;
+ }
+ char ch;
+ void* address = (char*)m_stringTableAddr + index;
+ if (!ReadMemory(address, &ch, sizeof(ch))) {
+ Trace("ERROR: GetStringAtIndex ReadMemory(%p) FAILED\n", address);
+ return false;
+ }
+ if (ch == '\0') {
+ break;
+ }
+ result.append(1, ch);
+ index++;
+ }
+ return true;
+}
+
+size_t Align4(size_t x) { return (x + 3) & ~3; }
+
+bool
+ElfReader::GetBuildId(BYTE* buffer, ULONG bufferSize, PULONG pBuildSize)
+{
+ _ASSERTE(pBuildSize != nullptr);
+
+ if (m_noteStart != 0)
+ {
+ _ASSERTE(m_noteEnd != 0);
+ uint64_t address = m_noteStart;
+ while (address < m_noteEnd)
+ {
+ Elf_Nhdr nhdr;
+ if (!ReadMemory((PVOID)address, &nhdr, sizeof(nhdr)))
+ {
+ return false;
+ }
+ size_t nhdrSize = sizeof(Elf_Nhdr) + Align4(nhdr.n_namesz) + Align4(nhdr.n_descsz);
+ Trace("GetBuildId: type %d size %08x\n", nhdr.n_type, nhdrSize);
+ if (nhdr.n_type == NT_GNU_BUILD_ID)
+ {
+ ArrayHolder<BYTE> nhdrBuffer = new BYTE[nhdrSize];
+ if (!ReadMemory((PVOID)address, nhdrBuffer, nhdrSize))
+ {
+ return false;
+ }
+ const char* name = (const char*)(nhdrBuffer.GetPtr() + sizeof(Elf_Nhdr));
+ Trace("GetBuildId: name %s\n", name);
+ if (strncmp(name, ELF_NOTE_GNU, Align4(nhdr.n_namesz)) == 0)
+ {
+ *pBuildSize = nhdr.n_descsz;
+ memcpy_s(buffer, bufferSize, nhdrBuffer.GetPtr() + sizeof(Elf_Nhdr) + Align4(nhdr.n_namesz), nhdr.n_descsz);
+
+ Trace("GetBuildId: found id size %d\n", *pBuildSize);
+ return true;
+ }
+ }
+ address += nhdrSize;
+ }
+ }
+ return false;
+}
+
+#ifdef HOST_UNIX
+
+bool
+ElfReader::GetBuildIdFromSectionHeader(uint64_t baseAddress, BYTE* buffer, ULONG bufferSize, PULONG pBuildSize)
+{
+ Elf_Ehdr ehdr;
+ if (!ReadHeader(baseAddress, ehdr)) {
+ return false;
+ }
+ if (ehdr.e_shoff == 0 || ehdr.e_shnum <= 0) {
+ return false;
+ }
+ Elf_Shdr* shdrAddr = reinterpret_cast<Elf_Shdr*>(baseAddress + ehdr.e_shoff);
+ for (int sectionIndex = 0; sectionIndex < ehdr.e_shnum; sectionIndex++, shdrAddr++)
+ {
+ Elf_Shdr sh;
+ if (!ReadMemory(shdrAddr, &sh, sizeof(sh))) {
+ Trace("GetBuildIdFromSectionHeader: %2d shdr %p ReadMemory FAILED\n", sectionIndex, shdrAddr);
+ return false;
+ }
+ Trace("GetBuildIdFromSectionHeader: %2d shdr %p type %2d (%x) addr %016lx offset %016lx size %016lx link %08x info %08x name %4d\n",
+ sectionIndex, shdrAddr, sh.sh_type, sh.sh_type, sh.sh_addr, sh.sh_offset, sh.sh_size, sh.sh_link, sh.sh_info, sh.sh_name);
+
+ if (sh.sh_type == SHT_NOTE)
+ {
+ m_noteStart = baseAddress + sh.sh_offset;
+ m_noteEnd = baseAddress + sh.sh_offset + sh.sh_size;
+ if (GetBuildId(buffer, bufferSize, pBuildSize))
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+//
+// Enumerate all the ELF info starting from the root program header. This
+// function doesn't cache any state in the ElfReader class.
+//
+bool
+ElfReader::EnumerateElfInfo(Elf_Phdr* phdrAddr, int phnum)
+{
+ Trace("EnumerateElfInfo: phdr %p phnum %d\n", phdrAddr, phnum);
+
+ if (phdrAddr == nullptr || phnum <= 0) {
+ return false;
+ }
+ uint64_t baseAddress = (uint64_t)phdrAddr - sizeof(Elf_Ehdr);
+ Elf_Dyn* dynamicAddr = nullptr;
+
+ // Enumerate program headers searching for the PT_DYNAMIC header, etc.
+ if (!EnumerateProgramHeaders(phdrAddr, phnum, baseAddress, nullptr, &dynamicAddr)) {
+ return false;
+ }
+ return EnumerateLinkMapEntries(dynamicAddr);
+}
+
+//
+// Enumerate through the dynamic debug link map entries
+//
+bool
+ElfReader::EnumerateLinkMapEntries(Elf_Dyn* dynamicAddr)
+{
+ if (dynamicAddr == nullptr) {
+ return false;
+ }
+
+ // Search dynamic entries for DT_DEBUG (r_debug entry)
+ struct r_debug* rdebugAddr = nullptr;
+ for (;;)
+ {
+ Elf_Dyn dyn;
+ if (!ReadMemory(dynamicAddr, &dyn, sizeof(dyn))) {
+ Trace("ERROR: ReadMemory(%p, %" PRIx ") dyn FAILED\n", dynamicAddr, sizeof(dyn));
+ return false;
+ }
+ Trace("DSO: dyn %p tag %" PRId " (%" PRIx ") d_ptr %" PRIxA "\n", dynamicAddr, dyn.d_tag, dyn.d_tag, dyn.d_un.d_ptr);
+ if (dyn.d_tag == DT_NULL) {
+ break;
+ }
+ else if (dyn.d_tag == DT_DEBUG) {
+ rdebugAddr = reinterpret_cast<struct r_debug*>(dyn.d_un.d_ptr);
+ }
+ dynamicAddr++;
+ }
+
+ Trace("DSO: rdebugAddr %p\n", rdebugAddr);
+ if (rdebugAddr == nullptr) {
+ return false;
+ }
+
+ struct r_debug debugEntry;
+ if (!ReadMemory(rdebugAddr, &debugEntry, sizeof(debugEntry))) {
+ Trace("ERROR: ReadMemory(%p, %" PRIx ") r_debug FAILED\n", rdebugAddr, sizeof(debugEntry));
+ return false;
+ }
+
+ // Add the DSO link_map entries
+ for (struct link_map* linkMapAddr = debugEntry.r_map; linkMapAddr != nullptr;)
+ {
+ struct link_map map;
+ if (!ReadMemory(linkMapAddr, &map, sizeof(map))) {
+ Trace("ERROR: ReadMemory(%p, %" PRIx ") link_map FAILED\n", linkMapAddr, sizeof(map));
+ return false;
+ }
+ // Read the module's name and make sure the memory is added to the core dump
+ std::string moduleName;
+ if (map.l_name != 0)
+ {
+ for (int i = 0; i < PATH_MAX; i++)
+ {
+ char ch;
+ if (!ReadMemory(map.l_name + i, &ch, sizeof(ch))) {
+ Trace("DSO: ReadMemory link_map name %p + %d FAILED\n", map.l_name, i);
+ break;
+ }
+ if (ch == '\0') {
+ break;
+ }
+ moduleName.append(1, ch);
+ }
+ }
+ Trace("\nDSO: link_map entry %p l_ld %p l_addr (Ehdr) %p l_name %p %s\n", linkMapAddr, map.l_ld, map.l_addr, map.l_name, moduleName.c_str());
+
+ // Call the derived class for each module
+ VisitModule(map.l_addr, moduleName);
+
+ linkMapAddr = map.l_next;
+ }
+
+ return true;
+}
+
+#endif // HOST_UNIX
+
+bool
+ElfReader::ReadHeader(uint64_t baseAddress, Elf_Ehdr& ehdr)
+{
+ if (!ReadMemory((void*)baseAddress, &ehdr, sizeof(Elf_Ehdr))) {
+ Trace("ERROR: EnumerateProgramHeaders ReadMemory(%p, %" PRIx ") ehdr FAILED\n", (void*)baseAddress, sizeof(Elf_Ehdr));
+ return false;
+ }
+ if (memcmp(ehdr.e_ident, ElfMagic, strlen(ElfMagic)) != 0) {
+ Trace("ERROR: EnumerateProgramHeaders Invalid elf header signature\n");
+ return false;
+ }
+ _ASSERTE(ehdr.e_phentsize == sizeof(Elf_Phdr));
+#ifdef TARGET_64BIT
+ _ASSERTE(ehdr.e_ident[EI_CLASS] == ELFCLASS64);
+#else
+ _ASSERTE(ehdr.e_ident[EI_CLASS] == ELFCLASS32);
+#endif
+ _ASSERTE(ehdr.e_ident[EI_DATA] == ELFDATA2LSB);
+ int phnum = ehdr.e_phnum;
+#ifdef PN_XNUM
+ _ASSERTE(phnum != PN_XNUM);
+#endif
+ if (ehdr.e_phoff == 0 || phnum <= 0) {
+ return false;
+ }
+ Trace("ELF: type %d mach 0x%x ver %d flags 0x%x phnum %d phoff %" PRIxA " phentsize 0x%02x shnum %d shoff %" PRIxA " shentsize 0x%02x shstrndx %d\n",
+ ehdr.e_type, ehdr.e_machine, ehdr.e_version, ehdr.e_flags, phnum, ehdr.e_phoff, ehdr.e_phentsize, ehdr.e_shnum, ehdr.e_shoff, ehdr.e_shentsize, ehdr.e_shstrndx);
+ return true;
+}
+
+bool
+ElfReader::EnumerateProgramHeaders(uint64_t baseAddress, uint64_t* ploadbias, Elf_Dyn** pdynamicAddr)
+{
+ Elf_Ehdr ehdr;
+ if (!ReadHeader(baseAddress, ehdr)) {
+ return false;
+ }
+ Elf_Phdr* phdrAddr = reinterpret_cast<Elf_Phdr*>(baseAddress + ehdr.e_phoff);
+ return EnumerateProgramHeaders(phdrAddr, ehdr.e_phnum, baseAddress, ploadbias, pdynamicAddr);
+}
+
+//
+// Enumerate and find the dynamic program header entry
+//
+bool
+ElfReader::EnumerateProgramHeaders(Elf_Phdr* phdrAddr, int phnum, uint64_t baseAddress, uint64_t* ploadbias, Elf_Dyn** pdynamicAddr)
+{
+ uint64_t loadbias = baseAddress;
+
+ // Calculate the load bias from the PT_LOAD program headers
+ for (int i = 0; i < phnum; i++)
+ {
+ Elf_Phdr ph;
+ if (!ReadMemory(phdrAddr + i, &ph, sizeof(ph))) {
+ Trace("ERROR: ReadMemory(%p, %" PRIx ") phdr FAILED\n", phdrAddr + i, sizeof(ph));
+ return false;
+ }
+ if (ph.p_type == PT_LOAD && ph.p_offset == 0) {
+ loadbias -= ph.p_vaddr;
+ Trace("PHDR: loadbias %" PRIA PRIx64 "\n", loadbias);
+ break;
+ }
+ }
+
+ if (ploadbias != nullptr) {
+ *ploadbias = loadbias;
+ }
+
+ // Enumerate all the program headers
+ for (int i = 0; i < phnum; i++)
+ {
+ Elf_Phdr ph;
+ if (!ReadMemory(phdrAddr + i, &ph, sizeof(ph))) {
+ Trace("ERROR: ReadMemory(%p, %" PRIx ") phdr FAILED\n", phdrAddr + i, sizeof(ph));
+ return false;
+ }
+ Trace("PHDR: %p type %d (%x) vaddr %" PRIxA " memsz %" PRIxA " paddr %" PRIxA " filesz %" PRIxA " offset %" PRIxA " align %" PRIxA "\n",
+ phdrAddr + i, ph.p_type, ph.p_type, ph.p_vaddr, ph.p_memsz, ph.p_paddr, ph.p_filesz, ph.p_offset, ph.p_align);
+
+ switch (ph.p_type)
+ {
+ case PT_NOTE:
+ m_noteStart = loadbias + ph.p_vaddr;
+ m_noteEnd = loadbias + ph.p_vaddr + ph.p_memsz;
+ break;
+
+ case PT_DYNAMIC:
+ if (pdynamicAddr != nullptr)
+ {
+ if (m_isFileLayout)
+ {
+ *pdynamicAddr = reinterpret_cast<Elf_Dyn*>(loadbias + ph.p_offset);
+ }
+ else
+ {
+ *pdynamicAddr = reinterpret_cast<Elf_Dyn*>(loadbias + ph.p_vaddr);
+ }
+ }
+ break;
+ }
+
+ // Give any derived classes a chance at the program header
+ VisitProgramHeader(loadbias, baseAddress, &ph);
+ }
+
+ return true;
+}
+
+#ifdef HOST_WINDOWS
+
+/* ELF 32bit header */
+Elf32_Ehdr::Elf32_Ehdr()
+{
+ e_ident[EI_MAG0] = ElfMagic[0];
+ e_ident[EI_MAG1] = ElfMagic[1];
+ e_ident[EI_MAG2] = ElfMagic[2];
+ e_ident[EI_MAG3] = ElfMagic[3];
+ e_ident[EI_CLASS] = ELFCLASS32;
+ e_ident[EI_DATA] = ELFDATA2LSB;
+ e_ident[EI_VERSION] = EV_CURRENT;
+ e_ident[EI_OSABI] = ELFOSABI_NONE;
+ e_ident[EI_ABIVERSION] = 0;
+ for (int i = EI_PAD; i < EI_NIDENT; ++i) {
+ e_ident[i] = 0;
+ }
+ e_type = ET_REL;
+#if defined(TARGET_X86)
+ e_machine = EM_386;
+#elif defined(TARGET_ARM)
+ e_machine = EM_ARM;
+#endif
+ e_flags = 0;
+ e_version = 1;
+ e_entry = 0;
+ e_phoff = 0;
+ e_ehsize = sizeof(Elf32_Ehdr);
+ e_phentsize = 0;
+ e_phnum = 0;
+}
+
+/* ELF 64bit header */
+Elf64_Ehdr::Elf64_Ehdr()
+{
+ e_ident[EI_MAG0] = ElfMagic[0];
+ e_ident[EI_MAG1] = ElfMagic[1];
+ e_ident[EI_MAG2] = ElfMagic[2];
+ e_ident[EI_MAG3] = ElfMagic[3];
+ e_ident[EI_CLASS] = ELFCLASS64;
+ e_ident[EI_DATA] = ELFDATA2LSB;
+ e_ident[EI_VERSION] = EV_CURRENT;
+ e_ident[EI_OSABI] = ELFOSABI_NONE;
+ e_ident[EI_ABIVERSION] = 0;
+ for (int i = EI_PAD; i < EI_NIDENT; ++i) {
+ e_ident[i] = 0;
+ }
+ e_type = ET_REL;
+#if defined(TARGET_AMD64)
+ e_machine = EM_X86_64;
+#elif defined(TARGET_ARM64)
+ e_machine = EM_AARCH64;
+#elif defined(TARGET_LOONGARCH64)
+ e_machine = EM_LOONGARCH;
+#elif defined(TARGET_RISCV64)
+ e_machine = EM_RISCV;
+#endif
+ e_flags = 0;
+ e_version = 1;
+ e_entry = 0;
+ e_phoff = 0;
+ e_ehsize = sizeof(Elf64_Ehdr);
+ e_phentsize = 0;
+ e_phnum = 0;
+}
+
+#endif // HOST_WINDOWS
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#include <elf.h>
+#ifdef HOST_UNIX
+#include <link.h>
+#endif // HOST_UNIX
+#include <string>
+#include <vector>
+
+#if TARGET_64BIT
+#define TARGET_WORDSIZE 64
+#else
+#define TARGET_WORDSIZE 32
+#endif
+
+#ifndef ElfW
+/* We use this macro to refer to ELF types independent of the native wordsize.
+ `ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */
+#define ElfW(type) _ElfW (Elf, TARGET_WORDSIZE, type)
+#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t)
+#define _ElfW_1(e,w,t) e##w##t
+#endif
+
+typedef struct {
+ int32_t BucketCount;
+ int32_t SymbolOffset;
+ int32_t BloomSize;
+ int32_t BloomShift;
+} GnuHashTable;
+
+class ElfReader
+{
+private:
+ bool m_isFileLayout;
+ void* m_gnuHashTableAddr; // DT_GNU_HASH
+ void* m_stringTableAddr; // DT_STRTAB
+ int m_stringTableSize; // DT_STRSIZ
+ void* m_symbolTableAddr; // DT_SYMTAB
+
+ GnuHashTable m_hashTable; // gnu hash table info
+ int32_t* m_buckets; // gnu hash table buckets
+ void* m_chainsAddress;
+
+ uint64_t m_noteStart;
+ uint64_t m_noteEnd;
+
+public:
+ ElfReader(bool isFileLayout);
+ virtual ~ElfReader();
+ bool PopulateForSymbolLookup(uint64_t baseAddress);
+ bool TryLookupSymbol(std::string symbolName, uint64_t* symbolOffset);
+ bool GetBuildId(BYTE* buffer, ULONG bufferSize, PULONG pBuildSize);
+#ifdef HOST_UNIX
+ bool EnumerateElfInfo(ElfW(Phdr)* phdrAddr, int phnum);
+ bool GetBuildIdFromSectionHeader(uint64_t baseAddress, BYTE* buffer, ULONG bufferSize, PULONG pBuildSize);
+#endif
+ bool EnumerateProgramHeaders(uint64_t baseAddress, uint64_t* ploadbias = nullptr, ElfW(Dyn)** pdynamicAddr = nullptr);
+
+private:
+ bool GetSymbol(int32_t index, ElfW(Sym)* symbol);
+ bool InitializeGnuHashTable();
+ bool GetPossibleSymbolIndex(const std::string& symbolName, std::vector<int32_t>& symbolIndexes);
+ uint32_t Hash(const std::string& symbolName);
+ bool GetChain(int index, int32_t* chain);
+ bool GetStringAtIndex(int index, std::string& result);
+ bool ReadHeader(uint64_t baseAddress, ElfW(Ehdr)& ehdr);
+ bool EnumerateProgramHeaders(ElfW(Phdr)* phdrAddr, int phnum, uint64_t baseAddress, uint64_t* ploadbias, ElfW(Dyn)** pdynamicAddr);
+#ifdef HOST_UNIX
+ bool EnumerateLinkMapEntries(ElfW(Dyn)* dynamicAddr);
+#endif
+#ifdef __FreeBSD__
+ virtual void VisitModule(caddr_t baseAddress, std::string& moduleName) { };
+#else
+ virtual void VisitModule(uint64_t baseAddress, std::string& moduleName) { };
+#endif
+ virtual void VisitProgramHeader(uint64_t loadbias, uint64_t baseAddress, ElfW(Phdr)* phdr) { };
+ virtual bool ReadMemory(void* address, void* buffer, size_t size) = 0;
+ virtual void Trace(const char* format, ...) { };
+ virtual void TraceVerbose(const char* format, ...) { };
+};
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#include <windows.h>
+#include <clrdata.h>
+#include <cor.h>
+#include <cordebug.h>
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
+#include <arrayholder.h>
+#include "machoreader.h"
+
+#if TARGET_64BIT
+#define PRIx PRIx64
+#define PRIu PRIu64
+#define PRId PRId64
+#define PRIA "016"
+#define PRIxA PRIA PRIx
+#else
+#define PRIx PRIx32
+#define PRIu PRIu32
+#define PRId PRId32
+#define PRIA "08"
+#define PRIxA PRIA PRIx
+#endif
+
+class MachOReaderFromFile : public MachOReader
+{
+private:
+ FILE* m_file;
+
+public:
+ MachOReaderFromFile() :
+ m_file(NULL)
+ {
+ }
+
+ virtual ~MachOReaderFromFile()
+ {
+ }
+
+ bool OpenFile(const WCHAR* modulePath)
+ {
+ _ASSERTE(m_file == NULL);
+ m_file = _wfopen(modulePath, W("rb"));
+ return m_file != NULL;
+ }
+
+ virtual bool ReadMemory(void* address, void* buffer, size_t size)
+ {
+ if (m_file == NULL)
+ {
+ return false;
+ }
+ if (fseek(m_file, (LONG)(intptr_t)address, SEEK_SET) != 0)
+ {
+ return false;
+ }
+ size_t read = fread(buffer, 1, size, m_file);
+ return read > 0;
+ }
+};
+
+//
+// Entry point to get an export symbol from a module file
+//
+extern "C" bool
+TryReadSymbolFromFile(const WCHAR* modulePath, const char* symbolName, BYTE* buffer, ULONG32 size)
+{
+ MachOReaderFromFile reader;
+ if (reader.OpenFile(modulePath))
+ {
+ MachOModule module(reader, true, 0);
+ if (module.ReadHeader())
+ {
+ uint64_t symbolOffset;
+ if (module.TryLookupSymbol(symbolName, &symbolOffset))
+ {
+ return reader.ReadMemory((void*)symbolOffset, buffer, size);
+ }
+ }
+ }
+ return false;
+}
+
+//
+// Entry point to get the MachO file's build id
+//
+extern "C" bool
+TryGetBuildIdFromFile(const WCHAR* modulePath, BYTE* buffer, ULONG bufferSize, PULONG pBuildSize)
+{
+ MachOReaderFromFile reader;
+ if (reader.OpenFile(modulePath))
+ {
+ MachOModule module(reader, true, 0);
+ return module.GetBuildId(buffer, bufferSize, pBuildSize);
+ }
+ return false;
+}
+
+typedef bool (*ReadMemoryCallback)(void* address, void* buffer, size_t size);
+
+class MachOReaderWithCallback : public MachOReader
+{
+private:
+ ReadMemoryCallback m_readMemory;
+
+public:
+ MachOReaderWithCallback(ReadMemoryCallback readMemory) :
+ m_readMemory(readMemory)
+ {
+ }
+
+ virtual ~MachOReaderWithCallback()
+ {
+ }
+
+private:
+ virtual bool ReadMemory(void* address, void* buffer, size_t size)
+ {
+ return m_readMemory(address, buffer, size);
+ }
+};
+
+//
+// Entry point to get an export symbol
+//
+extern "C" bool
+TryGetSymbolWithCallback(ReadMemoryCallback readMemory, uint64_t baseAddress, const char* symbolName, uint64_t* symbolAddress)
+{
+ MachOReaderWithCallback reader(readMemory);
+ MachOModule module(reader, false, baseAddress);
+ if (module.ReadHeader())
+ {
+ uint64_t symbolOffset;
+ if (module.TryLookupSymbol(symbolName, &symbolOffset))
+ {
+ *symbolAddress = symbolOffset;
+ return true;
+ }
+ }
+ *symbolAddress = 0;
+ return false;
+}
+
+class MachOReaderExport : public MachOReader
+{
+private:
+ ICorDebugDataTarget* m_dataTarget;
+
+public:
+ MachOReaderExport(ICorDebugDataTarget* dataTarget) :
+ m_dataTarget(dataTarget)
+ {
+ dataTarget->AddRef();
+ }
+
+ virtual ~MachOReaderExport()
+ {
+ m_dataTarget->Release();
+ }
+
+private:
+ virtual bool ReadMemory(void* address, void* buffer, size_t size)
+ {
+ uint32_t read = 0;
+ return SUCCEEDED(m_dataTarget->ReadVirtual(reinterpret_cast<CLRDATA_ADDRESS>(address), reinterpret_cast<PBYTE>(buffer), (uint32_t)size, &read));
+ }
+};
+
+//
+// Main entry point to get an export symbol
+//
+extern "C" bool
+TryGetSymbol(ICorDebugDataTarget* dataTarget, uint64_t baseAddress, const char* symbolName, uint64_t* symbolAddress)
+{
+ MachOReaderExport reader(dataTarget);
+ MachOModule module(reader, false, baseAddress);
+ if (module.ReadHeader())
+ {
+ uint64_t symbolOffset;
+ if (module.TryLookupSymbol(symbolName, &symbolOffset))
+ {
+ *symbolAddress = symbolOffset;
+ return true;
+ }
+ }
+ *symbolAddress = 0;
+ return false;
+}
+
+//
+// Get the build id of the module from a data target
+//
+extern "C" bool
+TryGetBuildId(ICorDebugDataTarget* dataTarget, uint64_t baseAddress, BYTE* buffer, ULONG bufferSize, PULONG pBuildSize)
+{
+ MachOReaderExport reader(dataTarget);
+ MachOModule module(reader, false, baseAddress);
+ return module.GetBuildId(buffer, bufferSize, pBuildSize);
+}
+
+//--------------------------------------------------------------------
+// MachO module
+//--------------------------------------------------------------------
+
+MachOModule::MachOModule(MachOReader& reader, bool isFileLayout, mach_vm_address_t baseAddress, mach_header_64* header, std::string* name) :
+ m_reader(reader),
+ m_isFileLayout(isFileLayout),
+ m_baseAddress(baseAddress),
+ m_loadBias(0),
+ m_commands(nullptr),
+ m_symtabCommand(nullptr),
+ m_nlists(nullptr),
+ m_strtabAddress(0)
+{
+ if (header != nullptr) {
+ m_header = *header;
+ }
+ if (name != nullptr) {
+ m_name = *name;
+ }
+}
+
+MachOModule::~MachOModule()
+{
+ if (m_commands != nullptr) {
+ free(m_commands);
+ m_commands = nullptr;
+ }
+ if (m_nlists != nullptr) {
+ free(m_nlists);
+ m_nlists = nullptr;
+ }
+}
+
+bool
+MachOModule::ReadHeader()
+{
+ _ASSERTE(sizeof(m_header) == sizeof(mach_header_64));
+ if (!m_reader.ReadMemory((void*)m_baseAddress, &m_header, sizeof(mach_header_64)))
+ {
+ m_reader.Trace("ERROR: failed to read header at %p\n", (void*)m_baseAddress);
+ return false;
+ }
+ m_reader.Trace("ReadHeader: magic %08x cputype %08x ncmds %d sizeofcmds %d\n", m_header.magic, m_header.cputype, m_header.ncmds, m_header.sizeofcmds);
+ return m_header.magic == 0xfeedfacf;
+}
+
+bool
+MachOModule::TryLookupSymbol(const char* symbolName, uint64_t* symbolValue)
+{
+ _ASSERTE(symbolValue != nullptr);
+
+ if (ReadSymbolTable())
+ {
+ _ASSERTE(m_nlists != nullptr);
+ _ASSERTE(m_strtabAddress != 0);
+
+ // First, search just the "external" export symbols
+ if (TryLookupSymbol(m_dysymtabCommand->iextdefsym, m_dysymtabCommand->nextdefsym, symbolName, symbolValue))
+ {
+ m_reader.Trace("SYM: Found '%s' in external symbols\n", symbolName);
+ return true;
+ }
+ m_reader.Trace("SYM: Missed '%s' in external symbols\n", symbolName);
+
+ // If not found in external symbols, search all of them
+ if (TryLookupSymbol(0, m_symtabCommand->nsyms, symbolName, symbolValue))
+ {
+ m_reader.Trace("SYM: Found '%s' in all symbols\n", symbolName);
+ return true;
+ }
+ m_reader.Trace("SYM: Missed '%s' in all symbols\n", symbolName);
+ }
+ *symbolValue = 0;
+ return false;
+}
+
+bool
+MachOModule::TryLookupSymbol(int start, int nsyms, const char* symbolName, uint64_t* symbolValue)
+{
+ for (int i = 0; i < nsyms; i++)
+ {
+ std::string name = GetSymbolName(start + i);
+
+ // Skip the leading underscores to match Linux externs
+ const char* currentName = name.length() > 0 && name[0] == '_' ? name.c_str() + 1 : name.c_str();
+
+ // Does this symbol match?
+ if (strcmp(currentName, symbolName) == 0)
+ {
+ *symbolValue = m_loadBias + m_nlists[start + i].n_value;
+ return true;
+ }
+ }
+ *symbolValue = 0;
+ return false;
+}
+
+bool
+MachOModule::GetBuildId(BYTE* buffer, ULONG bufferSize, PULONG pBuildSize)
+{
+ _ASSERTE(pBuildSize != nullptr);
+ if (ReadHeader())
+ {
+ if (ReadLoadCommands())
+ {
+ if (m_uuidCommand != nullptr)
+ {
+ *pBuildSize = sizeof(m_uuidCommand->uuid);
+ memcpy_s(buffer, bufferSize, m_uuidCommand->uuid, *pBuildSize);
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+bool
+MachOModule::EnumerateSegments()
+{
+ if (!ReadLoadCommands())
+ {
+ return false;
+ }
+ _ASSERTE(!m_segments.empty());
+
+ for (const segment_command_64* segment : m_segments)
+ {
+ m_reader.VisitSegment(*this, *segment);
+
+ const section_64* section = (section_64*)((uint64_t)segment + sizeof(segment_command_64));
+
+ for (int s = 0; s < segment->nsects; s++, section++)
+ {
+ m_reader.VisitSection(*this, *section);
+ }
+ }
+ return true;
+}
+
+bool
+MachOModule::ReadLoadCommands()
+{
+ if (m_commands == nullptr)
+ {
+ // Read load commands
+ void* commandsAddress = (void*)(m_baseAddress + sizeof(mach_header_64));
+ m_commands = (load_command*)malloc(m_header.sizeofcmds);
+ if (m_commands == nullptr)
+ {
+ m_reader.Trace("ERROR: Failed to allocate %d byte load commands\n", m_header.sizeofcmds);
+ return false;
+ }
+ if (!m_reader.ReadMemory(commandsAddress, m_commands, m_header.sizeofcmds))
+ {
+ m_reader.Trace("ERROR: Failed to read load commands at %p of %d\n", commandsAddress, m_header.sizeofcmds);
+ return false;
+ }
+ load_command* command = m_commands;
+
+ for (int i = 0; i < m_header.ncmds; i++)
+ {
+ m_reader.TraceVerbose("CMD: load command cmd %02x (%d) size %d\n", command->cmd, command->cmd, command->cmdsize);
+
+ switch (command->cmd)
+ {
+ case LC_UUID:
+ m_uuidCommand = (uuid_command*)command;
+ break;
+
+ case LC_SYMTAB:
+ m_symtabCommand = (symtab_command*)command;
+ break;
+
+ case LC_DYSYMTAB:
+ m_dysymtabCommand = (dysymtab_command*)command;
+ break;
+
+ case LC_SEGMENT_64:
+ segment_command_64* segment = (segment_command_64*)command;
+ m_segments.push_back(segment);
+
+ // Calculate the load bias for the module. This is the value to add to the vmaddr of a
+ // segment to get the actual address.
+ if (!m_isFileLayout)
+ {
+ if (strcmp(segment->segname, SEG_TEXT) == 0)
+ {
+ m_loadBias = m_baseAddress - segment->vmaddr;
+ }
+ }
+
+ m_reader.TraceVerbose("CMD: vmaddr %016llx vmsize %016llx fileoff %016llx filesize %016llx nsects %d max %c%c%c init %c%c%c %02x %s\n",
+ segment->vmaddr,
+ segment->vmsize,
+ segment->fileoff,
+ segment->filesize,
+ segment->nsects,
+ (segment->maxprot & VM_PROT_READ) ? 'r' : '-',
+ (segment->maxprot & VM_PROT_WRITE) ? 'w' : '-',
+ (segment->maxprot & VM_PROT_EXECUTE) ? 'x' : '-',
+ (segment->initprot & VM_PROT_READ) ? 'r' : '-',
+ (segment->initprot & VM_PROT_WRITE) ? 'w' : '-',
+ (segment->initprot & VM_PROT_EXECUTE) ? 'x' : '-',
+ segment->flags,
+ segment->segname);
+
+ section_64* section = (section_64*)((uint64_t)segment + sizeof(segment_command_64));
+ for (int s = 0; s < segment->nsects; s++, section++)
+ {
+ m_reader.TraceVerbose(" addr %016llx size %016llx off %08x align %02x flags %02x %s\n",
+ section->addr,
+ section->size,
+ section->offset,
+ section->align,
+ section->flags,
+ section->sectname);
+ }
+ break;
+ }
+ // Get next load command
+ command = (load_command*)((char*)command + command->cmdsize);
+ }
+ m_reader.TraceVerbose("CMD: load bias %016llx\n", m_loadBias);
+ }
+
+ return true;
+}
+
+bool
+MachOModule::ReadSymbolTable()
+{
+ if (m_nlists == nullptr)
+ {
+ if (!ReadLoadCommands())
+ {
+ return false;
+ }
+ _ASSERTE(m_symtabCommand != nullptr);
+ _ASSERTE(m_strtabAddress == 0);
+
+ m_reader.TraceVerbose("SYM: symoff %08x nsyms %d stroff %08x strsize %d iext %d next %d iundef %d nundef %d extref %d nextref %d\n",
+ m_symtabCommand->symoff,
+ m_symtabCommand->nsyms,
+ m_symtabCommand->stroff,
+ m_symtabCommand->strsize,
+ m_dysymtabCommand->iextdefsym,
+ m_dysymtabCommand->nextdefsym,
+ m_dysymtabCommand->iundefsym,
+ m_dysymtabCommand->nundefsym,
+ m_dysymtabCommand->extrefsymoff,
+ m_dysymtabCommand->nextrefsyms);
+
+ // Read the entire symbol part of symbol table. An array of "nlist" structs.
+ void* symbolTableAddress = (void*)GetAddressFromFileOffset(m_symtabCommand->symoff);
+ size_t symtabSize = sizeof(nlist_64) * m_symtabCommand->nsyms;
+ m_nlists = (nlist_64*)malloc(symtabSize);
+ if (m_nlists == nullptr)
+ {
+ m_reader.Trace("ERROR: Failed to allocate %zu byte symtab\n", symtabSize);
+ return false;
+ }
+ if (!m_reader.ReadMemory(symbolTableAddress, m_nlists, symtabSize))
+ {
+ m_reader.Trace("ERROR: Failed to read symtab at %p of %zu\n", symbolTableAddress, symtabSize);
+ return false;
+ }
+
+ // Save the symbol string table address.
+ m_strtabAddress = GetAddressFromFileOffset(m_symtabCommand->stroff);
+ }
+ return true;
+}
+
+uint64_t
+MachOModule::GetAddressFromFileOffset(uint32_t offset)
+{
+ _ASSERTE(!m_segments.empty());
+ if (!m_isFileLayout)
+ {
+ for (const segment_command_64* segment : m_segments)
+ {
+ if (offset >= segment->fileoff && offset < (segment->fileoff + segment->filesize))
+ {
+ return m_loadBias + offset + segment->vmaddr - segment->fileoff;
+ }
+ }
+ }
+ return m_loadBias + offset;
+}
+
+std::string
+MachOModule::GetSymbolName(int index)
+{
+ uint64_t symbolNameAddress = m_strtabAddress + m_nlists[index].n_un.n_strx;
+ std::string result;
+ while (true)
+ {
+ char c = 0;
+ if (!m_reader.ReadMemory((void*)symbolNameAddress, &c, sizeof(char)))
+ {
+ m_reader.Trace("ERROR: Failed to read string table at %p\n", (void*)symbolNameAddress);
+ break;
+ }
+ if (c == '\0')
+ {
+ break;
+ }
+ result.append(1, c);
+ symbolNameAddress++;
+ }
+ return result;
+}
+
+//--------------------------------------------------------------------
+// MachO reader
+//--------------------------------------------------------------------
+
+MachOReader::MachOReader()
+{
+}
+
+bool
+MachOReader::EnumerateModules(mach_vm_address_t dyldInfoAddress)
+{
+ // Read the all image info from the dylinker image
+ dyld_all_image_infos dyldInfo;
+ if (!ReadMemory((void*)dyldInfoAddress, &dyldInfo, sizeof(dyld_all_image_infos)))
+ {
+ Trace("ERROR: Failed to read dyld_all_image_infos at %p\n", (void*)dyldInfoAddress);
+ return false;
+ }
+ Trace("MOD: infoArray %p infoArrayCount %d\n", dyldInfo.infoArray, dyldInfo.infoArrayCount);
+
+ // Create the dyld module info
+ if (!TryRegisterModule(dyldInfo.dyldImageLoadAddress, dyldInfo.dyldPath, true))
+ {
+ Trace("ERROR: Failed to read dyld header at %p\n", dyldInfo.dyldImageLoadAddress);
+ return false;
+ }
+ void* imageInfosAddress = (void*)dyldInfo.infoArray;
+ size_t imageInfosSize = dyldInfo.infoArrayCount * sizeof(dyld_image_info);
+ ArrayHolder<dyld_image_info> imageInfos = new (std::nothrow) dyld_image_info[dyldInfo.infoArrayCount];
+ if (imageInfos == nullptr)
+ {
+ Trace("ERROR: Failed to allocate %zu byte image infos\n", imageInfosSize);
+ return false;
+ }
+ if (!ReadMemory(imageInfosAddress, imageInfos, imageInfosSize))
+ {
+ Trace("ERROR: Failed to read dyld_all_image_infos at %p\n", imageInfosAddress);
+ return false;
+ }
+ for (int i = 0; i < dyldInfo.infoArrayCount; i++)
+ {
+ // Ignore any errors and continue to next module
+ TryRegisterModule(imageInfos[i].imageLoadAddress, imageInfos[i].imageFilePath, false);
+ }
+ return true;
+}
+
+bool
+MachOReader::TryRegisterModule(const struct mach_header* imageAddress, const char* imageFilePathAddress, bool dylinker)
+{
+ std::string imagePath;
+ if (!ReadString(imageFilePathAddress, imagePath))
+ {
+ return false;
+ }
+
+ MachOModule module(*this, false, (mach_vm_address_t)imageAddress, nullptr, &imagePath);
+ if (!module.ReadHeader())
+ {
+ return false;
+ }
+ Trace("MOD: %016llx %08x %s\n", imageAddress, module.Header().flags, imagePath.c_str());
+ VisitModule(module);
+ if (dylinker)
+ {
+ // Make sure the memory for the symbol and string tables are in the core dump for our
+ // dump readers which still use this symbol to enumerate modules.
+ uint64_t dyldInfoAddress = 0;
+ if (!module.TryLookupSymbol("dyld_all_image_infos", &dyldInfoAddress))
+ {
+ Trace("ERROR: Can not find the _dyld_all_image_infos symbol\n");
+ return false;
+ }
+ Trace("MOD: dyldInfoAddress %016llx\n", dyldInfoAddress);
+ }
+ return true;
+}
+
+bool
+MachOReader::ReadString(const char* address, std::string& str)
+{
+ for (int i = 0; i < MAX_LONGPATH; i++)
+ {
+ char c = 0;
+ if (!ReadMemory((void*)(address + i), &c, sizeof(char)))
+ {
+ Trace("ERROR: Failed to read string at %p\n", (void*)(address + i));
+ return false;
+ }
+ if (c == '\0')
+ {
+ break;
+ }
+ str.append(1, c);
+ }
+ return true;
+}
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#include <mach/mach.h>
+#include <mach-o/loader.h>
+#include <mach-o/nlist.h>
+#include <mach-o/dyld_images.h>
+#include <string>
+#include <vector>
+
+class MachOReader;
+
+class MachOModule
+{
+ friend MachOReader;
+private:
+ MachOReader& m_reader;
+ bool m_isFileLayout;
+ mach_vm_address_t m_baseAddress;
+ mach_vm_address_t m_loadBias;
+ mach_header_64 m_header;
+ std::string m_name;
+ load_command* m_commands;
+ std::vector<segment_command_64*> m_segments;
+ uuid_command* m_uuidCommand;
+ symtab_command* m_symtabCommand;
+ dysymtab_command* m_dysymtabCommand;
+ nlist_64* m_nlists;
+ uint64_t m_strtabAddress;
+
+public:
+ MachOModule(MachOReader& reader, bool isFileLayout, mach_vm_address_t baseAddress, mach_header_64* header = nullptr, std::string* name = nullptr);
+ ~MachOModule();
+
+ inline mach_vm_address_t BaseAddress() const { return m_baseAddress; }
+ inline mach_vm_address_t LoadBias() const { return m_loadBias; }
+ inline const mach_header_64& Header() const { return m_header; }
+ inline const std::string& Name() const { return m_name; }
+
+ bool ReadHeader();
+ bool TryLookupSymbol(const char* symbolName, uint64_t* symbolValue);
+ bool TryLookupSymbol(int start, int nsyms, const char* symbolName, uint64_t* symbolValue);
+ bool GetBuildId(BYTE* buffer, ULONG bufferSize, PULONG pBuildSize);
+ bool EnumerateSegments();
+
+private:
+ inline void SetName(std::string& name) { m_name = name; }
+
+ bool ReadSymbolTable();
+ bool ReadLoadCommands();
+ uint64_t GetAddressFromFileOffset(uint32_t offset);
+ std::string GetSymbolName(int index);
+};
+
+class MachOReader
+{
+ friend MachOModule;
+public:
+ MachOReader();
+ bool EnumerateModules(mach_vm_address_t dyldInfoAddress);
+
+private:
+ bool TryRegisterModule(const struct mach_header* imageAddress, const char* imageFilePathAddress, bool dylinker);
+ bool ReadString(const char* address, std::string& str);
+ virtual void VisitModule(MachOModule& module) { };
+ virtual void VisitSegment(MachOModule& module, const segment_command_64& segment) { };
+ virtual void VisitSection(MachOModule& module, const section_64& section) { };
+ virtual bool ReadMemory(void* address, void* buffer, size_t size) = 0;
+ virtual void Trace(const char* format, ...) { };
+ virtual void TraceVerbose(const char* format, ...) { };
+};
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef __DBG_TARGET_CONTEXT_INCLUDED
+#define __DBG_TARGET_CONTEXT_INCLUDED
+
+#include <dbgportable.h>
+#include <stddef.h>
+#include "crosscomp.h"
+
+//
+// The right side of the debugger can be built to target multiple platforms. This means it is not
+// safe to use the CONTEXT structure directly: the context of the platform we're building for might not match
+// that of the one the debugger is targeting. So all right side code will use the DT_CONTEXT abstraction
+// instead. When the debugger target is the local platform this will just resolve back into CONTEXT, but cross
+// platform we'll provide a hand-rolled version.
+//
+
+//
+// For cross platform cases we also need to provide a helper function for byte-swapping a context structure
+// should the endian-ness of the debugger and debuggee platforms differ. This is called ByteSwapContext and is
+// obviously a no-op for those cases where the left and right sides agree on storage format.
+//
+// NOTE: Any changes to the field layout of DT_CONTEXT must be tracked in the associated definition of
+// ByteSwapContext.
+//
+
+// ****
+// **** NOTE: T_CONTEXT (in pal/inc/pal.h) can now be larger than DT_CONTEXT (currently T_CONTEXT on Linux/MacOS
+// **** x64 includes the XSTATE registers). This means the following:
+// ****
+// **** 1) The DBI/DAC APIs cannot assume that incoming context buffers are T_CONTEXT sized.
+// **** 2) When the DAC calls the supplied data target's context APIs, the size of the context buffer must
+// **** be the size of the DT_CONTEXT for compatiblity.
+// **** 3) DBI/DAC code can not cast and copy from a T_CONTEXT into a DT_CONTEXT buffer.
+// ****
+
+// This odd define pattern is needed because in DBI we set _TARGET_ to match the host and
+// DBG_TARGET to control our targeting. In x-plat DBI DBG_TARGET won't match _TARGET_ and
+// DBG_TARGET needs to take precedence
+#if defined(TARGET_X86)
+#define DTCONTEXT_IS_X86
+#elif defined (TARGET_AMD64)
+#define DTCONTEXT_IS_AMD64
+#elif defined (TARGET_ARM)
+#define DTCONTEXT_IS_ARM
+#elif defined (TARGET_ARM64)
+#define DTCONTEXT_IS_ARM64
+#elif defined (TARGET_X86)
+#define DTCONTEXT_IS_X86
+#elif defined (TARGET_AMD64)
+#define DTCONTEXT_IS_AMD64
+#elif defined (TARGET_ARM)
+#define DTCONTEXT_IS_ARM
+#elif defined (TARGET_ARM64)
+#define DTCONTEXT_IS_ARM64
+#elif defined (TARGET_LOONGARCH64)
+#define DTCONTEXT_IS_LOONGARCH64
+#elif defined (TARGET_RISCV64)
+#define DTCONTEXT_IS_RISCV64
+#endif
+
+#define CONTEXT_AREA_MASK 0xffff
+
+#if defined(DTCONTEXT_IS_X86)
+
+#define DT_SIZE_OF_80387_REGISTERS 80
+
+#define DT_CONTEXT_i386 0x00010000
+#define DT_CONTEXT_CONTROL (DT_CONTEXT_i386 | 0x00000001L) // SS:SP, CS:IP, FLAGS, BP
+#define DT_CONTEXT_INTEGER (DT_CONTEXT_i386 | 0x00000002L) // AX, BX, CX, DX, SI, DI
+#define DT_CONTEXT_SEGMENTS (DT_CONTEXT_i386 | 0x00000004L)
+#define DT_CONTEXT_FLOATING_POINT (DT_CONTEXT_i386 | 0x00000008L) // 387 state
+#define DT_CONTEXT_DEBUG_REGISTERS (DT_CONTEXT_i386 | 0x00000010L)
+#define DT_CONTEXT_EXTENDED_REGISTERS (DT_CONTEXT_i386 | 0x00000020L)
+
+#define DT_CONTEXT_FULL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_SEGMENTS)
+#define DT_CONTEXT_ALL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_SEGMENTS | DT_CONTEXT_FLOATING_POINT | DT_CONTEXT_DEBUG_REGISTERS | DT_CONTEXT_EXTENDED_REGISTERS)
+
+#define DT_MAXIMUM_SUPPORTED_EXTENSION 512
+
+typedef struct {
+ DWORD ControlWord;
+ DWORD StatusWord;
+ DWORD TagWord;
+ DWORD ErrorOffset;
+ DWORD ErrorSelector;
+ DWORD DataOffset;
+ DWORD DataSelector;
+ BYTE RegisterArea[DT_SIZE_OF_80387_REGISTERS];
+ DWORD Cr0NpxState;
+} DT_FLOATING_SAVE_AREA;
+
+typedef struct {
+ ULONG ContextFlags;
+
+ ULONG Dr0;
+ ULONG Dr1;
+ ULONG Dr2;
+ ULONG Dr3;
+ ULONG Dr6;
+ ULONG Dr7;
+
+ DT_FLOATING_SAVE_AREA FloatSave;
+
+ ULONG SegGs;
+ ULONG SegFs;
+ ULONG SegEs;
+ ULONG SegDs;
+
+ ULONG Edi;
+ ULONG Esi;
+ ULONG Ebx;
+ ULONG Edx;
+ ULONG Ecx;
+ ULONG Eax;
+
+ ULONG Ebp;
+ ULONG Eip;
+ ULONG SegCs;
+ ULONG EFlags;
+ ULONG Esp;
+ ULONG SegSs;
+
+ UCHAR ExtendedRegisters[DT_MAXIMUM_SUPPORTED_EXTENSION];
+
+} DT_CONTEXT;
+
+static_assert(sizeof(DT_CONTEXT) == sizeof(T_CONTEXT), "DT_CONTEXT size must equal the T_CONTEXT size on X86");
+
+// Since the target is little endian in this case we only have to provide a real implementation of
+// ByteSwapContext if the platform we're building on is big-endian.
+#ifdef BIGENDIAN
+inline void ByteSwapContext(DT_CONTEXT *pContext)
+{
+ // Our job is simplified since the context has large contiguous ranges with fields of the same size. Keep
+ // the following logic in sync with the definition of DT_CONTEXT above.
+ BYTE *pbContext = (BYTE*)pContext;
+
+ // The first span consists of 4 byte fields.
+ DWORD cbFields = (offsetof(DT_CONTEXT, FloatSave) + offsetof(DT_FLOATING_SAVE_AREA, RegisterArea)) / 4;
+ for (DWORD i = 0; i < cbFields; i++)
+ {
+ ByteSwapPrimitive(pbContext, pbContext, 4);
+ pbContext += 4;
+ }
+
+ // Then there's a float save area containing 8 byte fields.
+ cbFields = sizeof(pContext->FloatSave.RegisterArea);
+ for (DWORD i = 0; i < cbFields; i++)
+ {
+ ByteSwapPrimitive(pbContext, pbContext, 8);
+ pbContext += 8;
+ }
+
+ // Back to 4 byte fields.
+ cbFields = (offsetof(DT_CONTEXT, ExtendedRegisters) - offsetof(DT_CONTEXT, SegGs)) / 4;
+ for (DWORD i = 0; i < cbFields; i++)
+ {
+ ByteSwapPrimitive(pbContext, pbContext, 4);
+ pbContext += 4;
+ }
+
+ // We don't know the formatting of the extended register area, but the debugger doesn't access this data
+ // on the left side, so just leave it in left-side format for now.
+
+ // Validate that we converted up to where we think we did as a hedge against DT_CONTEXT layout changes.
+ _PASSERT((pbContext - ((BYTE*)pContext)) == (sizeof(DT_CONTEXT) - sizeof(pContext->ExtendedRegisters)));
+}
+#else // BIGENDIAN
+inline void ByteSwapContext(DT_CONTEXT *pContext)
+{
+}
+#endif // BIGENDIAN
+
+#elif defined(DTCONTEXT_IS_AMD64)
+
+#define DT_CONTEXT_AMD64 0x00100000L
+
+#define DT_CONTEXT_CONTROL (DT_CONTEXT_AMD64 | 0x00000001L)
+#define DT_CONTEXT_INTEGER (DT_CONTEXT_AMD64 | 0x00000002L)
+#define DT_CONTEXT_SEGMENTS (DT_CONTEXT_AMD64 | 0x00000004L)
+#define DT_CONTEXT_FLOATING_POINT (DT_CONTEXT_AMD64 | 0x00000008L)
+#define DT_CONTEXT_DEBUG_REGISTERS (DT_CONTEXT_AMD64 | 0x00000010L)
+
+#define DT_CONTEXT_FULL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT)
+#define DT_CONTEXT_ALL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_SEGMENTS | DT_CONTEXT_FLOATING_POINT | DT_CONTEXT_DEBUG_REGISTERS)
+
+typedef struct {
+ ULONGLONG Low;
+ LONGLONG High;
+} DT_M128A;
+
+typedef struct {
+ WORD ControlWord;
+ WORD StatusWord;
+ BYTE TagWord;
+ BYTE Reserved1;
+ WORD ErrorOpcode;
+ DWORD ErrorOffset;
+ WORD ErrorSelector;
+ WORD Reserved2;
+ DWORD DataOffset;
+ WORD DataSelector;
+ WORD Reserved3;
+ DWORD MxCsr;
+ DWORD MxCsr_Mask;
+ DT_M128A FloatRegisters[8];
+ DT_M128A XmmRegisters[16];
+ BYTE Reserved4[96];
+} DT_XMM_SAVE_AREA32;
+
+typedef struct DECLSPEC_ALIGN(16) {
+
+ DWORD64 P1Home;
+ DWORD64 P2Home;
+ DWORD64 P3Home;
+ DWORD64 P4Home;
+ DWORD64 P5Home;
+ DWORD64 P6Home;
+
+ DWORD ContextFlags;
+ DWORD MxCsr;
+
+ WORD SegCs;
+ WORD SegDs;
+ WORD SegEs;
+ WORD SegFs;
+ WORD SegGs;
+ WORD SegSs;
+ DWORD EFlags;
+
+ DWORD64 Dr0;
+ DWORD64 Dr1;
+ DWORD64 Dr2;
+ DWORD64 Dr3;
+ DWORD64 Dr6;
+ DWORD64 Dr7;
+
+ DWORD64 Rax;
+ DWORD64 Rcx;
+ DWORD64 Rdx;
+ DWORD64 Rbx;
+ DWORD64 Rsp;
+ DWORD64 Rbp;
+ DWORD64 Rsi;
+ DWORD64 Rdi;
+ DWORD64 R8;
+ DWORD64 R9;
+ DWORD64 R10;
+ DWORD64 R11;
+ DWORD64 R12;
+ DWORD64 R13;
+ DWORD64 R14;
+ DWORD64 R15;
+
+ DWORD64 Rip;
+
+ union {
+ DT_XMM_SAVE_AREA32 FltSave;
+ struct {
+ DT_M128A Header[2];
+ DT_M128A Legacy[8];
+ DT_M128A Xmm0;
+ DT_M128A Xmm1;
+ DT_M128A Xmm2;
+ DT_M128A Xmm3;
+ DT_M128A Xmm4;
+ DT_M128A Xmm5;
+ DT_M128A Xmm6;
+ DT_M128A Xmm7;
+ DT_M128A Xmm8;
+ DT_M128A Xmm9;
+ DT_M128A Xmm10;
+ DT_M128A Xmm11;
+ DT_M128A Xmm12;
+ DT_M128A Xmm13;
+ DT_M128A Xmm14;
+ DT_M128A Xmm15;
+ };
+ };
+
+ DT_M128A VectorRegister[26];
+ DWORD64 VectorControl;
+
+ DWORD64 DebugControl;
+ DWORD64 LastBranchToRip;
+ DWORD64 LastBranchFromRip;
+ DWORD64 LastExceptionToRip;
+ DWORD64 LastExceptionFromRip;
+} DT_CONTEXT;
+
+#if !defined(CROSS_COMPILE) && !defined(TARGET_WINDOWS)
+static_assert(sizeof(DT_CONTEXT) == offsetof(T_CONTEXT, XStateFeaturesMask), "DT_CONTEXT must not include the XSTATE registers on AMD64");
+#else
+static_assert(sizeof(DT_CONTEXT) == sizeof(T_CONTEXT), "DT_CONTEXT size must equal the T_CONTEXT size on AMD64");
+#endif
+
+#elif defined(DTCONTEXT_IS_ARM)
+
+#define DT_CONTEXT_ARM 0x00200000L
+
+#define DT_CONTEXT_CONTROL (DT_CONTEXT_ARM | 0x1L)
+#define DT_CONTEXT_INTEGER (DT_CONTEXT_ARM | 0x2L)
+#define DT_CONTEXT_FLOATING_POINT (DT_CONTEXT_ARM | 0x4L)
+#define DT_CONTEXT_DEBUG_REGISTERS (DT_CONTEXT_ARM | 0x8L)
+
+#define DT_CONTEXT_FULL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT)
+#define DT_CONTEXT_ALL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT | DT_CONTEXT_DEBUG_REGISTERS)
+
+#define DT_ARM_MAX_BREAKPOINTS 8
+#define DT_ARM_MAX_WATCHPOINTS 1
+
+
+typedef struct {
+ ULONGLONG Low;
+ LONGLONG High;
+} DT_NEON128;
+
+typedef DECLSPEC_ALIGN(8) struct {
+
+ //
+ // Control flags.
+ //
+
+ DWORD ContextFlags;
+
+ //
+ // Integer registers
+ //
+
+ DWORD R0;
+ DWORD R1;
+ DWORD R2;
+ DWORD R3;
+ DWORD R4;
+ DWORD R5;
+ DWORD R6;
+ DWORD R7;
+ DWORD R8;
+ DWORD R9;
+ DWORD R10;
+ DWORD R11;
+ DWORD R12;
+
+ //
+ // Control Registers
+ //
+
+ DWORD Sp;
+ DWORD Lr;
+ DWORD Pc;
+ DWORD Cpsr;
+
+ //
+ // Floating Point/NEON Registers
+ //
+
+ DWORD Fpscr;
+ DWORD Padding;
+ union {
+ DT_NEON128 Q[16];
+ ULONGLONG D[32];
+ DWORD S[32];
+ };
+
+ //
+ // Debug registers
+ //
+
+ DWORD Bvr[DT_ARM_MAX_BREAKPOINTS];
+ DWORD Bcr[DT_ARM_MAX_BREAKPOINTS];
+ DWORD Wvr[DT_ARM_MAX_WATCHPOINTS];
+ DWORD Wcr[DT_ARM_MAX_WATCHPOINTS];
+
+ DWORD Padding2[2];
+
+} DT_CONTEXT;
+
+static_assert(sizeof(DT_CONTEXT) == sizeof(T_CONTEXT), "DT_CONTEXT size must equal the T_CONTEXT size on ARM32");
+
+#elif defined(DTCONTEXT_IS_ARM64)
+
+#define DT_CONTEXT_ARM64 0x00400000L
+
+#define DT_CONTEXT_CONTROL (DT_CONTEXT_ARM64 | 0x1L)
+#define DT_CONTEXT_INTEGER (DT_CONTEXT_ARM64 | 0x2L)
+#define DT_CONTEXT_FLOATING_POINT (DT_CONTEXT_ARM64 | 0x4L)
+#define DT_CONTEXT_DEBUG_REGISTERS (DT_CONTEXT_ARM64 | 0x8L)
+
+#define DT_CONTEXT_FULL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT)
+#define DT_CONTEXT_ALL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT | DT_CONTEXT_DEBUG_REGISTERS)
+
+#define DT_ARM64_MAX_BREAKPOINTS 8
+#define DT_ARM64_MAX_WATCHPOINTS 2
+
+typedef struct {
+ ULONGLONG Low;
+ LONGLONG High;
+} DT_NEON128;
+
+typedef DECLSPEC_ALIGN(16) struct {
+ //
+ // Control flags.
+ //
+
+ /* +0x000 */ DWORD ContextFlags;
+
+ //
+ // Integer registers
+ //
+
+ /* +0x004 */ DWORD Cpsr; // NZVF + DAIF + CurrentEL + SPSel
+ /* +0x008 */ union {
+ struct {
+ DWORD64 X0;
+ DWORD64 X1;
+ DWORD64 X2;
+ DWORD64 X3;
+ DWORD64 X4;
+ DWORD64 X5;
+ DWORD64 X6;
+ DWORD64 X7;
+ DWORD64 X8;
+ DWORD64 X9;
+ DWORD64 X10;
+ DWORD64 X11;
+ DWORD64 X12;
+ DWORD64 X13;
+ DWORD64 X14;
+ DWORD64 X15;
+ DWORD64 X16;
+ DWORD64 X17;
+ DWORD64 X18;
+ DWORD64 X19;
+ DWORD64 X20;
+ DWORD64 X21;
+ DWORD64 X22;
+ DWORD64 X23;
+ DWORD64 X24;
+ DWORD64 X25;
+ DWORD64 X26;
+ DWORD64 X27;
+ DWORD64 X28;
+ };
+ DWORD64 X[29];
+ };
+ /* +0x0f0 */ DWORD64 Fp;
+ /* +0x0f8 */ DWORD64 Lr;
+ /* +0x100 */ DWORD64 Sp;
+ /* +0x108 */ DWORD64 Pc;
+
+ //
+ // Floating Point/NEON Registers
+ //
+
+ /* +0x110 */ DT_NEON128 V[32];
+ /* +0x310 */ DWORD Fpcr;
+ /* +0x314 */ DWORD Fpsr;
+
+ //
+ // Debug registers
+ //
+
+ /* +0x318 */ DWORD Bcr[DT_ARM64_MAX_BREAKPOINTS];
+ /* +0x338 */ DWORD64 Bvr[DT_ARM64_MAX_BREAKPOINTS];
+ /* +0x378 */ DWORD Wcr[DT_ARM64_MAX_WATCHPOINTS];
+ /* +0x380 */ DWORD64 Wvr[DT_ARM64_MAX_WATCHPOINTS];
+ /* +0x390 */
+
+} DT_CONTEXT;
+
+
+#if !defined(CROSS_COMPILE) && !defined(TARGET_WINDOWS)
+static_assert(sizeof(DT_CONTEXT) == offsetof(T_CONTEXT, XStateFeaturesMask), "DT_CONTEXT must not include the SVE registers on AMD64");
+#else
+static_assert(sizeof(DT_CONTEXT) == sizeof(T_CONTEXT), "DT_CONTEXT size must equal the T_CONTEXT size on ARM64");
+#endif
+
+#elif defined(DTCONTEXT_IS_LOONGARCH64)
+
+#define DT_CONTEXT_LOONGARCH64 0x00800000L
+
+#define DT_CONTEXT_CONTROL (DT_CONTEXT_LOONGARCH64 | 0x1L)
+#define DT_CONTEXT_INTEGER (DT_CONTEXT_LOONGARCH64 | 0x2L)
+#define DT_CONTEXT_FLOATING_POINT (DT_CONTEXT_LOONGARCH64 | 0x4L)
+#define DT_CONTEXT_DEBUG_REGISTERS (DT_CONTEXT_LOONGARCH64 | 0x8L)
+
+#define DT_CONTEXT_FULL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT)
+#define DT_CONTEXT_ALL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT | DT_CONTEXT_DEBUG_REGISTERS)
+
+#define DT_LOONGARCH64_MAX_BREAKPOINTS 8
+#define DT_LOONGARCH64_MAX_WATCHPOINTS 2
+
+typedef struct DECLSPEC_ALIGN(16) {
+ //
+ // Control flags.
+ //
+
+ /* +0x000 */ DWORD ContextFlags;
+
+ //
+ // Integer registers
+ //
+ DWORD64 R0;
+ DWORD64 Ra;
+ DWORD64 Tp;
+ DWORD64 Sp;
+ DWORD64 A0;
+ DWORD64 A1;
+ DWORD64 A2;
+ DWORD64 A3;
+ DWORD64 A4;
+ DWORD64 A5;
+ DWORD64 A6;
+ DWORD64 A7;
+ DWORD64 T0;
+ DWORD64 T1;
+ DWORD64 T2;
+ DWORD64 T3;
+ DWORD64 T4;
+ DWORD64 T5;
+ DWORD64 T6;
+ DWORD64 T7;
+ DWORD64 T8;
+ DWORD64 X0;
+ DWORD64 Fp;
+ DWORD64 S0;
+ DWORD64 S1;
+ DWORD64 S2;
+ DWORD64 S3;
+ DWORD64 S4;
+ DWORD64 S5;
+ DWORD64 S6;
+ DWORD64 S7;
+ DWORD64 S8;
+ DWORD64 Pc;
+
+ //
+ // Floating Point Registers: FPR64/LSX/LASX.
+ //
+ ULONGLONG F[4*32];
+ DWORD64 Fcc;
+ DWORD Fcsr;
+} DT_CONTEXT;
+
+static_assert(sizeof(DT_CONTEXT) == sizeof(T_CONTEXT), "DT_CONTEXT size must equal the T_CONTEXT size");
+
+#elif defined(DTCONTEXT_IS_RISCV64)
+
+#define DT_CONTEXT_RISCV64 0x01000000L
+
+#define DT_CONTEXT_CONTROL (DT_CONTEXT_RISCV64 | 0x1L)
+#define DT_CONTEXT_INTEGER (DT_CONTEXT_RISCV64 | 0x2L)
+#define DT_CONTEXT_FLOATING_POINT (DT_CONTEXT_RISCV64 | 0x4L)
+#define DT_CONTEXT_DEBUG_REGISTERS (DT_CONTEXT_RISCV64 | 0x8L)
+
+#define DT_CONTEXT_FULL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT)
+#define DT_CONTEXT_ALL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT | DT_CONTEXT_DEBUG_REGISTERS)
+
+#define DT_RISCV64_MAX_BREAKPOINTS 8
+#define DT_RISCV64_MAX_WATCHPOINTS 2
+
+typedef struct DECLSPEC_ALIGN(16) {
+ //
+ // Control flags.
+ //
+
+ /* +0x000 */ DWORD ContextFlags;
+
+ //
+ // Integer registers
+ //
+ DWORD64 R0;
+ DWORD64 Ra;
+ DWORD64 Sp;
+ DWORD64 Gp;
+ DWORD64 Tp;
+ DWORD64 T0;
+ DWORD64 T1;
+ DWORD64 T2;
+ DWORD64 Fp;
+ DWORD64 S1;
+ DWORD64 A0;
+ DWORD64 A1;
+ DWORD64 A2;
+ DWORD64 A3;
+ DWORD64 A4;
+ DWORD64 A5;
+ DWORD64 A6;
+ DWORD64 A7;
+ DWORD64 S2;
+ DWORD64 S3;
+ DWORD64 S4;
+ DWORD64 S5;
+ DWORD64 S6;
+ DWORD64 S7;
+ DWORD64 S8;
+ DWORD64 S9;
+ DWORD64 S10;
+ DWORD64 S11;
+ DWORD64 T3;
+ DWORD64 T4;
+ DWORD64 T5;
+ DWORD64 T6;
+ DWORD64 Pc;
+
+ //
+ // Floating Point Registers
+ //
+ ULONGLONG F[32];
+ DWORD Fcsr;
+} DT_CONTEXT;
+
+static_assert(sizeof(DT_CONTEXT) == sizeof(T_CONTEXT), "DT_CONTEXT size must equal the T_CONTEXT size");
+
+#else
+#error Unsupported platform
+#endif
+
+#endif // __DBG_TARGET_CONTEXT_INCLUDED
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//*****************************************************************************
+// dbgutil.h
+//
+
+//
+//*****************************************************************************
+
+#pragma once
+#include <cor.h>
+#include <cordebug.h>
+#include <metahost.h>
+
+//
+// Various common helpers used by multiple debug components.
+//
+
+// Returns the RVA of the resource section for the module specified by the given data target and module base.
+// Returns failure if the module doesn't have a resource section.
+//
+// Arguments
+// pDataTarget - dataTarget for the process we are inspecting
+// moduleBaseAddress - base address of a module we should inspect
+// pwImageFileMachine - updated with the Machine from the IMAGE_FILE_HEADER
+// pdwResourceSectionRVA - updated with the resultant RVA on success
+HRESULT GetMachineAndResourceSectionRVA(ICorDebugDataTarget* pDataTarget,
+ ULONG64 moduleBaseAddress,
+ WORD* pwImageFileMachine,
+ DWORD* pdwResourceSectionRVA);
+
+HRESULT GetResourceRvaFromResourceSectionRva(ICorDebugDataTarget* pDataTarget,
+ ULONG64 moduleBaseAddress,
+ DWORD resourceSectionRva,
+ DWORD type,
+ DWORD name,
+ DWORD language,
+ DWORD* pResourceRva,
+ DWORD* pResourceSize);
+
+HRESULT GetResourceRvaFromResourceSectionRvaByName(ICorDebugDataTarget* pDataTarget,
+ ULONG64 moduleBaseAddress,
+ DWORD resourceSectionRva,
+ DWORD type,
+ LPCWSTR pwszName,
+ DWORD language,
+ DWORD* pResourceRva,
+ DWORD* pResourceSize);
+
+// Traverses down one level in the PE resource tree structure
+//
+// Arguments:
+// pDataTarget - the data target for inspecting this process
+// id - the id of the next node in the resource tree you want
+// moduleBaseAddress - the base address of the module being inspected
+// resourceDirectoryRVA - the base address of the beginning of the resource directory for this
+// level of the tree
+// pNextLevelRVA - out - The RVA for the next level tree directory or the RVA of the resource entry
+//
+// Returns:
+// S_OK if successful or an appropriate failing HRESULT
+HRESULT GetNextLevelResourceEntryRVA(ICorDebugDataTarget* pDataTarget,
+ DWORD id,
+ ULONG64 moduleBaseAddress,
+ DWORD resourceDirectoryRVA,
+ DWORD* pNextLevelRVA);
+
+// Traverses down one level in the PE resource tree structure
+//
+// Arguments:
+// pDataTarget - the data target for inspecting this process
+// name - the name of the next node in the resource tree you want
+// moduleBaseAddress - the base address of the module being inspected
+// resourceDirectoryRVA - the base address of the beginning of the resource directory for this
+// level of the tree
+// resourceSectionRVA - the rva of the beginning of the resource section of the PE file
+// pNextLevelRVA - out - The RVA for the next level tree directory or the RVA of the resource entry
+//
+// Returns:
+// S_OK if successful or an appropriate failing HRESULT
+HRESULT GetNextLevelResourceEntryRVAByName(ICorDebugDataTarget* pDataTarget,
+ LPCWSTR pwzName,
+ ULONG64 moduleBaseAddress,
+ DWORD resourceDirectoryRva,
+ DWORD resourceSectionRva,
+ DWORD* pNextLevelRva);
+
+// A small wrapper that reads from the data target and throws on error
+HRESULT ReadFromDataTarget(ICorDebugDataTarget* pDataTarget,
+ ULONG64 addr,
+ BYTE* pBuffer,
+ ULONG32 bytesToRead);
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef DEBUGGER_DUMPCOMMON_H
+#define DEBUGGER_DUMPCOMMON_H
+
+#ifdef HOST_UNIX
+typedef enum _MINIDUMP_TYPE {
+ MiniDumpNormal = 0x00000000,
+ MiniDumpWithDataSegs = 0x00000001,
+ MiniDumpWithFullMemory = 0x00000002,
+ MiniDumpWithHandleData = 0x00000004,
+ MiniDumpFilterMemory = 0x00000008,
+ MiniDumpScanMemory = 0x00000010,
+ MiniDumpWithUnloadedModules = 0x00000020,
+ MiniDumpWithIndirectlyReferencedMemory = 0x00000040,
+ MiniDumpFilterModulePaths = 0x00000080,
+ MiniDumpWithProcessThreadData = 0x00000100,
+ MiniDumpWithPrivateReadWriteMemory = 0x00000200,
+ MiniDumpWithoutOptionalData = 0x00000400,
+ MiniDumpWithFullMemoryInfo = 0x00000800,
+ MiniDumpWithThreadInfo = 0x00001000,
+ MiniDumpWithCodeSegs = 0x00002000,
+ MiniDumpWithoutAuxiliaryState = 0x00004000,
+ MiniDumpWithFullAuxiliaryState = 0x00008000,
+ MiniDumpWithPrivateWriteCopyMemory = 0x00010000,
+ MiniDumpIgnoreInaccessibleMemory = 0x00020000,
+ MiniDumpWithTokenInformation = 0x00040000,
+ MiniDumpWithModuleHeaders = 0x00080000,
+ MiniDumpFilterTriage = 0x00100000,
+ MiniDumpWithAvxXStateContext = 0x00200000,
+ MiniDumpValidTypeFlags = 0x003fffff,
+} MINIDUMP_TYPE;
+#endif // HOST_UNIX
+
+#if defined(DACCESS_COMPILE) || defined(RIGHT_SIDE_COMPILE)
+
+// When debugging against minidumps, we frequently need to ignore errors
+// due to the dump not having memory content.
+// You should be VERY careful using these macros. Because our code does not
+// distinguish target types, when you allow memory to be missing because a dump
+// target may not have that memory content by-design you are also implicitly
+// allowing that same data to be missing from a live debugging target.
+// Also, be aware that these macros exist in code under vm\. You must be careful to
+// only allow them to change execution for DAC and DBI.
+// Be careful state is such that execution can continue if the target is missing
+// memory.
+// In general, there are two solutions to this problem:
+// a) add the memory to all minidumps
+// b) stop forcing the memory to always be present
+// All decisions between a & b focus on cost. For a, cost is adding the memory & a complete
+// path to locate it to the dump, both in terms of dump generation time and most
+// especially in terms of dump size (we cannot make MiniDumpNormal many MB for trivial
+// apps).
+// For b, cost is that we lose some of our validation when we have to turn off asserts
+// and other checks for targets that should always have the missing memory present
+// because we have no concept of allowing it to be missing only from a dump.
+
+// This seemingly awkward try block starting tag is so that when the macro is used over
+// multiple source lines we don't create a useless try/catch block. This is important
+// when using the macros in vm\ code.
+#define EX_TRY_ALLOW_DATATARGET_MISSING_MEMORY EX_TRY
+#define EX_END_CATCH_ALLOW_DATATARGET_MISSING_MEMORY \
+ EX_CATCH \
+ { \
+ if ((GET_EXCEPTION()->GetHR() != HRESULT_FROM_WIN32(ERROR_PARTIAL_COPY)) && \
+ (GET_EXCEPTION()->GetHR() != CORDBG_E_READVIRTUAL_FAILURE) ) \
+ { \
+ EX_RETHROW; \
+ } \
+ } \
+ EX_END_CATCH(SwallowAllExceptions)
+
+#define EX_TRY_ALLOW_DATATARGET_MISSING_MEMORY_WITH_HANDLER EX_TRY
+#define EX_CATCH_ALLOW_DATATARGET_MISSING_MEMORY_WITH_HANDLER \
+ EX_CATCH \
+ { \
+ if ((GET_EXCEPTION()->GetHR() != HRESULT_FROM_WIN32(ERROR_PARTIAL_COPY)) && \
+ (GET_EXCEPTION()->GetHR() != CORDBG_E_READVIRTUAL_FAILURE) ) \
+ { \
+ EX_RETHROW; \
+ } \
+ else \
+
+#define EX_TRY_ALLOW_DATATARGET_MISSING_OR_INCONSISTENT_MEMORY EX_TRY
+#define EX_END_CATCH_ALLOW_DATATARGET_MISSING_OR_INCONSISTENT_MEMORY \
+ EX_CATCH \
+ { \
+ if ((GET_EXCEPTION()->GetHR() != HRESULT_FROM_WIN32(ERROR_PARTIAL_COPY)) && \
+ (GET_EXCEPTION()->GetHR() != CORDBG_E_READVIRTUAL_FAILURE) && \
+ (GET_EXCEPTION()->GetHR() != CORDBG_E_TARGET_INCONSISTENT)) \
+ { \
+ EX_RETHROW; \
+ } \
+ } \
+ EX_END_CATCH(SwallowAllExceptions)
+
+
+#define EX_END_CATCH_ALLOW_DATATARGET_MISSING_MEMORY_WITH_HANDLER \
+ } \
+ EX_END_CATCH(SwallowAllExceptions)
+
+// Only use this version for wrapping single source lines, or you'll make debugging
+// painful.
+#define ALLOW_DATATARGET_MISSING_MEMORY(sourceCode) \
+ EX_TRY \
+ { \
+ sourceCode \
+ } \
+ EX_END_CATCH_ALLOW_DATATARGET_MISSING_MEMORY
+
+#define ALLOW_DATATARGET_MISSING_OR_INCONSISTENT_MEMORY(sourceCode) \
+ EX_TRY \
+ { \
+ sourceCode \
+ } \
+ EX_END_CATCH_ALLOW_DATATARGET_MISSING_OR_INCONSISTENT_MEMORY
+
+#else
+#define EX_TRY_ALLOW_DATATARGET_MISSING_MEMORY
+#define EX_END_CATCH_ALLOW_DATATARGET_MISSING_MEMORY
+#define EX_TRY_ALLOW_DATATARGET_MISSING_MEMORY_WITH_HANDLER \
+ #error This macro is only intended for use in DAC code!
+#define EX_CATCH_ALLOW_DATATARGET_MISSING_MEMORY_WITH_HANDLER \
+ #error This macro is only intended for use in DAC code!
+#define EX_END_CATCH_ALLOW_DATATARGET_MISSING_MEMORY_WITH_HANDLER \
+ #error This macro is only intended for use in DAC code!
+
+
+#define ALLOW_DATATARGET_MISSING_MEMORY(sourceCode) \
+ sourceCode
+
+#endif // defined(DACCESS_COMPILE) || defined(RIGHT_SIDE_COMPILE)
+
+
+#endif //DEBUGGER_DUMPCOMMON_H
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#pragma once
+
+// The first byte of the index is the count of bytes
+typedef unsigned char SYMBOL_INDEX;
+#define RUNTIME_INFO_SIGNATURE "DotNetRuntimeInfo"
+#define RUNTIME_INFO_VERSION 2
+
+// Make sure that if you update this structure
+// - You do so in a in a way that it is backwards compatible. For example, only tail append to this.
+// - Rev the version.
+// - Update the logic in ClrDataAccess::EnumMemCLRMainModuleInfo to ensure all needed state is in the dump.
+typedef struct _RuntimeInfo
+{
+ char Signature[18];
+ int Version;
+ SYMBOL_INDEX RuntimeModuleIndex[24];
+ SYMBOL_INDEX DacModuleIndex[24];
+ SYMBOL_INDEX DbiModuleIndex[24];
+} RuntimeInfo;
+
+extern RuntimeInfo DotNetRuntimeInfo;
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//{{NO_DEPENDENCIES}}
+// Used by mscorrc.rc
+//
+
+
+// For (failing) hresults of facility FACILITY_URT, we store
+// unparameterized description strings in the range
+// 0x6000..0x9000.
+#define MSG_FOR_URT_HR(hr) (0x6000 + (HRESULT_CODE(hr)))
+#define MAX_URT_HRESULT_CODE 0x3000
+
+#define HR_FOR_URT_MSG(code) (((code) >=0x6000 && (code) <= 0x6000+MAX_URT_HRESULT_CODE) ? \
+ MAKE_HRESULT(SEVERITY_ERROR, FACILITY_URT, (code) - 0x6000) : \
+ (code))
+
+#ifndef HRESULT_CODE
+#define HRESULT_CODE(hr) ((hr) & 0xFFFF)
+#endif // HRESULT_CODE
+
+
+//-----------------------------------------------------------------------------
+// Resource strings for MDA descriptions.
+//-----------------------------------------------------------------------------
+
+#define IDS_RTL 0x01F5
+
+#define IDS_DS_ACTIVESESSIONS 0x1701
+#define IDS_DS_DATASOURCENAME 0x1702
+#define IDS_DS_DATASOURCEREADONLY 0x1703
+#define IDS_DS_DBMSNAME 0x1704
+#define IDS_DS_DBMSVER 0x1705
+#define IDS_DS_IDENTIFIERCASE 0x1706
+#define IDS_DS_DSOTHREADMODEL 0x1707
+
+#define IDS_EE_NDIRECT_UNSUPPORTED_SIG 0x1708
+#define IDS_EE_NDIRECT_BADNATL 0x170a
+#define IDS_EE_NDIRECT_LOADLIB_WIN 0x170b
+#define IDS_EE_NDIRECT_GETPROCADDRESS_WIN 0x170c
+#define IDS_EE_COM_UNSUPPORTED_SIG 0x170d
+#define IDS_EE_NOSYNCHRONIZED 0x170f
+#define IDS_EE_NDIRECT_BADNATL_THISCALL 0x1710
+#define IDS_EE_MULTIPLE_CALLCONV_UNSUPPORTED 0x1711
+
+#define IDS_EE_LOAD_BAD_MAIN_SIG 0x1712
+#define IDS_EE_COM_UNSUPPORTED_TYPE 0x1713
+
+#define IDS_EE_RETHROW_NOT_ALLOWED 0x171d
+#define IDS_EE_INVALID_OLE_VARIANT 0x171e
+
+#define IDS_EE_FILE_NOT_FOUND 0x80070002
+#define IDS_EE_PATH_TOO_LONG 0x8007006F
+#define IDS_EE_PROC_NOT_FOUND 0x8007007F
+#define IDS_EE_ALREADY_EXISTS 0x800700B7
+#define IDS_EE_BAD_USER_PROFILE 0x800704E5
+#define IDS_INET_E_CANNOT_CONNECT 0x1799 // 0x800C0004
+#define IDS_INET_E_RESOURCE_NOT_FOUND 0x1a60 // 0x800C0005
+#define IDS_INET_E_CONNECTION_TIMEOUT 0x1a1e // 0x800C000B
+#define IDS_INET_E_SECURITY_PROBLEM 0x800C000E
+
+#define IDS_EE_TO_MANY_ARGUMENTS_IN_MAIN 0x1721
+#define IDS_EE_FAILED_TO_FIND_MAIN 0x1722
+#define IDS_EE_ILLEGAL_TOKEN_FOR_MAIN 0x1723
+#define IDS_EE_MAIN_METHOD_MUST_BE_STATIC 0x1724
+#define IDS_EE_MAIN_METHOD_HAS_INVALID_RTN 0x1725
+#define IDS_EE_VTABLECALLSNOTSUPPORTED 0x1726
+
+#define IDS_EE_BADMARSHALFIELD_STRING 0x1727
+#define IDS_EE_BADMARSHALFIELD_NOCUSTOMMARSH 0x1728
+#define IDS_EE_BADMARSHALFIELD_FIXEDARRAY_ZEROSIZE 0x172a
+#define IDS_EE_BADMARSHALFIELD_LAYOUTCLASS 0x172b
+#define IDS_EE_BADMARSHALFIELD_ARRAY 0x172c
+
+#define IDS_EE_BADMARSHALPARAM_NO_LPTSTR 0x172d
+
+#define IDS_EE_SAFEARRAYTYPEMISMATCH 0x1738
+#define IDS_EE_SAFEARRAYRANKMISMATCH 0x1739
+#define IDS_EE_BADMARSHAL_GENERIC 0x173a
+#define IDS_EE_BADMARSHAL_CHAR 0x173b
+#define IDS_EE_BADMARSHAL_BOOLEAN 0x173c
+#define IDS_EE_BADMARSHAL_I1 0x173d
+#define IDS_EE_BADMARSHAL_I2 0x173e
+#define IDS_EE_BADMARSHAL_I4 0x173f
+#define IDS_EE_BADMARSHAL_I8 0x1740
+#define IDS_EE_BADMARSHAL_I 0x1741
+#define IDS_EE_BADMARSHAL_R4 0x1742
+#define IDS_EE_BADMARSHAL_R8 0x1743
+#define IDS_EE_BADMARSHAL_PTR 0x1745
+#define IDS_EE_BADMARSHAL_NOLAYOUT 0x1746
+#define IDS_EE_BADMARSHALPARAM_STRING 0x1747
+#define IDS_EE_BADMARSHALPARAM_STRINGBUILDER 0x1748
+#define IDS_EE_BADMARSHAL_DELEGATE 0x1749
+#define IDS_EE_BADMARSHAL_FNPTR 0x174a
+#define IDS_EE_BADMARSHAL_INTERFACE 0x174b
+#define IDS_EE_BADMARSHAL_CLASS 0x174c
+#define IDS_EE_BADMARSHAL_VALUETYPE 0x174d
+#define IDS_EE_BADMARSHAL_OBJECT 0x174e
+#define IDS_EE_BADMARSHALFIELD_OBJECT 0x174f
+#define IDS_EE_BADMARSHALPARAM_DECIMAL 0x1750
+#define IDS_EE_BADMARSHAL_GUID 0x1751
+#define IDS_EE_BADMARSHAL_DATETIME 0x1753
+#define IDS_EE_BADMARSHAL_ARRAY 0x1754
+#define IDS_EE_BADMARSHAL_BADMANAGED 0x1756
+#define IDS_EE_SRC_OBJ_NOT_COMOBJECT 0x1757
+#define IDS_EE_CANNOT_COERCE_COMOBJECT 0x1759
+#define IDS_EE_BADMARSHAL_AUTOLAYOUT 0x175a
+#define IDS_EE_BADMARSHAL_RESTRICTION 0x175d
+#define IDS_EE_BADMARSHAL_ASANYRESTRICTION 0x175f
+#define IDS_EE_BADMARSHAL_VBBYVALSTRRESTRICTION 0x1760
+#define IDS_EE_BADMARSHAL_AWORESTRICTION 0x1761
+#define IDS_EE_BADMARSHAL_ARGITERATORRESTRICTION 0x1765
+#define IDS_EE_BADMARSHAL_HANDLEREFRESTRICTION 0x1766
+
+#define IDS_EE_ADUNLOAD_NOT_ALLOWED 0x1767
+
+#define IDS_CANNOT_MARSHAL 0x1770
+#define IDS_CANNOT_MARSHAL_RECURSIVE_DEF 0x1771
+#define IDS_EE_HASH_VAL_FAILED 0x1772
+
+
+#define IDS_CLASSLOAD_GENERAL 0x80131522
+#define IDS_CLASSLOAD_BADFORMAT 0x1774
+#define IDS_CLASSLOAD_BYREFARRAY 0x1775
+#define IDS_CLASSLOAD_BYREFLIKEARRAY 0x1776
+#define IDS_CLASSLOAD_VOIDARRAY 0x1777
+#define IDS_CLASSLOAD_STATICVIRTUAL 0x1778
+#define IDS_CLASSLOAD_REDUCEACCESS 0x1779
+#define IDS_CLASSLOAD_BADPINVOKE 0x177a
+#define IDS_CLASSLOAD_VALUECLASSTOOLARGE 0x177b
+#define IDS_CLASSLOAD_NOTIMPLEMENTED 0x177c
+#define IDS_CLASSLOAD_PARENTNULL 0x177d
+#define IDS_CLASSLOAD_PARENTINTERFACE 0x177e
+#define IDS_CLASSLOAD_INTERFACEOBJECT 0x177f
+#define IDS_CLASSLOAD_INTERFACENULL 0x1780
+#define IDS_CLASSLOAD_NOTINTERFACE 0x1781
+#define IDS_CLASSLOAD_VALUEINSTANCEFIELD 0x1782
+#define IDS_CLASSLOAD_EXPLICIT_GENERIC 0x1783
+#define IDS_CLASSLOAD_RANK_TOOLARGE 0x1785
+#define IDS_CLASSLOAD_BAD_UNMANAGED_RVA 0x1787
+#define IDS_CLASSLOAD_ENCLOSING 0x1789
+#define IDS_CLASSLOAD_EXPLICIT_LAYOUT 0x178a
+#define IDS_CLASSLOAD_SEALEDPARENT 0x178b
+#define IDS_CLASSLOAD_NOMETHOD_NAME 0x178c
+#define IDS_CLASSLOAD_BADSPECIALMETHOD 0x178e
+#define IDS_CLASSLOAD_MI_DECLARATIONNOTFOUND 0x178f
+#define IDS_CLASSLOAD_MI_MULTIPLEOVERRIDES 0x1790
+#define IDS_CLASSLOAD_MI_ACCESS_FAILURE 0x1791
+#define IDS_CLASSLOAD_MI_BADSIGNATURE 0x1793
+#define IDS_CLASSLOAD_MI_NOTIMPLEMENTED 0x1794
+#define IDS_CLASSLOAD_MI_MUSTBEVIRTUAL 0x1796
+#define IDS_CLASSLOAD_MISSINGMETHODRVA 0x1797
+#define IDS_CLASSLOAD_FIELDTOOLARGE 0x1798
+#define IDS_CLASSLOAD_CANTEXTEND 0x179a
+#define IDS_CLASSLOAD_ZEROSIZE 0x179b
+#define IDS_CLASSLOAD_TYPESPEC 0x179c
+#define IDS_CLASSLOAD_BAD_FIELD 0x179d
+#define IDS_CLASSLOAD_MI_ILLEGAL_BODY 0x179e
+#define IDS_CLASSLOAD_MI_ILLEGAL_TOKEN_BODY 0x17a0
+#define IDS_CLASSLOAD_MI_ILLEGAL_TOKEN_DECL 0x17a1
+#define IDS_CLASSLOAD_MI_SEALED_DECL 0x17a2
+#define IDS_CLASSLOAD_MI_FINAL_DECL 0x17a3
+#define IDS_CLASSLOAD_MI_NONVIRTUAL_DECL 0x17a4
+#define IDS_CLASSLOAD_MI_BODY_DECL_MISMATCH 0x17a5
+#define IDS_CLASSLOAD_MI_MISSING_SIG_BODY 0x17a6
+#define IDS_CLASSLOAD_MI_MISSING_SIG_DECL 0x17a7
+#define IDS_CLASSLOAD_MI_BADRETURNTYPE 0x17a8
+#define IDS_CLASSLOAD_STATICVIRTUAL_NOTIMPL 0x17a9
+
+#define IDS_INVALID_RECURSIVE_GENERIC_FIELD_LOAD 0x17aa
+#define IDS_CLASSLOAD_TOOMANYGENERICARGS 0x17ab
+
+#define IDS_CLASSLOAD_INLINE_ARRAY_FIELD_COUNT 0x17ac
+#define IDS_CLASSLOAD_INLINE_ARRAY_LENGTH 0x17ad
+#define IDS_CLASSLOAD_INLINE_ARRAY_EXPLICIT 0x17ae
+
+#define IDS_CLASSLOAD_BYREF_OF_BYREF 0x17af
+#define IDS_CLASSLOAD_POINTER_OF_BYREF 0x17b0
+
+#define IDS_DEBUG_USERBREAKPOINT 0x17b6
+
+#define IDS_PERFORMANCEMON_FUNCNOTFOUND 0x17bb
+#define IDS_PERFORMANCEMON_FUNCNOTFOUND_TITLE 0x17bc
+#define IDS_PERFORMANCEMON_PSAPINOTFOUND 0x17bd
+#define IDS_PERFORMANCEMON_PSAPINOTFOUND_TITLE 0x17be
+
+#define IDS_INVALID_REDIM 0x17c3
+#define IDS_INVALID_PINVOKE_CALLCONV 0x17c4
+#define IDS_CLASSLOAD_NSTRUCT_EXPLICIT_OFFSET 0x17c7
+#define IDS_EE_BADPINVOKEFIELD_NOTMARSHALABLE 0x17c9
+
+#define IDS_EE_INVALIDLCIDPARAM 0x17cd
+#define IDS_EE_BADMARSHAL_NESTEDARRAY 0x17ce
+#define IDS_EE_INVALIDCOMSOURCEITF 0x17d1
+#define IDS_EE_CANNOT_COERCE_BYREF_VARIANT 0x17d2
+#define IDS_EE_WRAPPER_MUST_HAVE_DEF_CONS 0x17d3
+#define IDS_EE_INVALID_STD_DISPID_NAME 0x17d4
+
+#define IDS_EE_NON_STD_NAME_WITH_STD_DISPID 0x17d6
+#define IDS_EE_INVOKE_NEW_ENUM_INVALID_RETURN 0x17d7
+#define IDS_EE_COM_OBJECT_RELEASE_RACE 0x17d8
+#define IDS_EE_COM_OBJECT_NO_LONGER_HAS_WRAPPER 0x17d9
+#define IDS_EE_NDIRECT_BADNATL_CALLCONV 0x17df
+#define IDS_EE_CANNOTCAST 0x17e0
+
+#define IDS_EE_NOCUSTOMMARSHALER 0x17e7
+#define IDS_EE_SIZECONTROLOUTOFRANGE 0x17e8
+#define IDS_EE_SIZECONTROLBADTYPE 0x17e9
+#define IDS_EE_SAFEARRAYSZARRAYMISMATCH 0x17eb
+#define IDS_EE_INVALID_VT_FOR_CUSTOM_MARHALER 0x17ec
+#define IDS_EE_BAD_COMEXTENDS_CLASS 0x17ed
+
+#define IDS_EE_LOCAL_COGETCLASSOBJECT_FAILED 0x17f5
+
+#define IDS_EE_MISSING_FIELD 0x17f7
+#define IDS_EE_MISSING_METHOD 0x17f8
+
+#define IDS_EE_UNHANDLED_EXCEPTION 0x17fc
+#define IDS_EE_EXCEPTION_TOSTRING_FAILED 0x17fd
+
+#define IDS_CLASSLOAD_EQUIVALENTSTRUCTMETHODS 0x17fe
+#define IDS_CLASSLOAD_EQUIVALENTSTRUCTFIELDS 0x17ff
+
+#define IDS_EE_SIGTOOCOMPLEX 0x1a03
+#define IDS_EE_STRUCTTOOCOMPLEX 0x1a04
+#define IDS_EE_STRUCTARRAYTOOLARGE 0x1a05
+#define IDS_EE_BADMARSHALFIELD_NOSTRINGBUILDER 0x1a06
+
+#define IDS_EE_NO_BACKING_CLASS_FACTORY 0x1a0b
+#define IDS_EE_STRING_TOOLONG 0x1a0d
+#define IDS_EE_VARARG_NOT_SUPPORTED 0x1a0f
+
+#define IDS_EE_INVALID_CA 0x1a10
+
+#define IDS_EE_THREAD_CANNOT_GET 0x1a15
+#define IDS_EE_THREAD_BAD_STATE 0x1a1b
+#define IDS_EE_THREAD_ABORT_WHILE_SUSPEND 0x1a1c
+
+#define IDS_EE_NOVARIANTRETURN 0x1a1d
+
+#define IDS_EE_METHOD_NOT_FOUND_ON_EV_PROV 0x1a24
+#define IDS_EE_BAD_COMEVENTITF_CLASS 0x1a25
+
+#define IDS_EE_ICUSTOMMARSHALERNOTIMPL 0x1a2e
+#define IDS_EE_GETINSTANCENOTIMPL 0x1a2f
+
+#define IDS_EE_BADMARSHAL_CUSTOMMARSHALER 0x1a30
+
+#define IDS_CLASSLOAD_COMIMPCANNOTHAVELAYOUT 0x1a31
+#define IDS_EE_INVALIDCOMDEFITF 0x1a32
+#define IDS_EE_COMDEFITFNOTSUPPORTED 0x1a33
+
+#define IDS_EE_CLASS_TO_VARIANT_TLB_NOT_REG 0x1a35
+#define IDS_EE_CANNOT_MAP_TO_MANAGED_VC 0x1a36
+
+#define IDS_EE_MARSHAL_UNMAPPABLE_CHAR 0x1a37
+
+#define IDS_EE_BADMARSHAL_SAFEHANDLENATIVETOCOM 0x1a3a
+#define IDS_EE_BADMARSHAL_ABSTRACTOUTSAFEHANDLE 0x1a3b
+#define IDS_EE_BADMARSHAL_RETURNSHCOMTONATIVE 0x1a3c
+#define IDS_EE_BADMARSHAL_SAFEHANDLE 0x1a3d
+
+#define IDS_EE_BADMARSHAL_ABSTRACTRETSAFEHANDLE 0x1a44
+#define IDS_EE_SH_IN_VARIANT_NOT_SUPPORTED 0x1a47
+
+#define IDS_EE_BADMARSHAL_SYSARRAY 0x1a48
+#define IDS_EE_VAR_WRAP_IN_VAR_NOT_SUPPORTED 0x1a49
+#define IDS_EE_RECORD_NON_SUPPORTED_FIELDS 0x1a4a
+
+#define IDS_CLASSLOAD_TYPEWRONGNUMGENERICARGS 0x1a4b
+#define IDS_CLASSLOAD_NSTRUCT_NEGATIVE_OFFSET 0x1a4d
+
+#define IDS_CLASSLOAD_INVALIDINSTANTIATION 0x1a59
+
+#define IDS_EE_CLASSLOAD_INVALIDINSTANTIATION 0x1a59
+#define IDS_EE_BADMARSHALFIELD_ZEROLENGTHFIXEDSTRING 0x1a5a
+
+#define IDS_EE_BADMARSHAL_CRITICALHANDLENATIVETOCOM 0x1a62
+#define IDS_EE_BADMARSHAL_ABSTRACTOUTCRITICALHANDLE 0x1a63
+#define IDS_EE_BADMARSHAL_RETURNCHCOMTONATIVE 0x1a64
+#define IDS_EE_BADMARSHAL_CRITICALHANDLE 0x1a65
+#define IDS_EE_BADMARSHAL_INT128_RESTRICTION 0x1a66
+
+#define IDS_EE_BADMARSHAL_ABSTRACTRETCRITICALHANDLE 0x1a6a
+#define IDS_EE_CH_IN_VARIANT_NOT_SUPPORTED 0x1a6b
+
+#define IDS_CLASSLOAD_CONSTRAINT_MISMATCH_ON_IMPLICIT_OVERRIDE 0x1a6f
+#define IDS_CLASSLOAD_CONSTRAINT_MISMATCH_ON_IMPLICIT_IMPLEMENTATION 0x1a70
+#define IDS_CLASSLOAD_CONSTRAINT_MISMATCH_ON_LOCAL_METHOD_IMPL 0x1a71
+#define IDS_CLASSLOAD_CONSTRAINT_MISMATCH_ON_PARENT_METHOD_IMPL 0x1a72
+#define IDS_CLASSLOAD_CONSTRAINT_MISMATCH_ON_INTERFACE_METHOD_IMPL 0x1a73
+
+#define IDS_EE_NDIRECT_BADNATL_VARARGS_CALLCONV 0x1a75
+
+#define IDS_CLASSLOAD_VARIANCE_IN_METHOD_ARG 0x1a79
+#define IDS_CLASSLOAD_VARIANCE_IN_METHOD_RESULT 0x1a7a
+#define IDS_CLASSLOAD_VARIANCE_IN_BASE 0x1a7b
+#define IDS_CLASSLOAD_VARIANCE_IN_INTERFACE 0x1a7c
+#define IDS_CLASSLOAD_VARIANCE_IN_CONSTRAINT 0x1a7d
+#define IDS_CLASSLOAD_VARIANCE_CLASS 0x1a7e
+#define IDS_CLASSLOAD_BADVARIANCE 0x1a7f
+
+#define IDS_CLASSLOAD_OVERLAPPING_INTERFACES 0x1a80
+#define IDS_CLASSLOAD_32BITCLRLOADING64BITASSEMBLY 0x1a81
+
+#define IDS_EE_NEEDS_ASSEMBLY_SPEC 0x1a87
+
+#define IDS_EE_FILELOAD_ERROR_GENERIC 0x1a88
+
+#define IDS_EE_BADMARSHAL_UNSUPPORTED_SIG 0x1a89
+#define IDS_EE_BADMARSHAL_STRINGARRAY 0x1a8a
+#define IDS_EE_BADMARSHAL_OBJECTARRAY 0x1a8b
+#define IDS_EE_BADMARSHAL_DATETIMEARRAY 0x1a8c
+#define IDS_EE_BADMARSHAL_DECIMALARRAY 0x1a8d
+#define IDS_EE_BADMARSHAL_SAFEHANDLEARRAY 0x1a8f
+#define IDS_EE_BADMARSHAL_CRITICALHANDLEARRAY 0x1a90
+#define IDS_EE_BADMARSHALFIELD_ERROR_MSG 0x1a92
+#define IDS_EE_BADMARSHAL_ERROR_MSG 0x1a93
+#define IDS_EE_COM_INVISIBLE_PARENT 0x1a97
+
+#define IDS_EE_REMOTE_COGETCLASSOBJECT_FAILED 0x1a98
+#define IDS_EE_CREATEINSTANCE_FAILED 0x1a99
+#define IDS_EE_CREATEINSTANCE_LIC_FAILED 0x1a9a
+
+#define IDS_EE_RCW_INVALIDCAST_ITF 0x1a9b
+#define IDS_EE_RCW_INVALIDCAST_EVENTITF 0x1a9c
+#define IDS_EE_RCW_INVALIDCAST_IENUMERABLE 0x1a9d
+#define IDS_EE_RCW_INVALIDCAST_MNGSTDITF 0x1a9e
+#define IDS_EE_RCW_INVALIDCAST_COMOBJ_TO_MD 0x1a9f
+#define IDS_EE_RCW_INVALIDCAST_TO_NON_COMOBJTYPE 0x1aa0
+#define IDS_EE_RCW_INVALIDCAST_MD_TO_MD 0x1aa1
+
+#define IDS_EE_GENERIC 0x1aa2
+#define IDS_EE_BADMARSHAL_GENERICS_RESTRICTION 0x1aa3
+
+#define IDS_EE_THREAD_ABORT 0x1aa4
+#define IDS_EE_THREAD_INTERRUPTED 0x1aa5
+#define IDS_EE_OUT_OF_MEMORY 0x1aa6
+
+#define IDS_EE_ATTEMPT_TO_CREATE_GENERIC_CCW 0x1aa9
+#define IDS_EE_ATTEMPT_TO_CREATE_NON_ABSTRACT_CCW 0x1aaa
+#define IDS_EE_COMIMPORT_METHOD_NO_INTERFACE 0x1aab
+#define IDS_EE_OUT_OF_MEMORY_WITHIN_RANGE 0x1aac
+#define IDS_EE_ARRAY_DIMENSIONS_EXCEEDED 0x1aad
+#define IDS_EE_OUT_OF_SYNCBLOCKS 0x1aae
+
+#define IDS_CLASSLOAD_MI_CANNOT_OVERRIDE 0x1ab3
+#define IDS_CLASSLOAD_EQUIVALENTBADTYPE 0x1ab7
+#define IDS_EE_CODEEXECUTION_CONTAINSGENERICVAR 0x1abb
+#define IDS_CLASSLOAD_WRONGCPU 0x1abc
+
+#define IDS_CLASSLOAD_MI_FINAL_IMPL 0x1ac8
+#define IDS_CLASSLOAD_AMBIGUOUS_OVERRIDE 0x1ac9
+#define IDS_CLASSLOAD_UNSUPPORTED_DISPATCH 0x1aca
+#define IDS_CLASSLOAD_METHOD_NOT_IMPLEMENTED 0x1acb
+
+#define BFA_INVALID_TOKEN_TYPE 0x2001
+#define BFA_INVALID_TOKEN 0x2003
+#define BFA_UNABLE_TO_GET_NESTED_PROPS 0x2005
+#define BFA_METHOD_TOKEN_OUT_OF_RANGE 0x2006
+#define BFA_METHOD_NAME_TOO_LONG 0x2007
+#define BFA_METHOD_IN_A_ENUM 0x2009
+#define BFA_METHOD_WITH_NONZERO_RVA 0x200a
+#define BFA_ABSTRACT_METHOD_WITH_RVA 0x200b
+#define BFA_RUNTIME_METHOD_WITH_RVA 0x200c
+#define BFA_INTERNAL_METHOD_WITH_RVA 0x200d
+#define BFA_AB_METHOD_IN_AB_CLASS 0x200e
+#define BFA_NONVIRT_AB_METHOD 0x200f
+#define BFA_NONAB_NONCCTOR_METHOD_ON_INT 0x2010
+#define BFA_VIRTUAL_PINVOKE_METHOD 0x2011
+#define BFA_VIRTUAL_STATIC_METHOD 0x2012
+#define BFA_VIRTUAL_INSTANCE_CTOR 0x2013
+#define BFA_VIRTUAL_NONAB_INT_METHOD 0x2014
+#define BFA_NONVIRT_INST_INT_METHOD 0x2015
+#define BFA_SYNC_METHOD_IN_VT 0x2016
+#define BFA_NONSTATIC_GLOBAL_METHOD 0x2017
+#define BFA_GLOBAL_INST_CTOR 0x2018
+#define BFA_BAD_PLACE_FOR_GENERIC_METHOD 0x2019
+#define BFA_GENERIC_METHOD_RUNTIME_IMPL 0x201a
+#define BFA_BAD_RUNTIME_IMPL 0x201b
+#define BFA_BAD_FLAGS_ON_DELEGATE 0x201c
+#define BFA_UNKNOWN_DELEGATE_METHOD 0x201d
+#define BFA_GENERIC_METHODS_INST 0x201e
+#define BFA_BAD_FIELD_TOKEN 0x201f
+#define BFA_INVALID_FIELD_ACC_FLAGS 0x2020
+#define BFA_FIELD_LITERAL_AND_INIT 0x2021
+#define BFA_NONSTATIC_GLOBAL_FIELD 0x2022
+#define BFA_INSTANCE_FIELD_IN_INT 0x2023
+#define BFA_INSTANCE_FIELD_IN_ENUM 0x2024
+#define BFA_NONVIRT_NO_SEARCH 0x2025
+#define BFA_MANAGED_NATIVE_NYI 0x2027
+#define BFA_BAD_IMPL_FLAGS 0x2028
+#define BFA_BAD_UNMANAGED_ENTRY_POINT 0x2029
+#define BFA_GENCODE_NOT_BE_VARARG 0x202b
+#define BFA_CANNOT_INHERIT_FROM_DELEGATE 0x202c
+#define BFA_DELEGATE_CLASS_NOTSEALED 0x202d
+#define BFA_ENCLOSING_TYPE_NOT_FOUND 0x202e
+#define BFA_ILLEGAL_DELEGATE_METHOD 0x202f
+#define BFA_MISSING_DELEGATE_METHOD 0x2030
+#define BFA_MULT_TYPE_SAME_NAME 0x2031
+#define BFA_INVALID_METHOD_TOKEN 0x2032
+#define BFA_ECALLS_MUST_BE_IN_SYS_MOD 0x2034
+#define BFA_CANT_GET_CLASSLAYOUT 0x2035
+#define BFA_CALLCONV_NOT_LOCAL_SIG 0x2036
+#define BFA_BAD_CLASS_TOKEN 0x2037
+#define BFA_BAD_IL_RANGE 0x2038
+#define BFA_METHODDEF_WO_TYPEDEF_PARENT 0x2039
+#define BFA_METHODDEF_PARENT_NO_MEMBERS 0x203a
+#define BFA_INVALID_TOKEN_IN_MANIFESTRES 0x203c
+#define BFA_EMPTY_ASSEMDEF_NAME 0x203d
+#define BFA_BAD_IL 0x203e
+#define BFA_CLASSLOAD_VALUETYPEMISMATCH 0x203f
+#define BFA_METHODDECL_NOT_A_METHODDEF 0x2040
+#define BFA_DUPLICATE_DELEGATE_METHOD 0x2041
+#define BFA_ECALLS_MUST_HAVE_ZERO_RVA 0x2042
+#define BFA_METADATA_CORRUPT 0x2043
+#define BFA_BAD_SIGNATURE 0x2044
+#define BFA_TYPEREG_NAME_TOO_LONG 0x2045
+#define BFA_BAD_TYPEREF_TOKEN 0x2046
+#define BFA_BAD_CLASS_INT_CA_FORMAT 0x2048
+#define BFA_BAD_COMPLUS_SIG 0x2049
+#define BFA_BAD_ELEM_IN_SIZEOF 0x204b
+#define BFA_IJW_IN_COLLECTIBLE_ALC 0x204c
+#define BFA_INVALID_UNSAFEACCESSOR 0x204d
+
+#define IDS_CLASSLOAD_INTERFACE_NO_ACCESS 0x204f
+
+#define BFA_BAD_CA_HEADER 0x2050
+#define BFA_BAD_STRING_TOKEN_RANGE 0x2053
+#define BFA_FIXUP_WRONG_PLATFORM 0x2054
+#define BFA_UNEXPECTED_GENERIC_TOKENTYPE 0x2055
+#define BFA_MDARRAY_BADRANK 0x2056
+#define BFA_SDARRAY_BADRANK 0x2057
+#define BFA_BAD_PACKING_SIZE 0x2058
+#define BFA_UNEXPECTED_ARRAY_TYPE 0x2059
+#define BFA_BAD_VISIBILITY 0x205a
+#define BFA_FAMILY_ON_GLOBAL 0x205b
+#define BFA_NOT_AN_ARRAY 0x205d
+#define BFA_EXPECTED_METHODDEF_OR_MEMBERREF 0x205e
+
+#define IDS_CLASSLOAD_BAD_METHOD_COUNT 0x2062
+#define IDS_CLASSLOAD_BAD_FIELD_COUNT 0x2063
+#define IDS_CLASSLOAD_MUST_BE_BYVAL 0x2064
+#define IDS_CLASSLOAD_BAD_VARIANCE_SIG 0x2065
+#define IDS_CLASSLOAD_VARIANCE_IN_DELEGATE 0x2066
+
+#define BFA_UNEXPECTED_FIELD_SIGNATURE 0x2068
+#define BFA_UNEXPECTED_TOKEN_AFTER_CLASSVALTYPE 0x2069
+#define BFA_FNPTR_CANNOT_BE_A_FIELD 0x206a
+#define BFA_FNPTR_CANNOT_BE_GENERIC 0x206b
+#define BFA_UNEXPECTED_TOKEN_AFTER_GENINST 0x206c
+#define BFA_TYPEDBYREFCANNOTHAVEBYREF 0x206e
+
+#define IDS_CLASSLOAD_MI_BAD_SIG 0x2070
+
+#define IDS_EE_TOOMANYFIELDS 0x2072
+
+#define IDS_EE_NDIRECT_GETPROCADDRESS_NONAME 0x2073
+#define IDS_EE_CLASS_CONSTRAINTS_VIOLATION 0x2076
+#define IDS_EE_METHOD_CONSTRAINTS_VIOLATION 0x2077
+#define IDS_CLASSLOAD_TOO_MANY_METHODS 0x2078
+#define IDS_CLASSLOAD_ENUM_EXTRA_GENERIC_TYPE_PARAM 0x2079
+
+#define IDS_CLASSLOAD_GENERICTYPE_RECURSIVE 0x207D
+#define IDS_EE_JIT_COMPILER_ERROR 0x207F
+
+#define IDS_ER_APPLICATION 0x2082
+#define IDS_ER_UNKNOWN 0x2083
+#define IDS_ER_FRAMEWORK_VERSION 0x2084
+#define IDS_ER_UNHANDLEDEXCEPTION 0x2085
+#define IDS_ER_UNHANDLEDEXCEPTIONMSG 0x2086
+#define IDS_ER_MANAGEDFAILFAST 0x2087
+#define IDS_ER_MANAGEDFAILFASTMSG 0x2088
+#define IDS_ER_UNMANAGEDFAILFAST 0x2089
+#define IDS_ER_STACK_OVERFLOW 0x208a
+#define IDS_ER_STACK 0x208b
+#define IDS_ER_WORDAT 0x208c
+
+
+#define IDS_ER_MESSAGE_TRUNCATE 0x208f
+
+#define IDS_EE_OBJECT_TO_VARIANT_NOT_SUPPORTED 0x2090
+#define IDS_EE_OBJECT_TO_ITF_NOT_SUPPORTED 0x2091
+
+#define IDS_EE_BADMARSHALFIELD_DECIMAL 0x2099
+
+#define IDS_EE_CANNOTCASTSAME 0x209a
+
+// For ForwardInteropStubAttribute
+#ifdef FEATURE_COMINTEROP
+#define IDS_EE_INTEROP_STUB_CA_MUST_BE_WITHIN_SAME_ASSEMBLY 0x2107
+#define IDS_EE_INTEROP_STUB_CA_STUB_CLASS_MUST_NOT_BE_GENERIC 0x2108
+#define IDS_EE_INTEROP_STUB_CA_STUB_CLASS_MUST_NOT_BE_INTERFACE 0x2109
+#define IDS_EE_INTEROP_STUB_CA_STUB_METHOD_MISSING 0x2110
+#define IDS_EE_INTEROP_STUB_CA_NO_ACCESS_TO_STUB_METHOD 0x2111
+#endif
+
+#define BFA_REFERENCE_ASSEMBLY 0x2113
+
+#define IDS_E_FIELDACCESS 0x2114
+#define IDS_E_METHODACCESS 0x2115
+#define IDS_E_TYPEACCESS 0x2116
+
+// Profiler error messages for event log
+#define IDS_E_PROF_NO_CLSID 0x2500
+#define IDS_E_PROF_INTERNAL_INIT 0x2501
+#define IDS_E_PROF_BAD_CLSID 0x2502
+#define IDS_E_PROF_NO_CALLBACK_IFACE 0x2503
+#define IDS_E_PROF_CCI_FAILED 0x2504
+#define IDS_E_PROF_INIT_CALLBACK_FAILED 0x2505
+#define IDS_PROF_SUPPLEMENTARY_INFO 0x2506
+#define IDS_PROF_LOAD_COMPLETE 0x2507
+#define IDS_E_PROF_BAD_PATH 0x2508
+#define IDS_E_PROF_NOTIFICATION_DISABLED 0x2509
+#define IDS_PROF_ALREADY_LOADED 0x250A
+#define IDS_E_PROF_NOTIFICATION_LIMIT_EXCEEDED 0x250B
+#define IDS_E_PROF_NOT_ATTACHABLE 0x250E
+#define IDS_E_PROF_UNHANDLED_EXCEPTION_ON_LOAD 0x250F
+#define IDS_PROF_ATTACH_REQUEST_RECEIVED 0x2512
+#define IDS_PROF_DETACH_INITIATED 0x2513
+#define IDS_PROF_DETACH_COMPLETE 0x2514
+#define IDS_PROF_DETACH_THREAD_ERROR 0x2515
+#define IDS_PROF_CANCEL_ACTIVATION 0x2516
+#define IDS_PROF_V2PROFILER_DISABLED 0x2517
+#define IDS_PROF_V2PROFILER_ENABLED 0x2518
+#define IDS_PROF_PROFILER_DISABLED 0x251A
+
+#define IDS_ER_CODECONTRACT_FAILED 0x251B
+#define IDS_ER_CODECONTRACT_DETAILMSG 0x251C
+
+#define IDS_E_PROF_TIMEOUT_WAITING_FOR_CONCURRENT_GC 0x251D
+
+#define IDS_EE_CANNOTCAST_NOMARSHAL 0x2629
+#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS)
+#define IDS_EE_NATIVE_COM_WEAKREF_BAD_TYPE 0x262e
+#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS
+
+#define IDS_HOST_ASSEMBLY_RESOLVER_ASSEMBLY_ALREADY_LOADED_IN_CONTEXT 0x2636
+#define IDS_HOST_ASSEMBLY_RESOLVER_DYNAMICALLY_EMITTED_ASSEMBLIES_UNSUPPORTED 0x2637
+
+#define IDS_NATIVE_IMAGE_CANNOT_BE_LOADED_MULTIPLE_TIMES 0x263a
+
+#define IDS_CLASSLOAD_BYREF_OR_BYREFLIKE_STATICFIELD 0x263b
+#define IDS_CLASSLOAD_BYREF_OR_BYREFLIKE_INSTANCEFIELD 0x263c
+#define IDS_EE_NDIRECT_LOADLIB_LINUX 0x263e
+#define IDS_EE_NDIRECT_LOADLIB_MAC 0x263f
+#define IDS_EE_NDIRECT_GETPROCADDRESS_UNIX 0x2640
+#define IDS_EE_ERROR_COM 0x2641
+
+#define IDS_EE_CANNOT_SET_INITONLY_STATIC_FIELD 0x2643
+
+#define IDS_EE_NDIRECT_GETPROCADDR_WIN_DLL 0x2644
+#define IDS_EE_NDIRECT_GETPROCADDR_UNIX_SO 0x2645
+#define IDS_EE_BADMARSHAL_STRING_OUT 0x2646
+#define IDS_EE_BADMARSHAL_COPYCTORRESTRICTION 0x2647
+#define IDS_EE_BADMARSHAL_DELEGATE_TLB_INTERFACE 0x2649
+#define IDS_EE_THREAD_APARTMENT_NOT_SUPPORTED 0x264A
+#define IDS_EE_NO_IINSPECTABLE 0x264B
+#define IDS_EE_BADMARSHAL_MARSHAL_DISABLED 0x264C
+#define IDS_EE_NDIRECT_DISABLEDMARSHAL_SETLASTERROR 0x264D
+#define IDS_EE_NDIRECT_DISABLEDMARSHAL_LCID 0x264E
+#define IDS_EE_NDIRECT_DISABLEDMARSHAL_PRESERVESIG 0x264F
+#define IDS_EE_NDIRECT_DISABLEDMARSHAL_VARARGS 0x2650
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//
+//
+// GC Object Pointer Location Series Stuff
+//
+
+
+
+#ifndef _GCDESC_H_
+#define _GCDESC_H_
+
+#ifdef HOST_64BIT
+typedef uint32_t HALF_SIZE_T;
+#else // HOST_64BIT
+typedef uint16_t HALF_SIZE_T;
+#endif
+
+
+typedef size_t *JSlot;
+
+
+//
+// These two classes make up the apparatus with which the object references
+// within an object can be found.
+//
+// CGCDescSeries:
+//
+// The CGCDescSeries class describes a series of object references within an
+// object by describing the size of the series (which has an adjustment which
+// will be explained later) and the starting point of the series.
+//
+// The series size is adjusted when the map is created by subtracting the
+// GetBaseSize() of the object. On retieval of the size the total size
+// of the object is added back. For non-array objects the total object
+// size is equal to the base size, so this returns the same value. For
+// array objects this will yield the size of the data portion of the array.
+// Since arrays containing object references will contain ONLY object references
+// this is a fast way of handling arrays and normal objects without a
+// conditional test
+//
+//
+//
+// CGCDesc:
+//
+// The CGCDesc is a collection of CGCDescSeries objects to describe all the
+// different runs of pointers in a particular object. <TODO> [add more on the strange
+// way the CGCDesc grows backwards in memory behind the MethodTable]
+//</TODO>
+
+struct val_serie_item
+{
+ HALF_SIZE_T nptrs;
+ HALF_SIZE_T skip;
+ void set_val_serie_item (HALF_SIZE_T nptrs, HALF_SIZE_T skip)
+ {
+ this->nptrs = nptrs;
+ this->skip = skip;
+ }
+};
+
+typedef DPTR(class CGCDescSeries) PTR_CGCDescSeries;
+typedef DPTR(class MethodTable) PTR_MethodTable;
+class CGCDescSeries
+{
+public:
+ union
+ {
+ size_t seriessize; // adjusted length of series (see above) in bytes
+ val_serie_item val_serie[1]; //coded serie for value class array
+ };
+
+ size_t startoffset;
+
+ size_t GetSeriesCount ()
+ {
+ return seriessize/sizeof(JSlot);
+ }
+
+ void SetSeriesCount (size_t newcount)
+ {
+ seriessize = newcount * sizeof(JSlot);
+ }
+
+ void IncSeriesCount (size_t increment = 1)
+ {
+ seriessize += increment * sizeof(JSlot);
+ }
+
+ size_t GetSeriesSize ()
+ {
+ return seriessize;
+ }
+
+ void SetSeriesSize (size_t newsize)
+ {
+ seriessize = newsize;
+ }
+
+ void SetSeriesValItem (val_serie_item item, int index)
+ {
+ val_serie [index] = item;
+ }
+
+ void SetSeriesOffset (size_t newoffset)
+ {
+ startoffset = newoffset;
+ }
+
+ size_t GetSeriesOffset ()
+ {
+ return startoffset;
+ }
+};
+
+
+
+
+
+typedef DPTR(class CGCDesc) PTR_CGCDesc;
+class CGCDesc
+{
+ // Don't construct me, you have to hand me a ptr to the *top* of my storage in Init.
+ CGCDesc () {}
+
+ //
+ // NOTE: for alignment reasons, NumSeries is stored as a size_t.
+ // This makes everything nicely 8-byte aligned on IA64.
+ //
+public:
+ static size_t ComputeSize (size_t NumSeries)
+ {
+ _ASSERTE (ptrdiff_t(NumSeries) > 0);
+
+ return sizeof(size_t) + NumSeries*sizeof(CGCDescSeries);
+ }
+
+ // For value type array
+ static size_t ComputeSizeRepeating (size_t NumSeries)
+ {
+ _ASSERTE (ptrdiff_t(NumSeries) > 0);
+
+ return sizeof(size_t) + sizeof(CGCDescSeries) +
+ (NumSeries-1)*sizeof(val_serie_item);
+ }
+
+#ifndef DACCESS_COMPILE
+ static void Init (void* mem, size_t NumSeries)
+ {
+ *((size_t*)mem-1) = NumSeries;
+ }
+
+ static void InitValueClassSeries (void* mem, size_t NumSeries)
+ {
+ *((ptrdiff_t*)mem-1) = -((ptrdiff_t)NumSeries);
+ }
+#endif
+
+ static PTR_CGCDesc GetCGCDescFromMT (MethodTable * pMT)
+ {
+ // If it doesn't contain pointers, there isn't a GCDesc
+ PTR_MethodTable mt(pMT);
+#ifndef SOS_INCLUDE
+ _ASSERTE(mt->ContainsGCPointers());
+#endif
+ return PTR_CGCDesc(mt);
+ }
+
+ size_t GetNumSeries ()
+ {
+ return *(PTR_size_t(PTR_CGCDesc(this))-1);
+ }
+
+ // Returns lowest series in memory.
+ // Cannot be used for valuetype arrays
+ PTR_CGCDescSeries GetLowestSeries ()
+ {
+ _ASSERTE (ptrdiff_t(GetNumSeries()) > 0);
+ return PTR_CGCDescSeries(PTR_uint8_t(PTR_CGCDesc(this))
+ - ComputeSize(GetNumSeries()));
+ }
+
+ // Returns highest series in memory.
+ PTR_CGCDescSeries GetHighestSeries ()
+ {
+ return PTR_CGCDescSeries(PTR_size_t(PTR_CGCDesc(this))-1)-1;
+ }
+
+ // Returns number of immediate pointers this object has. It should match the number of
+ // pointers enumerated by go_through_object_cl macro. The implementation shape has intentional
+ // similarity with the go_through_object family of macros.
+ // size is only used if you have an array of value types.
+#ifndef DACCESS_COMPILE
+ static size_t GetNumPointers (MethodTable* pMT, size_t ObjectSize, size_t NumComponents)
+ {
+ size_t NumOfPointers = 0;
+
+ if (pMT->ContainsGCPointers())
+ {
+ CGCDesc* map = GetCGCDescFromMT(pMT);
+ CGCDescSeries* cur = map->GetHighestSeries();
+ ptrdiff_t cnt = (ptrdiff_t)map->GetNumSeries();
+
+ if (cnt >= 0)
+ {
+ CGCDescSeries* last = map->GetLowestSeries();
+ do
+ {
+ NumOfPointers += (cur->GetSeriesSize() + ObjectSize) / sizeof(JSlot);
+ cur--;
+ }
+ while (cur >= last);
+ }
+ else
+ {
+ /* Handle the repeating case - array of valuetypes */
+ for (ptrdiff_t __i = 0; __i > cnt; __i--)
+ {
+ NumOfPointers += (cur->val_serie + __i)->nptrs;
+ }
+
+ NumOfPointers *= NumComponents;
+ }
+ }
+
+#ifndef FEATURE_NATIVEAOT
+ if (pMT->Collectible())
+ {
+ NumOfPointers += 1;
+ }
+#endif
+
+ return NumOfPointers;
+ }
+#endif
+
+ // Size of the entire slot map.
+ size_t GetSize ()
+ {
+ ptrdiff_t numSeries = (ptrdiff_t) GetNumSeries();
+ if (numSeries < 0)
+ {
+ return ComputeSizeRepeating(-numSeries);
+ }
+ else
+ {
+ return ComputeSize(numSeries);
+ }
+ }
+
+ uint8_t *GetStartOfGCData()
+ {
+ return ((uint8_t *)this) - GetSize();
+ }
+
+private:
+
+ BOOL IsValueClassSeries()
+ {
+ return ((ptrdiff_t) GetNumSeries()) < 0;
+ }
+
+};
+
+#define MAX_SIZE_FOR_VALUECLASS_IN_ARRAY 0xffff
+#define MAX_PTRS_FOR_VALUECLASSS_IN_ARRAY 0xffff
+
+
+#endif // _GCDESC_H_
* to the standard code-manager spec.
*/
+#if !defined(TARGET_UNIX) && !defined(SOS_INCLUDE)
+#include "utilcode.h" // For _ASSERTE()
+#endif
#include "gcdump.h"
/*****************************************************************************/
<ItemGroup>
<ClCompile Include="gcdump.cpp" />
<ClCompile Include="gcdumpnonx86.cpp" />
- <ClCompile Include="gcinfodecoder.cpp" />
- <ClCompile Include="gcinfodumper.cpp" />
<ClCompile Include="i386\gcdumpx86.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
</ClCompile>
<ClCompile Include="gcdump.cpp" />
<ClCompile Include="gcdumpnonx86.cpp" />
- <ClCompile Include="gcinfodecoder.cpp" />
- <ClCompile Include="gcinfodumper.cpp" />
</ItemGroup>
</Project>
\ No newline at end of file
static CHAR szRegName[16];
_snprintf_s(szRegName, ARRAY_SIZE(szRegName), sizeof(szRegName), "r%u", regnum);
return szRegName;
-
#elif defined(TARGET_LOONGARCH64)
switch (regnum)
{
),
0);
- if (NO_SECURITY_OBJECT != hdrdecoder.GetSecurityObjectStackSlot() ||
- NO_GENERICS_INST_CONTEXT != hdrdecoder.GetGenericsInstContextStackSlot() ||
+ if (NO_GENERICS_INST_CONTEXT != hdrdecoder.GetGenericsInstContextStackSlot() ||
NO_GS_COOKIE == hdrdecoder.GetGSCookieStackSlot())
{
gcPrintf("Prolog size: ");
gcPrintf("%d\n", prologSize);
}
- gcPrintf("Security object: ");
- if (NO_SECURITY_OBJECT == hdrdecoder.GetSecurityObjectStackSlot())
- {
- gcPrintf("<none>\n");
- }
- else
- {
- INT32 ofs = hdrdecoder.GetSecurityObjectStackSlot();
- char sign = '+';
-
- if (ofs < 0)
- {
- sign = '-';
- ofs = -ofs;
- }
-
- gcPrintf("caller.sp%c%x\n", sign, ofs);
- }
-
gcPrintf("GS cookie: ");
if (NO_GS_COOKIE == hdrdecoder.GetGSCookieStackSlot())
{
#define GET_CALLER_SP(pREGDISPLAY) ((size_t)GetSP(pREGDISPLAY->pCallerContext))
#define VALIDATE_OBJECTREF(objref, fDeep) ((void)0)
#define VALIDATE_ROOT(isInterior, hCallBack, pObjRef) ((void)0)
-#include "gcinfodecoder.cpp"
-#include "gcinfodumper.cpp"
+#include "../vm/gcinfodecoder.cpp"
+#include "../gcinfo/gcinfodumper.cpp"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#include "gcinfodecoder.h"
-
-#ifdef USE_GC_INFO_DECODER
-
-#ifndef CHECK_APP_DOMAIN
-#define CHECK_APP_DOMAIN 0
-#endif
-
-#ifndef GCINFODECODER_CONTRACT
-#define GCINFODECODER_CONTRACT LIMITED_METHOD_CONTRACT
-#endif // !GCINFODECODER_CONTRACT
-
-
-#ifndef GET_CALLER_SP
-#define GET_CALLER_SP(pREGDISPLAY) EECodeManager::GetCallerSp(pREGDISPLAY)
-#endif // !GET_CALLER_SP
-
-#ifndef VALIDATE_OBJECTREF
-#if defined(DACCESS_COMPILE)
-#define VALIDATE_OBJECTREF(objref, fDeep)
-#else // DACCESS_COMPILE
-#define VALIDATE_OBJECTREF(objref, fDeep) \
- do { \
- Object* objPtr = OBJECTREF_TO_UNCHECKED_OBJECTREF(objref); \
- if (objPtr) \
- { \
- objPtr->Validate(fDeep); \
- } \
- } while(0)
-#endif // DACCESS_COMPILE
-#endif // !VALIDATE_OBJECTREF
-
-#ifndef VALIDATE_ROOT
-#include "gcenv.h"
-#define VALIDATE_ROOT(isInterior, hCallBack, pObjRef) \
- do { \
- /* Only call Object::Validate() with bDeep == TRUE if we are in the promote phase. */ \
- /* We should call Validate() with bDeep == FALSE if we are in the relocation phase. */ \
- /* Actually with the introduction of the POPO feature, we cannot validate during */ \
- /* relocate because POPO might have written over the object. It will require non */ \
- /* trivial amount of work to make this work.*/ \
- \
- GCCONTEXT* pGCCtx = (GCCONTEXT*)(hCallBack); \
- \
- if (!(isInterior) && !(m_Flags & DECODE_NO_VALIDATION) && (pGCCtx->sc->promotion)) { \
- VALIDATE_OBJECTREF(*(pObjRef), pGCCtx->sc->promotion == TRUE); \
- } \
- } while (0)
-#endif // !VALIDATE_ROOT
-
-#ifndef LOG_PIPTR
-#define LOG_PIPTR(pObjRef, gcFlags, hCallBack) \
- { \
- GCCONTEXT* pGCCtx = (GCCONTEXT*)(hCallBack); \
- if (pGCCtx->sc->promotion) \
- { \
- LOG((LF_GCROOTS, LL_INFO1000, /* Part Three */ \
- LOG_PIPTR_OBJECT_CLASS(OBJECTREF_TO_UNCHECKED_OBJECTREF(*pObjRef), (gcFlags & GC_CALL_PINNED), (gcFlags & GC_CALL_INTERIOR)))); \
- } \
- else \
- { \
- LOG((LF_GCROOTS, LL_INFO1000, /* Part Three */ \
- LOG_PIPTR_OBJECT(OBJECTREF_TO_UNCHECKED_OBJECTREF(*pObjRef), (gcFlags & GC_CALL_PINNED), (gcFlags & GC_CALL_INTERIOR)))); \
- } \
- }
-#endif // !LOG_PIPTR
-
-bool GcInfoDecoder::SetIsInterruptibleCB (UINT32 startOffset, UINT32 stopOffset, void * hCallback)
-{
- GcInfoDecoder *pThis = (GcInfoDecoder*)hCallback;
-
-
- bool fStop = pThis->m_InstructionOffset >= startOffset && pThis->m_InstructionOffset < stopOffset;
-
- if (fStop)
- pThis->m_IsInterruptible = true;
-
- return fStop;
-}
-
-GcInfoDecoder::GcInfoDecoder(
- GCInfoToken gcInfoToken,
- GcInfoDecoderFlags flags,
- UINT32 breakOffset
- )
- : m_Reader(dac_cast<PTR_CBYTE>(gcInfoToken.Info))
- , m_InstructionOffset(breakOffset)
- , m_IsInterruptible(false)
- , m_ReturnKind(RT_Illegal)
-#ifdef _DEBUG
- , m_Flags( flags )
- , m_GcInfoAddress(dac_cast<PTR_CBYTE>(gcInfoToken.Info))
-#endif
- , m_Version(gcInfoToken.Version)
-{
- _ASSERTE( (flags & (DECODE_INTERRUPTIBILITY | DECODE_GC_LIFETIMES)) || (0 == breakOffset) );
-
- // The current implementation doesn't support the two flags together
- _ASSERTE(
- ((flags & (DECODE_INTERRUPTIBILITY | DECODE_GC_LIFETIMES)) != (DECODE_INTERRUPTIBILITY | DECODE_GC_LIFETIMES))
- );
-
- //--------------------------------------------
- // Pre-decode information
- //--------------------------------------------
-
- GcInfoHeaderFlags headerFlags;
- bool slimHeader = (m_Reader.ReadOneFast() == 0);
-
- if (slimHeader)
- {
- headerFlags = (GcInfoHeaderFlags)(m_Reader.ReadOneFast() ? GC_INFO_HAS_STACK_BASE_REGISTER : 0);
- }
- else
- {
- int numFlagBits = (m_Version == 1) ? GC_INFO_FLAGS_BIT_SIZE_VERSION_1 : GC_INFO_FLAGS_BIT_SIZE;
- headerFlags = (GcInfoHeaderFlags) m_Reader.Read(numFlagBits);
- }
-
- m_IsVarArg = headerFlags & GC_INFO_IS_VARARG;
- int hasSecurityObject = headerFlags & GC_INFO_HAS_SECURITY_OBJECT;
- int hasGSCookie = headerFlags & GC_INFO_HAS_GS_COOKIE;
- int hasPSPSym = headerFlags & GC_INFO_HAS_PSP_SYM;
- int hasGenericsInstContext = (headerFlags & GC_INFO_HAS_GENERICS_INST_CONTEXT_MASK) != GC_INFO_HAS_GENERICS_INST_CONTEXT_NONE;
- m_GenericSecretParamIsMD = (headerFlags & GC_INFO_HAS_GENERICS_INST_CONTEXT_MASK) == GC_INFO_HAS_GENERICS_INST_CONTEXT_MD;
- m_GenericSecretParamIsMT = (headerFlags & GC_INFO_HAS_GENERICS_INST_CONTEXT_MASK) == GC_INFO_HAS_GENERICS_INST_CONTEXT_MT;
- int hasStackBaseRegister = headerFlags & GC_INFO_HAS_STACK_BASE_REGISTER;
-#ifdef TARGET_AMD64
- m_WantsReportOnlyLeaf = ((headerFlags & GC_INFO_WANTS_REPORT_ONLY_LEAF) != 0);
-#elif defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
- m_HasTailCalls = ((headerFlags & GC_INFO_HAS_TAILCALLS) != 0);
-#endif // TARGET_AMD64
- int hasSizeOfEditAndContinuePreservedArea = headerFlags & GC_INFO_HAS_EDIT_AND_CONTINUE_PRESERVED_SLOTS;
- int hasReversePInvokeFrame = headerFlags & GC_INFO_REVERSE_PINVOKE_FRAME;
-
- int returnKindBits = (slimHeader) ? SIZE_OF_RETURN_KIND_IN_SLIM_HEADER : SIZE_OF_RETURN_KIND_IN_FAT_HEADER;
- m_ReturnKind =
- (ReturnKind)((UINT32)m_Reader.Read(returnKindBits));
-
- if (flags == DECODE_RETURN_KIND) {
- // Bail, if we've decoded enough,
- return;
- }
-
- m_CodeLength = (UINT32) DENORMALIZE_CODE_LENGTH((UINT32) m_Reader.DecodeVarLengthUnsigned(CODE_LENGTH_ENCBASE));
-
- if (flags == DECODE_CODE_LENGTH) {
- // Bail, if we've decoded enough,
- return;
- }
-
- if (hasGSCookie)
- {
- // Note that normalization as a code offset can be different than
- // normalization as code length
- UINT32 normCodeLength = NORMALIZE_CODE_OFFSET(m_CodeLength);
-
- // Decode prolog/epilog information
- UINT32 normPrologSize = (UINT32) m_Reader.DecodeVarLengthUnsigned(NORM_PROLOG_SIZE_ENCBASE) + 1;
- UINT32 normEpilogSize = (UINT32) m_Reader.DecodeVarLengthUnsigned(NORM_EPILOG_SIZE_ENCBASE);
-
- m_ValidRangeStart = (UINT32) DENORMALIZE_CODE_OFFSET(normPrologSize);
- m_ValidRangeEnd = (UINT32) DENORMALIZE_CODE_OFFSET(normCodeLength - normEpilogSize);
- _ASSERTE(m_ValidRangeStart < m_ValidRangeEnd);
- }
- else if (hasSecurityObject || hasGenericsInstContext)
- {
- // Decode prolog information
- UINT32 normPrologSize = (UINT32) m_Reader.DecodeVarLengthUnsigned(NORM_PROLOG_SIZE_ENCBASE) + 1;
- m_ValidRangeStart = (UINT32) DENORMALIZE_CODE_OFFSET(normPrologSize);
- // satisfy asserts that assume m_GSCookieValidRangeStart != 0 ==> m_GSCookieValidRangeStart < m_GSCookieValidRangeEnd
- m_ValidRangeEnd = m_ValidRangeStart + 1;
- }
- else
- {
- m_ValidRangeStart = m_ValidRangeEnd = 0;
- }
-
- if (flags == DECODE_PROLOG_LENGTH) {
- // Bail, if we've decoded enough,
- return;
- }
-
- // Decode the offset to the security object.
- if(hasSecurityObject)
- {
- m_SecurityObjectStackSlot = (INT32) DENORMALIZE_STACK_SLOT(m_Reader.DecodeVarLengthSigned(SECURITY_OBJECT_STACK_SLOT_ENCBASE));
- }
- else
- {
- m_SecurityObjectStackSlot = NO_SECURITY_OBJECT;
- }
-
- if (flags == DECODE_SECURITY_OBJECT) {
- // Bail, if we've decoded enough,
- return;
- }
-
- // Decode the offset to the GS cookie.
- if(hasGSCookie)
- {
- m_GSCookieStackSlot = (INT32) DENORMALIZE_STACK_SLOT(m_Reader.DecodeVarLengthSigned(GS_COOKIE_STACK_SLOT_ENCBASE));
- }
- else
- {
- m_GSCookieStackSlot = NO_GS_COOKIE;
- }
-
- if (flags == DECODE_GS_COOKIE) {
- // Bail, if we've decoded enough,
- return;
- }
-
- // Decode the offset to the PSPSym.
- // The PSPSym is relative to the caller SP on IA64 and the initial stack pointer before any stack allocation on X64 (InitialSP).
- if(hasPSPSym)
- {
- m_PSPSymStackSlot = (INT32) DENORMALIZE_STACK_SLOT(m_Reader.DecodeVarLengthSigned(PSP_SYM_STACK_SLOT_ENCBASE));
- }
- else
- {
- m_PSPSymStackSlot = NO_PSP_SYM;
- }
-
- if (flags == DECODE_PSP_SYM) {
- // Bail, if we've decoded enough,
- return;
- }
-
- // Decode the offset to the generics type context.
- if(hasGenericsInstContext)
- {
- m_GenericsInstContextStackSlot = (INT32) DENORMALIZE_STACK_SLOT(m_Reader.DecodeVarLengthSigned(GENERICS_INST_CONTEXT_STACK_SLOT_ENCBASE));
- }
- else
- {
- m_GenericsInstContextStackSlot = NO_GENERICS_INST_CONTEXT;
- }
-
- if (flags == DECODE_GENERICS_INST_CONTEXT) {
- // Bail, if we've decoded enough,
- return;
- }
-
- if(hasStackBaseRegister)
- {
- if (slimHeader)
- {
- m_StackBaseRegister = (UINT32) DENORMALIZE_STACK_BASE_REGISTER(0);
- }
- else
- {
- m_StackBaseRegister = (UINT32) DENORMALIZE_STACK_BASE_REGISTER(m_Reader.DecodeVarLengthUnsigned(STACK_BASE_REGISTER_ENCBASE));
- }
- }
- else
- {
- m_StackBaseRegister = NO_STACK_BASE_REGISTER;
- }
-
- if (hasSizeOfEditAndContinuePreservedArea)
- {
- m_SizeOfEditAndContinuePreservedArea = (UINT32) m_Reader.DecodeVarLengthUnsigned(SIZE_OF_EDIT_AND_CONTINUE_PRESERVED_AREA_ENCBASE);
- }
- else
- {
- m_SizeOfEditAndContinuePreservedArea = NO_SIZE_OF_EDIT_AND_CONTINUE_PRESERVED_AREA;
- }
-
- if (hasReversePInvokeFrame)
- {
- m_ReversePInvokeFrameStackSlot = (INT32)DENORMALIZE_STACK_SLOT(m_Reader.DecodeVarLengthSigned(REVERSE_PINVOKE_FRAME_ENCBASE));
- }
- else
- {
- m_ReversePInvokeFrameStackSlot = NO_REVERSE_PINVOKE_FRAME;
- }
-
-
-#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
- if (slimHeader)
- {
- m_SizeOfStackOutgoingAndScratchArea = 0;
- }
- else
- {
- m_SizeOfStackOutgoingAndScratchArea = (UINT32)DENORMALIZE_SIZE_OF_STACK_AREA(m_Reader.DecodeVarLengthUnsigned(SIZE_OF_STACK_AREA_ENCBASE));
- }
-#endif // FIXED_STACK_PARAMETER_SCRATCH_AREA
-
-#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
- m_NumSafePoints = (UINT32) DENORMALIZE_NUM_SAFE_POINTS(m_Reader.DecodeVarLengthUnsigned(NUM_SAFE_POINTS_ENCBASE));
-#endif
-
- if (slimHeader)
- {
- m_NumInterruptibleRanges = 0;
- }
- else
- {
- m_NumInterruptibleRanges = (UINT32) DENORMALIZE_NUM_INTERRUPTIBLE_RANGES(m_Reader.DecodeVarLengthUnsigned(NUM_INTERRUPTIBLE_RANGES_ENCBASE));
- }
-
-#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
- if(flags & (DECODE_INTERRUPTIBILITY | DECODE_GC_LIFETIMES))
- {
- if(m_NumSafePoints)
- {
- m_SafePointIndex = FindSafePoint(m_InstructionOffset);
- }
- else
- {
- m_SafePointIndex = 0;
- }
- }
- else if(flags & DECODE_FOR_RANGES_CALLBACK)
- {
- // Note that normalization as a code offset can be different than
- // normalization as code length
- UINT32 normCodeLength = NORMALIZE_CODE_OFFSET(m_CodeLength);
-
- UINT32 numBitsPerOffset = CeilOfLog2(normCodeLength);
- m_Reader.Skip(m_NumSafePoints * numBitsPerOffset);
- }
-#endif
-
- if(!m_IsInterruptible && (flags & DECODE_INTERRUPTIBILITY))
- {
- EnumerateInterruptibleRanges(&SetIsInterruptibleCB, this);
- }
-}
-
-bool GcInfoDecoder::IsInterruptible()
-{
- _ASSERTE( m_Flags & DECODE_INTERRUPTIBILITY );
- return m_IsInterruptible;
-}
-
-bool GcInfoDecoder::HasMethodDescGenericsInstContext()
-{
- _ASSERTE( m_Flags & DECODE_GENERICS_INST_CONTEXT );
- return m_GenericSecretParamIsMD;
-}
-
-bool GcInfoDecoder::HasMethodTableGenericsInstContext()
-{
- _ASSERTE( m_Flags & DECODE_GENERICS_INST_CONTEXT );
- return m_GenericSecretParamIsMT;
-}
-
-#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
-
-// This is used for gccoverage: is the given offset
-// a call-return offset with partially-interruptible GC info?
-bool GcInfoDecoder::IsSafePoint(UINT32 codeOffset)
-{
- _ASSERTE(m_Flags == DECODE_EVERYTHING && m_InstructionOffset == 0);
- if(m_NumSafePoints == 0)
- return false;
-
-#if defined(TARGET_AMD64) || defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
- // Safepoints are encoded with a -1 adjustment
- codeOffset--;
-#endif
- size_t savedPos = m_Reader.GetCurrentPos();
- UINT32 safePointIndex = FindSafePoint(codeOffset);
- m_Reader.SetCurrentPos(savedPos);
- return (bool) (safePointIndex != m_NumSafePoints);
-
-}
-
-UINT32 GcInfoDecoder::FindSafePoint(UINT32 breakOffset)
-{
- if(m_NumSafePoints == 0)
- return 0;
-
- const size_t savedPos = m_Reader.GetCurrentPos();
- const UINT32 numBitsPerOffset = CeilOfLog2(NORMALIZE_CODE_OFFSET(m_CodeLength));
- UINT32 result = m_NumSafePoints;
-
-#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
- // Safepoints are encoded with a -1 adjustment
- // but normalizing them masks off the low order bit
- // Thus only bother looking if the address is odd
- if ((breakOffset & 1) != 0)
-#endif
- {
- const UINT32 normBreakOffset = NORMALIZE_CODE_OFFSET(breakOffset);
-
- INT32 low = 0;
- INT32 high = (INT32)m_NumSafePoints;
-
- while(low < high)
- {
- const INT32 mid = (low+high)/2;
- _ASSERTE(mid >= 0 && mid < (INT32)m_NumSafePoints);
- m_Reader.SetCurrentPos(savedPos + (UINT32)mid * numBitsPerOffset);
- UINT32 normOffset = (UINT32)m_Reader.Read(numBitsPerOffset);
- if(normOffset == normBreakOffset)
- {
- result = (UINT32) mid;
- break;
- }
-
- if(normOffset < normBreakOffset)
- low = mid+1;
- else
- high = mid;
- }
- }
-
- m_Reader.SetCurrentPos(savedPos + m_NumSafePoints * numBitsPerOffset);
- return result;
-}
-
-void GcInfoDecoder::EnumerateSafePoints(EnumerateSafePointsCallback *pCallback, void * hCallback)
-{
- if(m_NumSafePoints == 0)
- return;
-
- const UINT32 numBitsPerOffset = CeilOfLog2(NORMALIZE_CODE_OFFSET(m_CodeLength));
-
- for(UINT32 i = 0; i < m_NumSafePoints; i++)
- {
- UINT32 normOffset = (UINT32)m_Reader.Read(numBitsPerOffset);
- UINT32 offset = DENORMALIZE_CODE_OFFSET(normOffset) + 2;
-
-#if defined(TARGET_AMD64) || defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
- // Safepoints are encoded with a -1 adjustment
- offset--;
-#endif
-
- pCallback(offset, hCallback);
- }
-}
-#endif
-
-void GcInfoDecoder::EnumerateInterruptibleRanges (
- EnumerateInterruptibleRangesCallback *pCallback,
- void * hCallback)
-{
- // If no info is found for the call site, we default to fully-interruptible
- LOG((LF_GCROOTS, LL_INFO1000000, "No GC info found for call site at offset %x. Defaulting to fully-interruptible information.\n", (int) m_InstructionOffset));
-
- UINT32 lastInterruptibleRangeStopOffsetNormalized = 0;
-
- for(UINT32 i=0; i<m_NumInterruptibleRanges; i++)
- {
- UINT32 normStartDelta = (UINT32) m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA1_ENCBASE );
- UINT32 normStopDelta = (UINT32) m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA2_ENCBASE ) + 1;
-
- UINT32 rangeStartOffsetNormalized = lastInterruptibleRangeStopOffsetNormalized + normStartDelta;
- UINT32 rangeStopOffsetNormalized = rangeStartOffsetNormalized + normStopDelta;
-
- UINT32 rangeStartOffset = DENORMALIZE_CODE_OFFSET(rangeStartOffsetNormalized);
- UINT32 rangeStopOffset = DENORMALIZE_CODE_OFFSET(rangeStopOffsetNormalized);
-
- bool fStop = pCallback(rangeStartOffset, rangeStopOffset, hCallback);
- if (fStop)
- return;
-
- lastInterruptibleRangeStopOffsetNormalized = rangeStopOffsetNormalized;
- }
-}
-
-INT32 GcInfoDecoder::GetSecurityObjectStackSlot()
-{
- _ASSERTE( m_Flags & DECODE_SECURITY_OBJECT );
- return m_SecurityObjectStackSlot;
-}
-
-INT32 GcInfoDecoder::GetGSCookieStackSlot()
-{
- _ASSERTE( m_Flags & DECODE_GS_COOKIE );
- return m_GSCookieStackSlot;
-}
-
-INT32 GcInfoDecoder::GetReversePInvokeFrameStackSlot()
-{
- _ASSERTE(m_Flags & DECODE_REVERSE_PINVOKE_VAR);
- return m_ReversePInvokeFrameStackSlot;
-}
-
-UINT32 GcInfoDecoder::GetGSCookieValidRangeStart()
-{
- _ASSERTE( m_Flags & DECODE_GS_COOKIE );
- return m_ValidRangeStart;
-}
-UINT32 GcInfoDecoder::GetGSCookieValidRangeEnd()
-{
- _ASSERTE( m_Flags & DECODE_GS_COOKIE );
- return m_ValidRangeEnd;
-}
-
-UINT32 GcInfoDecoder::GetPrologSize()
-{
- _ASSERTE( m_Flags & DECODE_PROLOG_LENGTH );
-
- return m_ValidRangeStart;
-}
-
-INT32 GcInfoDecoder::GetGenericsInstContextStackSlot()
-{
- _ASSERTE( m_Flags & DECODE_GENERICS_INST_CONTEXT );
- return m_GenericsInstContextStackSlot;
-}
-
-INT32 GcInfoDecoder::GetPSPSymStackSlot()
-{
- _ASSERTE( m_Flags & DECODE_PSP_SYM );
- return m_PSPSymStackSlot;
-}
-
-bool GcInfoDecoder::GetIsVarArg()
-{
- _ASSERTE( m_Flags & DECODE_VARARG );
- return m_IsVarArg;
-}
-
-#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
-bool GcInfoDecoder::HasTailCalls()
-{
- _ASSERTE( m_Flags & DECODE_HAS_TAILCALLS );
- return m_HasTailCalls;
-}
-#endif // TARGET_ARM || TARGET_ARM64 || defined(TARGET_LOONGARCH64) || TARGET_RISCV64
-
-bool GcInfoDecoder::WantsReportOnlyLeaf()
-{
- // Only AMD64 with JIT64 can return false here.
-#ifdef TARGET_AMD64
- return m_WantsReportOnlyLeaf;
-#else
- return true;
-#endif
-}
-
-UINT32 GcInfoDecoder::GetCodeLength()
-{
-// SUPPORTS_DAC;
- _ASSERTE( m_Flags & DECODE_CODE_LENGTH );
- return m_CodeLength;
-}
-
-ReturnKind GcInfoDecoder::GetReturnKind()
-{
- // SUPPORTS_DAC;
- _ASSERTE( m_Flags & DECODE_RETURN_KIND );
- return m_ReturnKind;
-}
-
-UINT32 GcInfoDecoder::GetStackBaseRegister()
-{
- return m_StackBaseRegister;
-}
-
-UINT32 GcInfoDecoder::GetSizeOfEditAndContinuePreservedArea()
-{
- _ASSERTE( m_Flags & DECODE_EDIT_AND_CONTINUE );
- return m_SizeOfEditAndContinuePreservedArea;
-}
-
-size_t GcInfoDecoder::GetNumBytesRead()
-{
- return (m_Reader.GetCurrentPos() + 7) / 8;
-}
-
-
-#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
-
-UINT32 GcInfoDecoder::GetSizeOfStackParameterArea()
-{
- return m_SizeOfStackOutgoingAndScratchArea;
-}
-
-#endif // FIXED_STACK_PARAMETER_SCRATCH_AREA
-
-
-bool GcInfoDecoder::EnumerateLiveSlots(
- PREGDISPLAY pRD,
- bool reportScratchSlots,
- unsigned inputFlags,
- GCEnumCallback pCallBack,
- void * hCallBack
- )
-{
-
- unsigned executionAborted = (inputFlags & ExecutionAborted);
-
- // In order to make ARM more x86-like we only ever report the leaf frame
- // of any given function. We accomplish this by having the stackwalker
- // pass a flag whenever walking the frame of a method where it has
- // previously visited a child funclet
- if (WantsReportOnlyLeaf() && (inputFlags & ParentOfFuncletStackFrame))
- {
- LOG((LF_GCROOTS, LL_INFO100000, "Not reporting this frame because it was already reported via another funclet.\n"));
- return true;
- }
-
- //
- // If this is a non-leaf frame and we are executing a call, the unwinder has given us the PC
- // of the call instruction. We should adjust it to the PC of the instruction after the call in order to
- // obtain transition information for scratch slots. However, we always assume scratch slots to be
- // dead for non-leaf frames (except for ResumableFrames), so we don't need to adjust the PC.
- // If this is a non-leaf frame and we are not executing a call (i.e.: a fault occurred in the function),
- // then it would be incorrect to adjust the PC
- //
-
- _ASSERTE(GC_SLOT_INTERIOR == GC_CALL_INTERIOR);
- _ASSERTE(GC_SLOT_PINNED == GC_CALL_PINNED);
-
- _ASSERTE( m_Flags & DECODE_GC_LIFETIMES );
-
- GcSlotDecoder slotDecoder;
-
- UINT32 normBreakOffset = NORMALIZE_CODE_OFFSET(m_InstructionOffset);
-
- // Normalized break offset
- // Relative to interruptible ranges #if PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
-#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
- UINT32 pseudoBreakOffset = 0;
- UINT32 numInterruptibleLength = 0;
-#else
- UINT32 pseudoBreakOffset = normBreakOffset;
- UINT32 numInterruptibleLength = NORMALIZE_CODE_OFFSET(m_CodeLength);
-#endif
-
-
-#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
- bool noTrackedRefs = false;
-
- if(m_SafePointIndex < m_NumSafePoints && !executionAborted)
- {
- // Skip interruptibility information
- for(UINT32 i=0; i<m_NumInterruptibleRanges; i++)
- {
- m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA1_ENCBASE );
- m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA2_ENCBASE );
- }
- }
- else
- {
- //
- // We didn't find the break offset in the list of call sites
- // or we are in an executionAborted frame
- // So either we have fully-interruptible information,
- // or execution will not resume at the current method
- // and nothing should be reported
- //
- if(!executionAborted)
- {
- if(m_NumInterruptibleRanges == 0)
- {
- // No ranges and no explicit safepoint - must be MinOpts with untracked refs.
- noTrackedRefs = true;
- }
- }
-
- if(m_NumInterruptibleRanges != 0)
- {
- int countIntersections = 0;
- UINT32 lastNormStop = 0;
- for(UINT32 i=0; i<m_NumInterruptibleRanges; i++)
- {
- UINT32 normStartDelta = (UINT32) m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA1_ENCBASE );
- UINT32 normStopDelta = (UINT32) m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA2_ENCBASE ) + 1;
-
- UINT32 normStart = lastNormStop + normStartDelta;
- UINT32 normStop = normStart + normStopDelta;
- if(normBreakOffset >= normStart && normBreakOffset < normStop)
- {
- _ASSERTE(pseudoBreakOffset == 0);
- countIntersections++;
- pseudoBreakOffset = numInterruptibleLength + normBreakOffset - normStart;
- }
- numInterruptibleLength += normStopDelta;
- lastNormStop = normStop;
- }
- _ASSERTE(countIntersections <= 1);
- if(countIntersections == 0)
- {
- _ASSERTE(executionAborted);
- LOG((LF_GCROOTS, LL_INFO100000, "Not reporting this frame because it is aborted and not fully interruptible.\n"));
- goto ExitSuccess;
- }
- }
- }
-#else // !PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
-
- // Skip interruptibility information
- for(UINT32 i=0; i<m_NumInterruptibleRanges; i++)
- {
- m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA1_ENCBASE );
- m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA2_ENCBASE );
- }
-#endif
-
-
- //------------------------------------------------------------------------------
- // Read the slot table
- //------------------------------------------------------------------------------
-
-
- slotDecoder.DecodeSlotTable(m_Reader);
-
- {
- UINT32 numSlots = slotDecoder.GetNumTracked();
-
- if(!numSlots)
- goto ReportUntracked;
-
-#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
-
- UINT32 numBitsPerOffset = 0;
- // Duplicate the encoder's heuristic to determine if we have indirect live
- // slot table (similar to the chunk pointers)
- if ((m_NumSafePoints > 0) && m_Reader.ReadOneFast())
- {
- numBitsPerOffset = (UINT32) m_Reader.DecodeVarLengthUnsigned(POINTER_SIZE_ENCBASE) + 1;
- _ASSERTE(numBitsPerOffset != 0);
- }
-
- //------------------------------------------------------------------------------
- // Try partially interruptible first
- //------------------------------------------------------------------------------
-
- if( !executionAborted && m_SafePointIndex != m_NumSafePoints )
- {
- if (numBitsPerOffset)
- {
- const size_t offsetTablePos = m_Reader.GetCurrentPos();
- m_Reader.Skip(m_SafePointIndex * numBitsPerOffset);
- const size_t liveStatesOffset = m_Reader.Read(numBitsPerOffset);
- const size_t liveStatesStart = ((offsetTablePos + m_NumSafePoints * numBitsPerOffset + 7) & (~7));
- m_Reader.SetCurrentPos(liveStatesStart + liveStatesOffset);
- if (m_Reader.ReadOneFast()) {
- // RLE encoded
- bool fSkip = (m_Reader.ReadOneFast() == 0);
- bool fReport = true;
- UINT32 readSlots = (UINT32)m_Reader.DecodeVarLengthUnsigned( fSkip ? LIVESTATE_RLE_SKIP_ENCBASE : LIVESTATE_RLE_RUN_ENCBASE );
- fSkip = !fSkip;
- while (readSlots < numSlots)
- {
- UINT32 cnt = (UINT32)m_Reader.DecodeVarLengthUnsigned( fSkip ? LIVESTATE_RLE_SKIP_ENCBASE : LIVESTATE_RLE_RUN_ENCBASE ) + 1;
- if (fReport)
- {
- for(UINT32 slotIndex = readSlots; slotIndex < readSlots + cnt; slotIndex++)
- {
- ReportSlotToGC(slotDecoder,
- slotIndex,
- pRD,
- reportScratchSlots,
- inputFlags,
- pCallBack,
- hCallBack
- );
- }
- }
- readSlots += cnt;
- fSkip = !fSkip;
- fReport = !fReport;
- }
- _ASSERTE(readSlots == numSlots);
- goto ReportUntracked;
- }
- // Just a normal live state (1 bit per slot), so use the normal decoding loop
- }
- else
- {
- m_Reader.Skip(m_SafePointIndex * numSlots);
- }
-
- for(UINT32 slotIndex = 0; slotIndex < numSlots; slotIndex++)
- {
- if(m_Reader.ReadOneFast())
- {
- ReportSlotToGC(
- slotDecoder,
- slotIndex,
- pRD,
- reportScratchSlots,
- inputFlags,
- pCallBack,
- hCallBack
- );
- }
- }
- goto ReportUntracked;
- }
- else
- {
- m_Reader.Skip(m_NumSafePoints * numSlots);
- if(m_NumInterruptibleRanges == 0)
- goto ReportUntracked;
- }
-#endif // PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
-
- _ASSERTE(m_NumInterruptibleRanges);
- _ASSERTE(numInterruptibleLength);
-
- // If no info is found for the call site, we default to fully-interruptible
- LOG((LF_GCROOTS, LL_INFO1000000, "No GC info found for call site at offset %x. Defaulting to fully-interruptible information.\n", (int) m_InstructionOffset));
-
- UINT32 numChunks = (numInterruptibleLength + NUM_NORM_CODE_OFFSETS_PER_CHUNK - 1) / NUM_NORM_CODE_OFFSETS_PER_CHUNK;
- UINT32 breakChunk = pseudoBreakOffset / NUM_NORM_CODE_OFFSETS_PER_CHUNK;
- _ASSERTE(breakChunk < numChunks);
-
- UINT32 numBitsPerPointer = (UINT32) m_Reader.DecodeVarLengthUnsigned(POINTER_SIZE_ENCBASE);
-
- if(!numBitsPerPointer)
- goto ReportUntracked;
-
- size_t pointerTablePos = m_Reader.GetCurrentPos();
-
- size_t chunkPointer;
- UINT32 chunk = breakChunk;
- for(;;)
- {
- m_Reader.SetCurrentPos(pointerTablePos + chunk * numBitsPerPointer);
- chunkPointer = m_Reader.Read(numBitsPerPointer);
- if(chunkPointer)
- break;
-
- if(chunk-- == 0)
- goto ReportUntracked;
- }
-
- size_t chunksStartPos = ((pointerTablePos + numChunks * numBitsPerPointer + 7) & (~7));
- size_t chunkPos = chunksStartPos + chunkPointer - 1;
- m_Reader.SetCurrentPos(chunkPos);
-
- {
- BitStreamReader couldBeLiveReader(m_Reader);
-
- UINT32 numCouldBeLiveSlots = 0;
- // A potentially compressed bit vector of which slots have any lifetimes
- if (m_Reader.ReadOneFast())
- {
- // RLE encoded
- bool fSkip = (m_Reader.ReadOneFast() == 0);
- bool fReport = true;
- UINT32 readSlots = (UINT32)m_Reader.DecodeVarLengthUnsigned( fSkip ? LIVESTATE_RLE_SKIP_ENCBASE : LIVESTATE_RLE_RUN_ENCBASE );
- fSkip = !fSkip;
- while (readSlots < numSlots)
- {
- UINT32 cnt = (UINT32)m_Reader.DecodeVarLengthUnsigned( fSkip ? LIVESTATE_RLE_SKIP_ENCBASE : LIVESTATE_RLE_RUN_ENCBASE ) + 1;
- if (fReport)
- {
- numCouldBeLiveSlots += cnt;
- }
- readSlots += cnt;
- fSkip = !fSkip;
- fReport = !fReport;
- }
- _ASSERTE(readSlots == numSlots);
-
- }
- else
- {
- for(UINT32 i = 0; i < numSlots; i++)
- {
- if(m_Reader.ReadOneFast())
- numCouldBeLiveSlots++;
- }
- }
- _ASSERTE(numCouldBeLiveSlots > 0);
-
- BitStreamReader finalStateReader(m_Reader);
-
- m_Reader.Skip(numCouldBeLiveSlots);
-
- int lifetimeTransitionsCount = 0;
-
- UINT32 slotIndex = 0;
- bool fSimple = (couldBeLiveReader.ReadOneFast() == 0);
- bool fSkipFirst = false; // silence the warning
- UINT32 cnt = 0;
- if (!fSimple)
- {
- fSkipFirst = (couldBeLiveReader.ReadOneFast() == 0);
- slotIndex = -1;
- }
- for(UINT32 i = 0; i < numCouldBeLiveSlots; i++)
- {
- if (fSimple)
- {
- while(!couldBeLiveReader.ReadOneFast())
- slotIndex++;
- }
- else if (cnt > 0)
- {
- // We have more from the last run to report
- cnt--;
- }
- // We need to find a new run
- else if (fSkipFirst)
- {
- UINT32 tmp = (UINT32)couldBeLiveReader.DecodeVarLengthUnsigned( LIVESTATE_RLE_SKIP_ENCBASE ) + 1;
- slotIndex += tmp;
- cnt = (UINT32)couldBeLiveReader.DecodeVarLengthUnsigned( LIVESTATE_RLE_RUN_ENCBASE );
- }
- else
- {
- UINT32 tmp = (UINT32)couldBeLiveReader.DecodeVarLengthUnsigned( LIVESTATE_RLE_RUN_ENCBASE ) + 1;
- slotIndex += tmp;
- cnt = (UINT32)couldBeLiveReader.DecodeVarLengthUnsigned( LIVESTATE_RLE_SKIP_ENCBASE );
- }
-
- UINT32 isLive = (UINT32) finalStateReader.Read(1);
-
- if(chunk == breakChunk)
- {
- // Read transitions
- UINT32 normBreakOffsetDelta = pseudoBreakOffset % NUM_NORM_CODE_OFFSETS_PER_CHUNK;
- for(;;)
- {
- if(!m_Reader.ReadOneFast())
- break;
-
- UINT32 transitionOffset = (UINT32) m_Reader.Read(NUM_NORM_CODE_OFFSETS_PER_CHUNK_LOG2);
-
- lifetimeTransitionsCount++;
- _ASSERTE(transitionOffset && transitionOffset < NUM_NORM_CODE_OFFSETS_PER_CHUNK);
- if(transitionOffset > normBreakOffsetDelta)
- {
- isLive ^= 1;
- }
- }
- }
-
- if(isLive)
- {
- ReportSlotToGC(
- slotDecoder,
- slotIndex,
- pRD,
- reportScratchSlots,
- inputFlags,
- pCallBack,
- hCallBack
- );
- }
-
- slotIndex++;
- }
-
- LOG((LF_GCROOTS, LL_INFO1000000, "Decoded %d lifetime transitions.\n", (int) lifetimeTransitionsCount ));
- }
- }
-
-ReportUntracked:
-
- //------------------------------------------------------------------------------
- // Last report anything untracked
- // But only for the leaf funclet/frame
- // Turned on in the VM for regular GC reporting and the DAC for !CLRStack -gc
- // But turned off in the #includes for nidump and sos's !u -gcinfo and !gcinfo
- //------------------------------------------------------------------------------
-
- if (slotDecoder.GetNumUntracked() && !(inputFlags & (ParentOfFuncletStackFrame | NoReportUntracked)))
- {
- ReportUntrackedSlots(slotDecoder, pRD, inputFlags, pCallBack, hCallBack);
- }
-
-ExitSuccess:
-
- return true;
-}
-
-void GcInfoDecoder::EnumerateUntrackedSlots(
- PREGDISPLAY pRD,
- unsigned inputFlags,
- GCEnumCallback pCallBack,
- void * hCallBack
- )
-{
- _ASSERTE(GC_SLOT_INTERIOR == GC_CALL_INTERIOR);
- _ASSERTE(GC_SLOT_PINNED == GC_CALL_PINNED);
-
- _ASSERTE( m_Flags & DECODE_GC_LIFETIMES );
-
- GcSlotDecoder slotDecoder;
-
- // Skip interruptibility information
- for(UINT32 i=0; i<m_NumInterruptibleRanges; i++)
- {
- m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA1_ENCBASE );
- m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA2_ENCBASE );
- }
-
- //------------------------------------------------------------------------------
- // Read the slot table
- //------------------------------------------------------------------------------
-
- slotDecoder.DecodeSlotTable(m_Reader);
-
- if (slotDecoder.GetNumUntracked())
- {
- ReportUntrackedSlots(slotDecoder, pRD, inputFlags, pCallBack, hCallBack);
- }
-}
-
-void GcInfoDecoder::ReportUntrackedSlots(
- GcSlotDecoder& slotDecoder,
- PREGDISPLAY pRD,
- unsigned inputFlags,
- GCEnumCallback pCallBack,
- void * hCallBack
- )
-{
- for(UINT32 slotIndex = slotDecoder.GetNumTracked(); slotIndex < slotDecoder.GetNumSlots(); slotIndex++)
- {
- ReportSlotToGC(slotDecoder,
- slotIndex,
- pRD,
- true, // Report everything (although there should *never* be any scratch slots that are untracked)
- inputFlags,
- pCallBack,
- hCallBack
- );
- }
-}
-
-void GcSlotDecoder::DecodeSlotTable(BitStreamReader& reader)
-{
- if (reader.ReadOneFast())
- {
- m_NumRegisters = (UINT32) reader.DecodeVarLengthUnsigned(NUM_REGISTERS_ENCBASE);
- }
- else
- {
- m_NumRegisters = 0;
- }
- UINT32 numStackSlots;
- if (reader.ReadOneFast())
- {
- numStackSlots = (UINT32) reader.DecodeVarLengthUnsigned(NUM_STACK_SLOTS_ENCBASE);
- m_NumUntracked = (UINT32) reader.DecodeVarLengthUnsigned(NUM_UNTRACKED_SLOTS_ENCBASE);
- }
- else
- {
- numStackSlots = 0;
- m_NumUntracked = 0;
- }
- m_NumSlots = m_NumRegisters + numStackSlots + m_NumUntracked;
-
- UINT32 i = 0;
-
- if(m_NumRegisters > 0)
- {
- // We certainly predecode the first register
-
- _ASSERTE(i < MAX_PREDECODED_SLOTS);
-
- UINT32 normRegNum = (UINT32) reader.DecodeVarLengthUnsigned(REGISTER_ENCBASE);
- UINT32 regNum = DENORMALIZE_REGISTER(normRegNum);
- GcSlotFlags flags = (GcSlotFlags) reader.Read(2);
-
- m_SlotArray[0].Slot.RegisterNumber = regNum;
- m_SlotArray[0].Flags = flags;
-
- UINT32 loopEnd = _min(m_NumRegisters, MAX_PREDECODED_SLOTS);
- for(i++; i < loopEnd; i++)
- {
- if(flags)
- {
- normRegNum = (UINT32) reader.DecodeVarLengthUnsigned(REGISTER_ENCBASE);
- regNum = DENORMALIZE_REGISTER(normRegNum);
- flags = (GcSlotFlags) reader.Read(2);
- }
- else
- {
- UINT32 normRegDelta = (UINT32) reader.DecodeVarLengthUnsigned(REGISTER_DELTA_ENCBASE) + 1;
- normRegNum += normRegDelta;
- regNum = DENORMALIZE_REGISTER(normRegNum);
- }
-
- m_SlotArray[i].Slot.RegisterNumber = regNum;
- m_SlotArray[i].Flags = flags;
- }
- }
-
- if((numStackSlots > 0) && (i < MAX_PREDECODED_SLOTS))
- {
- // We have stack slots left and more room to predecode
-
- GcStackSlotBase spBase = (GcStackSlotBase) reader.Read(2);
- UINT32 normSpOffset = (INT32) reader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
- INT32 spOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
- GcSlotFlags flags = (GcSlotFlags) reader.Read(2);
-
- m_SlotArray[i].Slot.Stack.SpOffset = spOffset;
- m_SlotArray[i].Slot.Stack.Base = spBase;
- m_SlotArray[i].Flags = flags;
-
- UINT32 loopEnd = _min(m_NumRegisters + numStackSlots, MAX_PREDECODED_SLOTS);
- for(i++; i < loopEnd; i++)
- {
- spBase = (GcStackSlotBase) reader.Read(2);
-
- if(flags)
- {
- normSpOffset = (INT32) reader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
- spOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
- flags = (GcSlotFlags) reader.Read(2);
- }
- else
- {
- INT32 normSpOffsetDelta = (INT32) reader.DecodeVarLengthUnsigned(STACK_SLOT_DELTA_ENCBASE);
- normSpOffset += normSpOffsetDelta;
- spOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
- }
-
- m_SlotArray[i].Slot.Stack.SpOffset = spOffset;
- m_SlotArray[i].Slot.Stack.Base = spBase;
- m_SlotArray[i].Flags = flags;
- }
- }
-
- if((m_NumUntracked > 0) && (i < MAX_PREDECODED_SLOTS))
- {
- // We have untracked stack slots left and more room to predecode
-
- GcStackSlotBase spBase = (GcStackSlotBase) reader.Read(2);
- UINT32 normSpOffset = (INT32) reader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
- INT32 spOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
- GcSlotFlags flags = (GcSlotFlags) reader.Read(2);
-
- m_SlotArray[i].Slot.Stack.SpOffset = spOffset;
- m_SlotArray[i].Slot.Stack.Base = spBase;
- m_SlotArray[i].Flags = flags;
-
- UINT32 loopEnd = _min(m_NumSlots, MAX_PREDECODED_SLOTS);
- for(i++; i < loopEnd; i++)
- {
- spBase = (GcStackSlotBase) reader.Read(2);
-
- if(flags)
- {
- normSpOffset = (INT32) reader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
- spOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
- flags = (GcSlotFlags) reader.Read(2);
- }
- else
- {
- INT32 normSpOffsetDelta = (INT32) reader.DecodeVarLengthUnsigned(STACK_SLOT_DELTA_ENCBASE);
- normSpOffset += normSpOffsetDelta;
- spOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
- }
-
- m_SlotArray[i].Slot.Stack.SpOffset = spOffset;
- m_SlotArray[i].Slot.Stack.Base = spBase;
- m_SlotArray[i].Flags = flags;
- }
- }
-
- // Done pre-decoding
-
- if(i < m_NumSlots)
- {
- // Prepare for lazy decoding
-
- _ASSERTE(i == MAX_PREDECODED_SLOTS);
- m_NumDecodedSlots = i;
- m_pLastSlot = &m_SlotArray[MAX_PREDECODED_SLOTS - 1];
-
- m_SlotReader = reader;
-
- // Move the argument reader past the end of the table
-
- GcSlotFlags flags = m_pLastSlot->Flags;
-
- // Skip any remaining registers
-
- for(; i < m_NumRegisters; i++)
- {
- if(flags)
- {
- reader.DecodeVarLengthUnsigned(REGISTER_ENCBASE);
- flags = (GcSlotFlags) reader.Read(2);
- }
- else
- {
- reader.DecodeVarLengthUnsigned(REGISTER_DELTA_ENCBASE);
- }
- }
-
- if(numStackSlots > 0)
- {
- if(i == m_NumRegisters)
- {
- // Skip the first stack slot
-
- reader.Read(2);
- reader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
- flags = (GcSlotFlags) reader.Read(2);
- i++;
- }
-
- // Skip any remaining stack slots
-
- const UINT32 loopEnd = m_NumRegisters + numStackSlots;
- for(; i < loopEnd; i++)
- {
- reader.Read(2);
-
- if(flags)
- {
- reader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
- flags = (GcSlotFlags) reader.Read(2);
- }
- else
- {
- reader.DecodeVarLengthUnsigned(STACK_SLOT_DELTA_ENCBASE);
- }
- }
- }
-
- if(m_NumUntracked > 0)
- {
- if(i == m_NumRegisters + numStackSlots)
- {
- // Skip the first untracked slot
-
- reader.Read(2);
- reader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
- flags = (GcSlotFlags) reader.Read(2);
- i++;
- }
-
- // Skip any remaining untracked slots
-
- for(; i < m_NumSlots; i++)
- {
- reader.Read(2);
-
- if(flags)
- {
- reader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
- flags = (GcSlotFlags) reader.Read(2);
- }
- else
- {
- reader.DecodeVarLengthUnsigned(STACK_SLOT_DELTA_ENCBASE);
- }
- }
- }
- }
-}
-
-const GcSlotDesc* GcSlotDecoder::GetSlotDesc(UINT32 slotIndex)
-{
- _ASSERTE(slotIndex < m_NumSlots);
-
- if(slotIndex < MAX_PREDECODED_SLOTS)
- {
- return &m_SlotArray[slotIndex];
- }
-
- _ASSERTE(m_NumDecodedSlots >= MAX_PREDECODED_SLOTS && m_NumDecodedSlots < m_NumSlots);
- _ASSERTE(m_NumDecodedSlots <= slotIndex);
-
- while(m_NumDecodedSlots <= slotIndex)
- {
- if(m_NumDecodedSlots < m_NumRegisters)
- {
- //
- // Decode a register
- //
-
- if(m_NumDecodedSlots == 0)
- {
- // Decode the first register
- UINT32 normRegNum = (UINT32) m_SlotReader.DecodeVarLengthUnsigned(REGISTER_ENCBASE);
- m_pLastSlot->Slot.RegisterNumber = DENORMALIZE_REGISTER(normRegNum);
- m_pLastSlot->Flags = (GcSlotFlags) m_SlotReader.Read(2);
- }
- else
- {
- if(m_pLastSlot->Flags)
- {
- UINT32 normRegNum = (UINT32) m_SlotReader.DecodeVarLengthUnsigned(REGISTER_ENCBASE);
- m_pLastSlot->Slot.RegisterNumber = DENORMALIZE_REGISTER(normRegNum);
- m_pLastSlot->Flags = (GcSlotFlags) m_SlotReader.Read(2);
- }
- else
- {
- UINT32 normRegDelta = (UINT32) m_SlotReader.DecodeVarLengthUnsigned(REGISTER_DELTA_ENCBASE) + 1;
- UINT32 normRegNum = normRegDelta + NORMALIZE_REGISTER(m_pLastSlot->Slot.RegisterNumber);
- m_pLastSlot->Slot.RegisterNumber = DENORMALIZE_REGISTER(normRegNum);
- }
- }
- }
- else
- {
- //
- // Decode a stack slot
- //
-
- if((m_NumDecodedSlots == m_NumRegisters) || (m_NumDecodedSlots == GetNumTracked()))
- {
- // Decode the first stack slot or first untracked slot
- m_pLastSlot->Slot.Stack.Base = (GcStackSlotBase) m_SlotReader.Read(2);
- UINT32 normSpOffset = (INT32) m_SlotReader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
- m_pLastSlot->Slot.Stack.SpOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
- m_pLastSlot->Flags = (GcSlotFlags) m_SlotReader.Read(2);
- }
- else
- {
- m_pLastSlot->Slot.Stack.Base = (GcStackSlotBase) m_SlotReader.Read(2);
-
- if(m_pLastSlot->Flags)
- {
- INT32 normSpOffset = (INT32) m_SlotReader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
- m_pLastSlot->Slot.Stack.SpOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
- m_pLastSlot->Flags = (GcSlotFlags) m_SlotReader.Read(2);
- }
- else
- {
- INT32 normSpOffsetDelta = (INT32) m_SlotReader.DecodeVarLengthUnsigned(STACK_SLOT_DELTA_ENCBASE);
- INT32 normSpOffset = normSpOffsetDelta + NORMALIZE_STACK_SLOT(m_pLastSlot->Slot.Stack.SpOffset);
- m_pLastSlot->Slot.Stack.SpOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
- }
- }
- }
-
- m_NumDecodedSlots++;
- }
-
- return m_pLastSlot;
-}
-
-
-//-----------------------------------------------------------------------------
-// Platform-specific methods
-//-----------------------------------------------------------------------------
-
-#if defined(TARGET_AMD64)
-
-
-OBJECTREF* GcInfoDecoder::GetRegisterSlot(
- int regNum,
- PREGDISPLAY pRD
- )
-{
- _ASSERTE(regNum >= 0 && regNum <= 16);
- _ASSERTE(regNum != 4); // rsp
-
-#ifdef FEATURE_REDHAWK
- PTR_UIntNative* ppRax = &pRD->pRax;
- if (regNum > 4) regNum--; // rsp is skipped in Redhawk RegDisplay
-#else
- // The fields of KNONVOLATILE_CONTEXT_POINTERS are in the same order as
- // the processor encoding numbers.
-
- ULONGLONG **ppRax = &pRD->pCurrentContextPointers->Rax;
-#endif
-
- return (OBJECTREF*)*(ppRax + regNum);
-}
-
-#if defined(TARGET_UNIX) && !defined(FEATURE_REDHAWK)
-OBJECTREF* GcInfoDecoder::GetCapturedRegister(
- int regNum,
- PREGDISPLAY pRD
- )
-{
- _ASSERTE(regNum >= 0 && regNum <= 16);
- _ASSERTE(regNum != 4); // rsp
-
- // The fields of CONTEXT are in the same order as
- // the processor encoding numbers.
-
- ULONGLONG *pRax = &pRD->pCurrentContext->Rax;
-
- return (OBJECTREF*)(pRax + regNum);
-}
-#endif // TARGET_UNIX && !FEATURE_REDHAWK
-
-bool GcInfoDecoder::IsScratchRegister(int regNum, PREGDISPLAY pRD)
-{
- _ASSERTE(regNum >= 0 && regNum <= 16);
- _ASSERTE(regNum != 4); // rsp
-
- UINT16 PreservedRegMask =
- (1 << 3) // rbx
- | (1 << 5) // rbp
-#ifndef UNIX_AMD64_ABI
- | (1 << 6) // rsi
- | (1 << 7) // rdi
-#endif // UNIX_AMD64_ABI
- | (1 << 12) // r12
- | (1 << 13) // r13
- | (1 << 14) // r14
- | (1 << 15); // r15
-
- return !(PreservedRegMask & (1 << regNum));
-}
-
-
-bool GcInfoDecoder::IsScratchStackSlot(INT32 spOffset, GcStackSlotBase spBase, PREGDISPLAY pRD)
-{
-#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
- _ASSERTE( m_Flags & DECODE_GC_LIFETIMES );
-
- TADDR pSlot = (TADDR) GetStackSlot(spOffset, spBase, pRD);
- _ASSERTE(pSlot >= pRD->SP);
-
- return (pSlot < pRD->SP + m_SizeOfStackOutgoingAndScratchArea);
-#else
- return FALSE;
-#endif
-}
-
-
-void GcInfoDecoder::ReportRegisterToGC( // AMD64
- int regNum,
- unsigned gcFlags,
- PREGDISPLAY pRD,
- unsigned flags,
- GCEnumCallback pCallBack,
- void * hCallBack)
-{
- GCINFODECODER_CONTRACT;
-
- _ASSERTE(regNum >= 0 && regNum <= 16);
- _ASSERTE(regNum != 4); // rsp
-
- LOG((LF_GCROOTS, LL_INFO1000, "Reporting " FMT_REG, regNum ));
-
- OBJECTREF* pObjRef = GetRegisterSlot( regNum, pRD );
-#if defined(TARGET_UNIX) && !defined(FEATURE_REDHAWK) && !defined(SOS_TARGET_AMD64)
- // On PAL, we don't always have the context pointers available due to
- // a limitation of an unwinding library. In such case, the context
- // pointers for some nonvolatile registers are NULL.
- // In such case, we let the pObjRef point to the captured register
- // value in the context and pin the object itself.
- if (pObjRef == NULL)
- {
- // Report a pinned object to GC only in the promotion phase when the
- // GC is scanning roots.
- GCCONTEXT* pGCCtx = (GCCONTEXT*)(hCallBack);
- if (!pGCCtx->sc->promotion)
- {
- return;
- }
-
- pObjRef = GetCapturedRegister(regNum, pRD);
-
- gcFlags |= GC_CALL_PINNED;
- }
-#endif // TARGET_UNIX && !FEATURE_REDHAWK && !SOS_TARGET_AMD64
-
-#ifdef _DEBUG
- if(IsScratchRegister(regNum, pRD))
- {
- // Scratch registers cannot be reported for non-leaf frames
- _ASSERTE(flags & ActiveStackFrame);
- }
-
- LOG((LF_GCROOTS, LL_INFO1000, /* Part Two */
- "at" FMT_ADDR "as ", DBG_ADDR(pObjRef) ));
-
- VALIDATE_ROOT((gcFlags & GC_CALL_INTERIOR), hCallBack, pObjRef);
-
- LOG_PIPTR(pObjRef, gcFlags, hCallBack);
-#endif //_DEBUG
-
- gcFlags |= CHECK_APP_DOMAIN;
-
- pCallBack(hCallBack, pObjRef, gcFlags DAC_ARG(DacSlotLocation(regNum, 0, false)));
-}
-
-#elif defined(TARGET_ARM)
-
-OBJECTREF* GcInfoDecoder::GetRegisterSlot(
- int regNum,
- PREGDISPLAY pRD
- )
-{
- _ASSERTE(regNum >= 0 && regNum <= 14);
- _ASSERTE(regNum != 13); // sp
-
-#ifdef FEATURE_REDHAWK
- if(regNum < 14)
- {
- PTR_UIntNative* ppReg = &pRD->pR0;
- return (OBJECTREF*)*(ppReg + regNum);
- }
- else
- {
- return (OBJECTREF*) pRD->pLR;
- }
-#else
- DWORD **ppReg;
-
- if(regNum <= 3)
- {
- ppReg = &pRD->volatileCurrContextPointers.R0;
- return (OBJECTREF*)*(ppReg + regNum);
- }
- else if(regNum == 12)
- {
- return (OBJECTREF*) pRD->volatileCurrContextPointers.R12;
- }
- else if(regNum == 14)
- {
- return (OBJECTREF*) pRD->pCurrentContextPointers->Lr;
- }
-
- ppReg = &pRD->pCurrentContextPointers->R4;
-
- return (OBJECTREF*)*(ppReg + regNum-4);
-#endif
-}
-
-#if defined(TARGET_UNIX) && !defined(FEATURE_REDHAWK)
-OBJECTREF* GcInfoDecoder::GetCapturedRegister(
- int regNum,
- PREGDISPLAY pRD
- )
-{
- _ASSERTE(regNum >= 0 && regNum <= 14);
- _ASSERTE(regNum != 13); // sp
-
- // The fields of CONTEXT are in the same order as
- // the processor encoding numbers.
-
- ULONG *pR0 = &pRD->pCurrentContext->R0;
-
- return (OBJECTREF*)(pR0 + regNum);
-}
-#endif // TARGET_UNIX && !FEATURE_REDHAWK
-
-
-bool GcInfoDecoder::IsScratchRegister(int regNum, PREGDISPLAY pRD)
-{
- _ASSERTE(regNum >= 0 && regNum <= 14);
- _ASSERTE(regNum != 13); // sp
-
- return regNum <= 3 || regNum >= 12; // R12 and R14/LR are both scratch registers
-}
-
-
-bool GcInfoDecoder::IsScratchStackSlot(INT32 spOffset, GcStackSlotBase spBase, PREGDISPLAY pRD)
-{
-#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
- _ASSERTE( m_Flags & DECODE_GC_LIFETIMES );
-
- TADDR pSlot = (TADDR) GetStackSlot(spOffset, spBase, pRD);
- _ASSERTE(pSlot >= pRD->SP);
-
- return (pSlot < pRD->SP + m_SizeOfStackOutgoingAndScratchArea);
-#else
- return FALSE;
-#endif
-}
-
-
-void GcInfoDecoder::ReportRegisterToGC( // ARM
- int regNum,
- unsigned gcFlags,
- PREGDISPLAY pRD,
- unsigned flags,
- GCEnumCallback pCallBack,
- void * hCallBack)
-{
- GCINFODECODER_CONTRACT;
-
- _ASSERTE(regNum >= 0 && regNum <= 14);
- _ASSERTE(regNum != 13); // sp
-
- LOG((LF_GCROOTS, LL_INFO1000, "Reporting " FMT_REG, regNum ));
-
- OBJECTREF* pObjRef = GetRegisterSlot( regNum, pRD );
-
-#ifdef _DEBUG
- if(IsScratchRegister(regNum, pRD))
- {
- // Scratch registers cannot be reported for non-leaf frames
- _ASSERTE(flags & ActiveStackFrame);
- }
-
- LOG((LF_GCROOTS, LL_INFO1000, /* Part Two */
- "at" FMT_ADDR "as ", DBG_ADDR(pObjRef) ));
-
- VALIDATE_ROOT((gcFlags & GC_CALL_INTERIOR), hCallBack, pObjRef);
-
- LOG_PIPTR(pObjRef, gcFlags, hCallBack);
-#endif //_DEBUG
-
- gcFlags |= CHECK_APP_DOMAIN;
-
- pCallBack(hCallBack, pObjRef, gcFlags DAC_ARG(DacSlotLocation(regNum, 0, false)));
-}
-
-#elif defined(TARGET_ARM64)
-
-OBJECTREF* GcInfoDecoder::GetRegisterSlot(
- int regNum,
- PREGDISPLAY pRD
- )
-{
- _ASSERTE(regNum >= 0 && regNum <= 30);
- _ASSERTE(regNum != 18); // TEB
-
-#ifdef FEATURE_REDHAWK
- PTR_UIntNative* ppReg = &pRD->pX0;
-
- return (OBJECTREF*)*(ppReg + regNum);
-#else
- DWORD64 **ppReg;
-
- if(regNum <= 17)
- {
- ppReg = &pRD->volatileCurrContextPointers.X0;
- return (OBJECTREF*)*(ppReg + regNum);
- }
- else if(regNum == 29)
- {
- return (OBJECTREF*) pRD->pCurrentContextPointers->Fp;
- }
- else if(regNum == 30)
- {
- return (OBJECTREF*) pRD->pCurrentContextPointers->Lr;
- }
-
- ppReg = &pRD->pCurrentContextPointers->X19;
-
- return (OBJECTREF*)*(ppReg + regNum-19);
-#endif
-}
-
-bool GcInfoDecoder::IsScratchRegister(int regNum, PREGDISPLAY pRD)
-{
- _ASSERTE(regNum >= 0 && regNum <= 30);
- _ASSERTE(regNum != 18);
-
- return regNum <= 17 || regNum >= 29; // R12 and R14/LR are both scratch registers
-}
-
-bool GcInfoDecoder::IsScratchStackSlot(INT32 spOffset, GcStackSlotBase spBase, PREGDISPLAY pRD)
-{
-#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
- _ASSERTE( m_Flags & DECODE_GC_LIFETIMES );
-
- TADDR pSlot = (TADDR) GetStackSlot(spOffset, spBase, pRD);
- _ASSERTE(pSlot >= pRD->SP);
-
- return (pSlot < pRD->SP + m_SizeOfStackOutgoingAndScratchArea);
-#else
- return FALSE;
-#endif
-
-}
-
-void GcInfoDecoder::ReportRegisterToGC( // ARM64
- int regNum,
- unsigned gcFlags,
- PREGDISPLAY pRD,
- unsigned flags,
- GCEnumCallback pCallBack,
- void * hCallBack)
-{
- GCINFODECODER_CONTRACT;
-
- _ASSERTE(regNum >= 0 && regNum <= 30);
- _ASSERTE(regNum != 18);
-
- LOG((LF_GCROOTS, LL_INFO1000, "Reporting " FMT_REG, regNum ));
-
- OBJECTREF* pObjRef = GetRegisterSlot( regNum, pRD );
-#if defined(TARGET_UNIX) && !defined(FEATURE_REDHAWK) && !defined(SOS_TARGET_ARM64)
- // On PAL, we don't always have the context pointers available due to
- // a limitation of an unwinding library. In such case, the context
- // pointers for some nonvolatile registers are NULL.
- // In such case, we let the pObjRef point to the captured register
- // value in the context and pin the object itself.
- if (pObjRef == NULL)
- {
- // Report a pinned object to GC only in the promotion phase when the
- // GC is scanning roots.
- GCCONTEXT* pGCCtx = (GCCONTEXT*)(hCallBack);
- if (!pGCCtx->sc->promotion)
- {
- return;
- }
-
- pObjRef = GetCapturedRegister(regNum, pRD);
-
- gcFlags |= GC_CALL_PINNED;
- }
-#endif // TARGET_UNIX && !SOS_TARGET_ARM64
-
-#ifdef _DEBUG
- if(IsScratchRegister(regNum, pRD))
- {
- // Scratch registers cannot be reported for non-leaf frames
- _ASSERTE(flags & ActiveStackFrame);
- }
-
- LOG((LF_GCROOTS, LL_INFO1000, /* Part Two */
- "at" FMT_ADDR "as ", DBG_ADDR(pObjRef) ));
-
- VALIDATE_ROOT((gcFlags & GC_CALL_INTERIOR), hCallBack, pObjRef);
-
- LOG_PIPTR(pObjRef, gcFlags, hCallBack);
-#endif //_DEBUG
-
- gcFlags |= CHECK_APP_DOMAIN;
-
- pCallBack(hCallBack, pObjRef, gcFlags DAC_ARG(DacSlotLocation(regNum, 0, false)));
-}
-
-#if defined(TARGET_UNIX) && !defined(FEATURE_REDHAWK)
-OBJECTREF* GcInfoDecoder::GetCapturedRegister(
- int regNum,
- PREGDISPLAY pRD
- )
-{
- _ASSERTE(regNum >= 0 && regNum <= 30);
- _ASSERTE(regNum != 18);
-
- if (regNum == 29)
- {
- return (OBJECTREF*) &pRD->pCurrentContext->Fp;
- }
- else if (regNum == 30)
- {
- return (OBJECTREF*) &pRD->pCurrentContext->Lr;
- }
-
- // The fields of CONTEXT are in the same order as
- // the processor encoding numbers.
-
- DWORD64 *pX0 = &pRD->pCurrentContext->X0;
-
- return (OBJECTREF*)(pX0 + regNum);
-}
-#endif // TARGET_UNIX && !FEATURE_REDHAWK
-
-#elif defined(TARGET_LOONGARCH64)
-
-#if defined(TARGET_UNIX) && !defined(FEATURE_REDHAWK)
-OBJECTREF* GcInfoDecoder::GetCapturedRegister(
- int regNum,
- PREGDISPLAY pRD
- )
-{
- _ASSERTE(regNum >= 1 && regNum <= 31);
-
- // The fields of CONTEXT are in the same order as
- // the processor encoding numbers.
-
- DWORD64 *pR0 = &pRD->pCurrentContext->R0;
-
- return (OBJECTREF*)(pR0 + regNum);
-}
-#endif // TARGET_UNIX && !FEATURE_REDHAWK
-
-OBJECTREF* GcInfoDecoder::GetRegisterSlot(
- int regNum,
- PREGDISPLAY pRD
- )
-{
- _ASSERTE((regNum == 1) || (regNum >= 4 && regNum <= 31));
-
-#ifdef FEATURE_REDHAWK
- PTR_UIntNative* ppReg = &pRD->pR0;
-
- return (OBJECTREF*)*(ppReg + regNum);
-#else
- if(regNum == 1)
- {
- return (OBJECTREF*) pRD->pCurrentContextPointers->Ra;
- }
- else if (regNum < 22)
- {
- return (OBJECTREF*)*(DWORD64**)(&pRD->volatileCurrContextPointers.A0 + (regNum - 4));
- }
- else if(regNum == 22)
- {
- return (OBJECTREF*) pRD->pCurrentContextPointers->Fp;
- }
- return (OBJECTREF*)*(DWORD64**)(&pRD->pCurrentContextPointers->S0 + (regNum-23));
-#endif
-}
-
-bool GcInfoDecoder::IsScratchRegister(int regNum, PREGDISPLAY pRD)
-{
- _ASSERTE(regNum >= 0 && regNum <= 31);
-
- return (regNum <= 21 && ((regNum >= 4) || (regNum == 1)));
-}
-
-bool GcInfoDecoder::IsScratchStackSlot(INT32 spOffset, GcStackSlotBase spBase, PREGDISPLAY pRD)
-{
-#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
- _ASSERTE( m_Flags & DECODE_GC_LIFETIMES );
-
- TADDR pSlot = (TADDR) GetStackSlot(spOffset, spBase, pRD);
- _ASSERTE(pSlot >= pRD->SP);
-
- return (pSlot < pRD->SP + m_SizeOfStackOutgoingAndScratchArea);
-#else
- return FALSE;
-#endif
-}
-
-void GcInfoDecoder::ReportRegisterToGC(
- int regNum,
- unsigned gcFlags,
- PREGDISPLAY pRD,
- unsigned flags,
- GCEnumCallback pCallBack,
- void * hCallBack)
-{
- GCINFODECODER_CONTRACT;
-
- _ASSERTE(regNum > 0 && regNum <= 31);
-
- LOG((LF_GCROOTS, LL_INFO1000, "Reporting " FMT_REG, regNum ));
-
- OBJECTREF* pObjRef = GetRegisterSlot( regNum, pRD );
-#if defined(TARGET_UNIX) && !defined(FEATURE_REDHAWK) && !defined(SOS_TARGET_LOONGARCH64)
- // On PAL, we don't always have the context pointers available due to
- // a limitation of an unwinding library. In such case, the context
- // pointers for some nonvolatile registers are NULL.
- // In such case, we let the pObjRef point to the captured register
- // value in the context and pin the object itself.
- if (pObjRef == NULL)
- {
- // Report a pinned object to GC only in the promotion phase when the
- // GC is scanning roots.
- GCCONTEXT* pGCCtx = (GCCONTEXT*)(hCallBack);
- if (!pGCCtx->sc->promotion)
- {
- return;
- }
-
- pObjRef = GetCapturedRegister(regNum, pRD);
-
- gcFlags |= GC_CALL_PINNED;
- }
-#endif // TARGET_UNIX && !SOS_TARGET_LOONGARCH64
-
-#ifdef _DEBUG
- if(IsScratchRegister(regNum, pRD))
- {
- // Scratch registers cannot be reported for non-leaf frames
- _ASSERTE(flags & ActiveStackFrame);
- }
-
- LOG((LF_GCROOTS, LL_INFO1000, /* Part Two */
- "at" FMT_ADDR "as ", DBG_ADDR(pObjRef) ));
-
- VALIDATE_ROOT((gcFlags & GC_CALL_INTERIOR), hCallBack, pObjRef);
-
- LOG_PIPTR(pObjRef, gcFlags, hCallBack);
-#endif //_DEBUG
-
- gcFlags |= CHECK_APP_DOMAIN;
-
- pCallBack(hCallBack, pObjRef, gcFlags DAC_ARG(DacSlotLocation(regNum, 0, false)));
-}
-
-#elif defined(TARGET_RISCV64)
-
-#if defined(TARGET_UNIX) && !defined(FEATURE_REDHAWK)
-OBJECTREF* GcInfoDecoder::GetCapturedRegister(
- int regNum,
- PREGDISPLAY pRD
- )
-{
- _ASSERTE(regNum >= 1 && regNum <= 31);
-
- // The fields of CONTEXT are in the same order as
- // the processor encoding numbers.
-
- DWORD64 *pR0 = &pRD->pCurrentContext->R0;
-
- return (OBJECTREF*)(pR0 + regNum);
-}
-#endif // TARGET_UNIX && !FEATURE_REDHAWK
-
-OBJECTREF* GcInfoDecoder::GetRegisterSlot(
- int regNum,
- PREGDISPLAY pRD
- )
-{
- _ASSERTE((regNum == 1) || (regNum >= 5 && regNum <= 31));
-
-#ifdef FEATURE_REDHAWK
- PTR_UIntNative* ppReg = &pRD->pR0;
-
- return (OBJECTREF*)*(ppReg + regNum);
-#else
- if(regNum == 1)
- {
- return (OBJECTREF*) pRD->pCurrentContextPointers->Ra;
- }
- else if (regNum < 8)
- {
- return (OBJECTREF*)*(DWORD64**)(&pRD->volatileCurrContextPointers.T0 + (regNum - 5));
- }
- else if(regNum == 8)
- {
- return (OBJECTREF*) pRD->pCurrentContextPointers->Fp;
- }
- else if (regNum == 9)
- {
- return (OBJECTREF*) pRD->pCurrentContextPointers->S1;
- }
- else if (regNum < 18)
- {
- return (OBJECTREF*)*(DWORD64**)(&pRD->volatileCurrContextPointers.A0 + (regNum - 10));
- }
- else if (regNum < 28)
- {
- return (OBJECTREF*)*(DWORD64**)(&pRD->pCurrentContextPointers->S2 + (regNum-18));
- }
- return (OBJECTREF*)*(DWORD64**)(&pRD->volatileCurrContextPointers.T3 + (regNum-28));
-#endif
-}
-
-bool GcInfoDecoder::IsScratchRegister(int regNum, PREGDISPLAY pRD)
-{
- _ASSERTE(regNum >= 0 && regNum <= 31);
-
- return (regNum >= 5 && regNum <= 7) || (regNum >= 10 and regNum <= 17) || regNum >= 28 || regNum == 1;
-}
-
-bool GcInfoDecoder::IsScratchStackSlot(INT32 spOffset, GcStackSlotBase spBase, PREGDISPLAY pRD)
-{
-#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
- _ASSERTE( m_Flags & DECODE_GC_LIFETIMES );
-
- TADDR pSlot = (TADDR) GetStackSlot(spOffset, spBase, pRD);
- _ASSERTE(pSlot >= pRD->SP);
-
- return (pSlot < pRD->SP + m_SizeOfStackOutgoingAndScratchArea);
-#else
- return FALSE;
-#endif
-}
-
-void GcInfoDecoder::ReportRegisterToGC(
- int regNum,
- unsigned gcFlags,
- PREGDISPLAY pRD,
- unsigned flags,
- GCEnumCallback pCallBack,
- void * hCallBack)
-{
- GCINFODECODER_CONTRACT;
-
- _ASSERTE(regNum > 0 && regNum <= 31);
-
- LOG((LF_GCROOTS, LL_INFO1000, "Reporting " FMT_REG, regNum ));
-
- OBJECTREF* pObjRef = GetRegisterSlot( regNum, pRD );
-#if defined(TARGET_UNIX) && !defined(FEATURE_REDHAWK) && !defined(SOS_TARGET_RISCV64)
- // On PAL, we don't always have the context pointers available due to
- // a limitation of an unwinding library. In such case, the context
- // pointers for some nonvolatile registers are NULL.
- // In such case, we let the pObjRef point to the captured register
- // value in the context and pin the object itself.
- if (pObjRef == NULL)
- {
- // Report a pinned object to GC only in the promotion phase when the
- // GC is scanning roots.
- GCCONTEXT* pGCCtx = (GCCONTEXT*)(hCallBack);
- if (!pGCCtx->sc->promotion)
- {
- return;
- }
-
- pObjRef = GetCapturedRegister(regNum, pRD);
-
- gcFlags |= GC_CALL_PINNED;
- }
-#endif // TARGET_UNIX && !SOS_TARGET_RISCV64
-
-#ifdef _DEBUG
- if(IsScratchRegister(regNum, pRD))
- {
- // Scratch registers cannot be reported for non-leaf frames
- _ASSERTE(flags & ActiveStackFrame);
- }
-
- LOG((LF_GCROOTS, LL_INFO1000, /* Part Two */
- "at" FMT_ADDR "as ", DBG_ADDR(pObjRef) ));
-
- VALIDATE_ROOT((gcFlags & GC_CALL_INTERIOR), hCallBack, pObjRef);
-
- LOG_PIPTR(pObjRef, gcFlags, hCallBack);
-#endif //_DEBUG
-
- gcFlags |= CHECK_APP_DOMAIN;
-
- pCallBack(hCallBack, pObjRef, gcFlags DAC_ARG(DacSlotLocation(regNum, 0, false)));
-}
-
-#else // Unknown platform
-
-OBJECTREF* GcInfoDecoder::GetRegisterSlot(
- int regNum,
- PREGDISPLAY pRD
- )
-{
- PORTABILITY_ASSERT("GcInfoDecoder::GetRegisterSlot");
- return NULL;
-}
-
-bool GcInfoDecoder::IsScratchRegister(int regNum, PREGDISPLAY pRD)
-{
- PORTABILITY_ASSERT("GcInfoDecoder::IsScratchRegister");
- return false;
-}
-
-bool GcInfoDecoder::IsScratchStackSlot(INT32 spOffset, GcStackSlotBase spBase, PREGDISPLAY pRD)
-{
- _ASSERTE( !"NYI" );
- return false;
-}
-
-void GcInfoDecoder::ReportRegisterToGC(
- int regNum,
- unsigned gcFlags,
- PREGDISPLAY pRD,
- unsigned flags,
- GCEnumCallback pCallBack,
- void * hCallBack)
-{
- _ASSERTE( !"NYI" );
-}
-
-#endif // Unknown platform
-
-
-OBJECTREF* GcInfoDecoder::GetStackSlot(
- INT32 spOffset,
- GcStackSlotBase spBase,
- PREGDISPLAY pRD
- )
-{
- OBJECTREF* pObjRef;
-
- if( GC_SP_REL == spBase )
- {
- pObjRef = (OBJECTREF*) ((SIZE_T)pRD->SP + spOffset);
- }
- else if( GC_CALLER_SP_REL == spBase )
- {
- pObjRef = (OBJECTREF*) (GET_CALLER_SP(pRD) + spOffset);
- }
- else
- {
- _ASSERTE( GC_FRAMEREG_REL == spBase );
- _ASSERTE( NO_STACK_BASE_REGISTER != m_StackBaseRegister );
-
- SIZE_T * pFrameReg = (SIZE_T*) GetRegisterSlot(m_StackBaseRegister, pRD);
-
-#if defined(TARGET_UNIX) && !defined(FEATURE_REDHAWK)
- // On PAL, we don't always have the context pointers available due to
- // a limitation of an unwinding library. In such case, the context
- // pointers for some nonvolatile registers are NULL.
- if (pFrameReg == NULL)
- {
- pFrameReg = (SIZE_T*) GetCapturedRegister(m_StackBaseRegister, pRD);
- }
-#endif // TARGET_UNIX && !FEATURE_REDHAWK
-
- pObjRef = (OBJECTREF*)(*pFrameReg + spOffset);
- }
-
- return pObjRef;
-}
-
-#ifdef DACCESS_COMPILE
-int GcInfoDecoder::GetStackReg(int spBase)
-{
-#if defined(TARGET_AMD64)
- int esp = 4;
-#elif defined(TARGET_ARM)
- int esp = 13;
-#elif defined(TARGET_ARM64)
- int esp = 31;
-#elif defined(TARGET_LOONGARCH64)
- int esp = 3;
-#elif defined(TARGET_RISCV64)
- int esp = 2;
-#endif
-
- if( GC_SP_REL == spBase )
- return esp;
- else if ( GC_CALLER_SP_REL == spBase )
- return -(esp+1);
- else
- return m_StackBaseRegister;
-}
-#endif // DACCESS_COMPILE
-
-void GcInfoDecoder::ReportStackSlotToGC(
- INT32 spOffset,
- GcStackSlotBase spBase,
- unsigned gcFlags,
- PREGDISPLAY pRD,
- unsigned flags,
- GCEnumCallback pCallBack,
- void * hCallBack)
-{
- GCINFODECODER_CONTRACT;
-
- OBJECTREF* pObjRef = GetStackSlot(spOffset, spBase, pRD);
- _ASSERTE(IS_ALIGNED(pObjRef, sizeof(OBJECTREF*)));
-
-#ifdef _DEBUG
- LOG((LF_GCROOTS, LL_INFO1000, /* Part One */
- "Reporting %s" FMT_STK,
- ( (GC_SP_REL == spBase) ? "" :
- ((GC_CALLER_SP_REL == spBase) ? "caller's " :
- ((GC_FRAMEREG_REL == spBase) ? "frame " : "<unrecognized GcStackSlotBase> "))),
- DBG_STK(spOffset) ));
-
- LOG((LF_GCROOTS, LL_INFO1000, /* Part Two */
- "at" FMT_ADDR "as ", DBG_ADDR(pObjRef) ));
-
- VALIDATE_ROOT((gcFlags & GC_CALL_INTERIOR), hCallBack, pObjRef);
-
- LOG_PIPTR(pObjRef, gcFlags, hCallBack);
-#endif
-
- gcFlags |= CHECK_APP_DOMAIN;
-
- pCallBack(hCallBack, pObjRef, gcFlags DAC_ARG(DacSlotLocation(GetStackReg(spBase), spOffset, true)));
-}
-
-
-#endif // USE_GC_INFO_DECODER
-
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#include "gcinfodumper.h"
-#include "gcinfodecoder.h"
-
-// Stolen from gc.h.
-#define GC_CALL_INTERIOR 0x1
-#define GC_CALL_PINNED 0x2
-
-
-#ifdef HOST_64BIT
-// All stack offsets are INT32's, so this guarantees a disjoint range of
-// addresses for each register.
-#define ADDRESS_SPACING UI64(0x100000000)
-#elif defined(TARGET_ARM)
-#define ADDRESS_SPACING 0x100000
-#else
-#error pick suitable ADDRESS_SPACING for platform
-#endif
-
-GcInfoDumper::GcInfoDumper (GCInfoToken gcInfoToken)
-{
- m_gcTable = gcInfoToken;
- m_pRecords = NULL;
- m_gcInfoSize = 0;
-}
-
-
-GcInfoDumper::~GcInfoDumper ()
-{
- FreePointerRecords(m_pRecords);
-}
-size_t GcInfoDumper::GetGCInfoSize()
-{
- return m_gcInfoSize;
-}
-
-
-//static*
-void GcInfoDumper::LivePointerCallback (
- LPVOID hCallback, // callback data
- OBJECTREF* pObject, // address of obect-reference we are reporting
- uint32_t flags // is this a pinned and/or interior pointer
- DAC_ARG(DacSlotLocation loc)) // the location of the slot
-{
- GcInfoDumper *pDumper = (GcInfoDumper*)hCallback;
- LivePointerRecord **ppRecords = &pDumper->m_pRecords;
- LivePointerRecord *pRecord = new LivePointerRecord();
- if (!pRecord)
- {
- pDumper->m_Error = OUT_OF_MEMORY;
- return;
- }
-
- pRecord->ppObject = pObject;
- pRecord->flags = flags;
- pRecord->marked = -1;
-
- pRecord->pNext = *ppRecords;
- *ppRecords = pRecord;
-}
-
-
-//static
-void GcInfoDumper::FreePointerRecords (LivePointerRecord *pRecords)
-{
- while (pRecords)
- {
- LivePointerRecord *trash = pRecords;
- pRecords = pRecords->pNext;
- delete trash;
- }
-}
-
-//This function tries to find the address of the managed object in the registers of the current function's context,
-//failing which it checks if it is present in the stack of the current function. IF it finds one it reports appropriately
-//
-//For Amd64, this additionally tries to probe in the stack for the caller.
-//This behavior largely seems to be present for legacy x64 jit and is not likely to be used anywhere else
-BOOL GcInfoDumper::ReportPointerRecord (
- UINT32 CodeOffset,
- BOOL fLive,
- REGDISPLAY *pRD,
- LivePointerRecord *pRecord)
-{
- //
- // Convert the flags passed to the GC into flags used by GcInfoEncoder.
- //
-
- int EncodedFlags = 0;
-
- if (pRecord->flags & GC_CALL_INTERIOR)
- EncodedFlags |= GC_SLOT_INTERIOR;
-
- if (pRecord->flags & GC_CALL_PINNED)
- EncodedFlags |= GC_SLOT_PINNED;
-
- //
- // Compare the reported pointer against the REGIDISPLAY pointers to
- // figure out the register or register-relative location.
- //
-
- struct RegisterInfo
- {
- SIZE_T cbContextOffset;
- };
-
- static RegisterInfo rgRegisters[] = {
-#define REG(reg, field) { FIELD_OFFSET(T_CONTEXT, field) }
-
-#ifdef TARGET_AMD64
- REG(rax, Rax),
- REG(rcx, Rcx),
- REG(rdx, Rdx),
- REG(rbx, Rbx),
- REG(rsp, Rsp),
- REG(rbp, Rbp),
- REG(rsi, Rsi),
- REG(rdi, Rdi),
- REG(r8, R8),
- REG(r9, R9),
- REG(r10, R10),
- REG(r11, R11),
- REG(r12, R12),
- REG(r13, R13),
- REG(r14, R14),
- REG(r15, R15),
-#elif defined(TARGET_ARM)
-#undef REG
-#define REG(reg, field) { FIELD_OFFSET(ArmVolatileContextPointer, field) }
- REG(r0, R0),
- REG(r1, R1),
- REG(r2, R2),
- REG(r3, R3),
-#undef REG
-#define REG(reg, field) { FIELD_OFFSET(T_KNONVOLATILE_CONTEXT_POINTERS, field) }
- REG(r4, R4),
- REG(r5, R5),
- REG(r6, R6),
- REG(r7, R7),
- REG(r8, R8),
- REG(r9, R9),
- REG(r10, R10),
- REG(r11, R11),
- { FIELD_OFFSET(ArmVolatileContextPointer, R12) },
- { FIELD_OFFSET(T_CONTEXT, Sp) },
- { FIELD_OFFSET(T_KNONVOLATILE_CONTEXT_POINTERS, Lr) },
- { FIELD_OFFSET(T_CONTEXT, Sp) },
- { FIELD_OFFSET(T_KNONVOLATILE_CONTEXT_POINTERS, R7) },
-#elif defined(TARGET_ARM64)
-#undef REG
-#define REG(reg, field) { FIELD_OFFSET(Arm64VolatileContextPointer, field) }
- REG(x0, X0),
- REG(x1, X1),
- REG(x2, X2),
- REG(x3, X3),
- REG(x4, X4),
- REG(x5, X5),
- REG(x6, X6),
- REG(x7, X7),
- REG(x8, X8),
- REG(x9, X9),
- REG(x10, X10),
- REG(x11, X11),
- REG(x12, X12),
- REG(x13, X13),
- REG(x14, X14),
- REG(x15, X15),
- REG(x16, X16),
- REG(x17, X17),
-#undef REG
-#define REG(reg, field) { FIELD_OFFSET(T_KNONVOLATILE_CONTEXT_POINTERS, field) }
- REG(x19, X19),
- REG(x20, X20),
- REG(x21, X21),
- REG(x22, X22),
- REG(x23, X23),
- REG(x24, X24),
- REG(x25, X25),
- REG(x26, X26),
- REG(x27, X27),
- REG(x28, X28),
- REG(Fp, Fp),
- REG(Lr, Lr),
- { FIELD_OFFSET(T_CONTEXT, Sp) },
-#undef REG
-#elif defined(TARGET_LOONGARCH64)
-#undef REG
-#define REG(reg, field) { FIELD_OFFSET(T_KNONVOLATILE_CONTEXT_POINTERS, field) }
-#define vREG(reg, field) { FIELD_OFFSET(LoongArch64VolatileContextPointer, field) }
- vREG(zero, R0),
- REG(ra, Ra),
- REG(tp, Tp),
- { FIELD_OFFSET(T_CONTEXT, Sp) },
- vREG(a0, A0),
- vREG(a1, A1),
- vREG(a2, A2),
- vREG(a3, A3),
- vREG(a4, A4),
- vREG(a5, A5),
- vREG(a6, A6),
- vREG(a7, A7),
- vREG(t0, T0),
- vREG(t1, T1),
- vREG(t2, T2),
- vREG(t3, T3),
- vREG(t4, T4),
- vREG(t5, T5),
- vREG(t6, T6),
- vREG(t7, T7),
- vREG(t8, T8),
- vREG(x0, X0),
- REG(fp, Fp),
- REG(s0, S0),
- REG(s1, S1),
- REG(s2, S2),
- REG(s3, S3),
- REG(s4, S4),
- REG(s5, S5),
- REG(s6, S6),
- REG(s7, S7),
- REG(s8, S8),
-#undef vREG
-#undef REG
-#elif defined(TARGET_RISCV64)
-#undef REG
-#define REG(reg, field) { FIELD_OFFSET(T_KNONVOLATILE_CONTEXT_POINTERS, field) }
-#define vREG(reg, field) { FIELD_OFFSET(RiscV64VolatileContextPointer, field) }
- vREG(zero, R0),
- REG(Ra, Ra),
- { FIELD_OFFSET(T_CONTEXT, Sp) },
- REG(Gp, Gp),
- REG(Tp, Tp),
- vREG(t0, T0),
- vREG(t1, T1),
- vREG(t2, T2),
- REG(Fp, Fp),
- REG(s1, S1),
- vREG(a0, A0),
- vREG(a1, A1),
- vREG(a2, A2),
- vREG(a3, A3),
- vREG(a4, A4),
- vREG(a5, A5),
- vREG(a6, A6),
- vREG(a7, A7),
- REG(s2, S2),
- REG(s3, S3),
- REG(s4, S4),
- REG(s5, S5),
- REG(s6, S6),
- REG(s7, S7),
- REG(s8, S8),
- REG(s9, S9),
- REG(s10, S10),
- REG(s11, S11),
- vREG(t3, T3),
- vREG(t4, T4),
- vREG(t5, T5),
- vREG(t6, T6),
-#undef vREG
-#undef REG
-#else
-PORTABILITY_ASSERT("GcInfoDumper::ReportPointerRecord is not implemented on this platform.")
-#endif
-
- };
-
- UINT iFirstRegister;
- UINT iSPRegister;
-
- iFirstRegister = 0;
-#ifdef TARGET_AMD64
- iSPRegister = (FIELD_OFFSET(CONTEXT, Rsp) - FIELD_OFFSET(CONTEXT, Rax)) / sizeof(ULONGLONG);
-#elif defined(TARGET_ARM64)
- iSPRegister = (FIELD_OFFSET(T_CONTEXT, Sp) - FIELD_OFFSET(T_CONTEXT, X0)) / sizeof(ULONGLONG);
-#elif defined(TARGET_ARM)
- iSPRegister = (FIELD_OFFSET(T_CONTEXT, Sp) - FIELD_OFFSET(T_CONTEXT, R0)) / sizeof(ULONG);
- UINT iBFRegister = m_StackBaseRegister;
-#elif defined(TARGET_LOONGARCH64)
- iSPRegister = (FIELD_OFFSET(T_CONTEXT, Sp) - FIELD_OFFSET(T_CONTEXT, R0)) / sizeof(ULONGLONG);
-#elif defined(TARGET_RISCV64)
- iSPRegister = (FIELD_OFFSET(T_CONTEXT, Sp) - FIELD_OFFSET(T_CONTEXT, R0)) / sizeof(ULONGLONG);
-#endif
-
-#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64)
- BYTE* pContext = (BYTE*)&(pRD->volatileCurrContextPointers);
-#else
- BYTE* pContext = (BYTE*)pRD->pCurrentContext;
-#endif
-
- for (int ctx = 0; ctx < 2; ctx++)
- {
- SIZE_T *pReg = NULL;
-
- for (UINT iReg = 0; iReg < ARRAY_SIZE(rgRegisters); iReg++)
- {
- UINT iEncodedReg = iFirstRegister + iReg;
-#ifdef TARGET_ARM
- if (ctx == 1)
- {
- if ((iReg < 4 || iReg == 12)) // skip volatile registers for second context
- {
- continue;
- }
- // Force StackRegister and BaseRegister at the end (r15, r16)
- if (iReg == iSPRegister || iReg == m_StackBaseRegister)
- {
- continue;
- }
- if (iReg == 15)
- {
- if (iBFRegister != NO_STACK_BASE_REGISTER)
- {
- iEncodedReg = iBFRegister;
- }
- else
- {
- continue;
- }
- }
- if (iReg == 16)
- {
- iEncodedReg = iSPRegister;
- }
- }
- if (ctx == 0 && iReg == 4) //ArmVolatileContextPointer 5th register is R12
- {
- iEncodedReg = 12;
- }
- else if (ctx == 0 && iReg > 4)
- {
- break;
- }
-#elif defined (TARGET_ARM64)
- iEncodedReg = iEncodedReg + ctx; //We have to compensate for not tracking x18
- if (ctx == 1)
- {
- if (iReg < 18 ) // skip volatile registers for second context
- {
- continue;
- }
-
- if (iReg == 30)
- {
- iEncodedReg = iSPRegister;
- }
- }
-
- if (ctx == 0 && iReg > 17)
- {
- break;
- }
-#elif defined(TARGET_LOONGARCH64)
- bool isVolatile = (iReg == 0 || (iReg >= 4 && iReg <= 21));
- if (ctx == 0)
- {
- if (!isVolatile)
- {
- continue;
- }
- }
- else if (isVolatile) // skip volatile registers for second context
- {
- continue;
- }
-#elif defined(TARGET_RISCV64)
- bool isVolatile = (iReg == 0 || (iReg >= 5 && iReg <= 7) || (iReg >= 10 && iReg <= 17) || iReg >= 28);
- if (ctx == 0)
- {
- if (!isVolatile)
- {
- continue;
- }
- }
- else if (isVolatile) // skip volatile registers for second context
- {
- continue;
- }
-#endif
- {
- _ASSERTE(iReg < ARRAY_SIZE(rgRegisters));
-#ifdef TARGET_ARM
- pReg = *(SIZE_T**)(pContext + rgRegisters[iReg].cbContextOffset);
- if (iEncodedReg == 12)
- {
- pReg = *(SIZE_T**)((BYTE*)&pRD->volatileCurrContextPointers + rgRegisters[iEncodedReg].cbContextOffset);
- }
- if (iEncodedReg == iSPRegister)
- {
- pReg = (SIZE_T*)((BYTE*)pRD->pCurrentContext + rgRegisters[iEncodedReg].cbContextOffset);
- }
- if (iEncodedReg == iBFRegister)
- {
- pReg = *(SIZE_T**)((BYTE*)pRD->pCurrentContextPointers + rgRegisters[iEncodedReg].cbContextOffset);
- }
-
-#elif defined(TARGET_ARM64) || defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64)
- pReg = *(SIZE_T**)(pContext + rgRegisters[iReg].cbContextOffset);
- if (iEncodedReg == iSPRegister)
- {
- pReg = (SIZE_T*)((BYTE*)pRD->pCurrentContext + rgRegisters[iReg].cbContextOffset);
- }
-#else
- pReg = (SIZE_T*)(pContext + rgRegisters[iReg].cbContextOffset);
-#endif
-
- }
-
- SIZE_T ptr = (SIZE_T)pRecord->ppObject;
-
-
- //
- // Is it reporting the register?
- //
- if (ptr == (SIZE_T)pReg)
- {
- // Make sure the register is in the current frame.
-#if defined(TARGET_AMD64)
- if (0 != ctx)
- {
- m_Error = REPORTED_REGISTER_IN_CALLERS_FRAME;
- return TRUE;
- }
-#endif
- // Make sure the register isn't sp or the frame pointer.
- if ( iSPRegister == iEncodedReg
- || m_StackBaseRegister == iEncodedReg)
- {
- m_Error = REPORTED_FRAME_POINTER;
- return TRUE;
- }
-
- if (m_pfnRegisterStateChange(
- CodeOffset,
- iEncodedReg,
- (GcSlotFlags)EncodedFlags,
- fLive ? GC_SLOT_LIVE : GC_SLOT_DEAD,
- m_pvCallbackData))
- {
- return TRUE;
- }
-
- return FALSE;
- }
-
- //
- // Is it reporting an address relative to the register's value?
- //
-
- SIZE_T regVal = *pReg;
-
- if ( ptr >= regVal - ADDRESS_SPACING/2
- && ptr < regVal + ADDRESS_SPACING/2)
- {
- //
- // The register must be sp, caller's sp, or the frame register.
- // The GcInfoEncoder interface doesn't have a way to express
- // anything else.
- //
-
- if (!( iSPRegister == iEncodedReg
- || m_StackBaseRegister == iEncodedReg))
- {
- continue;
- }
-
- GcStackSlotBase base;
- if (iSPRegister == iEncodedReg)
- {
-#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64)
- base = GC_SP_REL;
-#else
- if (0 == ctx)
- base = GC_SP_REL;
- else
- base = GC_CALLER_SP_REL;
-#endif //defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64)
- }
- else
- {
- base = GC_FRAMEREG_REL;
- }
-
- if (m_pfnStackSlotStateChange(
- CodeOffset,
- (GcSlotFlags)EncodedFlags,
- base,
- ptr - regVal,
- fLive ? GC_SLOT_LIVE : GC_SLOT_DEAD,
- m_pvCallbackData))
- {
- return TRUE;
- }
-
- return FALSE;
- }
- }
-
-#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64)
- pContext = (BYTE*)pRD->pCurrentContextPointers;
-#else
- pContext = (BYTE*)pRD->pCallerContext;
-#endif
-
- }
-
- m_Error = REPORTED_INVALID_POINTER;
- return TRUE;
-}
-
-
-BOOL GcInfoDumper::ReportPointerDifferences (
- UINT32 offset,
- REGDISPLAY *pRD,
- LivePointerRecord *pPrevState)
-{
- LivePointerRecord *pNewRecord;
- LivePointerRecord *pOldRecord;
-
- //
- // Match up old and new records
- //
-
- for (pNewRecord = m_pRecords; pNewRecord; pNewRecord = pNewRecord->pNext)
- {
- for (LivePointerRecord *pOldRecord = pPrevState; pOldRecord; pOldRecord = pOldRecord->pNext)
- {
- if ( pOldRecord->flags == pNewRecord->flags
- && pOldRecord->ppObject == pNewRecord->ppObject)
- {
- pOldRecord->marked = offset;
- pNewRecord->marked = offset;
- }
- }
- }
-
- //
- // Report out any old records that were not marked as dead pointers.
- //
-
- for (pOldRecord = pPrevState; pOldRecord; pOldRecord = pOldRecord->pNext)
- {
- if (pOldRecord->marked != offset)
- {
- if ( ReportPointerRecord(offset, FALSE, pRD, pOldRecord)
- || m_Error)
- {
- return TRUE;
- }
- }
- }
-
- //
- // Report any new records that were not marked as new pointers.
- //
-
- for (pNewRecord = m_pRecords; pNewRecord; pNewRecord = pNewRecord->pNext)
- {
- if (pNewRecord->marked != offset)
- {
- if ( ReportPointerRecord(offset, TRUE, pRD, pNewRecord)
- || m_Error)
- {
- return TRUE;
- }
- }
- }
-
- return FALSE;
-}
-
-
-GcInfoDumper::EnumerateStateChangesResults GcInfoDumper::EnumerateStateChanges (
- InterruptibleStateChangeProc *pfnInterruptibleStateChange,
- RegisterStateChangeProc *pfnRegisterStateChange,
- StackSlotStateChangeProc *pfnStackSlotStateChange,
- OnSafePointProc *pfnSafePointFunc,
- PVOID pvData)
-{
- m_Error = SUCCESS;
-
- //
- // Save callback functions for use by helper functions
- //
-
- m_pfnRegisterStateChange = pfnRegisterStateChange;
- m_pfnStackSlotStateChange = pfnStackSlotStateChange;
- m_pvCallbackData = pvData;
-
- //
- // Decode header information
- //
- GcInfoDecoder hdrdecoder(m_gcTable,
- (GcInfoDecoderFlags)( DECODE_SECURITY_OBJECT
- | DECODE_CODE_LENGTH
- | DECODE_GC_LIFETIMES
- | DECODE_VARARG),
- 0);
-
- UINT32 cbEncodedMethodSize = hdrdecoder.GetCodeLength();
- m_StackBaseRegister = hdrdecoder.GetStackBaseRegister();
-
- //
- // Set up a bogus REGDISPLAY to pass to EnumerateLiveSlots. This will
- // allow us to later identify registers or stack offsets passed to the
- // callback.
- //
-
- REGDISPLAY regdisp;
-
- ZeroMemory(®disp, sizeof(regdisp));
-
- regdisp.pContext = ®disp.ctxOne;
- regdisp.IsCallerContextValid = TRUE;
- regdisp.pCurrentContext = ®disp.ctxOne;
- regdisp.pCallerContext = ®disp.ctxTwo;
-
-#define NEXT_ADDRESS() (UniqueAddress += ADDRESS_SPACING)
-
- UINT iReg;
-
-#ifdef HOST_64BIT
- ULONG64 UniqueAddress = ADDRESS_SPACING*2;
- ULONG64 *pReg;
-#else
- DWORD UniqueAddress = ADDRESS_SPACING*2;
- DWORD *pReg;
-#endif
-
-#define FILL_REGS(start, count) \
- do { \
- for (iReg = 0, pReg = ®disp.start; iReg < count; iReg++, pReg++) \
- { \
- *pReg = NEXT_ADDRESS(); \
- } \
- } while (0)
-
-#ifdef TARGET_AMD64
- FILL_REGS(pCurrentContext->Rax, 16);
- FILL_REGS(pCallerContext->Rax, 16);
-
- regdisp.pCurrentContextPointers = ®disp.ctxPtrsOne;
- regdisp.pCallerContextPointers = ®disp.ctxPtrsTwo;
-
- ULONGLONG **ppCurrentRax = ®disp.pCurrentContextPointers->Rax;
- ULONGLONG **ppCallerRax = ®disp.pCallerContextPointers ->Rax;
-
- for (iReg = 0; iReg < 16; iReg++)
- {
- *(ppCurrentRax + iReg) = ®disp.pCurrentContext->Rax + iReg;
- *(ppCallerRax + iReg) = ®disp.pCallerContext ->Rax + iReg;
- }
-#elif defined(TARGET_ARM)
- FILL_REGS(pCurrentContext->R0, 16);
- FILL_REGS(pCallerContext->R0, 16);
-
- regdisp.pCurrentContextPointers = ®disp.ctxPtrsOne;
- regdisp.pCallerContextPointers = ®disp.ctxPtrsTwo;
-
- ULONG **ppCurrentReg = ®disp.pCurrentContextPointers->R4;
- ULONG **ppCallerReg = ®disp.pCallerContextPointers->R4;
-
- for (iReg = 0; iReg < 8; iReg++)
- {
- *(ppCurrentReg + iReg) = ®disp.pCurrentContext->R4 + iReg;
- *(ppCallerReg + iReg) = ®disp.pCallerContext->R4 + iReg;
- }
- /// Set Lr
- *(ppCurrentReg + 8) = ®disp.pCurrentContext->R4 + 10;
- *(ppCallerReg + 8) = ®disp.pCallerContext->R4 + 10;
- ULONG **ppVolatileReg = ®disp.volatileCurrContextPointers.R0;
- for (iReg = 0; iReg < 4; iReg++)
- {
- *(ppVolatileReg+iReg) = ®disp.pCurrentContext->R0 + iReg;
- }
- /// Set R12
- *(ppVolatileReg+4) = ®disp.pCurrentContext->R0+12;
-
-#elif defined(TARGET_ARM64)
- FILL_REGS(pCurrentContext->X0, 33);
- FILL_REGS(pCallerContext->X0, 33);
-
- regdisp.pCurrentContextPointers = ®disp.ctxPtrsOne;
- regdisp.pCallerContextPointers = ®disp.ctxPtrsTwo;
-
- ULONG64 **ppCurrentReg = ®disp.pCurrentContextPointers->X19;
- ULONG64 **ppCallerReg = ®disp.pCallerContextPointers->X19;
-
- for (iReg = 0; iReg < 11; iReg++)
- {
- *(ppCurrentReg + iReg) = ®disp.pCurrentContext->X19 + iReg;
- *(ppCallerReg + iReg) = ®disp.pCallerContext->X19 + iReg;
- }
-
- /// Set Lr
- *(ppCurrentReg + 11) = ®disp.pCurrentContext->Lr;
- *(ppCallerReg + 11) = ®disp.pCallerContext->Lr;
-
- ULONG64 **ppVolatileReg = ®disp.volatileCurrContextPointers.X0;
- for (iReg = 0; iReg < 18; iReg++)
- {
- *(ppVolatileReg+iReg) = ®disp.pCurrentContext->X0 + iReg;
- }
-#elif defined(TARGET_LOONGARCH64)
- FILL_REGS(pCurrentContext->R0, 33);
- FILL_REGS(pCallerContext->R0, 33);
-
- regdisp.pCurrentContextPointers = ®disp.ctxPtrsOne;
- regdisp.pCallerContextPointers = ®disp.ctxPtrsTwo;
-
- ULONG64 **ppCurrentReg = ®disp.pCurrentContextPointers->S0;
- ULONG64 **ppCallerReg = ®disp.pCallerContextPointers->S0;
-
- // Set S0-S8
- for (iReg = 0; iReg < 9; iReg++)
- {
- *(ppCurrentReg + iReg) = ®disp.pCurrentContext->S0 + iReg;
- *(ppCallerReg + iReg) = ®disp.pCallerContext->S0 + iReg;
- }
-
- // Set Ra, Tp, Fp
- regdisp.pCurrentContextPointers->Ra = ®disp.pCurrentContext->Ra;
- regdisp.pCallerContextPointers->Ra = ®disp.pCallerContext->Ra;
- regdisp.pCurrentContextPointers->Tp = ®disp.pCurrentContext->Tp;
- regdisp.pCallerContextPointers->Tp = ®disp.pCallerContext->Tp;
- regdisp.pCurrentContextPointers->Fp = ®disp.pCurrentContext->Fp;
- regdisp.pCallerContextPointers->Fp = ®disp.pCallerContext->Fp;
-
- ULONG64 **ppVolatileReg = ®disp.volatileCurrContextPointers.A0;
- for (iReg = 0; iReg < 18; iReg++)
- {
- *(ppVolatileReg+iReg) = ®disp.pCurrentContext->A0 + iReg;
- }
- regdisp.volatileCurrContextPointers.R0 = ®disp.pCurrentContext->R0;
-#elif defined(TARGET_RISCV64)
- FILL_REGS(pCurrentContext->R0, 33);
- FILL_REGS(pCallerContext->R0, 33);
-
- regdisp.pCurrentContextPointers = ®disp.ctxPtrsOne;
- regdisp.pCallerContextPointers = ®disp.ctxPtrsTwo;
-
- // Set S1
- regdisp.pCurrentContextPointers->S1 = ®disp.pCurrentContext->S1;
- regdisp.pCallerContextPointers ->S1 = ®disp.pCallerContext ->S1;
-
- ULONG64 **ppCurrentReg = ®disp.pCurrentContextPointers->S2;
- ULONG64 **ppCallerReg = ®disp.pCallerContextPointers ->S2;
- // Set S2-S11
- for (iReg = 0; iReg < 10; iReg++)
- {
- *(ppCurrentReg + iReg) = ®disp.pCurrentContext->S2 + iReg;
- *(ppCallerReg + iReg) = ®disp.pCallerContext ->S2 + iReg;
- }
-
- // Set Fp
- regdisp.pCurrentContextPointers->Fp = ®disp.pCurrentContext->Fp;
- regdisp.pCallerContextPointers ->Fp = ®disp.pCallerContext ->Fp;
-
- // Set Gp
- regdisp.pCurrentContextPointers->Gp = ®disp.pCurrentContext->Gp;
- regdisp.pCallerContextPointers ->Gp = ®disp.pCallerContext ->Gp;
-
- // Set Tp
- regdisp.pCurrentContextPointers->Tp = ®disp.pCurrentContext->Tp;
- regdisp.pCallerContextPointers ->Tp = ®disp.pCallerContext ->Tp;
-
- // Set Ra
- regdisp.pCurrentContextPointers->Ra = ®disp.pCurrentContext->Ra;
- regdisp.pCallerContextPointers ->Ra = ®disp.pCallerContext ->Ra;
-
- regdisp.volatileCurrContextPointers.R0 = ®disp.pCurrentContext->R0;
- regdisp.volatileCurrContextPointers.A0 = ®disp.pCurrentContext->A0;
- regdisp.volatileCurrContextPointers.A1 = ®disp.pCurrentContext->A1;
- regdisp.volatileCurrContextPointers.A2 = ®disp.pCurrentContext->A2;
- regdisp.volatileCurrContextPointers.A3 = ®disp.pCurrentContext->A3;
- regdisp.volatileCurrContextPointers.A4 = ®disp.pCurrentContext->A4;
- regdisp.volatileCurrContextPointers.A5 = ®disp.pCurrentContext->A5;
- regdisp.volatileCurrContextPointers.A6 = ®disp.pCurrentContext->A6;
- regdisp.volatileCurrContextPointers.A7 = ®disp.pCurrentContext->A7;
- regdisp.volatileCurrContextPointers.T0 = ®disp.pCurrentContext->T0;
- regdisp.volatileCurrContextPointers.T1 = ®disp.pCurrentContext->T1;
- regdisp.volatileCurrContextPointers.T2 = ®disp.pCurrentContext->T2;
- regdisp.volatileCurrContextPointers.T3 = ®disp.pCurrentContext->T3;
- regdisp.volatileCurrContextPointers.T4 = ®disp.pCurrentContext->T4;
- regdisp.volatileCurrContextPointers.T5 = ®disp.pCurrentContext->T5;
- regdisp.volatileCurrContextPointers.T6 = ®disp.pCurrentContext->T6;
-#else
-PORTABILITY_ASSERT("GcInfoDumper::EnumerateStateChanges is not implemented on this platform.");
-#endif
-
-#undef FILL_REGS
-#undef NEXT_ADDRESS
-
- SyncRegDisplayToCurrentContext(®disp);
-
- //
- // Enumerate pointers at every possible offset.
- //
-
-#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
- GcInfoDecoder safePointDecoder(m_gcTable, (GcInfoDecoderFlags)0, 0);
-#endif
-
- {
- GcInfoDecoder untrackedDecoder(m_gcTable, DECODE_GC_LIFETIMES, 0);
- untrackedDecoder.EnumerateUntrackedSlots(®disp,
- 0,
- &LivePointerCallback,
- this);
-
- BOOL fStop = ReportPointerDifferences(
- -2,
- ®disp,
- NULL);
-
- FreePointerRecords(m_pRecords);
- m_pRecords = NULL;
-
- if (fStop || m_Error)
- return m_Error;
- }
-
- LivePointerRecord *pLastState = NULL;
- BOOL fPrevInterruptible = FALSE;
-
- for (UINT32 offset = 0; offset <= cbEncodedMethodSize; offset++)
- {
- BOOL fNewInterruptible = FALSE;
-
- GcInfoDecoder decoder1(m_gcTable,
- (GcInfoDecoderFlags)( DECODE_SECURITY_OBJECT
- | DECODE_CODE_LENGTH
- | DECODE_VARARG
-#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
- | DECODE_HAS_TAILCALLS
-#endif // TARGET_ARM || TARGET_ARM64 || TARGET_LOONGARCH64 || TARGET_RISCV64
-
- | DECODE_INTERRUPTIBILITY),
- offset);
-
- fNewInterruptible = decoder1.IsInterruptible();
-
- if (fNewInterruptible != fPrevInterruptible)
- {
- if (pfnInterruptibleStateChange(offset, fNewInterruptible, pvData))
- break;
-
- fPrevInterruptible = fNewInterruptible;
- }
-
- unsigned flags = ActiveStackFrame;
-
-#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
- UINT32 safePointOffset = offset;
-#if defined(TARGET_AMD64) || defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64)
- safePointOffset++;
-#endif
- if(safePointDecoder.IsSafePoint(safePointOffset))
- {
- _ASSERTE(!fNewInterruptible);
- if (pfnSafePointFunc(safePointOffset, pvData))
- break;
-
- flags = 0;
- }
-#endif
-
- GcInfoDecoder decoder2(m_gcTable,
- (GcInfoDecoderFlags)( DECODE_SECURITY_OBJECT
- | DECODE_CODE_LENGTH
- | DECODE_VARARG
- | DECODE_GC_LIFETIMES
- | DECODE_NO_VALIDATION),
- offset);
-
- _ASSERTE(!m_pRecords);
-
- if(!fNewInterruptible && (flags == ActiveStackFrame))
- {
- // Decoding at non-interruptible offsets is only
- // valid in the ExecutionAborted case
- flags |= ExecutionAborted;
- }
-
- if (!decoder2.EnumerateLiveSlots(
- ®disp,
- true,
- flags | NoReportUntracked,
- &LivePointerCallback,
- this))
- {
- m_Error = DECODER_FAILED;
- }
-
- if (m_Error)
- break;
-
- if (ReportPointerDifferences(
- offset,
- ®disp,
- pLastState))
- {
- break;
- }
-
- if (m_Error)
- break;
-
- FreePointerRecords(pLastState);
-
- pLastState = m_pRecords;
- m_pRecords = NULL;
-
- size_t tempSize = decoder2.GetNumBytesRead();
- if( m_gcInfoSize < tempSize )
- m_gcInfoSize = tempSize;
- }
-
- FreePointerRecords(pLastState);
-
- FreePointerRecords(m_pRecords);
- m_pRecords = NULL;
-
- return m_Error;
-}
#ifdef TARGET_X86
/*****************************************************************************/
+#if !defined(TARGET_UNIX) && !defined(SOS_INCLUDE)
+#include "utilcode.h" // For _ASSERTE()
+#endif
#include "gcdump.h"
"EDI"
};
- _ASSERTE(reg < ARRAY_SIZE(regNames));
+ _ASSERTE(reg < (sizeof(regNames)/sizeof(regNames[0])));
return regNames[reg];
}
"EBP"
};
- _ASSERTE(reg < ARRAY_SIZE(regNames));
+ _ASSERTE(reg < (sizeof(regNames)/sizeof(regNames[0])));
return regNames[reg];
}
gcPrintf(" GuardStack cookie = [%s%u]\n",
header->ebpFrame ? "EBP-" : "ESP+", header->gsCookieOffset);
if (header->syncStartOffset != INVALID_SYNC_OFFSET)
- gcPrintf(" Sync region = [%u,%u]\n",
+ gcPrintf(" Sync region = [%u,%u] ([0x%x,0x%x])\n",
+ header->syncStartOffset, header->syncEndOffset,
header->syncStartOffset, header->syncEndOffset);
if (header->epilogCount > 1 || (header->epilogCount != 0 &&
/* non-ptr arg push */
curOffs += (val & 0x07);
-#ifndef UNIX_X86_ABI
- // For x86/Linux, non-ptr arg pushes can be reported even for EBP frames
+#ifndef FEATURE_EH_FUNCLETS
+ // For funclets, non-ptr arg pushes can be reported even for EBP frames
_ASSERTE(!header.ebpFrame);
-#endif // UNIX_X86_ABI
+#endif // FEATURE_EH_FUNCLETS
argCnt++;
DumpEncoding(bp, table-bp); bp = table;
if (callPndTab)
{
-#if defined(_DEBUG) && !defined(STRIKE)
- // note: _ASSERTE is a no-op for strike
PTR_CBYTE offsStart = table;
-#endif
gcPrintf(" argOffs(%d) =", callPndTabCnt);
for (unsigned i=0; i < callPndTabCnt; i++)
{
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef SOS_INCLUDE
+#include "common.h"
+#endif
+#include "gcinfodumper.h"
+#include "gcinfodecoder.h"
+
+// Stolen from gc.h.
+#define GC_CALL_INTERIOR 0x1
+#define GC_CALL_PINNED 0x2
+
+
+#ifdef HOST_64BIT
+// All stack offsets are INT32's, so this guarantees a disjoint range of
+// addresses for each register.
+#define ADDRESS_SPACING UI64(0x100000000)
+#elif defined(TARGET_ARM)
+#define ADDRESS_SPACING 0x100000
+#else
+#error pick suitable ADDRESS_SPACING for platform
+#endif
+
+GcInfoDumper::GcInfoDumper (GCInfoToken gcInfoToken)
+{
+ m_gcTable = gcInfoToken;
+ m_pRecords = NULL;
+ m_gcInfoSize = 0;
+}
+
+
+GcInfoDumper::~GcInfoDumper ()
+{
+ FreePointerRecords(m_pRecords);
+}
+size_t GcInfoDumper::GetGCInfoSize()
+{
+ return m_gcInfoSize;
+}
+
+
+//static*
+void GcInfoDumper::LivePointerCallback (
+ LPVOID hCallback, // callback data
+ OBJECTREF* pObject, // address of object-reference we are reporting
+ uint32_t flags // is this a pinned and/or interior pointer
+ DAC_ARG(DacSlotLocation loc)) // the location of the slot
+{
+ GcInfoDumper *pDumper = (GcInfoDumper*)hCallback;
+ LivePointerRecord **ppRecords = &pDumper->m_pRecords;
+ LivePointerRecord *pRecord = new LivePointerRecord();
+ if (!pRecord)
+ {
+ pDumper->m_Error = OUT_OF_MEMORY;
+ return;
+ }
+
+ pRecord->ppObject = pObject;
+ pRecord->flags = flags;
+ pRecord->marked = -1;
+
+ pRecord->pNext = *ppRecords;
+ *ppRecords = pRecord;
+}
+
+
+//static
+void GcInfoDumper::FreePointerRecords (LivePointerRecord *pRecords)
+{
+ while (pRecords)
+ {
+ LivePointerRecord *trash = pRecords;
+ pRecords = pRecords->pNext;
+ delete trash;
+ }
+}
+
+//This function tries to find the address of the managed object in the registers of the current function's context,
+//failing which it checks if it is present in the stack of the current function. IF it finds one it reports appropriately
+//
+//For Amd64, this additionally tries to probe in the stack for the caller.
+//This behavior largely seems to be present for legacy x64 jit and is not likely to be used anywhere else
+BOOL GcInfoDumper::ReportPointerRecord (
+ UINT32 CodeOffset,
+ BOOL fLive,
+ REGDISPLAY *pRD,
+ LivePointerRecord *pRecord)
+{
+ //
+ // Convert the flags passed to the GC into flags used by GcInfoEncoder.
+ //
+
+ int EncodedFlags = 0;
+
+ if (pRecord->flags & GC_CALL_INTERIOR)
+ EncodedFlags |= GC_SLOT_INTERIOR;
+
+ if (pRecord->flags & GC_CALL_PINNED)
+ EncodedFlags |= GC_SLOT_PINNED;
+
+ //
+ // Compare the reported pointer against the REGIDISPLAY pointers to
+ // figure out the register or register-relative location.
+ //
+
+ struct RegisterInfo
+ {
+ SIZE_T cbContextOffset;
+ };
+
+ static RegisterInfo rgRegisters[] = {
+#define REG(reg, field) { offsetof(T_CONTEXT, field) }
+
+#ifdef TARGET_AMD64
+ REG(rax, Rax),
+ REG(rcx, Rcx),
+ REG(rdx, Rdx),
+ REG(rbx, Rbx),
+ REG(rsp, Rsp),
+ REG(rbp, Rbp),
+ REG(rsi, Rsi),
+ REG(rdi, Rdi),
+ REG(r8, R8),
+ REG(r9, R9),
+ REG(r10, R10),
+ REG(r11, R11),
+ REG(r12, R12),
+ REG(r13, R13),
+ REG(r14, R14),
+ REG(r15, R15),
+#elif defined(TARGET_ARM)
+#undef REG
+#define REG(reg, field) { offsetof(ArmVolatileContextPointer, field) }
+ REG(r0, R0),
+ REG(r1, R1),
+ REG(r2, R2),
+ REG(r3, R3),
+#undef REG
+#define REG(reg, field) { offsetof(T_KNONVOLATILE_CONTEXT_POINTERS, field) }
+ REG(r4, R4),
+ REG(r5, R5),
+ REG(r6, R6),
+ REG(r7, R7),
+ REG(r8, R8),
+ REG(r9, R9),
+ REG(r10, R10),
+ REG(r11, R11),
+ { offsetof(ArmVolatileContextPointer, R12) },
+ { offsetof(T_CONTEXT, Sp) },
+ { offsetof(T_KNONVOLATILE_CONTEXT_POINTERS, Lr) },
+ { offsetof(T_CONTEXT, Sp) },
+ { offsetof(T_KNONVOLATILE_CONTEXT_POINTERS, R7) },
+#elif defined(TARGET_ARM64)
+#undef REG
+#define REG(reg, field) { offsetof(Arm64VolatileContextPointer, field) }
+ REG(x0, X0),
+ REG(x1, X1),
+ REG(x2, X2),
+ REG(x3, X3),
+ REG(x4, X4),
+ REG(x5, X5),
+ REG(x6, X6),
+ REG(x7, X7),
+ REG(x8, X8),
+ REG(x9, X9),
+ REG(x10, X10),
+ REG(x11, X11),
+ REG(x12, X12),
+ REG(x13, X13),
+ REG(x14, X14),
+ REG(x15, X15),
+ REG(x16, X16),
+ REG(x17, X17),
+#undef REG
+#define REG(reg, field) { offsetof(T_KNONVOLATILE_CONTEXT_POINTERS, field) }
+ REG(x19, X19),
+ REG(x20, X20),
+ REG(x21, X21),
+ REG(x22, X22),
+ REG(x23, X23),
+ REG(x24, X24),
+ REG(x25, X25),
+ REG(x26, X26),
+ REG(x27, X27),
+ REG(x28, X28),
+ REG(Fp, Fp),
+ REG(Lr, Lr),
+ { offsetof(T_CONTEXT, Sp) },
+#undef REG
+#elif defined(TARGET_LOONGARCH64)
+#undef REG
+#define REG(reg, field) { offsetof(T_KNONVOLATILE_CONTEXT_POINTERS, field) }
+#define vREG(reg, field) { offsetof(LoongArch64VolatileContextPointer, field) }
+ vREG(zero, R0),
+ REG(ra, Ra),
+ REG(tp, Tp),
+ { offsetof(T_CONTEXT, Sp) },
+ vREG(a0, A0),
+ vREG(a1, A1),
+ vREG(a2, A2),
+ vREG(a3, A3),
+ vREG(a4, A4),
+ vREG(a5, A5),
+ vREG(a6, A6),
+ vREG(a7, A7),
+ vREG(t0, T0),
+ vREG(t1, T1),
+ vREG(t2, T2),
+ vREG(t3, T3),
+ vREG(t4, T4),
+ vREG(t5, T5),
+ vREG(t6, T6),
+ vREG(t7, T7),
+ vREG(t8, T8),
+ vREG(x0, X0),
+ REG(fp, Fp),
+ REG(s0, S0),
+ REG(s1, S1),
+ REG(s2, S2),
+ REG(s3, S3),
+ REG(s4, S4),
+ REG(s5, S5),
+ REG(s6, S6),
+ REG(s7, S7),
+ REG(s8, S8),
+#undef vREG
+#undef REG
+#elif defined(TARGET_RISCV64)
+#undef REG
+#define REG(reg, field) { offsetof(T_KNONVOLATILE_CONTEXT_POINTERS, field) }
+#define vREG(reg, field) { offsetof(RiscV64VolatileContextPointer, field) }
+ vREG(zero, R0),
+ REG(Ra, Ra),
+ { offsetof(T_CONTEXT, Sp) },
+ REG(Gp, Gp),
+ REG(Tp, Tp),
+ vREG(t0, T0),
+ vREG(t1, T1),
+ vREG(t2, T2),
+ REG(Fp, Fp),
+ REG(s1, S1),
+ vREG(a0, A0),
+ vREG(a1, A1),
+ vREG(a2, A2),
+ vREG(a3, A3),
+ vREG(a4, A4),
+ vREG(a5, A5),
+ vREG(a6, A6),
+ vREG(a7, A7),
+ REG(s2, S2),
+ REG(s3, S3),
+ REG(s4, S4),
+ REG(s5, S5),
+ REG(s6, S6),
+ REG(s7, S7),
+ REG(s8, S8),
+ REG(s9, S9),
+ REG(s10, S10),
+ REG(s11, S11),
+ vREG(t3, T3),
+ vREG(t4, T4),
+ vREG(t5, T5),
+ vREG(t6, T6),
+#undef vREG
+#undef REG
+#else
+PORTABILITY_ASSERT("GcInfoDumper::ReportPointerRecord is not implemented on this platform.")
+#endif
+
+ };
+
+ const UINT nCONTEXTRegisters = sizeof(rgRegisters)/sizeof(rgRegisters[0]);
+
+ UINT iFirstRegister;
+ UINT iSPRegister;
+ UINT nRegisters;
+
+ iFirstRegister = 0;
+ nRegisters = nCONTEXTRegisters;
+#ifdef TARGET_AMD64
+ iSPRegister = (offsetof(CONTEXT, Rsp) - offsetof(CONTEXT, Rax)) / sizeof(ULONGLONG);
+#elif defined(TARGET_ARM64)
+ iSPRegister = (offsetof(T_CONTEXT, Sp) - offsetof(T_CONTEXT, X0)) / sizeof(ULONGLONG);
+#elif defined(TARGET_ARM)
+ iSPRegister = (offsetof(T_CONTEXT, Sp) - offsetof(T_CONTEXT, R0)) / sizeof(ULONG);
+ UINT iBFRegister = m_StackBaseRegister;
+#elif defined(TARGET_LOONGARCH64)
+ iSPRegister = (offsetof(T_CONTEXT, Sp) - offsetof(T_CONTEXT, R0)) / sizeof(ULONGLONG);
+#elif defined(TARGET_RISCV64)
+ iSPRegister = (offsetof(T_CONTEXT, Sp) - offsetof(T_CONTEXT, R0)) / sizeof(ULONGLONG);
+#endif
+
+#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64)
+ BYTE* pContext = (BYTE*)&(pRD->volatileCurrContextPointers);
+#else
+ BYTE* pContext = (BYTE*)pRD->pCurrentContext;
+#endif
+
+ for (int ctx = 0; ctx < 2; ctx++)
+ {
+ SIZE_T *pReg = NULL;
+
+ for (UINT iReg = 0; iReg < nRegisters; iReg++)
+ {
+ UINT iEncodedReg = iFirstRegister + iReg;
+#ifdef TARGET_ARM
+ if (ctx == 1)
+ {
+ if ((iReg < 4 || iReg == 12)) // skip volatile registers for second context
+ {
+ continue;
+ }
+ // Force StackRegister and BaseRegister at the end (r15, r16)
+ if (iReg == iSPRegister || iReg == m_StackBaseRegister)
+ {
+ continue;
+ }
+ if (iReg == 15)
+ {
+ if (iBFRegister != NO_STACK_BASE_REGISTER)
+ {
+ iEncodedReg = iBFRegister;
+ }
+ else
+ {
+ continue;
+ }
+ }
+ if (iReg == 16)
+ {
+ iEncodedReg = iSPRegister;
+ }
+ }
+ if (ctx == 0 && iReg == 4) //ArmVolatileContextPointer 5th register is R12
+ {
+ iEncodedReg = 12;
+ }
+ else if (ctx == 0 && iReg > 4)
+ {
+ break;
+ }
+#elif defined (TARGET_ARM64)
+ iEncodedReg = iEncodedReg + ctx; //We have to compensate for not tracking x18
+ if (ctx == 1)
+ {
+ if (iReg < 18 ) // skip volatile registers for second context
+ {
+ continue;
+ }
+
+ if (iReg == 30)
+ {
+ iEncodedReg = iSPRegister;
+ }
+ }
+
+ if (ctx == 0 && iReg > 17)
+ {
+ break;
+ }
+#elif defined(TARGET_LOONGARCH64)
+ bool isVolatile = (iReg == 0 || (iReg >= 4 && iReg <= 21));
+ if (ctx == 0)
+ {
+ if (!isVolatile)
+ {
+ continue;
+ }
+ }
+ else if (isVolatile) // skip volatile registers for second context
+ {
+ continue;
+ }
+#elif defined(TARGET_RISCV64)
+ bool isVolatile = (iReg == 0 || (iReg >= 5 && iReg <= 7) || (iReg >= 10 && iReg <= 17) || iReg >= 28);
+ if (ctx == 0)
+ {
+ if (!isVolatile)
+ {
+ continue;
+ }
+ }
+ else if (isVolatile) // skip volatile registers for second context
+ {
+ continue;
+ }
+#endif
+ {
+ _ASSERTE(iReg < nCONTEXTRegisters);
+#ifdef TARGET_ARM
+ pReg = *(SIZE_T**)(pContext + rgRegisters[iReg].cbContextOffset);
+ if (iEncodedReg == 12)
+ {
+ pReg = *(SIZE_T**)((BYTE*)&pRD->volatileCurrContextPointers + rgRegisters[iEncodedReg].cbContextOffset);
+ }
+ if (iEncodedReg == iSPRegister)
+ {
+ pReg = (SIZE_T*)((BYTE*)pRD->pCurrentContext + rgRegisters[iEncodedReg].cbContextOffset);
+ }
+ if (iEncodedReg == iBFRegister)
+ {
+ pReg = *(SIZE_T**)((BYTE*)pRD->pCurrentContextPointers + rgRegisters[iEncodedReg].cbContextOffset);
+ }
+
+#elif defined(TARGET_ARM64) || defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64)
+ pReg = *(SIZE_T**)(pContext + rgRegisters[iReg].cbContextOffset);
+ if (iEncodedReg == iSPRegister)
+ {
+ pReg = (SIZE_T*)((BYTE*)pRD->pCurrentContext + rgRegisters[iReg].cbContextOffset);
+ }
+#else
+ pReg = (SIZE_T*)(pContext + rgRegisters[iReg].cbContextOffset);
+#endif
+
+ }
+
+ SIZE_T ptr = (SIZE_T)pRecord->ppObject;
+
+
+ //
+ // Is it reporting the register?
+ //
+ if (ptr == (SIZE_T)pReg)
+ {
+ // Make sure the register is in the current frame.
+#if defined(TARGET_AMD64)
+ if (0 != ctx)
+ {
+ m_Error = REPORTED_REGISTER_IN_CALLERS_FRAME;
+ return TRUE;
+ }
+#endif
+ // Make sure the register isn't sp or the frame pointer.
+ if ( iSPRegister == iEncodedReg
+ || m_StackBaseRegister == iEncodedReg)
+ {
+ m_Error = REPORTED_FRAME_POINTER;
+ return TRUE;
+ }
+
+ if (m_pfnRegisterStateChange(
+ CodeOffset,
+ iEncodedReg,
+ (GcSlotFlags)EncodedFlags,
+ fLive ? GC_SLOT_LIVE : GC_SLOT_DEAD,
+ m_pvCallbackData))
+ {
+ return TRUE;
+ }
+
+ return FALSE;
+ }
+
+ //
+ // Is it reporting an address relative to the register's value?
+ //
+
+ SIZE_T regVal = *pReg;
+
+ if ( ptr >= regVal - ADDRESS_SPACING/2
+ && ptr < regVal + ADDRESS_SPACING/2)
+ {
+ //
+ // The register must be sp, caller's sp, or the frame register.
+ // The GcInfoEncoder interface doesn't have a way to express
+ // anything else.
+ //
+
+ if (!( iSPRegister == iEncodedReg
+ || m_StackBaseRegister == iEncodedReg))
+ {
+ continue;
+ }
+
+ GcStackSlotBase base;
+ if (iSPRegister == iEncodedReg)
+ {
+#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64)
+ base = GC_SP_REL;
+#else
+ if (0 == ctx)
+ base = GC_SP_REL;
+ else
+ base = GC_CALLER_SP_REL;
+#endif //defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64)
+ }
+ else
+ {
+ base = GC_FRAMEREG_REL;
+ }
+
+ if (m_pfnStackSlotStateChange(
+ CodeOffset,
+ (GcSlotFlags)EncodedFlags,
+ base,
+ ptr - regVal,
+ fLive ? GC_SLOT_LIVE : GC_SLOT_DEAD,
+ m_pvCallbackData))
+ {
+ return TRUE;
+ }
+
+ return FALSE;
+ }
+ }
+
+#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64)
+ pContext = (BYTE*)pRD->pCurrentContextPointers;
+#else
+ pContext = (BYTE*)pRD->pCallerContext;
+#endif
+
+ }
+
+ m_Error = REPORTED_INVALID_POINTER;
+ return TRUE;
+}
+
+
+BOOL GcInfoDumper::ReportPointerDifferences (
+ UINT32 offset,
+ REGDISPLAY *pRD,
+ LivePointerRecord *pPrevState)
+{
+ LivePointerRecord *pNewRecord;
+ LivePointerRecord *pOldRecord;
+
+ //
+ // Match up old and new records
+ //
+
+ for (pNewRecord = m_pRecords; pNewRecord; pNewRecord = pNewRecord->pNext)
+ {
+ for (LivePointerRecord *pOldRecord = pPrevState; pOldRecord; pOldRecord = pOldRecord->pNext)
+ {
+ if ( pOldRecord->flags == pNewRecord->flags
+ && pOldRecord->ppObject == pNewRecord->ppObject)
+ {
+ pOldRecord->marked = offset;
+ pNewRecord->marked = offset;
+ }
+ }
+ }
+
+ //
+ // Report out any old records that were not marked as dead pointers.
+ //
+
+ for (pOldRecord = pPrevState; pOldRecord; pOldRecord = pOldRecord->pNext)
+ {
+ if (pOldRecord->marked != offset)
+ {
+ if ( ReportPointerRecord(offset, FALSE, pRD, pOldRecord)
+ || m_Error)
+ {
+ return TRUE;
+ }
+ }
+ }
+
+ //
+ // Report any new records that were not marked as new pointers.
+ //
+
+ for (pNewRecord = m_pRecords; pNewRecord; pNewRecord = pNewRecord->pNext)
+ {
+ if (pNewRecord->marked != offset)
+ {
+ if ( ReportPointerRecord(offset, TRUE, pRD, pNewRecord)
+ || m_Error)
+ {
+ return TRUE;
+ }
+ }
+ }
+
+ return FALSE;
+}
+
+
+GcInfoDumper::EnumerateStateChangesResults GcInfoDumper::EnumerateStateChanges (
+ InterruptibleStateChangeProc *pfnInterruptibleStateChange,
+ RegisterStateChangeProc *pfnRegisterStateChange,
+ StackSlotStateChangeProc *pfnStackSlotStateChange,
+ OnSafePointProc *pfnSafePointFunc,
+ PVOID pvData)
+{
+ m_Error = SUCCESS;
+
+ //
+ // Save callback functions for use by helper functions
+ //
+
+ m_pfnRegisterStateChange = pfnRegisterStateChange;
+ m_pfnStackSlotStateChange = pfnStackSlotStateChange;
+ m_pvCallbackData = pvData;
+
+ //
+ // Decode header information
+ //
+ GcInfoDecoder hdrdecoder(m_gcTable,
+ (GcInfoDecoderFlags)( DECODE_SECURITY_OBJECT
+ | DECODE_CODE_LENGTH
+ | DECODE_GC_LIFETIMES
+ | DECODE_VARARG),
+ 0);
+
+ UINT32 cbEncodedMethodSize = hdrdecoder.GetCodeLength();
+ m_StackBaseRegister = hdrdecoder.GetStackBaseRegister();
+
+ //
+ // Set up a bogus REGDISPLAY to pass to EnumerateLiveSlots. This will
+ // allow us to later identify registers or stack offsets passed to the
+ // callback.
+ //
+
+ REGDISPLAY regdisp;
+
+ ZeroMemory(®disp, sizeof(regdisp));
+
+ regdisp.pContext = ®disp.ctxOne;
+ regdisp.IsCallerContextValid = TRUE;
+ regdisp.pCurrentContext = ®disp.ctxOne;
+ regdisp.pCallerContext = ®disp.ctxTwo;
+
+#define NEXT_ADDRESS() (UniqueAddress += ADDRESS_SPACING)
+
+ UINT iReg;
+
+#ifdef HOST_64BIT
+ ULONG64 UniqueAddress = ADDRESS_SPACING*2;
+ ULONG64 *pReg;
+#else
+ DWORD UniqueAddress = ADDRESS_SPACING*2;
+ DWORD *pReg;
+#endif
+
+#define FILL_REGS(start, count) \
+ do { \
+ for (iReg = 0, pReg = ®disp.start; iReg < count; iReg++, pReg++) \
+ { \
+ *pReg = NEXT_ADDRESS(); \
+ } \
+ } while (0)
+
+#ifdef TARGET_AMD64
+ FILL_REGS(pCurrentContext->Rax, 16);
+ FILL_REGS(pCallerContext->Rax, 16);
+
+ regdisp.pCurrentContextPointers = ®disp.ctxPtrsOne;
+ regdisp.pCallerContextPointers = ®disp.ctxPtrsTwo;
+
+ ULONGLONG **ppCurrentRax = ®disp.pCurrentContextPointers->Rax;
+ ULONGLONG **ppCallerRax = ®disp.pCallerContextPointers ->Rax;
+
+ for (iReg = 0; iReg < 16; iReg++)
+ {
+ *(ppCurrentRax + iReg) = ®disp.pCurrentContext->Rax + iReg;
+ *(ppCallerRax + iReg) = ®disp.pCallerContext ->Rax + iReg;
+ }
+#elif defined(TARGET_ARM)
+ FILL_REGS(pCurrentContext->R0, 16);
+ FILL_REGS(pCallerContext->R0, 16);
+
+ regdisp.pCurrentContextPointers = ®disp.ctxPtrsOne;
+ regdisp.pCallerContextPointers = ®disp.ctxPtrsTwo;
+
+ ULONG **ppCurrentReg = ®disp.pCurrentContextPointers->R4;
+ ULONG **ppCallerReg = ®disp.pCallerContextPointers->R4;
+
+ for (iReg = 0; iReg < 8; iReg++)
+ {
+ *(ppCurrentReg + iReg) = ®disp.pCurrentContext->R4 + iReg;
+ *(ppCallerReg + iReg) = ®disp.pCallerContext->R4 + iReg;
+ }
+ /// Set Lr
+ *(ppCurrentReg + 8) = ®disp.pCurrentContext->R4 + 10;
+ *(ppCallerReg + 8) = ®disp.pCallerContext->R4 + 10;
+ ULONG **ppVolatileReg = ®disp.volatileCurrContextPointers.R0;
+ for (iReg = 0; iReg < 4; iReg++)
+ {
+ *(ppVolatileReg+iReg) = ®disp.pCurrentContext->R0 + iReg;
+ }
+ /// Set R12
+ *(ppVolatileReg+4) = ®disp.pCurrentContext->R0+12;
+
+#elif defined(TARGET_ARM64)
+ FILL_REGS(pCurrentContext->X0, 33);
+ FILL_REGS(pCallerContext->X0, 33);
+
+ regdisp.pCurrentContextPointers = ®disp.ctxPtrsOne;
+ regdisp.pCallerContextPointers = ®disp.ctxPtrsTwo;
+
+ ULONG64 **ppCurrentReg = ®disp.pCurrentContextPointers->X19;
+ ULONG64 **ppCallerReg = ®disp.pCallerContextPointers->X19;
+
+ for (iReg = 0; iReg < 11; iReg++)
+ {
+ *(ppCurrentReg + iReg) = ®disp.pCurrentContext->X19 + iReg;
+ *(ppCallerReg + iReg) = ®disp.pCallerContext->X19 + iReg;
+ }
+
+ /// Set Lr
+ *(ppCurrentReg + 11) = ®disp.pCurrentContext->Lr;
+ *(ppCallerReg + 11) = ®disp.pCallerContext->Lr;
+
+ ULONG64 **ppVolatileReg = ®disp.volatileCurrContextPointers.X0;
+ for (iReg = 0; iReg < 18; iReg++)
+ {
+ *(ppVolatileReg+iReg) = ®disp.pCurrentContext->X0 + iReg;
+ }
+#elif defined(TARGET_LOONGARCH64)
+ FILL_REGS(pCurrentContext->R0, 33);
+ FILL_REGS(pCallerContext->R0, 33);
+
+ regdisp.pCurrentContextPointers = ®disp.ctxPtrsOne;
+ regdisp.pCallerContextPointers = ®disp.ctxPtrsTwo;
+
+ ULONG64 **ppCurrentReg = ®disp.pCurrentContextPointers->S0;
+ ULONG64 **ppCallerReg = ®disp.pCallerContextPointers->S0;
+
+ // Set S0-S8
+ for (iReg = 0; iReg < 9; iReg++)
+ {
+ *(ppCurrentReg + iReg) = ®disp.pCurrentContext->S0 + iReg;
+ *(ppCallerReg + iReg) = ®disp.pCallerContext->S0 + iReg;
+ }
+
+ // Set Ra, Tp, Fp
+ regdisp.pCurrentContextPointers->Ra = ®disp.pCurrentContext->Ra;
+ regdisp.pCallerContextPointers->Ra = ®disp.pCallerContext->Ra;
+ regdisp.pCurrentContextPointers->Tp = ®disp.pCurrentContext->Tp;
+ regdisp.pCallerContextPointers->Tp = ®disp.pCallerContext->Tp;
+ regdisp.pCurrentContextPointers->Fp = ®disp.pCurrentContext->Fp;
+ regdisp.pCallerContextPointers->Fp = ®disp.pCallerContext->Fp;
+
+ ULONG64 **ppVolatileReg = ®disp.volatileCurrContextPointers.A0;
+ for (iReg = 0; iReg < 18; iReg++)
+ {
+ *(ppVolatileReg+iReg) = ®disp.pCurrentContext->A0 + iReg;
+ }
+ regdisp.volatileCurrContextPointers.R0 = ®disp.pCurrentContext->R0;
+#elif defined(TARGET_RISCV64)
+ FILL_REGS(pCurrentContext->R0, 33);
+ FILL_REGS(pCallerContext->R0, 33);
+
+ regdisp.pCurrentContextPointers = ®disp.ctxPtrsOne;
+ regdisp.pCallerContextPointers = ®disp.ctxPtrsTwo;
+
+ // Set S1
+ regdisp.pCurrentContextPointers->S1 = ®disp.pCurrentContext->S1;
+ regdisp.pCallerContextPointers ->S1 = ®disp.pCallerContext ->S1;
+
+ ULONG64 **ppCurrentReg = ®disp.pCurrentContextPointers->S2;
+ ULONG64 **ppCallerReg = ®disp.pCallerContextPointers ->S2;
+ // Set S2-S11
+ for (iReg = 0; iReg < 10; iReg++)
+ {
+ *(ppCurrentReg + iReg) = ®disp.pCurrentContext->S2 + iReg;
+ *(ppCallerReg + iReg) = ®disp.pCallerContext ->S2 + iReg;
+ }
+
+ // Set Fp
+ regdisp.pCurrentContextPointers->Fp = ®disp.pCurrentContext->Fp;
+ regdisp.pCallerContextPointers ->Fp = ®disp.pCallerContext ->Fp;
+
+ // Set Gp
+ regdisp.pCurrentContextPointers->Gp = ®disp.pCurrentContext->Gp;
+ regdisp.pCallerContextPointers ->Gp = ®disp.pCallerContext ->Gp;
+
+ // Set Tp
+ regdisp.pCurrentContextPointers->Tp = ®disp.pCurrentContext->Tp;
+ regdisp.pCallerContextPointers ->Tp = ®disp.pCallerContext ->Tp;
+
+ // Set Ra
+ regdisp.pCurrentContextPointers->Ra = ®disp.pCurrentContext->Ra;
+ regdisp.pCallerContextPointers ->Ra = ®disp.pCallerContext ->Ra;
+
+ regdisp.volatileCurrContextPointers.R0 = ®disp.pCurrentContext->R0;
+ regdisp.volatileCurrContextPointers.A0 = ®disp.pCurrentContext->A0;
+ regdisp.volatileCurrContextPointers.A1 = ®disp.pCurrentContext->A1;
+ regdisp.volatileCurrContextPointers.A2 = ®disp.pCurrentContext->A2;
+ regdisp.volatileCurrContextPointers.A3 = ®disp.pCurrentContext->A3;
+ regdisp.volatileCurrContextPointers.A4 = ®disp.pCurrentContext->A4;
+ regdisp.volatileCurrContextPointers.A5 = ®disp.pCurrentContext->A5;
+ regdisp.volatileCurrContextPointers.A6 = ®disp.pCurrentContext->A6;
+ regdisp.volatileCurrContextPointers.A7 = ®disp.pCurrentContext->A7;
+ regdisp.volatileCurrContextPointers.T0 = ®disp.pCurrentContext->T0;
+ regdisp.volatileCurrContextPointers.T1 = ®disp.pCurrentContext->T1;
+ regdisp.volatileCurrContextPointers.T2 = ®disp.pCurrentContext->T2;
+ regdisp.volatileCurrContextPointers.T3 = ®disp.pCurrentContext->T3;
+ regdisp.volatileCurrContextPointers.T4 = ®disp.pCurrentContext->T4;
+ regdisp.volatileCurrContextPointers.T5 = ®disp.pCurrentContext->T5;
+ regdisp.volatileCurrContextPointers.T6 = ®disp.pCurrentContext->T6;
+#else
+PORTABILITY_ASSERT("GcInfoDumper::EnumerateStateChanges is not implemented on this platform.");
+#endif
+
+#undef FILL_REGS
+#undef NEXT_ADDRESS
+
+ SyncRegDisplayToCurrentContext(®disp);
+
+ //
+ // Enumerate pointers at every possible offset.
+ //
+
+#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
+ GcInfoDecoder safePointDecoder(m_gcTable, (GcInfoDecoderFlags)0, 0);
+#endif
+
+ {
+ GcInfoDecoder untrackedDecoder(m_gcTable, DECODE_GC_LIFETIMES, 0);
+ untrackedDecoder.EnumerateUntrackedSlots(®disp,
+ 0,
+ &LivePointerCallback,
+ this);
+
+ BOOL fStop = ReportPointerDifferences(
+ -2,
+ ®disp,
+ NULL);
+
+ FreePointerRecords(m_pRecords);
+ m_pRecords = NULL;
+
+ if (fStop || m_Error)
+ return m_Error;
+ }
+
+ LivePointerRecord *pLastState = NULL;
+ BOOL fPrevInterruptible = FALSE;
+
+ for (UINT32 offset = 0; offset <= cbEncodedMethodSize; offset++)
+ {
+ BOOL fNewInterruptible = FALSE;
+
+ GcInfoDecoder decoder1(m_gcTable,
+ (GcInfoDecoderFlags)( DECODE_SECURITY_OBJECT
+ | DECODE_CODE_LENGTH
+ | DECODE_VARARG
+#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
+ | DECODE_HAS_TAILCALLS
+#endif // TARGET_ARM || TARGET_ARM64 || TARGET_LOONGARCH64 || TARGET_RISCV64
+
+ | DECODE_INTERRUPTIBILITY),
+ offset);
+
+ fNewInterruptible = decoder1.IsInterruptible();
+
+ if (fNewInterruptible != fPrevInterruptible)
+ {
+ if (pfnInterruptibleStateChange(offset, fNewInterruptible, pvData))
+ break;
+
+ fPrevInterruptible = fNewInterruptible;
+ }
+
+ unsigned flags = ActiveStackFrame;
+
+#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
+ UINT32 safePointOffset = offset;
+#if defined(TARGET_AMD64) || defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_RISCV64) || defined(TARGET_LOONGARCH64)
+ safePointOffset++;
+#endif
+ if(safePointDecoder.IsSafePoint(safePointOffset))
+ {
+ _ASSERTE(!fNewInterruptible);
+ if (pfnSafePointFunc(safePointOffset, pvData))
+ break;
+
+ flags = 0;
+ }
+#endif
+
+ GcInfoDecoder decoder2(m_gcTable,
+ (GcInfoDecoderFlags)( DECODE_SECURITY_OBJECT
+ | DECODE_CODE_LENGTH
+ | DECODE_VARARG
+ | DECODE_GC_LIFETIMES
+ | DECODE_NO_VALIDATION),
+ offset);
+
+ _ASSERTE(!m_pRecords);
+
+ if(!fNewInterruptible && (flags == ActiveStackFrame))
+ {
+ // Decoding at non-interruptible offsets is only
+ // valid in the ExecutionAborted case
+ flags |= ExecutionAborted;
+ }
+
+ if (!decoder2.EnumerateLiveSlots(
+ ®disp,
+ true,
+ flags | NoReportUntracked,
+ &LivePointerCallback,
+ this))
+ {
+ m_Error = DECODER_FAILED;
+ }
+
+ if (m_Error)
+ break;
+
+ if (ReportPointerDifferences(
+ offset,
+ ®disp,
+ pLastState))
+ {
+ break;
+ }
+
+ if (m_Error)
+ break;
+
+ FreePointerRecords(pLastState);
+
+ pLastState = m_pRecords;
+ m_pRecords = NULL;
+
+ size_t tempSize = decoder2.GetNumBytesRead();
+ if( m_gcInfoSize < tempSize )
+ m_gcInfoSize = tempSize;
+ }
+
+ FreePointerRecords(pLastState);
+
+ FreePointerRecords(m_pRecords);
+ m_pRecords = NULL;
+
+ return m_Error;
+}
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+//
+// APIs for hosting CoreCLR
+//
+
+#ifndef __CORECLR_HOST_H__
+#define __CORECLR_HOST_H__
+
+#if defined(_WIN32) && defined(_M_IX86)
+#define CORECLR_CALLING_CONVENTION __stdcall
+#else
+#define CORECLR_CALLING_CONVENTION
+#endif
+
+#include <stdint.h>
+
+// For each hosting API, we define a function prototype and a function pointer
+// The prototype is useful for implicit linking against the dynamic coreclr
+// library and the pointer for explicit dynamic loading (dlopen, LoadLibrary)
+#define CORECLR_HOSTING_API(function, ...) \
+ extern "C" int CORECLR_CALLING_CONVENTION function(__VA_ARGS__); \
+ typedef int (CORECLR_CALLING_CONVENTION *function##_ptr)(__VA_ARGS__)
+
+//
+// Initialize the CoreCLR. Creates and starts CoreCLR host and creates an app domain
+//
+// Parameters:
+// exePath - Absolute path of the executable that invoked the ExecuteAssembly (the native host application)
+// appDomainFriendlyName - Friendly name of the app domain that will be created to execute the assembly
+// propertyCount - Number of properties (elements of the following two arguments)
+// propertyKeys - Keys of properties of the app domain
+// propertyValues - Values of properties of the app domain
+// hostHandle - Output parameter, handle of the created host
+// domainId - Output parameter, id of the created app domain
+//
+// Returns:
+// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
+//
+CORECLR_HOSTING_API(coreclr_initialize,
+ const char* exePath,
+ const char* appDomainFriendlyName,
+ int propertyCount,
+ const char** propertyKeys,
+ const char** propertyValues,
+ void** hostHandle,
+ unsigned int* domainId);
+
+//
+// Type of the callback function that can be set by the coreclr_set_error_writer
+//
+typedef void (*coreclr_error_writer_callback_fn) (const char *message);
+
+//
+// Set callback for writing error logging
+//
+// Parameters:
+// errorWriter - callback that will be called for each line of the error info
+// - passing in NULL removes a callback that was previously set
+//
+// Returns:
+// S_OK
+//
+CORECLR_HOSTING_API(coreclr_set_error_writer,
+ coreclr_error_writer_callback_fn errorWriter);
+
+//
+// Shutdown CoreCLR. It unloads the app domain and stops the CoreCLR host.
+//
+// Parameters:
+// hostHandle - Handle of the host
+// domainId - Id of the domain
+//
+// Returns:
+// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
+//
+CORECLR_HOSTING_API(coreclr_shutdown,
+ void* hostHandle,
+ unsigned int domainId);
+
+//
+// Shutdown CoreCLR. It unloads the app domain and stops the CoreCLR host.
+//
+// Parameters:
+// hostHandle - Handle of the host
+// domainId - Id of the domain
+// latchedExitCode - Latched exit code after domain unloaded
+//
+// Returns:
+// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
+//
+CORECLR_HOSTING_API(coreclr_shutdown_2,
+ void* hostHandle,
+ unsigned int domainId,
+ int* latchedExitCode);
+
+//
+// Create a native callable function pointer for a managed method.
+//
+// Parameters:
+// hostHandle - Handle of the host
+// domainId - Id of the domain
+// entryPointAssemblyName - Name of the assembly which holds the custom entry point
+// entryPointTypeName - Name of the type which holds the custom entry point
+// entryPointMethodName - Name of the method which is the custom entry point
+// delegate - Output parameter, the function stores a native callable function pointer to the delegate at the specified address
+//
+// Returns:
+// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
+//
+CORECLR_HOSTING_API(coreclr_create_delegate,
+ void* hostHandle,
+ unsigned int domainId,
+ const char* entryPointAssemblyName,
+ const char* entryPointTypeName,
+ const char* entryPointMethodName,
+ void** delegate);
+
+//
+// Execute a managed assembly with given arguments
+//
+// Parameters:
+// hostHandle - Handle of the host
+// domainId - Id of the domain
+// argc - Number of arguments passed to the executed assembly
+// argv - Array of arguments passed to the executed assembly
+// managedAssemblyPath - Path of the managed assembly to execute (or NULL if using a custom entrypoint).
+// exitCode - Exit code returned by the executed assembly
+//
+// Returns:
+// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
+//
+CORECLR_HOSTING_API(coreclr_execute_assembly,
+ void* hostHandle,
+ unsigned int domainId,
+ int argc,
+ const char** argv,
+ const char* managedAssemblyPath,
+ unsigned int* exitCode);
+
+#undef CORECLR_HOSTING_API
+
+//
+// Callback types used by the hosts
+//
+typedef bool(CORECLR_CALLING_CONVENTION BundleProbeFn)(const char* path, int64_t* offset, int64_t* size, int64_t* compressedSize);
+typedef const void* (CORECLR_CALLING_CONVENTION PInvokeOverrideFn)(const char* libraryName, const char* entrypointName);
+
+
+#endif // __CORECLR_HOST_H__
set(OUT_NAME ${CMAKE_CURRENT_BINARY_DIR}/idls_out/${IDLNAME}_i.c)
list(APPEND CORGUIDS_SOURCES ${OUT_NAME})
add_custom_command(OUTPUT ${OUT_NAME}
- COMMAND ${MIDL} ${MIDL_INCLUDE_DIRECTORIES} /no_stamp /h ${CMAKE_CURRENT_BINARY_DIR}/idls_out/${IDLNAME}.h ${MIDL_DEFINITIONS} /out ${CMAKE_CURRENT_BINARY_DIR}/idls_out ${CMAKE_CURRENT_SOURCE_DIR}/${GENERATE_IDL}
+ COMMAND ${MIDL} ${MIDL_INCLUDE_DIRECTORIES} /nologo /no_stamp /h ${CMAKE_CURRENT_BINARY_DIR}/idls_out/${IDLNAME}.h ${MIDL_DEFINITIONS} /out ${CMAKE_CURRENT_BINARY_DIR}/idls_out ${CMAKE_CURRENT_SOURCE_DIR}/${GENERATE_IDL}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${GENERATE_IDL}
COMMENT "Compiling ${GENERATE_IDL}")
endforeach(GENERATE_IDL)
endif(FEATURE_JIT_PITCHING)
# Compile *_i.cpp to lib
-add_library(corguids ${CORGUIDS_SOURCES})
+add_library_clr(corguids OBJECT ${CORGUIDS_SOURCES})
#define UNDEF_ASSERTE
#endif
+#ifndef FEATURE_NATIVEAOT
#define USE_BITVECTOR 1
+#endif
#if USE_BITVECTOR
/* The bitvector class is meant to be a drop in replacement for an integer
}
}
- // Note that that is set difference, not subtration
+ // Note that this is set difference, not subtration
void operator -=(const BitVector& arg)
{
WRAPPER_NO_CONTRACT;
#else // !USE_BITVECTOR
-typedef unsigned __int64 ptrArgTP;
+typedef uint64_t ptrArgTP;
// Maximum number of bits in our bitvector
#define MAX_PTRARG_OFS (sizeof(ptrArgTP) * 8)
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef CFI_H_
+#define CFI_H_
+
+#define DWARF_REG_ILLEGAL -1
+enum CFI_OPCODE
+{
+ CFI_ADJUST_CFA_OFFSET, // Offset is adjusted relative to the current one.
+ CFI_DEF_CFA_REGISTER, // New register is used to compute CFA
+ CFI_REL_OFFSET // Register is saved at offset from the current CFA
+};
+
+struct CFI_CODE
+{
+ unsigned char CodeOffset;// Offset from the start of code the frame covers.
+ unsigned char CfiOpCode;
+ short DwarfReg; // Dwarf register number. 0~32 for x64.
+ int Offset;
+ CFI_CODE(unsigned char codeOffset, unsigned char cfiOpcode,
+ short dwarfReg, int offset)
+ : CodeOffset(codeOffset)
+ , CfiOpCode(cfiOpcode)
+ , DwarfReg(dwarfReg)
+ , Offset(offset)
+ {}
+};
+typedef CFI_CODE* PCFI_CODE;
+
+#endif // CFI_H
+
// Assertion checking infrastructure
// ---------------------------------------------------------------------------
-
#ifndef CHECK_H_
#define CHECK_H_
#include "daccess.h"
#include "unreachable.h"
+// Use the C++ detection idiom (https://isocpp.org/blog/2017/09/detection-idiom-a-stopgap-for-concepts-simon-brand)
+template <class... > struct make_void { using type = void; };
+template <class... T> using void_t = typename make_void<T...>::type;
+
+// Macros for creating type traits to check if a member exists
+#define DEFINE_MEMBER_EXISTENCE_CHECK(Member) \
+template<typename T, typename = void> \
+struct has_##Member : std::false_type {}; \
+\
+template<typename T> \
+struct has_##Member<T, void_t<decltype(std::declval<T>().Member)>> : std::true_type {};
+
#ifdef _DEBUG
#ifdef _MSC_VER
#ifdef _DEBUG
, m_condition (NULL)
, m_file(NULL)
- , m_line(NULL)
+ , m_line(0)
, m_pCount(NULL)
#endif
{}
#endif
};
-
//--------------------------------------------------------------------------------
// These CHECK macros are the correct way to propagate an assertion. These
// routines are designed for use inside "Check" routines. Such routines may
// Note that CONTRACT_CHECK contracts do not support postconditions.
//
// CHECK: Check the given condition, return a CHECK failure if FALSE
-// CHECK_MSG: Same, but include a message paramter if the check fails
+// CHECK_MSG: Same, but include a message parameter if the check fails
// CHECK_OK: Return a successful check value;
//--------------------------------------------------------------------------------
#if CHECK_INVARIANTS
+DEFINE_MEMBER_EXISTENCE_CHECK(Invariant);
+DEFINE_MEMBER_EXISTENCE_CHECK(InternalInvariant);
+
+template <typename TYPENAME>
+typename std::enable_if<has_Invariant<TYPENAME>::value, CHECK>::type CheckInvariantOnly(TYPENAME &obj)
+{
+ CHECK(obj.Invariant());
+ CHECK_OK;
+}
+
+template <typename TYPENAME>
+typename std::enable_if<!has_Invariant<TYPENAME>::value, CHECK>::type CheckInvariantOnly(TYPENAME &obj) { CHECK_OK; }
+
+template <typename TYPENAME>
+typename std::enable_if<has_InternalInvariant<TYPENAME>::value, CHECK>::type CheckInternalInvariantOnly(TYPENAME &obj)
+{
+ CHECK(obj.InternalInvariant());
+ CHECK_OK;
+}
+
+template <typename TYPENAME>
+typename std::enable_if<!has_InternalInvariant<TYPENAME>::value, CHECK>::type CheckInternalInvariantOnly(TYPENAME &obj) { CHECK_OK; }
+
template <typename TYPENAME>
CHECK CheckInvariant(TYPENAME &obj)
{
-#if defined(_MSC_VER) || defined(__llvm__)
- __if_exists(TYPENAME::Invariant)
- {
- CHECK(obj.Invariant());
- }
- __if_exists(TYPENAME::InternalInvariant)
- {
- CHECK(obj.InternalInvariant());
- }
-#endif
+ CheckInvariantOnly(obj);
+ CheckInternalInvariantOnly(obj);
CHECK_OK;
}
};
#if CHECK_INVARIANTS
+DEFINE_MEMBER_EXISTENCE_CHECK(Check);
template <typename TYPENAME>
-CHECK CheckPointer(TYPENAME *o, IsNullOK ok = NULL_NOT_OK)
+typename std::enable_if<has_Check<TYPENAME>::value, CHECK>::type CheckPointer(TYPENAME *o, IsNullOK ok = NULL_NOT_OK)
{
if (o == NULL)
{
}
else
{
-#if defined(_MSC_VER) || defined(__llvm__)
- __if_exists(TYPENAME::Check)
- {
- CHECK(o->Check());
- }
-#endif
+ CHECK(o->Check());
}
CHECK_OK;
}
template <typename TYPENAME>
-CHECK CheckValue(TYPENAME &val)
+typename std::enable_if<!has_Check<TYPENAME>::value, CHECK>::type CheckPointer(TYPENAME *o, IsNullOK ok = NULL_NOT_OK)
{
-#if defined(_MSC_VER) || defined(__llvm__)
- __if_exists(TYPENAME::Check)
+ if (o == NULL)
{
- CHECK(val.Check());
+ CHECK_MSG(ok, "Illegal null pointer");
}
-#endif
+ CHECK_OK;
+}
+
+template <typename TYPENAME>
+typename std::enable_if<has_Check<TYPENAME>::value, CHECK>::type CheckValue(TYPENAME &val)
+{
+ CHECK(val.Check());
CHECK(CheckInvariant(val));
+ CHECK_OK;
+}
+template <typename TYPENAME>
+typename std::enable_if<!has_Check<TYPENAME>::value, CHECK>::type CheckValue(TYPENAME &val)
+{
+ CHECK(CheckInvariant(val));
CHECK_OK;
}
#else // CHECK_INVARIANTS
#endif // _PREFAST_ || _PREFIX_
-
#define COMPILER_ASSUME(_condition) \
COMPILER_ASSUME_MSG(_condition, "")
-
//--------------------------------------------------------------------------------
// PREFIX_ASSUME_MSG and PREFAST_ASSUME_MSG are just another name
// for COMPILER_ASSUME_MSG
#define UNREACHABLE() \
UNREACHABLE_MSG("")
-#ifdef __llvm__
-
-// LLVM complains if a function does not return what it says.
-#define UNREACHABLE_RET() do { UNREACHABLE(); return 0; } while (0)
-#define UNREACHABLE_MSG_RET(_message) UNREACHABLE_MSG(_message); return 0;
+#define UNREACHABLE_RET() \
+ do { \
+ UNREACHABLE(); \
+ return 0; \
+ } while (0)
-#else // __llvm__
-
-#define UNREACHABLE_RET() UNREACHABLE()
-#define UNREACHABLE_MSG_RET(_message) UNREACHABLE_MSG(_message)
-
-#endif // __llvm__ else
+#define UNREACHABLE_MSG_RET(_message) \
+ do { \
+ UNREACHABLE_MSG(_message); \
+ return 0; \
+ } while (0)
#ifdef _DEBUG_IMPL
#endif
-
//--------------------------------------------------------------------------------
// STRESS_CHECK represents a check which is included in a free build
// @todo: behavior on trigger
#endif
-
-
//--------------------------------------------------------------------------------
// Common base level checks
//--------------------------------------------------------------------------------
CHECK CheckAligned(ULONG value, UINT alignment);
#endif
CHECK CheckAligned(UINT64 value, UINT alignment);
+#ifdef __APPLE__
+CHECK CheckAligned(SIZE_T value, UINT alignment);
+#endif
CHECK CheckAligned(const void *address, UINT alignment);
CHECK CheckOverflow(UINT value1, UINT value2);
CHECK CheckOverflow(ULONG value1, ULONG value2);
#endif
CHECK CheckOverflow(UINT64 value1, UINT64 value2);
+#ifdef __APPLE__
+CHECK CheckOverflow(SIZE_T value1, SIZE_T value2);
+#endif
CHECK CheckOverflow(PTR_CVOID address, UINT offset);
#if defined(_MSC_VER)
CHECK CheckOverflow(const void *address, ULONG offset);
CHECK CheckUnderflow(ULONG value1, ULONG value2);
#endif
CHECK CheckUnderflow(UINT64 value1, UINT64 value2);
+#ifdef __APPLE__
+CHECK CheckUnderflow(SIZE_T value1, SIZE_T value2);
+#endif
CHECK CheckUnderflow(const void *address, UINT offset);
#if defined(_MSC_VER)
CHECK CheckUnderflow(const void *address, ULONG offset);
#endif
CHECK CheckUnderflow(const void *address, UINT64 offset);
+#ifdef __APPLE__
+CHECK CheckUnderflow(const void *address, SIZE_T offset);
+#endif
CHECK CheckUnderflow(const void *address, void *address2);
CHECK CheckZeroedMemory(const void *memory, SIZE_T size);
CHECK_OK;
}
+#ifdef __APPLE__
+inline CHECK CheckAligned(SIZE_T value, UINT alignment)
+{
+ STATIC_CONTRACT_WRAPPER;
+ CHECK(AlignmentTrim(value, alignment) == 0);
+ CHECK_OK;
+}
+#endif
+
inline CHECK CheckAligned(const void *address, UINT alignment)
{
STATIC_CONTRACT_WRAPPER;
CHECK_OK;
}
+#ifdef __APPLE__
+inline CHECK CheckOverflow(SIZE_T value1, SIZE_T value2)
+{
+ CHECK(value1 + value2 >= value1);
+ CHECK_OK;
+}
+#endif
+
inline CHECK CheckOverflow(PTR_CVOID address, UINT offset)
{
TADDR targetAddr = dac_cast<TADDR>(address);
CHECK_OK;
}
+#ifdef __APPLE__
+inline CHECK CheckOverflow(const void *address, SIZE_T offset)
+{
+ CHECK((UINT64) address + offset >= (UINT64) address);
+
+ CHECK_OK;
+}
+#endif // __APPLE__
inline CHECK CheckUnderflow(UINT value1, UINT value2)
{
CHECK_OK;
}
+#ifdef __APPLE__
+inline CHECK CheckUnderflow(SIZE_T value1, SIZE_T value2)
+{
+ CHECK(value1 - value2 <= value1);
+
+ CHECK_OK;
+}
+#endif
+
inline CHECK CheckUnderflow(const void *address, UINT offset)
{
#if POINTER_BITS == 32
CHECK_OK;
}
+#ifdef __APPLE__
+inline CHECK CheckUnderflow(const void *address, SIZE_T offset)
+{
+#if POINTER_BITS == 32
+ CHECK(offset >> 32 == 0);
+ CHECK((UINT) (SIZE_T) address - (UINT) offset <= (UINT) (SIZE_T) address);
+#else
+ CHECK((UINT64) address - offset <= (UINT64) address);
+#endif
+
+ CHECK_OK;
+}
+#endif
+
inline CHECK CheckUnderflow(const void *address, void *address2)
{
#if POINTER_BITS == 32
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-//
-// clr_std/algorithm
-//
-// Copy of some key Standard Template Library functionality
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#ifdef USE_STL
-#include <algorithm>
-#else
-#ifndef __clr_std_algorithm_h__
-#define __clr_std_algorithm_h__
-
-namespace std
-{
- template<class iter, class CompareFunc>
- iter find_if ( iter first, iter last, CompareFunc comp )
- {
- for ( ; first!=last ; first++ )
- if ( comp(*first) )
- break;
- return first;
- }
-
- template<class iter, class T>
- iter find(iter first, iter last, const T& val)
- {
- for (;first != last; first++)
- {
- if (*first == val)
- break;
- }
- return first;
- }
-
- template <class iter, class comp>
- iter qsort_partition( iter first, iter last, iter pivot, comp compare )
- {
- iter lastMinusOne = last - 1;
- swap(pivot, lastMinusOne);
-
- // Pivot is at end
- pivot = last - 1;
-
- iter partitionLoc = first;
-
- for (iter partitionWalk = first; partitionWalk != pivot; ++partitionWalk)
- {
- if (compare(*partitionWalk, *pivot))
- {
- swap(*partitionWalk, *partitionLoc);
- partitionLoc++;
- }
- }
- swap(*pivot, *partitionLoc);
-
- return partitionLoc;
- }
-
- template <class iter, class comp>
- void sort_worker ( iter first, iter last, comp compare )
- {
- typename iter::difference_type RangeSize = last - first;
-
- // When down to a list of size 1, be done
- if (RangeSize < 2)
- return;
-
- // Pick pivot
-
- // Use simple pick middle algorithm
- iter pivotLoc = first + (RangeSize / 2);
-
- // Partition
- pivotLoc = qsort_partition(first, last, pivotLoc, compare);
-
- // Sort first array
- sort_worker(first, pivotLoc, compare);
-
- // Sort second array
- sort_worker(pivotLoc + 1, last, compare);
- }
-
- template <class iter, class comp>
- void sort ( iter first, iter last, comp compare )
- {
- sort_worker(first, last, compare);
- if (first != last)
- {
- for (iter i = first; i < (last - 1); i++)
- {
- // Assert that the sort function works.
- assert(!compare(*(i+1), *i));
- }
- }
- }
-
- template<class InIter, class OutIter, class Fn1>
- OutIter transform( InIter first, InIter last, OutIter dest, Fn1 func )
- {
- for ( ; first!=last ; ++first, ++dest )
- *dest = func(*first);
- return dest;
- }
-
-} // namespace std
-
-#endif /* __clr_std_algorithm_h__ */
-
-#endif // !USE_STL
-
-// Help the VIM editor figure out what kind of file this no-extension file is.
-// vim: filetype=cpp
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-//
-// clr_std/string
-//
-// Copy of some key Standard Template Library functionality
-//
-// This was created for use with SuperPMI. It has the minimal functionality needed by SuperPMI. It hasn't
-// been tested elsewhere.
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#ifdef USE_STL
-#include <string>
-#else
-#ifndef __clr_std_string_h__
-#define __clr_std_string_h__
-
-#include "clr_std/vector"
-
-namespace std
-{
-
-template<class T>
-class basic_string
-{
-public:
- typedef T value_type;
- typedef size_t size_type;
- typedef typename vector<T>::iterator iterator;
- typedef typename vector<T>::const_iterator const_iterator;
-
- basic_string()
- : m_string(1) // start with a string of length 1 for null terminator
- {
- m_string[0] = T();
- }
-
- basic_string(const basic_string<T>& _Right)
- {
- assign(_Right);
- }
-
- // Initialize a string with _Count characters from the string pointed at by _Ptr.
- // If you want to include the trailing null character, _Count needs to include that.
- basic_string(const value_type* _Ptr, size_type _Count)
- : m_string(_Count + 1) // add 1 for a null terminator
- {
- copy(_Ptr, _Count);
- }
-
- basic_string(const value_type* _Ptr) : basic_string(_Ptr, c_len(_Ptr))
- {
- }
-
- void reserve(size_t newcapacity)
- {
- m_string.reserve(newcapacity + 1); // add 1 for the null terminator
- }
-
- //
- // Assignment
- //
-
- basic_string<T>& operator=(const basic_string<T>& _Right)
- {
- if (this != &_Right)
- {
- assign(_Right);
- }
- return (*this);
- }
-
- basic_string<T>& assign(const basic_string<T>& _Right)
- {
- m_string.resize(_Right.size() + 1); // +1 for null terminator
- copy(_Right);
- return (*this);
- }
-
- //
- // Basic data copying
- //
-
- void copy(const basic_string<T>& _Right)
- {
- assert(size() >= _Right.size());
- size_type i;
- for (i = 0; i < _Right.size(); i++)
- {
- m_string[i] = _Right.m_string[i];
- }
- m_string[i] = T();
- }
-
- void copy(const value_type* _Ptr, size_type _Count)
- {
- assert(size() >= _Count);
- size_type i;
- for (i = 0; i < _Count; i++)
- {
- m_string[i] = _Ptr[i];
- }
- m_string[i] = T();
- }
-
- //
- // Appending
- //
-
- // Append a C-style string to the string.
- basic_string<T>& operator+=(const value_type* _Ptr)
- {
- size_type oldsize = size(); // doesn't include null terminator
- size_type addsize = c_len(_Ptr); // doesn't include null terminator
- size_type newsize = oldsize + addsize + 1;
- m_string.resize(newsize);
- size_type i;
- for (i = oldsize; i < newsize - 1; i++)
- {
- m_string[i] = *_Ptr++;
- }
- m_string[i] = T();
- return (*this);
- }
-
- basic_string<T>& operator+=(const basic_string<T>& _Right)
- {
- size_type oldsize = size(); // doesn't include null terminator
- size_type addsize = _Right.size(); // doesn't include null terminator
- size_type newsize = oldsize + addsize + 1;
- m_string.resize(newsize);
- size_type new_index = oldsize, right_index = 0;
- while (right_index < addsize)
- {
- m_string[new_index] = _Right.m_string[right_index];
- ++new_index;
- ++right_index;
- }
- m_string[new_index] = T();
- return (*this);
- }
-
- basic_string<T>& operator+=(value_type _Ch)
- {
- size_type oldsize = size(); // doesn't include null terminator
- m_string[oldsize] = _Ch; // Replace the null terminator with the new symbol.
- m_string.push_back(T()); // Return the replaced terminator again.
- return (*this);
- }
-
- ~basic_string()
- {
- // vector destructor does all the work
- }
-
- size_t size() const
- {
- assert(m_string.size() > 0);
- return m_string.size() - 1; // Don't report the null terminator.
- }
-
- size_t length() const
- {
- return size();
- }
-
- T& operator[](size_t iIndex)
- {
- assert(iIndex < size() + 1); // allow looking at the null terminator
- return m_string[iIndex];
- }
-
- const T* c_str() const
- {
- return m_string.data();
- }
-
- iterator begin()
- {
- return m_string.begin();
- }
-
- iterator end()
- {
- return m_string.end();
- }
-
- const_iterator cbegin() const
- {
- return m_string.cbegin();
- }
-
- const_iterator cend() const
- {
- return m_string.cend();
- }
-
- basic_string<T> substr(size_type _Off = 0, size_type _Count = npos) const
- {
- size_type cursize = size();
- if (_Off >= cursize)
- {
- // result will be empty
- return basic_string<T>();
- }
- else
- {
- if ((_Count == npos) || // No count specified; take the whole string suffix
- (_Off + _Count > cursize)) // Count specified is too many characters; just take the whole suffix
- {
- _Count = cursize - _Off;
- }
- return basic_string<T>(m_string.data() + _Off, _Count);
- }
- }
-
- size_type find_last_of(value_type _Ch) const
- {
- for (size_type _Off = size(); _Off != 0; _Off--)
- {
- if (m_string[_Off - 1] == _Ch)
- {
- return _Off - 1;
- }
- }
- return npos;
- }
-
- bool empty() const
- {
- return size() == 0;
- }
-
- int compare(const basic_string<T>& _Str) const
- {
- size_type i;
- size_type compareSize = size();
- if (_Str.size() < compareSize)
- {
- // This string is longer; compare character-by-character only as many characters as we have.
- compareSize = _Str.size();
- }
- for (i = 0; i < compareSize; i++)
- {
- if (m_string[i] != _Str.m_string[i])
- {
- if (m_string[i] < _Str.m_string[i])
- {
- return -1;
- }
- else
- {
- return 1;
- }
- }
- }
-
- // All the characters we compared were identical, but one string might be longer than the other.
- if (size() == _Str.size())
- {
- // We compared everything.
- return 0;
- }
- else if (size() < _Str.size())
- {
- // _Str has more characters than this.
- return -1;
- }
- else
- {
- // this has more characters than _Str
- return 1;
- }
- }
-
- static const size_type npos = size_type(-1);
-
-private:
-
- // Compute the length in characters of a null-terminated C-style string, not including the trailing null character.
- // _Ptr must not be nullptr.
- size_type c_len(const value_type* _Ptr)
- {
- size_type count;
- for (count = 0; *_Ptr != T(); _Ptr++)
- {
- count++;
- }
- return count;
- }
-
- vector<T> m_string; // use a vector<> to represent the string, to avoid reimplementing similar functionality
-
-}; // class basic_string
-
-//
-// String class instantiations
-//
-
-typedef basic_string<char> string;
-
-//
-// Numeric conversions
-//
-
-// convert integer T to string
-template<class T> inline
-string _IntToString(const char *_Fmt, T _Val)
-{
- const size_t MaxIntBufSize = 21; /* can hold -2^63 and 2^64 - 1, plus NUL */
- char buf[MaxIntBufSize];
- int len = sprintf_s(buf, MaxIntBufSize, _Fmt, _Val);
- return (string(buf, len));
-}
-
-inline string to_string(int _Val)
-{
- return (_IntToString("%d", _Val));
-}
-
-inline string to_string(unsigned int _Val)
-{
- return (_IntToString("%u", _Val));
-}
-
-inline string to_string(long _Val)
-{
- return (_IntToString("%ld", _Val));
-}
-
-inline string to_string(unsigned long _Val)
-{
- return (_IntToString("%lu", _Val));
-}
-
-inline string to_string(long long _Val)
-{
- return (_IntToString("%lld", _Val));
-}
-
-inline string to_string(unsigned long long _Val)
-{
- return (_IntToString("%llu", _Val));
-}
-
-//
-// Comparisons
-//
-
-template<class T> inline
-bool operator==(
- const basic_string<T>& _Left,
- const basic_string<T>& _Right)
-{
- return (_Left.compare(_Right) == 0);
-}
-
-template<class T> inline
-bool operator!=(
- const basic_string<T>& _Left,
- const basic_string<T>& _Right)
-{
- return (!(_Left == _Right));
-}
-
-template<class T> inline
-bool operator<(
- const basic_string<T>& _Left,
- const basic_string<T>& _Right)
-{
- return (_Left.compare(_Right) < 0);
-}
-
-template<class T> inline
-bool operator>(
- const basic_string<T>& _Left,
- const basic_string<T>& _Right)
-{
- return (_Right < _Left);
-}
-
-template<class T> inline
-bool operator<=(
- const basic_string<T>& _Left,
- const basic_string<T>& _Right)
-{
- return (!(_Right < _Left));
-}
-
-template<class T> inline
-bool operator>=(
- const basic_string<T>& _Left,
- const basic_string<T>& _Right)
-{
- return (!(_Left < _Right));
-}
-
-//
-// String concatenation and other string operations
-//
-
-template<class T> inline
-basic_string<T> operator+(
- const basic_string<T>& _Left,
- const basic_string<T>& _Right)
-{
- basic_string<T> ret;
- ret.reserve(_Left.size() + _Right.size());
- ret += _Left;
- ret += _Right;
- return ret;
-}
-
-}; // namespace std
-
-#endif /* __clr_std_string_h__ */
-
-#endif // !USE_STL
-
-// Help the VIM editor figure out what kind of file this no-extension file is.
-// vim: filetype=cpp
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-//
-// clr_std/utility
-//
-// Copy of some key Standard Template Library functionality.
-// See http://msdn.microsoft.com/en-us/library/bb982077.aspx for documentation.
-//
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#ifndef __clr_std_type_traits_h__
-#define __clr_std_type_traits_h__
-
-#ifdef USE_STL
-
-#include <type_traits>
-
-#else
-
-namespace std
-{
- //-----------------------------------------------------------------------------------------
- // TEMPLATE CLASS remove_const
- template<class _Ty>
- struct remove_const
- { // remove top level const qualifier
- typedef _Ty type;
- };
-
- template<class _Ty>
- struct remove_const<const _Ty>
- { // remove top level const qualifier
- typedef _Ty type;
- };
-
- template<class _Ty>
- struct remove_const<const _Ty[]>
- { // remove top level const qualifier
- typedef _Ty type[];
- };
-
- template<class _Ty, unsigned int _Nx>
- struct remove_const<const _Ty[_Nx]>
- { // remove top level const qualifier
- typedef _Ty type[_Nx];
- };
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE CLASS remove_volatile
- template<class _Ty>
- struct remove_volatile
- { // remove top level volatile qualifier
- typedef _Ty type;
- };
-
- template<class _Ty>
- struct remove_volatile<volatile _Ty>
- { // remove top level volatile qualifier
- typedef _Ty type;
- };
-
- template<class _Ty>
- struct remove_volatile<volatile _Ty[]>
- { // remove top level volatile qualifier
- typedef _Ty type[];
- };
-
- template<class _Ty, unsigned int _Nx>
- struct remove_volatile<volatile _Ty[_Nx]>
- { // remove top level volatile qualifier
- typedef _Ty type[_Nx];
- };
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE CLASS remove_cv
- template<class _Ty>
- struct remove_cv
- { // remove top level const and volatile qualifiers
- typedef typename remove_const<typename remove_volatile<_Ty>::type>::type type;
- };
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE remove_reference
- template<class T>
- struct remove_reference
- { // remove reference
- typedef T type;
- };
-
- template<class T>
- struct remove_reference<T&>
- { // remove reference
- typedef T type;
- };
-
- template<class T>
- struct remove_reference<T&&>
- { // remove rvalue reference
- typedef T type;
- };
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE remove_pointer
- template<class T>
- struct remove_pointer
- { // remove pointer
- typedef T type;
- };
-
- template<class T>
- struct remove_pointer<T*>
- { // remove pointer
- typedef T type;
- };
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE FUNCTION identity
- template<class T>
- struct identity
- { // map T to type unchanged
- typedef T type;
-
- inline
- const T& operator()(const T& left) const
- { // apply identity operator to operand
- return (left);
- }
- };
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE CLASS integral_constant
- template<class _Ty, _Ty _Val>
- struct integral_constant
- { // convenient template for integral constant types
- static const _Ty value = _Val;
-
- typedef _Ty value_type;
- typedef integral_constant<_Ty, _Val> type;
- };
-
- typedef integral_constant<bool, true> true_type;
- typedef integral_constant<bool, false> false_type;
-
- // TEMPLATE CLASS _Cat_base
- template<bool>
- struct _Cat_base
- : false_type
- { // base class for type predicates
- };
-
- template<>
- struct _Cat_base<true>
- : true_type
- { // base class for type predicates
- };
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE CLASS enable_if
- template<bool _Test, class _Type = void>
- struct enable_if
- { // type is undefined for assumed !_Test
- };
-
- template<class _Type>
- struct enable_if<true, _Type>
- { // type is _Type for _Test
- typedef _Type type;
- };
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE CLASS conditional
- template<bool _Test, class _Ty1, class _Ty2>
- struct conditional
- { // type is _Ty2 for assumed !_Test
- typedef _Ty2 type;
- };
-
- template<class _Ty1, class _Ty2>
- struct conditional<true, _Ty1, _Ty2>
- { // type is _Ty1 for _Test
- typedef _Ty1 type;
- };
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE CLASS make_unsigned
- template<typename Type1>
- struct make_unsigned
- {
- };
-
- template<>
- struct make_unsigned<int>
- {
- typedef unsigned int type;
- };
-
-#ifndef HOST_UNIX
-
- template<>
- struct make_unsigned<long>
- {
- typedef unsigned long type;
- };
-
-#endif // !HOST_UNIX
-
- template<>
- struct make_unsigned<__int64>
- {
- typedef unsigned __int64 type;
- };
-
- template<>
- struct make_unsigned<size_t>
- {
- typedef size_t type;
- };
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE CLASS make_signed
- template<typename Type1>
- struct make_signed
- {
- };
-
- template<>
- struct make_signed<unsigned int>
- {
- typedef signed int type;
- };
-
-#ifndef HOST_UNIX
-
- template<>
- struct make_signed<unsigned long>
- {
- typedef signed long type;
- };
-
-#endif // !HOST_UNIX
-
- template<>
- struct make_signed<unsigned __int64>
- {
- typedef signed __int64 type;
- };
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE CLASS is_lvalue_reference
- template<class _Ty>
- struct is_lvalue_reference
- : false_type
- { // determine whether _Ty is an lvalue reference
- };
-
- template<class _Ty>
- struct is_lvalue_reference<_Ty&>
- : true_type
- { // determine whether _Ty is an lvalue reference
- };
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE CLASS is_rvalue_reference
- template<class _Ty>
- struct is_rvalue_reference
- : false_type
- { // determine whether _Ty is an rvalue reference
- };
-
- template<class _Ty>
- struct is_rvalue_reference<_Ty&&>
- : true_type
- { // determine whether _Ty is an rvalue reference
- };
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE CLASS is_reference
- template<class _Ty>
- struct is_reference
- : conditional<
- is_lvalue_reference<_Ty>::value || is_rvalue_reference<_Ty>::value,
- true_type,
- false_type>::type
- { // determine whether _Ty is a reference
- };
-
- // TEMPLATE CLASS is_pointer
- template<class _Ty>
- struct is_pointer
- : false_type
- { // determine whether _Ty is a pointer
- };
-
- template<class _Ty>
- struct is_pointer<_Ty *>
- : true_type
- { // determine whether _Ty is a pointer
- };
-
- // TEMPLATE CLASS _Is_integral
- template<class _Ty>
- struct _Is_integral
- : false_type
- { // determine whether _Ty is integral
- };
-
- template<>
- struct _Is_integral<bool>
- : true_type
- { // determine whether _Ty is integral
- };
-
- template<>
- struct _Is_integral<char>
- : true_type
- { // determine whether _Ty is integral
- };
-
- template<>
- struct _Is_integral<unsigned char>
- : true_type
- { // determine whether _Ty is integral
- };
-
- template<>
- struct _Is_integral<signed char>
- : true_type
- { // determine whether _Ty is integral
- };
-
- template<>
- struct _Is_integral<unsigned short>
- : true_type
- { // determine whether _Ty is integral
- };
-
- template<>
- struct _Is_integral<signed short>
- : true_type
- { // determine whether _Ty is integral
- };
-
- template<>
- struct _Is_integral<unsigned int>
- : true_type
- { // determine whether _Ty is integral
- };
-
- template<>
- struct _Is_integral<signed int>
- : true_type
- { // determine whether _Ty is integral
- };
-
-// On Unix 'long' is a 64-bit type (same as __int64) and the following two definitions
-// conflict with _Is_integral<unsigned __int64> and _Is_integral<signed __int64>.
-#ifndef HOST_UNIX
- template<>
- struct _Is_integral<unsigned long>
- : true_type
- { // determine whether _Ty is integral
- };
-
- template<>
- struct _Is_integral<signed long>
- : true_type
- { // determine whether _Ty is integral
- };
-#endif /* HOST_UNIX */
-
- #if _HAS_CHAR16_T_LANGUAGE_SUPPORT
- template<>
- struct _Is_integral<char16_t>
- : true_type
- { // determine whether _Ty is integral
- };
-
- template<>
- struct _Is_integral<char32_t>
- : true_type
- { // determine whether _Ty is integral
- };
- #endif /* _HAS_CHAR16_T_LANGUAGE_SUPPORT */
-
- template<>
- struct _Is_integral<unsigned __int64>
- : true_type
- { // determine whether _Ty is integral
- };
-
- template<>
- struct _Is_integral<signed __int64>
- : true_type
- { // determine whether _Ty is integral
- };
-
- // TEMPLATE CLASS is_integral
- template<class _Ty>
- struct is_integral
- : _Is_integral<typename remove_cv<_Ty>::type>
- { // determine whether _Ty is integral
- };
-
- // TEMPLATE CLASS _Is_floating_point
- template<class _Ty>
- struct _Is_floating_point
- : false_type
- { // determine whether _Ty is floating point
- };
-
- template<>
- struct _Is_floating_point<float>
- : true_type
- { // determine whether _Ty is floating point
- };
-
- template<>
- struct _Is_floating_point<double>
- : true_type
- { // determine whether _Ty is floating point
- };
-
-// In PAL, we define long as int and so this becomes int double,
-// which is a nonsense
-#ifndef HOST_UNIX
- template<>
- struct _Is_floating_point<long double>
- : true_type
- { // determine whether _Ty is floating point
- };
-#endif
-
- // TEMPLATE CLASS is_floating_point
- template<class _Ty>
- struct is_floating_point
- : _Is_floating_point<typename remove_cv<_Ty>::type>
- { // determine whether _Ty is floating point
- };
-
- // TEMPLATE CLASS is_arithmetic
- template<class _Ty>
- struct is_arithmetic
- : _Cat_base<is_integral<_Ty>::value
- || is_floating_point<_Ty>::value>
- { // determine whether _Ty is an arithmetic type
- };
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE CLASS is_signed
- template <typename T>
- struct is_signed : conditional<
- static_cast<typename remove_const<T>::type>(-1) < 0, true_type, false_type>::type {};
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE CLASS is_same
- template<class T1, class T2>
- struct is_same : false_type { };
-
- //-----------------------------------------------------------------------------------------
- template<class T1>
- struct is_same<T1, T1> : true_type { };
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE CLASS is_base_of
-#ifdef _MSC_VER
-
- template <typename TBase, typename TDerived>
- struct is_base_of :
- conditional<__is_base_of( TBase, TDerived), true_type, false_type>::type {};
-
-#else
- namespace detail
- {
- //-------------------------------------------------------------------------------------
- // Helper types Small and Big - guarantee that sizeof(Small) < sizeof(Big)
- //
-
- template <class T, class U>
- struct conversion_helper
- {
- typedef char Small;
- struct Big { char dummy[2]; };
- static Big Test(...);
- static Small Test(U);
- static T MakeT();
- };
-
- //-------------------------------------------------------------------------------------
- // class template conversion
- // Figures out the conversion relationships between two types
- // Invocations (T and U are types):
- // a) conversion<T, U>::exists
- // returns (at compile time) true if there is an implicit conversion from T
- // to U (example: Derived to Base)
- // b) conversion<T, U>::exists2Way
- // returns (at compile time) true if there are both conversions from T
- // to U and from U to T (example: int to char and back)
- // c) conversion<T, U>::sameType
- // returns (at compile time) true if T and U represent the same type
- //
- // NOTE: might not work if T and U are in a private inheritance hierarchy.
- //
-
- template <class T, class U>
- struct conversion
- {
- typedef detail::conversion_helper<T, U> H;
- static const bool exists = sizeof(typename H::Small) == sizeof((H::Test(H::MakeT())));
- static const bool exists2Way = exists && conversion<U, T>::exists;
- static const bool sameType = false;
- };
-
- template <class T>
- struct conversion<T, T>
- {
- static const bool exists = true;
- static const bool exists2Way = true;
- static const bool sameType = true;
- };
-
- template <class T>
- struct conversion<void, T>
- {
- static const bool exists = false;
- static const bool exists2Way = false;
- static const bool sameType = false;
- };
-
- template <class T>
- struct conversion<T, void>
- {
- static const bool exists = false;
- static const bool exists2Way = false;
- static const bool sameType = false;
- };
-
- template <>
- struct conversion<void, void>
- {
- static const bool exists = true;
- static const bool exists2Way = true;
- static const bool sameType = true;
- };
- } // detail
-
- // Note that we need to compare pointer types here, since conversion of types by-value
- // just tells us whether or not an implicit conversion constructor exists. We handle
- // type parameters that are already pointers specially; see below.
- template <typename TBase, typename TDerived>
- struct is_base_of :
- conditional<detail::conversion<TDerived *, TBase *>::exists, true_type, false_type>::type {};
-
- // Specialization to handle type parameters that are already pointers.
- template <typename TBase, typename TDerived>
- struct is_base_of<TBase *, TDerived *> :
- conditional<detail::conversion<TDerived *, TBase *>::exists, true_type, false_type>::type {};
-
- // Specialization to handle invalid mixing of pointer types.
- template <typename TBase, typename TDerived>
- struct is_base_of<TBase *, TDerived> :
- false_type {};
-
- // Specialization to handle invalid mixing of pointer types.
- template <typename TBase, typename TDerived>
- struct is_base_of<TBase, TDerived *> :
- false_type {};
-
-#endif
-
- namespace detail
- {
- template <typename...>
- using void_t = void;
- }
- // Always false dependent-value for static_asserts.
- template <typename...>
- struct _Always_false
- {
- const bool value = false;
- };
-
- template <class _Ty, class = void>
- struct _Add_reference { // add reference (non-referenceable type)
- using _Lvalue = _Ty;
- using _Rvalue = _Ty;
- };
-
- template <class _Ty>
- struct _Add_reference<_Ty, detail::void_t<_Ty&>> { // (referenceable type)
- using _Lvalue = _Ty&;
- using _Rvalue = _Ty&&;
- };
-
- template <class _Ty>
- struct add_lvalue_reference {
- using type = typename _Add_reference<_Ty>::_Lvalue;
- };
-
- template <class _Ty>
- struct add_rvalue_reference {
- using type = typename _Add_reference<_Ty>::_Rvalue;
- };
-
- template<typename _Ty>
- typename add_rvalue_reference<_Ty>::type declval() noexcept
- {
- static_assert(_Always_false<_Ty>::value, "Calling declval is ill-formed, see N4892 [declval]/2.");
- }
-} // namespace std
-
-#endif // !USE_STL
-
-#define REM_CONST(T) typename std::remove_const< T >::type
-#define REM_CV(T) typename std::remove_cv< T >::type
-#define REM_REF(T) typename std::remove_reference< T >::type
-
-#define REF_T(T) REM_REF(T) &
-#define REF_CT(T) REM_REF(REM_CONST(T)) const &
-
-#endif // __clr_std_type_traits_h__
-
-// Help the VIM editor figure out what kind of file this no-extension file is.
-// vim: filetype=cpp
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-//
-// clr_std/utility
-//
-// Copy of some key Standard Template Library functionality
-// See http://msdn.microsoft.com/en-us/library/bb982077.aspx for documentation.
-//
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#ifdef USE_STL
-#include <utility>
-#else
-#ifndef __clr_std_utility_h__
-#define __clr_std_utility_h__
-
-#include "clr_std/type_traits"
-
-namespace std
-{
- //-----------------------------------------------------------------------------------------
- // TEMPLATE FUNCTION move
- template<class T> inline
- typename remove_reference<T>::type&&
- move(T&& arg)
- { // forward _Arg as movable
- return ((typename remove_reference<T>::type&&)arg);
- }
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE FUNCTION swap (from <algorithm>)
- template<class T> inline
- void swap(T& left, T& right)
- { // exchange values stored at left and right
- T tmp = std::move(left);
- left = std::move(right);
- right = std::move(tmp);
- }
-
- //-----------------------------------------------------------------------------------------
- // TEMPLATE FUNCTION forward
- template<class T> inline
- T&&
- forward(typename identity<T>::type& _Arg)
- { // forward _Arg, given explicitly specified type parameter
- return ((T&&)_Arg);
- }
-}
-
-namespace std
-{
- //-----------------------------------------------------------------------------------------
- // TEMPLATE STRUCT pair
- template<class _Ty1, class _Ty2>
- struct pair
- { // store a pair of values
- typedef pair<_Ty1, _Ty2> _Myt;
- typedef _Ty1 first_type;
- typedef _Ty2 second_type;
-
- pair()
- : first(_Ty1()), second(_Ty2())
- { // construct from defaults
- }
-
- pair(const _Ty1& _Val1, const _Ty2& _Val2)
- : first(_Val1.first), second(_Val2.second)
- { // construct from specified values
- }
-
- template<class _Other1, class _Other2>
- pair(pair<_Other1, _Other2>& _Right)
- : first(_Right.first), second(_Right.second)
- { // construct from compatible pair
- }
-
- template<class _Other1, class _Other2>
- pair(const pair<_Other1, _Other2>& _Right)
- : first(_Right.first), second(_Right.second)
- { // construct from compatible pair
- }
-
- void swap(_Myt& _Right)
- { // exchange contents with _Right
- if (this != &_Right)
- { // different, worth swapping
- swap(this->first, _Right.first);
- swap(this->second, _Right.second);
- }
- }
-
- _Myt& operator=(const _Myt& _Right)
- { // assign from copied pair
- this->first = _Right.first;
- this->second = _Right.second;
- return (*this);
- }
-
- typedef typename remove_reference<_Ty1>::type _Ty1x;
- typedef typename remove_reference<_Ty2>::type _Ty2x;
-
- pair(_Ty1x&& _Val1, _Ty2x&& _Val2)
- : first(std::move(_Val1)),
- second(std::move(_Val2))
- { // construct from specified values
- }
-
- pair(const _Ty1x& _Val1, _Ty2x&& _Val2)
- : first(_Val1),
- second(std::move(_Val2))
- { // construct from specified values
- }
-
- pair(_Ty1x&& _Val1, const _Ty2x& _Val2)
- : first(std::move(_Val1)),
- second(_Val2)
- { // construct from specified values
- }
-
- template<class _Other1, class _Other2>
- pair(_Other1&& _Val1, _Other2&& _Val2)
- : first(std::move(_Val1)),
- second(std::move(_Val2))
- { // construct from moved values
- }
-
- template<class _Other1, class _Other2>
- pair(pair<_Other1, _Other2>&& _Right)
- : first(std::move(_Right.first)),
- second(std::move(_Right.second))
- { // construct from moved compatible pair
- }
-
- pair& operator=(pair<_Ty1, _Ty2>&& _Right)
- { // assign from moved pair
- this->first = std::move(_Right.first);
- this->second = std::move(_Right.second);
- return (*this);
- }
-
- void swap(_Myt&& _Right)
- { // exchange contents with _Right
- if (this != &_Right)
- { // different, worth swapping
- this->first = std::move(_Right.first);
- this->second = std::move(_Right.second);
- }
- }
-
- _Ty1 first; // the first stored value
- _Ty2 second; // the second stored value
- }; // struct pair
-
- //-----------------------------------------------------------------------------------------
- // pair TEMPLATE FUNCTIONS
-
- template<class _Ty1, class _Ty2> inline
- void swap(pair<_Ty1, _Ty2>& _Left, pair<_Ty1, _Ty2>& _Right)
- { // swap _Left and _Right pairs
- _Left.swap(_Right);
- }
-
- template<class _Ty1, class _Ty2> inline
- void swap(pair<_Ty1, _Ty2>& _Left, pair<_Ty1, _Ty2>&& _Right)
- { // swap _Left and _Right pairs
- typedef pair<_Ty1, _Ty2> _Myt;
- _Left.swap(std::forward<_Myt>(_Right));
- }
-
- template<class _Ty1, class _Ty2> inline
- void swap(
- pair<_Ty1, _Ty2>&& _Left,
- pair<_Ty1, _Ty2>& _Right)
- { // swap _Left and _Right pairs
- typedef pair<_Ty1, _Ty2> _Myt;
- _Right.swap(std::forward<_Myt>(_Left));
- }
-
- template<class _Ty1, class _Ty2> inline
- bool operator==(
- const pair<_Ty1, _Ty2>& _Left,
- const pair<_Ty1, _Ty2>& _Right)
- { // test for pair equality
- return (_Left.first == _Right.first && _Left.second == _Right.second);
- }
-
- template<class _Ty1, class _Ty2> inline
- bool operator!=(
- const pair<_Ty1, _Ty2>& _Left,
- const pair<_Ty1, _Ty2>& _Right)
- { // test for pair inequality
- return (!(_Left == _Right));
- }
-
- template<class _Ty1, class _Ty2> inline
- bool operator<(
- const pair<_Ty1, _Ty2>& _Left,
- const pair<_Ty1, _Ty2>& _Right)
- { // test if _Left < _Right for pairs
- return (_Left.first < _Right.first ||
- (!(_Right.first < _Left.first) && _Left.second < _Right.second));
- }
-
- template<class _Ty1, class _Ty2> inline
- bool operator>(
- const pair<_Ty1, _Ty2>& _Left,
- const pair<_Ty1, _Ty2>& _Right)
- { // test if _Left > _Right for pairs
- return (_Right < _Left);
- }
-
- template<class _Ty1, class _Ty2> inline
- bool operator<=(
- const pair<_Ty1, _Ty2>& _Left,
- const pair<_Ty1, _Ty2>& _Right)
- { // test if _Left <= _Right for pairs
- return (!(_Right < _Left));
- }
-
- template<class _Ty1, class _Ty2> inline
- bool operator>=(
- const pair<_Ty1, _Ty2>& _Left,
- const pair<_Ty1, _Ty2>& _Right)
- { // test if _Left >= _Right for pairs
- return (!(_Left < _Right));
- }
-
- template<class _InIt> inline
- _InIt begin(
- const pair<_InIt, _InIt>& _Pair)
- { // return first element of pair
- return (_Pair.first);
- }
-
- template<class _InIt> inline
- _InIt end(
- const pair<_InIt, _InIt>& _Pair)
- { // return second element of pair
- return (_Pair.second);
- }
-
-} // namespace std
-
-#endif /* __clr_std_utility_h__ */
-
-#endif // !USE_STL
-
-// Help the VIM editor figure out what kind of file this no-extension file is.
-// vim: filetype=cpp
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-//
-// clr_std/vector
-//
-// Copy of some key Standard Template Library functionality
-//
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#ifdef USE_STL
-#include <vector>
-#else
-#ifndef __clr_std_vector_h__
-#define __clr_std_vector_h__
-
-// This is defined in the debugmacrosext.h header, but don't take a dependency on that.
-#ifndef INDEBUG
-#ifdef _DEBUG
-#define INDEBUG(x) x
-#else
-#define INDEBUG(x)
-#endif
-#endif // !def INDEBUG
-
-namespace std
-{
- template <class T>
- class vector
- {
- public:
- class const_iterator;
-
- class iterator
- {
- friend class std::vector<T>::const_iterator;
- public:
- typedef T value_type;
- typedef ptrdiff_t difference_type;
- typedef T* pointer;
- typedef T& reference;
-
- typedef class vector<T>::iterator _MyIter;
-
- _MyIter &operator++()
- {
- m_ptr++;
- return *this;
- }
-
- _MyIter operator++(int)
- {
- // post-increment ++
- _MyIter myiter(m_ptr);
- m_ptr++;
- return myiter;
- }
-
- _MyIter &operator--()
- {
- m_ptr--;
- return *this;
- }
-
- _MyIter operator--(int)
- {
- // post-decrement --
- _MyIter myiter(m_ptr);
- m_ptr--;
- return myiter;
- }
-
- _MyIter operator- (ptrdiff_t n)
- {
- _MyIter myiter(m_ptr);
- myiter.m_ptr -= n;
- return myiter;
- }
-
- ptrdiff_t operator- (_MyIter right)
- {
- _MyIter myiter(m_ptr);
- return myiter.m_ptr - right.m_ptr;
- }
-
- _MyIter operator+ (ptrdiff_t n)
- {
- _MyIter myiter(m_ptr);
- myiter.m_ptr += n;
- return myiter;
- }
-
- T* operator->() const
- {
- return m_ptr;
- }
-
- T & operator*() const
- {
- return *m_ptr;
- }
-
- bool operator==(const _MyIter& _Right) const
- {
- bool equals = this->m_ptr == _Right.m_ptr;
- return equals;
- }
-
- bool operator!=(const _MyIter& _Right) const
- {
- bool equals = this->m_ptr == _Right.m_ptr;
- return !equals;
- }
-
- bool operator<(const _MyIter& _Right) const
- {
- return this->m_ptr < _Right.m_ptr;
- }
-
- bool operator>(const _MyIter& _Right) const
- {
- return this->m_ptr > _Right.m_ptr;
- }
- public:
- explicit iterator(T* ptr)
- {
- m_ptr = ptr;
- }
-
- private:
- T* m_ptr;
- }; // class iterator
-
- class const_iterator
- {
- public:
- typedef class vector<T>::const_iterator _MyIter;
- typedef class vector<T>::iterator _MyNonConstIter;
-
- _MyIter &operator++()
- {
- m_ptr++;
- return *this;
- }
-
- _MyIter operator++(int)
- {
- // post-increment ++
- _MyIter myiter(m_ptr);
- m_ptr++;
- return myiter;
- }
-
- const T* operator->() const
- {
- return m_ptr;
- }
-
- const T & operator*() const
- {
- return *m_ptr;
- }
-
- bool operator==(const _MyIter& _Right) const
- {
- bool equals = this->m_ptr == _Right.m_ptr;
- return equals;
- }
-
- bool operator!=(const _MyIter& _Right) const
- {
- bool equals = this->m_ptr == _Right.m_ptr;
- return !equals;
- }
-
- public:
- explicit const_iterator(T* ptr)
- {
- m_ptr = ptr;
- }
- const_iterator(const _MyNonConstIter &nonConstIterator)
- {
- m_ptr = nonConstIterator.m_ptr;
- }
-
- private:
- T* m_ptr;
- }; // class const iterator
-
-
- public:
- explicit vector(size_t n = 0)
- {
- m_size = 0;
- m_capacity = 0;
- m_pelements = NULL;
- m_isBufferOwner = true;
- resize(n);
- }
-
- ~vector()
- {
- if (m_isBufferOwner)
- {
- erase(m_pelements, 0, m_size);
- delete [] (BYTE*)m_pelements; // cast to BYTE* as we don't want this delete to invoke T's dtor
- }
- else
- {
- m_size = 0;
- m_capacity = 0;
- }
- }
-
-
- size_t size() const
- {
- return m_size;
- }
-
- T & operator[](size_t iIndex)
- {
- assert(iIndex < m_size);
- return m_pelements[iIndex];
- }
-
- T & operator[](size_t iIndex) const
- {
- assert(iIndex < m_size);
- return m_pelements[iIndex];
- }
-
- void resize(size_t newsize)
- {
- assert(m_isBufferOwner);
- size_t oldsize = this->size();
- resize_noinit(newsize);
- if (newsize > oldsize)
- {
- fill_uninitialized_with_default_value(m_pelements, oldsize, newsize);
- }
- }
-
- void clear()
- {
- assert(m_isBufferOwner);
- resize(0);
- }
-
- void resize(size_t newsize, T c)
- {
- assert(m_isBufferOwner);
- size_t oldsize = this->size();
- resize_noinit(newsize);
- if (newsize > oldsize)
- {
- for (size_t i = oldsize; i < newsize; i++)
- {
- m_pelements[i] = c;
- }
- }
- }
-
- void wrap(size_t numElements, T* pElements)
- {
- m_size = numElements;
- m_pelements = pElements;
- m_isBufferOwner = false;
- }
-
- void resize_noinit(size_t newsize)
- {
- assert(m_isBufferOwner);
- size_t oldsize = this->size();
- if (newsize < oldsize)
- {
- // Shrink
- erase(m_pelements, newsize, oldsize);
- }
- else if (newsize > oldsize)
- {
- // Grow
- reserve(newsize);
- }
- m_size = newsize;
- }
-
- void push_back(const T & val)
- {
- assert(m_isBufferOwner);
- if (m_size + 1 < m_size)
- {
- assert("push_back: overflow");
- // @todo: how to throw.
- }
- resize(m_size + 1, val);
- }
-
- void reserve(size_t newcapacity)
- {
- assert(m_isBufferOwner);
- if (newcapacity > m_capacity)
- {
- // To avoid resizing for every element that gets added to a vector, we
- // allocate at least twice the old capacity, or 16 elements, whichever is greater.
- newcapacity = max(newcapacity, max(m_capacity * 2, 16));
-
- size_t bytesNeeded = newcapacity * sizeof(T);
- if (bytesNeeded / sizeof(T) != newcapacity)
- {
- assert("resize: overflow");
- // @todo: how to throw something here?
- }
-
-
- T *pelements = (T*)(new BYTE[bytesNeeded]); // Allocate as BYTE array to avoid automatic construction
- INDEBUG(memset(pelements, 0xcc, bytesNeeded));
- for (size_t i = 0; i < m_size; i++)
- {
- pelements[i] = m_pelements[i];
- }
-
- erase(m_pelements, 0, m_size);
- delete [] (BYTE*)m_pelements; // cast to BYTE* as we don't want this delete to invoke T's dtor
-
- m_pelements = pelements;
- m_capacity = newcapacity;
- }
- }
-
- iterator begin()
- {
- return iterator(m_pelements);
- }
-
- iterator end()
- {
- return iterator(m_pelements + m_size);
- }
-
- const_iterator cbegin() const
- {
- return const_iterator(m_pelements);
- }
-
- const_iterator cend() const
- {
- return const_iterator(m_pelements + m_size);
- }
-
- iterator erase(iterator position)
- {
- assert(m_isBufferOwner);
- assert((position > begin() || position == begin()) && position < end());
- ptrdiff_t index = position - begin();
- erase(m_pelements, index, index + 1);
- memcpy(&m_pelements[index], &m_pelements[index + 1], sizeof(T) * (m_size - index - 1));
- --m_size;
- return iterator(m_pelements + (position - begin()));
- }
-
- iterator erase(iterator position, iterator positionEnd)
- {
- assert(m_isBufferOwner);
- assert((position > begin() || position == begin()) && position < end());
- ptrdiff_t index = position - begin();
- ptrdiff_t elements = positionEnd - position;
- erase(m_pelements, index, index + elements);
- memcpy(&m_pelements[index], &m_pelements[index + elements], sizeof(T) * (m_size - index - elements));
- m_size -= elements;
- return iterator(m_pelements + (position - begin()));
- }
-
- T* data()
- {
- return m_pelements;
- }
-
- const T* data() const
- {
- return m_pelements;
- }
-
- private:
- // Transition a subset of the array from uninitialized to initialized with default value for T.
- static void fill_uninitialized_with_default_value(T* pelements, size_t startIdx, size_t endIdx)
- {
- assert(startIdx <= endIdx);
- assert(pelements != NULL || startIdx == endIdx);
- for (size_t i = startIdx; i < endIdx; i++)
- {
- INDEBUG(assert(0xcc == *((BYTE*)&pelements[i])));
- pelements[i] = T();
- }
- }
-
- // Transition a subset of the array from a valid value of T to uninitialized.
- static void erase(T* pelements, size_t startIdx, size_t endIdx)
- {
- assert(startIdx <= endIdx);
- assert(pelements != NULL || startIdx == endIdx);
- for (size_t i = startIdx; i < endIdx; i++)
- {
- pelements[i].~T();
- }
-
- INDEBUG(memset(&pelements[startIdx], 0xcc, (endIdx - startIdx) * sizeof(T)));
- }
-
- private:
- size_t m_size; //# of elements
- size_t m_capacity; //# of elements allocated
- T *m_pelements; //actual array
- // invariants:
- // dimensions == m_capacity
- // elements 0 thru m_size-1 always contain constructed T values.
- // elements from m_size thru m_capacity - 1 contain memory garbage (0xcc in DEBUG).
- bool m_isBufferOwner; // indicate if this vector creates its own buffer, or wraps an existing buffer.
-
-
-
-
- }; // class vector
-
-}; // namespace std
-
-#endif /* __clr_std_vector_h__ */
-
-#endif // !USE_STL
-
-// Help the VIM editor figure out what kind of file this no-extension file is.
-// vim: filetype=cpp
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//
+// --------------------------------------------------------------------------------------------------
+// clrconfignocache.h
+//
+// Logic for resolving configuration names.
+//
+
+#include<minipal/utils.h>
+
+// Config prefixes
+#define COMPLUS_PREFIX_A "COMPlus_"
+#define COMPLUS_PREFIX W("COMPlus_")
+#define LEN_OF_COMPLUS_PREFIX STRING_LENGTH(COMPLUS_PREFIX_A)
+
+#define DOTNET_PREFIX_A "DOTNET_"
+#define DOTNET_PREFIX W("DOTNET_")
+#define LEN_OF_DOTNET_PREFIX STRING_LENGTH(DOTNET_PREFIX_A)
+
+class CLRConfigNoCache
+{
+ const char* _value;
+
+ CLRConfigNoCache() = default;
+ CLRConfigNoCache(LPCSTR cfg) : _value { cfg }
+ { }
+
+public:
+ bool IsSet() const { return _value != NULL; }
+
+ LPCSTR AsString() const
+ {
+ _ASSERTE(IsSet());
+ return _value;
+ }
+
+ bool TryAsInteger(int radix, DWORD& result) const
+ {
+ _ASSERTE(IsSet());
+
+ errno = 0;
+ LPSTR endPtr;
+ unsigned long rawResult = strtoul(_value, &endPtr, radix);
+ if ((DWORD)rawResult != rawResult || errno == ERANGE)
+ {
+ return false;
+ }
+
+ result = (DWORD)rawResult;
+ bool fSuccess = endPtr != _value;
+ return fSuccess;
+ }
+
+ static CLRConfigNoCache Get(LPCSTR cfg, bool noPrefix = false, char*(*getEnvFptr)(const char*) = nullptr)
+ {
+ char nameBuffer[64];
+ const char* fallbackPrefix = NULL;
+ const size_t namelen = strlen(cfg);
+
+ if (noPrefix)
+ {
+ if (namelen >= ARRAY_SIZE(nameBuffer))
+ {
+ _ASSERTE(!"Environment variable name too long.");
+ return {};
+ }
+
+ *nameBuffer = '\0';
+ }
+ else
+ {
+ bool dotnetValid = namelen < (size_t)(STRING_LENGTH(nameBuffer) - LEN_OF_DOTNET_PREFIX);
+ bool complusValid = namelen < (size_t)(STRING_LENGTH(nameBuffer) - LEN_OF_COMPLUS_PREFIX);
+ if (!dotnetValid || !complusValid)
+ {
+ _ASSERTE(!"Environment variable name too long.");
+ return {};
+ }
+
+ // Priority order is DOTNET_ and then COMPlus_.
+ strcpy_s(nameBuffer, ARRAY_SIZE(nameBuffer), DOTNET_PREFIX_A);
+ fallbackPrefix = COMPLUS_PREFIX_A;
+ }
+
+ strcat_s(nameBuffer, ARRAY_SIZE(nameBuffer), cfg);
+
+ LPCSTR val = getEnvFptr != NULL ? getEnvFptr(nameBuffer) : getenv(nameBuffer);
+ if (val == NULL && fallbackPrefix != NULL)
+ {
+ strcpy_s(nameBuffer, ARRAY_SIZE(nameBuffer), fallbackPrefix);
+ strcat_s(nameBuffer, ARRAY_SIZE(nameBuffer), cfg);
+ val = getEnvFptr != NULL ? getEnvFptr(nameBuffer) : getenv(nameBuffer);
+ }
+
+ return { val };
+ }
+};
typedef enum CLRDataEnumMemoryFlags
{
CLRDATA_ENUM_MEM_DEFAULT = 0x0,
- CLRDATA_ENUM_MEM_MINI = CLRDATA_ENUM_MEM_DEFAULT, // generating skinny mini-dump
- CLRDATA_ENUM_MEM_HEAP = 0x1, // generating heap dump
- CLRDATA_ENUM_MEM_TRIAGE = 0x2, // generating triage mini-dump
-
+ CLRDATA_ENUM_MEM_MINI = CLRDATA_ENUM_MEM_DEFAULT, // generating skinny mini-dump
+ CLRDATA_ENUM_MEM_HEAP = 0x1, // generating heap dump
+ CLRDATA_ENUM_MEM_TRIAGE = 0x2, // generating triage mini-dump
+ /* Generate heap dumps faster with less memory usage than CLRDATA_ENUM_MEM_HEAP by adding
+ the loader heaps instead of traversing all the individual runtime data structures. */
+ CLRDATA_ENUM_MEM_HEAP2 = 0x3,
/* More bits to be added here later */
} CLRDataEnumMemoryFlags;
#ifndef __CLRHOST_H__
#define __CLRHOST_H__
+#include <new>
+
#include "windows.h" // worth to include before mscoree.h so we are guaranteed to pick few definitions
-#ifdef CreateSemaphore
-#undef CreateSemaphore
-#endif
+
#include "mscoree.h"
#include "clrinternal.h"
#include "switches.h"
#include "holder.h"
-#include "new.hpp"
+
+using std::nothrow;
+
#include "staticcontract.h"
#include "predeftlsslot.h"
#include "safemath.h"
HANDLE ClrGetProcessExecutableHeap();
#endif
-#ifdef FAILPOINTS_ENABLED
-extern int RFS_HashStack();
-#endif
-
-// Critical section support for CLR DLLs other than the the EE.
+// Critical section support for CLR DLLs other than the EE.
// Include the header defining each Crst type and its corresponding level (relative rank). This is
// auto-generated from a tool that takes a high-level description of each Crst type and its dependencies.
-#include "crsttypes.h"
+#include "crsttypes_generated.h"
// critical section api
CRITSEC_COOKIE ClrCreateCriticalSection(CrstType type, CrstFlags flags);
void ClrEnterCriticalSection(CRITSEC_COOKIE cookie);
void ClrLeaveCriticalSection(CRITSEC_COOKIE cookie);
+DWORD ClrSleepEx(DWORD dwMilliseconds, BOOL bAlertable);
+
// Rather than use the above APIs directly, it is recommended that holder classes
// be used. This guarantees that the locks will be vacated when the scope is popped,
// either on exception or on return.
-typedef Holder<CRITSEC_COOKIE, ClrEnterCriticalSection, ClrLeaveCriticalSection, NULL> CRITSEC_Holder;
+typedef Holder<CRITSEC_COOKIE, ClrEnterCriticalSection, ClrLeaveCriticalSection, 0> CRITSEC_Holder;
// Use this holder to manage CRITSEC_COOKIE allocation to ensure it will be released if anything goes wrong
FORCEINLINE void VoidClrDeleteCriticalSection(CRITSEC_COOKIE cs) { if (cs != NULL) ClrDeleteCriticalSection(cs); }
-typedef Wrapper<CRITSEC_COOKIE, DoNothing<CRITSEC_COOKIE>, VoidClrDeleteCriticalSection, NULL> CRITSEC_AllocationHolder;
+typedef Wrapper<CRITSEC_COOKIE, DoNothing<CRITSEC_COOKIE>, VoidClrDeleteCriticalSection, 0> CRITSEC_AllocationHolder;
+
+#ifndef DACCESS_COMPILE
+// Suspend/resume APIs that fail-fast on errors
+#ifdef TARGET_WINDOWS
+DWORD ClrSuspendThread(HANDLE hThread);
+#endif // TARGET_WINDOWS
+DWORD ClrResumeThread(HANDLE hThread);
+#endif // !DACCESS_COMPILE
DWORD GetClrModulePathName(SString& buffer);
// security sense but short of deliberate 3rd party spoofing it should provide a good identity.
//
// Using a different ID allows us to completely hide different CLR SKUs from each other. The recommendation is to keep
-// the ID contant between different versions of the same SKU and use mscordbi's logic to determine whether a given
+// the ID constant between different versions of the same SKU and use mscordbi's logic to determine whether a given
// version is compatible. This allows debuggers to give different errors for 'future version of the CLR I don't
// support' vs. 'No CLR is loaded at all.'
//
// GUID CLR_ID_CORECLR : uuid{8CB8E075-0A91-408E-9228-D66E00A3BFF6}
cpp_quote("EXTERN_GUID(CLR_ID_CORECLR, 0x8CB8E075, 0x0A91, 0x408E, 0x92, 0x28, 0xD6, 0x6E, 0x00, 0xA3, 0xBF, 0xF6 );")
-// This guid first appears in the CoreCLR port to Windows Phone 8 - note that it is seperate from the CoreCLR id because it will
-// potentially have a different verioning lineage than CoreCLR
+// This guid first appears in the CoreCLR port to Windows Phone 8 - note that it is separate from the CoreCLR id because it will
+// potentially have a different versioning lineage than CoreCLR
// GUID CLR_ID_PHONE_CLR : uuid{E7237E9C-31C0-488C-AD48-324D3E7ED92A}
cpp_quote("EXTERN_GUID(CLR_ID_PHONE_CLR, 0xE7237E9C, 0x31C0, 0x488C, 0xAD, 0x48, 0x32, 0x4D, 0x3E, 0x7E, 0xD9, 0x2A);")
#define CLRNT_H_
#include "staticcontract.h"
-
-//
-// This file is the result of some changes to the SDK header files.
-// In particular, nt.h and some of its dependencies are no longer
-// available except as "nonship" files. As a result, this file
-// was created as a simple cut and past of structures and functions
-// from NT that are either not yet documented or have been overlooked
-// as being part of the platform SDK.
-//
+#include "cfi.h"
//
// ALL PLATFORMS
#define LOCALE_NAME_MAX_LENGTH 85
#endif // !LOCALE_NAME_MAX_LENGTH
-#ifndef SUBLANG_CUSTOM_DEFAULT
-#define SUBLANG_CUSTOM_DEFAULT 0x03 // default custom language/locale
-#define SUBLANG_CUSTOM_UNSPECIFIED 0x04 // custom language/locale
-#define LOCALE_CUSTOM_DEFAULT \
- (MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_CUSTOM_DEFAULT), SORT_DEFAULT))
-#define LOCALE_CUSTOM_UNSPECIFIED \
- (MAKELCID(MAKELANGID(LANG_NEUTRAL, SUBLANG_CUSTOM_UNSPECIFIED), SORT_DEFAULT))
-#endif // !SUBLANG_CUSTOM_DEFAULT
+#ifndef IMAGE_FILE_MACHINE_RISCV64
+#define IMAGE_FILE_MACHINE_RISCV64 0x5064 // RISCV64
+#endif // !IMAGE_FILE_MACHINE_RISCV64
#ifndef __out_xcount_opt
#define __out_xcount_opt(var) __out
typedef SCHAR *PSCHAR;
typedef LONG NTSTATUS;
-#ifndef HOST_UNIX
+#ifdef HOST_WINDOWS
-#define TLS_MINIMUM_AVAILABLE 64 // winnt
#define TLS_EXPANSION_SLOTS 1024
-typedef enum _THREADINFOCLASS {
- ThreadBasicInformation,
- ThreadTimes,
- ThreadPriority,
- ThreadBasePriority,
- ThreadAffinityMask,
- ThreadImpersonationToken,
- ThreadDescriptorTableEntry,
- ThreadEnableAlignmentFaultFixup,
- ThreadEventPair_Reusable,
- ThreadQuerySetWin32StartAddress,
- ThreadZeroTlsCell,
- ThreadPerformanceCount,
- ThreadAmILastThread,
- ThreadIdealProcessor,
- ThreadPriorityBoost,
- ThreadSetTlsArrayAddress,
- ThreadIsIoPending,
- ThreadHideFromDebugger,
- ThreadBreakOnTermination,
- MaxThreadInfoClass
- } THREADINFOCLASS;
-
-typedef enum _SYSTEM_INFORMATION_CLASS {
- SystemBasicInformation,
- SystemProcessorInformation, // obsolete...delete
- SystemPerformanceInformation,
- SystemTimeOfDayInformation,
- SystemPathInformation,
- SystemProcessInformation,
- SystemCallCountInformation,
- SystemDeviceInformation,
- SystemProcessorPerformanceInformation,
- SystemFlagsInformation,
- SystemCallTimeInformation,
- SystemModuleInformation,
- SystemLocksInformation,
- SystemStackTraceInformation,
- SystemPagedPoolInformation,
- SystemNonPagedPoolInformation,
- SystemHandleInformation,
- SystemObjectInformation,
- SystemPageFileInformation,
- SystemVdmInstemulInformation,
- SystemVdmBopInformation,
- SystemFileCacheInformation,
- SystemPoolTagInformation,
- SystemInterruptInformation,
- SystemDpcBehaviorInformation,
- SystemFullMemoryInformation,
- SystemLoadGdiDriverInformation,
- SystemUnloadGdiDriverInformation,
- SystemTimeAdjustmentInformation,
- SystemSummaryMemoryInformation,
- SystemMirrorMemoryInformation,
- SystemPerformanceTraceInformation,
- SystemObsolete0,
- SystemExceptionInformation,
- SystemCrashDumpStateInformation,
- SystemKernelDebuggerInformation,
- SystemContextSwitchInformation,
- SystemRegistryQuotaInformation,
- SystemExtendServiceTableInformation,
- SystemPrioritySeperation,
- SystemVerifierAddDriverInformation,
- SystemVerifierRemoveDriverInformation,
- SystemProcessorIdleInformation,
- SystemLegacyDriverInformation,
- SystemCurrentTimeZoneInformation,
- SystemLookasideInformation,
- SystemTimeSlipNotification,
- SystemSessionCreate,
- SystemSessionDetach,
- SystemSessionInformation,
- SystemRangeStartInformation,
- SystemVerifierInformation,
- SystemVerifierThunkExtend,
- SystemSessionProcessInformation,
- SystemLoadGdiDriverInSystemSpace,
- SystemNumaProcessorMap,
- SystemPrefetcherInformation,
- SystemExtendedProcessInformation,
- SystemRecommendedSharedDataAlignment,
- SystemComPlusPackage,
- SystemNumaAvailableMemory,
- SystemProcessorPowerInformation,
- SystemEmulationBasicInformation,
- SystemEmulationProcessorInformation,
- SystemExtendedHandleInformation,
- SystemLostDelayedWriteInformation
-} SYSTEM_INFORMATION_CLASS;
-
-typedef enum _EVENT_INFORMATION_CLASS {
- EventBasicInformation
- } EVENT_INFORMATION_CLASS;
-
-typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION {
- LARGE_INTEGER IdleTime;
- LARGE_INTEGER KernelTime;
- LARGE_INTEGER UserTime;
- LARGE_INTEGER DpcTime; // DEVL only
- LARGE_INTEGER InterruptTime; // DEVL only
- ULONG InterruptCount;
-} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
-
-typedef enum _EVENT_TYPE {
- NotificationEvent,
- SynchronizationEvent
- } EVENT_TYPE;
-
-typedef struct _EVENT_BASIC_INFORMATION {
- EVENT_TYPE EventType;
- LONG EventState;
-} EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
-
-#define RTL_MEG (1024UL * 1024UL)
-#define RTLP_IMAGE_MAX_DOS_HEADER ( 256UL * RTL_MEG)
-
-typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION {
- BOOLEAN KernelDebuggerEnabled;
- BOOLEAN KernelDebuggerNotPresent;
-} SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
-
-typedef struct _STRING {
- USHORT Length;
- USHORT MaximumLength;
-#ifdef MIDL_PASS
- [size_is(MaximumLength), length_is(Length) ]
-#endif // MIDL_PASS
- PCHAR Buffer;
-} STRING;
-typedef STRING *PSTRING;
-
-typedef STRING ANSI_STRING;
-typedef PSTRING PANSI_STRING;
-
-typedef STRING OEM_STRING;
-typedef PSTRING POEM_STRING;
-typedef CONST STRING* PCOEM_STRING;
-
-typedef struct _UNICODE_STRING {
- USHORT Length;
- USHORT MaximumLength;
-#ifdef MIDL_PASS
- [size_is(MaximumLength / 2), length_is((Length) / 2) ] USHORT * Buffer;
-#else // MIDL_PASS
- PWSTR Buffer;
-#endif // MIDL_PASS
-} UNICODE_STRING;
-typedef UNICODE_STRING *PUNICODE_STRING;
-typedef const UNICODE_STRING *PCUNICODE_STRING;
-#define UNICODE_NULL ((WCHAR)0) // winnt
-
-typedef struct _STRING32 {
- USHORT Length;
- USHORT MaximumLength;
- ULONG Buffer;
-} STRING32;
-typedef STRING32 *PSTRING32;
-
-typedef STRING32 UNICODE_STRING32;
-typedef UNICODE_STRING32 *PUNICODE_STRING32;
-
-typedef STRING32 ANSI_STRING32;
-typedef ANSI_STRING32 *PANSI_STRING32;
-
-
-typedef struct _STRING64 {
- USHORT Length;
- USHORT MaximumLength;
- ULONGLONG Buffer;
-} STRING64;
-typedef STRING64 *PSTRING64;
-
-typedef STRING64 UNICODE_STRING64;
-typedef UNICODE_STRING64 *PUNICODE_STRING64;
-
-typedef STRING64 ANSI_STRING64;
-typedef ANSI_STRING64 *PANSI_STRING64;
-
-#define GDI_HANDLE_BUFFER_SIZE32 34
-#define GDI_HANDLE_BUFFER_SIZE64 60
-
-#if !defined(TARGET_AMD64)
-#define GDI_HANDLE_BUFFER_SIZE GDI_HANDLE_BUFFER_SIZE32
-#else
-#define GDI_HANDLE_BUFFER_SIZE GDI_HANDLE_BUFFER_SIZE64
-#endif
-
-typedef ULONG GDI_HANDLE_BUFFER32[GDI_HANDLE_BUFFER_SIZE32];
-typedef ULONG GDI_HANDLE_BUFFER64[GDI_HANDLE_BUFFER_SIZE64];
-typedef ULONG GDI_HANDLE_BUFFER [GDI_HANDLE_BUFFER_SIZE ];
-
-
-typedef struct _PEB_LDR_DATA {
- ULONG Length;
- BOOLEAN Initialized;
- HANDLE SsHandle;
- LIST_ENTRY InLoadOrderModuleList;
- LIST_ENTRY InMemoryOrderModuleList;
- LIST_ENTRY InInitializationOrderModuleList;
- PVOID EntryInProgress;
-} PEB_LDR_DATA, *PPEB_LDR_DATA;
+// Included for TEB::ReservedForOle, TlsSlots, TlsExpansionSlots
+#include <winternl.h>
-typedef struct _PEB_FREE_BLOCK {
- struct _PEB_FREE_BLOCK *Next;
- ULONG Size;
-} PEB_FREE_BLOCK, *PPEB_FREE_BLOCK;
+// Alias for TEB::ThreadLocalStoragePointer
+#define ThreadLocalStoragePointer Reserved1[11]
-typedef PVOID* PPVOID;
-
-typedef
-VOID
-(*PPS_POST_PROCESS_INIT_ROUTINE) (
- VOID
- );
-
-typedef struct _LDR_DATA_TABLE_ENTRY {
- LIST_ENTRY InLoadOrderLinks;
- LIST_ENTRY InMemoryOrderLinks;
- LIST_ENTRY InInitializationOrderLinks;
- PVOID DllBase;
- PVOID EntryPoint;
- ULONG SizeOfImage;
- UNICODE_STRING FullDllName;
- UNICODE_STRING BaseDllName;
- ULONG Flags;
- USHORT LoadCount;
- USHORT TlsIndex;
- union _foo {
- LIST_ENTRY HashLinks;
- struct _bar {
- PVOID SectionPointer;
- ULONG CheckSum;
- };
- };
- union _foo2 {
- struct _bar2 {
- ULONG TimeDateStamp;
- };
- struct _bar3 {
- PVOID LoadedImports;
- };
- };
- PVOID EntryPointActivationContext;
-} LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY;
-
-#define TYPE3(arg) arg
-
-typedef struct _PEB {
- BOOLEAN InheritedAddressSpace; // These four fields cannot change unless the
- BOOLEAN ReadImageFileExecOptions; //
- BOOLEAN BeingDebugged; //
- BOOLEAN SpareBool; //
- HANDLE Mutant; // INITIAL_PEB structure is also updated.
-
- PVOID ImageBaseAddress;
- PPEB_LDR_DATA Ldr;
- TYPE3(struct _RTL_USER_PROCESS_PARAMETERS*) ProcessParameters;
- PVOID SubSystemData;
- PVOID ProcessHeap;
- TYPE3(struct _RTL_CRITICAL_SECTION*) FastPebLock;
- PVOID FastPebLockRoutine;
- PVOID FastPebUnlockRoutine;
- ULONG EnvironmentUpdateCount;
- PVOID KernelCallbackTable;
- ULONG SystemReserved[1];
-
- struct _foo {
- ULONG ExecuteOptions : 2;
- ULONG SpareBits : 30;
- };
-
-
- PPEB_FREE_BLOCK FreeList;
- ULONG TlsExpansionCounter;
- PVOID TlsBitmap;
- ULONG TlsBitmapBits[2]; // TLS_MINIMUM_AVAILABLE bits
- PVOID ReadOnlySharedMemoryBase;
- PVOID ReadOnlySharedMemoryHeap;
- PPVOID ReadOnlyStaticServerData;
- PVOID AnsiCodePageData;
- PVOID OemCodePageData;
- PVOID UnicodeCaseTableData;
-
- //
- // Useful information for LdrpInitialize
- ULONG NumberOfProcessors;
- ULONG NtGlobalFlag;
-
- //
- // Passed up from MmCreatePeb from Session Manager registry key
- //
-
- LARGE_INTEGER CriticalSectionTimeout;
- SIZE_T HeapSegmentReserve;
- SIZE_T HeapSegmentCommit;
- SIZE_T HeapDeCommitTotalFreeThreshold;
- SIZE_T HeapDeCommitFreeBlockThreshold;
-
- //
- // Where heap manager keeps track of all heaps created for a process
- // Fields initialized by MmCreatePeb. ProcessHeaps is initialized
- // to point to the first free byte after the PEB and MaximumNumberOfHeaps
- // is computed from the page size used to hold the PEB, less the fixed
- // size of this data structure.
- //
-
- ULONG NumberOfHeaps;
- ULONG MaximumNumberOfHeaps;
- PPVOID ProcessHeaps;
-
- //
- //
- PVOID GdiSharedHandleTable;
- PVOID ProcessStarterHelper;
- ULONG GdiDCAttributeList;
- PVOID LoaderLock;
-
- //
- // Following fields filled in by MmCreatePeb from system values and/or
- // image header.
- //
-
- ULONG OSMajorVersion;
- ULONG OSMinorVersion;
- USHORT OSBuildNumber;
- USHORT OSCSDVersion;
- ULONG OSPlatformId;
- ULONG ImageSubsystem;
- ULONG ImageSubsystemMajorVersion;
- ULONG ImageSubsystemMinorVersion;
- ULONG_PTR ImageProcessAffinityMask;
- GDI_HANDLE_BUFFER GdiHandleBuffer;
- PPS_POST_PROCESS_INIT_ROUTINE PostProcessInitRoutine;
-
- PVOID TlsExpansionBitmap;
- ULONG TlsExpansionBitmapBits[32]; // TLS_EXPANSION_SLOTS bits
-
- //
- // Id of the Hydra session in which this process is running
- //
- ULONG SessionId;
-
- //
- // Filled in by LdrpInstallAppcompatBackend
- //
- ULARGE_INTEGER AppCompatFlags;
-
- //
- // ntuser appcompat flags
- //
- ULARGE_INTEGER AppCompatFlagsUser;
-
- //
- // Filled in by LdrpInstallAppcompatBackend
- //
- PVOID pShimData;
-
- //
- // Filled in by LdrQueryImageFileExecutionOptions
- //
- PVOID AppCompatInfo;
-
- //
- // Used by GetVersionExW as the szCSDVersion string
- //
- UNICODE_STRING CSDVersion;
-
- //
- // Fusion stuff
- //
- PVOID ActivationContextData;
- PVOID ProcessAssemblyStorageMap;
- PVOID SystemDefaultActivationContextData;
- PVOID SystemAssemblyStorageMap;
-
- //
- // Enforced minimum initial commit stack
- //
- SIZE_T MinimumStackCommit;
-
-} PEB, *PPEB;
-
-#define ACTIVATION_CONTEXT_STACK_FLAG_QUERIES_DISABLED (0x00000001)
-
-typedef struct _ACTIVATION_CONTEXT_STACK {
- ULONG Flags;
- ULONG NextCookieSequenceNumber;
- PVOID ActiveFrame;
- LIST_ENTRY FrameListCache;
-
-#if NT_SXS_PERF_COUNTERS_ENABLED
- struct _ACTIVATION_CONTEXT_STACK_PERF_COUNTERS {
- ULONGLONG Activations;
- ULONGLONG ActivationCycles;
- ULONGLONG Deactivations;
- ULONGLONG DeactivationCycles;
- } Counters;
-#endif // NT_SXS_PERF_COUNTERS_ENABLED
-} ACTIVATION_CONTEXT_STACK, *PACTIVATION_CONTEXT_STACK;
-
-typedef const ACTIVATION_CONTEXT_STACK *PCACTIVATION_CONTEXT_STACK;
-
-#define TEB_ACTIVE_FRAME_CONTEXT_FLAG_EXTENDED (0x00000001)
-
-typedef struct _TEB_ACTIVE_FRAME_CONTEXT {
- ULONG Flags;
- PCSTR FrameName;
-} TEB_ACTIVE_FRAME_CONTEXT, *PTEB_ACTIVE_FRAME_CONTEXT;
-
-typedef const struct _TEB_ACTIVE_FRAME_CONTEXT *PCTEB_ACTIVE_FRAME_CONTEXT;
-
-typedef struct _TEB_ACTIVE_FRAME_CONTEXT_EX {
- TEB_ACTIVE_FRAME_CONTEXT BasicContext;
- PCSTR SourceLocation; // e.g. "Z:\foo\bar\baz.c"
-} TEB_ACTIVE_FRAME_CONTEXT_EX, *PTEB_ACTIVE_FRAME_CONTEXT_EX;
-
-typedef const struct _TEB_ACTIVE_FRAME_CONTEXT_EX *PCTEB_ACTIVE_FRAME_CONTEXT_EX;
-
-#define TEB_ACTIVE_FRAME_FLAG_EXTENDED (0x00000001)
-
-typedef struct _TEB_ACTIVE_FRAME {
- ULONG Flags;
- TYPE3(struct _TEB_ACTIVE_FRAME*) Previous;
- PCTEB_ACTIVE_FRAME_CONTEXT Context;
-} TEB_ACTIVE_FRAME, *PTEB_ACTIVE_FRAME;
-
-typedef const struct _TEB_ACTIVE_FRAME *PCTEB_ACTIVE_FRAME;
-
-typedef struct _TEB_ACTIVE_FRAME_EX {
- TEB_ACTIVE_FRAME BasicFrame;
- PVOID ExtensionIdentifier; // use address of your DLL Main or something unique to your mapping in the address space
-} TEB_ACTIVE_FRAME_EX, *PTEB_ACTIVE_FRAME_EX;
-
-typedef const struct _TEB_ACTIVE_FRAME_EX *PCTEB_ACTIVE_FRAME_EX;
-
-typedef struct _CLIENT_ID {
- HANDLE UniqueProcess;
- HANDLE UniqueThread;
-} CLIENT_ID;
-typedef CLIENT_ID *PCLIENT_ID;
-
-#define GDI_BATCH_BUFFER_SIZE 310
-
-typedef struct _GDI_TEB_BATCH {
- ULONG Offset;
- ULONG_PTR HDC;
- ULONG Buffer[GDI_BATCH_BUFFER_SIZE];
-} GDI_TEB_BATCH,*PGDI_TEB_BATCH;
-
-typedef struct _Wx86ThreadState {
- PULONG CallBx86Eip;
- PVOID DeallocationCpu;
- BOOLEAN UseKnownWx86Dll;
- char OleStubInvoked;
-} WX86THREAD, *PWX86THREAD;
-
-#define STATIC_UNICODE_BUFFER_LENGTH 261
-#define WIN32_CLIENT_INFO_LENGTH 62
-
-typedef struct _PEB* PPEB;
-
-typedef struct _TEB {
- NT_TIB NtTib;
- PVOID EnvironmentPointer;
- CLIENT_ID ClientId;
- PVOID ActiveRpcHandle;
- PVOID ThreadLocalStoragePointer;
-#if defined(PEBTEB_BITS)
- PVOID ProcessEnvironmentBlock;
-#else
- PPEB ProcessEnvironmentBlock;
#endif
- ULONG LastErrorValue;
- ULONG CountOfOwnedCriticalSections;
- PVOID CsrClientThread;
- PVOID Win32ThreadInfo; // PtiCurrent
- ULONG User32Reserved[26]; // user32.dll items
- ULONG UserReserved[5]; // Winsrv SwitchStack
- PVOID WOW32Reserved; // used by WOW
- LCID CurrentLocale;
- ULONG FpSoftwareStatusRegister; // offset known by outsiders!
- PVOID SystemReserved1[54]; // Used by FP emulator
- NTSTATUS ExceptionCode; // for RaiseUserException
- ACTIVATION_CONTEXT_STACK ActivationContextStack; // Fusion activation stack
- // sizeof(PVOID) is a way to express processor-dependence, more generally than #ifdef HOST_64BIT
- UCHAR SpareBytes1[48 - sizeof(PVOID) - sizeof(ACTIVATION_CONTEXT_STACK)];
- GDI_TEB_BATCH GdiTebBatch; // Gdi batching
- CLIENT_ID RealClientId;
- HANDLE GdiCachedProcessHandle;
- ULONG GdiClientPID;
- ULONG GdiClientTID;
- PVOID GdiThreadLocalInfo;
- ULONG_PTR Win32ClientInfo[WIN32_CLIENT_INFO_LENGTH]; // User32 Client Info
- PVOID glDispatchTable[233]; // OpenGL
- ULONG_PTR glReserved1[29]; // OpenGL
- PVOID glReserved2; // OpenGL
- PVOID glSectionInfo; // OpenGL
- PVOID glSection; // OpenGL
- PVOID glTable; // OpenGL
- PVOID glCurrentRC; // OpenGL
- PVOID glContext; // OpenGL
- ULONG LastStatusValue;
- UNICODE_STRING StaticUnicodeString;
- WCHAR StaticUnicodeBuffer[STATIC_UNICODE_BUFFER_LENGTH];
- PVOID DeallocationStack;
- PVOID TlsSlots[TLS_MINIMUM_AVAILABLE];
- LIST_ENTRY TlsLinks;
- PVOID Vdm;
- PVOID ReservedForNtRpc;
- PVOID DbgSsReserved[2];
- ULONG HardErrorsAreDisabled;
- PVOID Instrumentation[16];
- PVOID WinSockData; // WinSock
- ULONG GdiBatchCount;
- BOOLEAN InDbgPrint;
- BOOLEAN FreeStackOnTermination;
- BOOLEAN HasFiberData;
- BOOLEAN IdealProcessor;
- ULONG Spare3;
- PVOID ReservedForPerf;
- PVOID ReservedForOle;
- ULONG WaitingOnLoaderLock;
- WX86THREAD Wx86Thread;
- PPVOID TlsExpansionSlots;
- LCID ImpersonationLocale; // Current locale of impersonated user
- ULONG IsImpersonating; // Thread impersonation status
- PVOID NlsCache; // NLS thread cache
- PVOID pShimData; // Per thread data used in the shim
- ULONG HeapVirtualAffinity;
- HANDLE CurrentTransactionHandle;// reserved for TxF transaction context
- PTEB_ACTIVE_FRAME ActiveFrame;
-} TEB;
-typedef TEB *PTEB;
-
-typedef struct _CURDIR {
- UNICODE_STRING DosPath;
- HANDLE Handle;
-} CURDIR, *PCURDIR;
-
-#define RTL_USER_PROC_CURDIR_CLOSE 0x00000002
-#define RTL_USER_PROC_CURDIR_INHERIT 0x00000003
-
-typedef struct _RTL_DRIVE_LETTER_CURDIR {
- USHORT Flags;
- USHORT Length;
- ULONG TimeStamp;
- STRING DosPath;
-} RTL_DRIVE_LETTER_CURDIR, *PRTL_DRIVE_LETTER_CURDIR;
-
-
-#define RTL_MAX_DRIVE_LETTERS 32
-#define RTL_DRIVE_LETTER_VALID (USHORT)0x0001
-
-typedef struct _RTL_USER_PROCESS_PARAMETERS {
- ULONG MaximumLength;
- ULONG Length;
-
- ULONG Flags;
- ULONG DebugFlags;
-
- HANDLE ConsoleHandle;
- ULONG ConsoleFlags;
- HANDLE StandardInput;
- HANDLE StandardOutput;
- HANDLE StandardError;
-
- CURDIR CurrentDirectory; // ProcessParameters
- UNICODE_STRING DllPath; // ProcessParameters
- UNICODE_STRING ImagePathName; // ProcessParameters
- UNICODE_STRING CommandLine; // ProcessParameters
- PVOID Environment; // NtAllocateVirtualMemory
-
- ULONG StartingX;
- ULONG StartingY;
- ULONG CountX;
- ULONG CountY;
- ULONG CountCharsX;
- ULONG CountCharsY;
- ULONG FillAttribute;
-
- ULONG WindowFlags;
- ULONG ShowWindowFlags;
- UNICODE_STRING WindowTitle; // ProcessParameters
- UNICODE_STRING DesktopInfo; // ProcessParameters
- UNICODE_STRING ShellInfo; // ProcessParameters
- UNICODE_STRING RuntimeData; // ProcessParameters
- RTL_DRIVE_LETTER_CURDIR CurrentDirectores[ RTL_MAX_DRIVE_LETTERS ];
-} RTL_USER_PROCESS_PARAMETERS, *PRTL_USER_PROCESS_PARAMETERS;
-
-
-typedef enum _PROCESSINFOCLASS {
- ProcessBasicInformation,
- ProcessQuotaLimits,
- ProcessIoCounters,
- ProcessVmCounters,
- ProcessTimes,
- ProcessBasePriority,
- ProcessRaisePriority,
- ProcessDebugPort,
- ProcessExceptionPort,
- ProcessAccessToken,
- ProcessLdtInformation,
- ProcessLdtSize,
- ProcessDefaultHardErrorMode,
- ProcessIoPortHandlers, // Note: this is kernel mode only
- ProcessPooledUsageAndLimits,
- ProcessWorkingSetWatch,
- ProcessUserModeIOPL,
- ProcessEnableAlignmentFaultFixup,
- ProcessPriorityClass,
- ProcessWx86Information,
- ProcessHandleCount,
- ProcessAffinityMask,
- ProcessPriorityBoost,
- ProcessDeviceMap,
- ProcessSessionInformation,
- ProcessForegroundInformation,
- ProcessWow64Information,
- ProcessImageFileName,
- ProcessLUIDDeviceMapsEnabled,
- ProcessBreakOnTermination,
- ProcessDebugObjectHandle,
- ProcessDebugFlags,
- ProcessHandleTracing,
- MaxProcessInfoClass // MaxProcessInfoClass should always be the last enum
- } PROCESSINFOCLASS;
-
-
-typedef struct _VM_COUNTERS {
- SIZE_T PeakVirtualSize;
- SIZE_T VirtualSize;
- ULONG PageFaultCount;
- SIZE_T PeakWorkingSetSize;
- SIZE_T WorkingSetSize;
- SIZE_T QuotaPeakPagedPoolUsage;
- SIZE_T QuotaPagedPoolUsage;
- SIZE_T QuotaPeakNonPagedPoolUsage;
- SIZE_T QuotaNonPagedPoolUsage;
- SIZE_T PagefileUsage;
- SIZE_T PeakPagefileUsage;
-} VM_COUNTERS;
-typedef VM_COUNTERS *PVM_COUNTERS;
-
-#undef TYPE3
-
-#endif // !defined(HOST_UNIX)
#if !defined(TARGET_X86)
//
#ifdef TARGET_X86
-#ifndef TARGET_UNIX
+#ifndef HOST_UNIX
//
// x86 ABI does not define RUNTIME_FUNCTION. Define our own to allow unification between x86 and other platforms.
//
#ifdef HOST_X86
typedef struct _RUNTIME_FUNCTION {
DWORD BeginAddress;
+ // NOTE: R2R doesn't include EndAddress (see docs/design/coreclr/botr/readytorun-format.md).
+ // NativeAOT does include the EndAddress because the Microsoft linker expects it. In NativeAOT
+ // the info is generated in the managed ObjectWriter, so the structures don't have to match.
+ // DWORD EndAddress;
DWORD UnwindData;
} RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
typedef struct _DISPATCHER_CONTEXT {
_EXCEPTION_REGISTRATION_RECORD* RegistrationPointer;
} DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT;
+
#endif // HOST_X86
-#endif // !TARGET_UNIX
+#endif // !HOST_UNIX
#define RUNTIME_FUNCTION__BeginAddress(prf) (prf)->BeginAddress
#define RUNTIME_FUNCTION__SetBeginAddress(prf,addr) ((prf)->BeginAddress = (addr))
-#ifdef FEATURE_EH_FUNCLETS
#include "win64unwind.h"
#include "daccess.h"
_In_ TADDR ImageBase
)
{
- PTR_UNWIND_INFO pUnwindInfo = (PTR_UNWIND_INFO)(ImageBase + FunctionEntry->UnwindData);
+ PUNWIND_INFO pUnwindInfo = (PUNWIND_INFO)(ImageBase + FunctionEntry->UnwindData);
return FunctionEntry->BeginAddress + pUnwindInfo->FunctionLength;
}
#define RUNTIME_FUNCTION__SetUnwindInfoAddress(prf, addr) do { (prf)->UnwindData = (addr); } while(0)
#ifdef HOST_X86
-EXTERN_C
-NTSYSAPI
PEXCEPTION_ROUTINE
-NTAPI
RtlVirtualUnwind (
_In_ DWORD HandlerType,
_In_ DWORD ImageBase,
__inout_opt PT_KNONVOLATILE_CONTEXT_POINTERS ContextPointers
);
#endif // HOST_X86
-#endif // FEATURE_EH_FUNCLETS
#endif // TARGET_X86
ULONG64 FunctionLength;
FunctionLength = FunctionEntry->UnwindData;
- if ((FunctionLength & 3) != 0) {
- FunctionLength = (FunctionLength >> 2) & 0x7ff;
- } else {
+ if ((FunctionLength & 3) != 0)
+ {
+ // Compact form pdata.
+ if ((FunctionLength & 7) == 3)
+ {
+ // Long branch pdata, by standard this is 3 so size is 12.
+ FunctionLength = 3;
+ }
+ else
+ {
+ FunctionLength = (FunctionLength >> 2) & 0x7ff;
+ }
+ }
+ else
+ {
+ // Get from the xdata record.
FunctionLength = *(PTR_ULONG64)(ImageBase + FunctionLength) & 0x3ffff;
}
IN OUT PKNONVOLATILE_CONTEXT_POINTERS ContextPointers OPTIONAL
);
-#ifndef IMAGE_FILE_MACHINE_ARM64
-#define IMAGE_FILE_MACHINE_ARM64 0xAA64 // ARM64 Little-Endian
-#endif
-
-#ifndef IMAGE_REL_ARM64_BRANCH26
-#define IMAGE_REL_ARM64_BRANCH26 0x0003 // 26 bit offset << 2 & sign ext. for B & BL
-#endif
-
-#ifndef IMAGE_REL_ARM64_PAGEBASE_REL21
-#define IMAGE_REL_ARM64_PAGEBASE_REL21 0x0004 // ADRP 21 bit PC-relative page address
-#endif
-
-#ifndef IMAGE_REL_ARM64_PAGEOFFSET_12A
-#define IMAGE_REL_ARM64_PAGEOFFSET_12A 0x0006 // ADD 12 bit page offset
-#endif
-
#endif
#ifdef TARGET_LOONGARCH64
_In_ ULONG64 ImageBase
)
{
- ULONG64 FunctionLength = FunctionEntry->UnwindData;
+ ULONG64 FunctionLength;
+ FunctionLength = FunctionEntry->UnwindData;
if ((FunctionLength & 3) != 0) {
FunctionLength = (FunctionLength >> 2) & 0x7ff;
} else {
if ((FunctionLength & 3) != 0) {
FunctionLength = (FunctionLength >> 2) & 0x7ff;
} else {
- memcpy(&FunctionLength, (void*)(ImageBase + FunctionLength), sizeof(UINT32));
- FunctionLength &= 0x3ffff;
+ FunctionLength = *(PTR_ULONG64)(ImageBase + FunctionLength) & 0x3ffff;
}
return FunctionEntry->BeginAddress + 4 * FunctionLength;
return (value+alignment-1)&~(UINT64)(alignment-1);
}
+#ifdef __APPLE__
+inline SIZE_T AlignUp(SIZE_T value, UINT alignment)
+{
+ STATIC_CONTRACT_LEAF;
+ STATIC_CONTRACT_SUPPORTS_DAC;
+ return (value+alignment-1)&~(SIZE_T)(alignment-1);
+}
+#endif // __APPLE__
+
inline UINT AlignDown(UINT value, UINT alignment)
{
STATIC_CONTRACT_LEAF;
return (value&~(UINT64)(alignment-1));
}
+#ifdef __APPLE__
+inline SIZE_T AlignDown(SIZE_T value, UINT alignment)
+{
+ STATIC_CONTRACT_LEAF;
+ STATIC_CONTRACT_SUPPORTS_DAC;
+ return (value&~(SIZE_T)(alignment-1));
+}
+#endif // __APPLE__
+
inline UINT AlignmentPad(UINT value, UINT alignment)
{
STATIC_CONTRACT_WRAPPER;
return (UINT) (AlignUp(value, alignment) - value);
}
+#ifdef __APPLE__
+inline UINT AlignmentPad(SIZE_T value, UINT alignment)
+{
+ STATIC_CONTRACT_WRAPPER;
+ return (UINT) (AlignUp(value, alignment) - value);
+}
+#endif // __APPLE__
+
inline UINT AlignmentTrim(UINT value, UINT alignment)
{
STATIC_CONTRACT_LEAF;
return ((UINT)value)&(alignment-1);
}
+#ifdef __APPLE__
+inline UINT AlignmentTrim(SIZE_T value, UINT alignment)
+{
+ STATIC_CONTRACT_LEAF;
+ STATIC_CONTRACT_SUPPORTS_DAC;
+ return ((UINT)value)&(alignment-1);
+}
+#endif // __APPLE__
+
#endif // CLRTYPES_H_
// ModeViolation
// FaultViolation
// FaultNotFatal
-// HostViolation
// LoadsTypeViolation
// TakesLockViolation
//
// A do-nothing contract used by functions that trivially wrap another.
//
//
-// "LEGACY" stuff - these features have been mostly superceded by better solutions
+// "LEGACY" stuff - these features have been mostly superseded by better solutions
// so their use should be discouraged.
//
//
#define ENABLE_CONTRACTS
#endif
-// Finally, only define the implementaiton parts of contracts if this isn't a DAC build.
+// Finally, only define the implementation parts of contracts if this isn't a DAC build.
#if defined(_DEBUG_IMPL) && defined(ENABLE_CONTRACTS)
#define ENABLE_CONTRACTS_IMPL
#endif
#include "specstrings.h"
#include "clrtypes.h"
-#include "malloc.h"
#include "check.h"
#include "debugreturn.h"
#include "staticcontract.h"
#define CONTRACT_BITMASK_OK_TO_THROW 0x1 << 0
#define CONTRACT_BITMASK_FAULT_FORBID 0x1 << 1
-#define CONTRACT_BITMASK_HOSTCALLS 0x1 << 2
+// Unused 0x1 << 2
#define CONTRACT_BITMASK_SOTOLERANT 0x1 << 3
#define CONTRACT_BITMASK_DEBUGONLY 0x1 << 4
#define CONTRACT_BITMASK_SONOTMAINLINE 0x1 << 5
// We start out in SO-tolerant mode and must probe before entering SO-intolerant
// any global state updates.
// Initial mode is non-debug until we say otherwise
- // Everthing defaults to mainline
+ // Everything defaults to mainline
// By default, GetThread() is perfectly fine to call
// By default, it's ok to take a lock (or call someone who does)
m_flags = CONTRACT_BITMASK_OK_TO_THROW|
- CONTRACT_BITMASK_HOSTCALLS|
CONTRACT_BITMASK_SOTOLERANT|
CONTRACT_BITMASK_OK_TO_LOCK|
CONTRACT_BITMASK_OK_TO_RETAKE_LOCK;
CONTRACT_BITMASK_RESET(CONTRACT_BITMASK_FAULT_FORBID);
}
- //--//
- BOOL IsHostCaller()
- {
- return CONTRACT_BITMASK_IS_SET(CONTRACT_BITMASK_HOSTCALLS);
- }
-
- void SetHostCaller()
- {
- CONTRACT_BITMASK_SET(CONTRACT_BITMASK_HOSTCALLS);
- }
-
-
- BOOL SetHostCaller(BOOL value)
- {
- BOOL prevState = CONTRACT_BITMASK_IS_SET(CONTRACT_BITMASK_HOSTCALLS);
- CONTRACT_BITMASK_UPDATE(CONTRACT_BITMASK_HOSTCALLS,value);
- return prevState;
- }
-
- void ResetHostCaller()
- {
- CONTRACT_BITMASK_RESET(CONTRACT_BITMASK_HOSTCALLS);
- }
-
//--//
BOOL IsDebugOnly()
{
SO_MAINLINE_No = 0x00000800, // code is not part of our mainline SO scenario
- // Any place where we can't safely call into the host should have a HOST_NoCalls contract
- HOST_Mask = 0x00003000,
- HOST_Calls = 0x00002000,
- HOST_NoCalls = 0x00001000,
- HOST_Disabled = 0x00000000, // the default
+ // Unused = 0x00002000,
+ // Unused = 0x00001000,
// These enforce the CAN_TAKE_LOCK / CANNOT_TAKE_LOCK contracts
CAN_TAKE_LOCK_Mask = 0x00060000,
LOADS_TYPE_Disabled = 0x00000000, // the default
ALL_Disabled = THROWS_Disabled|GC_Disabled|FAULT_Disabled|MODE_Disabled|LOADS_TYPE_Disabled|
- HOST_Disabled|CAN_TAKE_LOCK_Disabled|CAN_RETAKE_LOCK_No_Disabled
+ CAN_TAKE_LOCK_Disabled|CAN_RETAKE_LOCK_No_Disabled
};
}
};
- // PseudoTemplate is a class which can be instantated with a template-like syntax, resulting
+ // PseudoTemplate is a class which can be instantiated with a template-like syntax, resulting
// in an expression which simply boxes a following value in a Box
template <typename T>
FaultNotFatal = 0x00000010, // suppress INJECT_FAULT but not fault injection by harness
LoadsTypeViolation = 0x00000040, // suppress LOADS_TYPE tags in this scope
TakesLockViolation = 0x00000080, // suppress CAN_TAKE_LOCK tags in this scope
- HostViolation = 0x00000100, // suppress HOST_CALLS tags in this scope
//These are not violation bits. We steal some bits out of the violation mask to serve as
// general flag bits.
FORCEINLINE void EnterInternal(UINT_PTR violationMask)
{
_ASSERTE(0 == (violationMask & ~(ThrowsViolation | GCViolation | ModeViolation | FaultViolation |
- FaultNotFatal | HostViolation |
+ FaultNotFatal |
TakesLockViolation | LoadsTypeViolation)) ||
violationMask == AllViolation);
ReasonIBC, // Code runs in IBC scenarios only and the violation is safe.
ReasonNGEN, // Code runs in NGEN scenarios only and the violation is safe.
ReasonProfilerCallout, // Profiler implementers are guaranteed not to throw.
- ReasonUnsupportedForSQLF1Profiling, // This code path violates HOST_NOCALLS, but that's ok b/c SQL will never
- // invoke it, and thus SQL/F1 profiling (the primary reason to enforce
- // HOST_NOCALLS) is not in danger.
ReasonRuntimeReentrancy, // e.g. SafeQueryInterface
ReasonShutdownOnly, // Code path only runs as part of Shutdown and the violation is safe.
ReasonSOTolerance, // We would like to redesign SO contracts anyways
return NULL;
}
-#endif // ENABLE_CONTRACTS_IMPL
-
-#ifdef ENABLE_CONTRACTS_IMPL
-
-class HostNoCallHolder
-{
- public:
- DEBUG_NOINLINE HostNoCallHolder()
- {
- SCAN_SCOPE_BEGIN;
- STATIC_CONTRACT_HOST_NOCALLS;
-
- m_clrDebugState = GetClrDebugState();
- m_previousState = m_clrDebugState->SetHostCaller(FALSE);
- }
-
- DEBUG_NOINLINE ~HostNoCallHolder()
- {
- SCAN_SCOPE_END;
-
- m_clrDebugState->SetHostCaller(m_previousState);
- }
-
- private:
- BOOL m_previousState;
- ClrDebugState* m_clrDebugState;
-
-};
-
-#define BEGIN_HOST_NOCALL_CODE \
- { \
- HostNoCallHolder __hostNoCallHolder; \
- CantAllocHolder __cantAlloc;
-
-#define END_HOST_NOCALL_CODE \
- }
-
-#else // ENABLE_CONTRACTS_IMPL
-#define BEGIN_HOST_NOCALL_CODE \
- { \
- CantAllocHolder __cantAlloc; \
-
-#define END_HOST_NOCALL_CODE \
- }
-#endif
-
-
-#if defined(ENABLE_CONTRACTS_IMPL)
// Macros to indicate we're taking or releasing locks
#define LOCK_RELEASED_MULTIPLE(dbgStateLockType, cExits, pvLock) \
::GetClrDebugState()->LockReleased((dbgStateLockType), (cExits), (void*) (pvLock))
-// Use these only if you need to force multiple entrances or exits in a single
-// line (e.g., to restore the lock to a previous state). CRWLock in vm\rwlock.cpp does this
-#define EE_LOCK_TAKEN_MULTIPLE(cEntrances, pvLock) \
- LOCK_TAKEN_MULTIPLE(kDbgStateLockType_EE, cEntrances, pvLock)
-#define EE_LOCK_RELEASED_MULTIPLE(cExits, pvLock) \
- LOCK_RELEASED_MULTIPLE(kDbgStateLockType_EE, cExits, pvLock)
-#define HOST_BREAKABLE_CRST_TAKEN_MULTIPLE(cEntrances, pvLock) \
- LOCK_TAKEN_MULTIPLE(kDbgStateLockType_HostBreakableCrst, cEntrances, pvLock)
-#define HOST_BREAKABLE_CRST_RELEASED_MULTIPLE(cExits, pvLock) \
- LOCK_RELEASED_MULTIPLE(kDbgStateLockType_HostBreakableCrst, cExits, pvLock)
-#define USER_LOCK_TAKEN_MULTIPLE(cEntrances, pvLock) \
- LOCK_TAKEN_MULTIPLE(kDbgStateLockType_User, cEntrances, pvLock)
-#define USER_LOCK_RELEASED_MULTIPLE(cExits, pvLock) \
- LOCK_RELEASED_MULTIPLE(kDbgStateLockType_User, cExits, pvLock)
-
// These are most typically used
#define EE_LOCK_TAKEN(pvLock) \
LOCK_TAKEN_MULTIPLE(kDbgStateLockType_EE, 1, pvLock)
#define LOCK_TAKEN_MULTIPLE(dbgStateLockType, cEntrances, pvLock)
#define LOCK_RELEASED_MULTIPLE(dbgStateLockType, cExits, pvLock)
-#define EE_LOCK_TAKEN_MULTIPLE(cEntrances, pvLock)
-#define EE_LOCK_RELEASED_MULTIPLE(cExits, pvLock)
-#define HOST_BREAKABLE_CRST_TAKEN_MULTIPLE(cEntrances, pvLock)
-#define HOST_BREAKABLE_CRST_RELEASED_MULTIPLE(cExits, pvLock)
-#define USER_LOCK_TAKEN_MULTIPLE(cEntrances, pvLock)
-#define USER_LOCK_RELEASED_MULTIPLE(cExits, pvLock)
#define EE_LOCK_TAKEN(pvLock)
#define EE_LOCK_RELEASED(pvLock)
#define HOST_BREAKABLE_CRST_TAKEN(pvLock)
// Eventually, all those bugs should be fixed this holder can be completely removed.
//
// It is also the case that we disallow allocations when any thread is OS suspended
-// This happens for a short time when we are suspending the EE. We supress both
+// This happens for a short time when we are suspending the EE. We suppress both
// of these.
//
// @todo- ideally this would be rolled into the ContractViolation.
// Remember as many of these new entrances in m_rgTakenLockInfos as we can
for (UINT i = cCombinedLocks;
- i < min (ARRAY_SIZE(m_rgTakenLockInfos), cCombinedLocks + cTakes);
+ i < std::min (ARRAY_SIZE(m_rgTakenLockInfos), (size_t)(cCombinedLocks + cTakes));
i++)
{
m_rgTakenLockInfos[i].m_pvLock = pvLock;
// If lock count is within range of our m_rgTakenLockInfos buffer size, then
// make sure we're releasing locks in reverse order of how we took them
for (UINT i = cCombinedLocks - cReleases;
- i < min (ARRAY_SIZE(m_rgTakenLockInfos), cCombinedLocks);
+ i < std::min (ARRAY_SIZE(m_rgTakenLockInfos), (size_t)cCombinedLocks);
i++)
{
if (m_rgTakenLockInfos[i].m_pvLock != pvLock)
// m_cLocksEnteringCannotRetakeLock records the number of locks that were taken
// when CANNOT_RETAKE_LOCK contract was constructed.
for (UINT i = 0;
- i < min(ARRAY_SIZE(m_pLockData->m_rgTakenLockInfos), m_cLocksEnteringCannotRetakeLock);
+ i < std::min(ARRAY_SIZE(m_pLockData->m_rgTakenLockInfos), (size_t)m_cLocksEnteringCannotRetakeLock);
++i)
{
if (m_pLockData->m_rgTakenLockInfos[i].m_pvLock == pvLock)
{
char Buf[512*20 + 2048 + 1024];
- sprintf_s(Buf,ARRAY_SIZE(Buf), "CONTRACT VIOLATION by %s at \"%s\" @ %d\n\n%s\n", szFunction, szFile, lineNum, szElaboration);
+ sprintf_s(Buf,ARRAY_SIZE(Buf), "CONTRACT VIOLATION by %s at \"%s\":%d\n\n%s\n", szFunction, szFile, lineNum, szElaboration);
int count = 20;
ContractStackRecord *pRec = CheckClrDebugState() ? CheckClrDebugState()->GetContractStackTrace() : NULL;
}
sprintf_s(tmpbuf,ARRAY_SIZE(tmpbuf),
- "\n%s %s in %s at \"%s\" @ %d",
+ "\n%s %s in %s at \"%s\":%d",
fshowconflict ? "VIOLATED-->" : " ",
pRec->m_construct,
pRec->m_szFunction,
extern "C" {
#endif
-// {BED7F4EA-1A96-11d2-8F08-00A0C9A6186D}
-EXTERN_GUID(LIBID_ComPlusRuntime, 0xbed7f4ea, 0x1a96, 0x11d2, 0x8f, 0x8, 0x0, 0xa0, 0xc9, 0xa6, 0x18, 0x6d);
-
-// {90883F05-3D28-11D2-8F17-00A0C9A6186D}
-EXTERN_GUID(GUID_ExportedFromComPlus, 0x90883f05, 0x3d28, 0x11d2, 0x8f, 0x17, 0x0, 0xa0, 0xc9, 0xa6, 0x18, 0x6d);
-
-// {0F21F359-AB84-41e8-9A78-36D110E6D2F9}
-EXTERN_GUID(GUID_ManagedName, 0xf21f359, 0xab84, 0x41e8, 0x9a, 0x78, 0x36, 0xd1, 0x10, 0xe6, 0xd2, 0xf9);
-
-// {54FC8F55-38DE-4703-9C4E-250351302B1C}
-EXTERN_GUID(GUID_Function2Getter, 0x54fc8f55, 0x38de, 0x4703, 0x9c, 0x4e, 0x25, 0x3, 0x51, 0x30, 0x2b, 0x1c);
-
-// CLSID_CorMetaDataDispenserRuntime: {1EC2DE53-75CC-11d2-9775-00A0C9B4D50C}
-// Dispenser coclass for version 1.5 and 2.0 meta data. To get the "latest" bind
-// to CLSID_MetaDataDispenser.
-EXTERN_GUID(CLSID_CorMetaDataDispenserRuntime, 0x1ec2de53, 0x75cc, 0x11d2, 0x97, 0x75, 0x0, 0xa0, 0xc9, 0xb4, 0xd5, 0xc);
-
-// {CD2BC5C9-F452-4326-B714-F9C539D4DA58}
-EXTERN_GUID(GUID_DispIdOverride, 0xcd2bc5c9, 0xf452, 0x4326, 0xb7, 0x14, 0xf9, 0xc5, 0x39, 0xd4, 0xda, 0x58);
-
-// {B64784EB-D8D4-4d9b-9ACD-0E30806426F7}
-EXTERN_GUID(GUID_ForceIEnumerable, 0xb64784eb, 0xd8d4, 0x4d9b, 0x9a, 0xcd, 0x0e, 0x30, 0x80, 0x64, 0x26, 0xf7);
-
-// {2941FF83-88D8-4F73-B6A9-BDF8712D000D}
-EXTERN_GUID(GUID_PropGetCA, 0x2941ff83, 0x88d8, 0x4f73, 0xb6, 0xa9, 0xbd, 0xf8, 0x71, 0x2d, 0x00, 0x0d);
-
-// {29533527-3683-4364-ABC0-DB1ADD822FA2}
-EXTERN_GUID(GUID_PropPutCA, 0x29533527, 0x3683, 0x4364, 0xab, 0xc0, 0xdb, 0x1a, 0xdd, 0x82, 0x2f, 0xa2);
-
// CLSID_CLR_v1_MetaData: {005023CA-72B1-11D3-9FC4-00C04F79A0A3}
// Used to generate v1 metadata (for v1.0 and v1.1 CLR compatibility).
EXTERN_GUID(CLSID_CLR_v1_MetaData, 0x005023ca, 0x72b1, 0x11d3, 0x9f, 0xc4, 0x0, 0xc0, 0x4f, 0x79, 0xa0, 0xa3);
// dispenser on the machine.
EXTERN_GUID(CLSID_CorMetaDataDispenser, 0xe5cb7a31, 0x7512, 0x11d2, 0x89, 0xce, 0x0, 0x80, 0xc7, 0x92, 0xe5, 0xd8);
-
-// CLSID_CorMetaDataDispenserReg: {435755FF-7397-11d2-9771-00A0C9B4D50C}
-// Dispenser coclass for version 1.0 meta data. To get the "latest" bind
-// to CLSID_CorMetaDataDispenser.
-EXTERN_GUID(CLSID_CorMetaDataDispenserReg, 0x435755ff, 0x7397, 0x11d2, 0x97, 0x71, 0x0, 0xa0, 0xc9, 0xb4, 0xd5, 0xc);
-
-
-// CLSID_CorMetaDataReg: {87F3A1F5-7397-11d2-9771-00A0C9B4D50C}
-// For COM+ Meta Data, Data Driven Registration
-EXTERN_GUID(CLSID_CorMetaDataReg, 0x87f3a1f5, 0x7397, 0x11d2, 0x97, 0x71, 0x0, 0xa0, 0xc9, 0xb4, 0xd5, 0xc);
-
-
interface IMetaDataDispenser;
//-------------------------------------
LPCWSTR szAssemblyName, // [IN] required - this is the assembly you are requesting
LPCWSTR szName, // [OUT] buffer - to hold name
ULONG cchName, // [IN] the name buffer's size
- ULONG *pcName) PURE; // [OUT] the number of characters returend in the buffer
+ ULONG *pcName) PURE; // [OUT] the number of characters returned in the buffer
STDMETHOD(FindAssemblyModule)( // S_OK or error
LPCWSTR szAppBase, // [IN] optional - can be NULL
_Out_writes_to_opt_(cchName, *pcName)
LPWSTR szName, // [OUT] buffer - to hold name
ULONG cchName, // [IN] the name buffer's size
- ULONG *pcName) PURE; // [OUT] the number of characters returend in the buffer
+ ULONG *pcName) PURE; // [OUT] the number of characters returned in the buffer
};
*(pBytes + 3) = BYTE(iData & 0xff);
return 4;
}
- // Out of compressable range
+ // Out of compressible range
return (ULONG)-1;
} // CorSigCompressSignedInt
CORDB_PLATFORM_POSIX_AMD64, // Posix supporting OS on Intel x64
CORDB_PLATFORM_POSIX_X86, // Posix supporting OS on Intel x86
CORDB_PLATFORM_POSIX_ARM, // Posix supporting OS on ARM32
- CORDB_PLATFORM_POSIX_ARM64 // Posix supporting OS on ARM64
+ CORDB_PLATFORM_POSIX_ARM64, // Posix supporting OS on ARM64
+ CORDB_PLATFORM_POSIX_LOONGARCH64, // Posix supporting OS on LoongArch64
+ CORDB_PLATFORM_POSIX_RISCV64 // Posix supporting OS on RISC64
} CorDebugPlatform;
HRESULT GetPlatform([out] CorDebugPlatform * pTargetPlatform);
*
* The format for each instantiation info in heap is as follows:
* - Length of this instantiation info (in bytes, not including this length information) in compressed ECMA metadata format.
- * - Number of instantatiation types (T, in compressed ECMA metadata format)
+ * - Number of instantiation types (T, in compressed ECMA metadata format)
* - T types, each expressed in ECMA type signature format
*
* The inclusion of the length for each heap element enables simple sorting of the directory section without affecting the heap.
{
/*
* All callbacks are called with the process in the synchronized state
- * All callbacks are serialized, and are called in in the same thread.
+ * All callbacks are serialized, and are called in the same thread.
* Each callback implementor must call Continue in a callback to
* resume execution.
* If Continue is not called before returning, the process will
/* ------------------------------------------------------------------------- *
* Assembly interface
- * An ICorDebugAssembly instance corresponds to a a managed assembly loaded
+ * An ICorDebugAssembly instance corresponds to a managed assembly loaded
* into a specific AppDomain in the CLR. For assemblies shared between multiple
* AppDomains (eg. CoreLib), there will be a separate ICorDebugAssembly instance
* per AppDomain in which it is used.
CorDebug_Gen2 = 2,
CorDebug_LOH = 3,
CorDebug_POH = 4,
+ CorDebug_NonGC = 0x7FFFFFFF,
} CorDebugGenerationTypes;
typedef struct _COR_SEGMENT
* Any managed breakpoints will be automatically stripped from the returned buffer.
* No adjustments will be made for Native breakpoints set by ICorDebugProcess2::SetUnmanagedBreakpoint
*
- * No caching of process memory is peformed.
+ * No caching of process memory is performed.
* These parameters have the same semantics as kernel32!ReadProcessMemory.
* The entire range must be read for the function to return success.
*/
// Note: If any container assembly is missing symbols, none of its
// sub-assemblies will be enumerated. If any regular assembly is
// missing symbols it may or may not be enumerated.
- // ICorDebugCode.GetCode (when refering to IL code only)
+ // ICorDebugCode.GetCode (when referring to IL code only)
// Disabled - Returns the IL in the post-merge assembly image.
// Enabled - Returns IL that would be valid in a pre-merge assembly image. Specifically
// any inline metadata tokens will correctly be TypeRef or MemberRef tokens
- // when the types being refered to are not defined in the virtual module
+ // when the types being referred to are not defined in the virtual module
// containing the IL. These TypeRefs/MemberRefs can be looked up in the
// IMetaDataImport for the corresponding virtual ICorDebugModule.
//
// returns true.
//
// Returns
- // S_OK - debuggee is succesfully updated
+ // S_OK - debuggee is successfully updated
// CORDBG_E_MODULE_NOT_LOADED - assembly containing System.Debugger.IsAttached API is not loaded
// or some other error is preventing it from being recognized such as missing metadata. This error
// is common and benign - it is recommended to try the call again when future assemblies load.
* Also, a stepper may migrate between threads if a cross-thread
* marshalled call is made by the EE.
*
- * This object serves several purposes. Its serves as an identifer between a
+ * This object serves several purposes. Its serves as an identifier between a
* step command issued and the completion of that command. It also
* provides a central interface to encapsulate all of the stepping
* that can be performed. Finally it provides a way to prematurely
*
* It should be noted that if one doesn't use a stepper to enter a
* method (for example, the main() method of C++), then one
- * won't neccessarily step over prologs,etc.
+ * won't necessarily step over prologs,etc.
*
* By default, STOP_OTHER_UNMAPPED will be used.
*
REGISTER_ARM64_V30,
REGISTER_ARM64_V31,
+ // LoongArch64 registers
+ REGISTER_LOONGARCH64_PC = 0,
+ REGISTER_LOONGARCH64_SP,
+ REGISTER_LOONGARCH64_FP,
+ REGISTER_LOONGARCH64_RA,
+ REGISTER_LOONGARCH64_TP,
+ REGISTER_LOONGARCH64_A0,
+ REGISTER_LOONGARCH64_A1,
+ REGISTER_LOONGARCH64_A2,
+ REGISTER_LOONGARCH64_A3,
+ REGISTER_LOONGARCH64_A4,
+ REGISTER_LOONGARCH64_A5,
+ REGISTER_LOONGARCH64_A6,
+ REGISTER_LOONGARCH64_A7,
+ REGISTER_LOONGARCH64_T0,
+ REGISTER_LOONGARCH64_T1,
+ REGISTER_LOONGARCH64_T2,
+ REGISTER_LOONGARCH64_T3,
+ REGISTER_LOONGARCH64_T4,
+ REGISTER_LOONGARCH64_T5,
+ REGISTER_LOONGARCH64_T6,
+ REGISTER_LOONGARCH64_T7,
+ REGISTER_LOONGARCH64_T8,
+ REGISTER_LOONGARCH64_X0,
+ REGISTER_LOONGARCH64_S0,
+ REGISTER_LOONGARCH64_S1,
+ REGISTER_LOONGARCH64_S2,
+ REGISTER_LOONGARCH64_S3,
+ REGISTER_LOONGARCH64_S4,
+ REGISTER_LOONGARCH64_S5,
+ REGISTER_LOONGARCH64_S6,
+ REGISTER_LOONGARCH64_S7,
+ REGISTER_LOONGARCH64_S8,
+
+ REGISTER_LOONGARCH64_F0,
+ REGISTER_LOONGARCH64_F1,
+ REGISTER_LOONGARCH64_F2,
+ REGISTER_LOONGARCH64_F3,
+ REGISTER_LOONGARCH64_F4,
+ REGISTER_LOONGARCH64_F5,
+ REGISTER_LOONGARCH64_F6,
+ REGISTER_LOONGARCH64_F7,
+ REGISTER_LOONGARCH64_F8,
+ REGISTER_LOONGARCH64_F9,
+ REGISTER_LOONGARCH64_F10,
+ REGISTER_LOONGARCH64_F11,
+ REGISTER_LOONGARCH64_F12,
+ REGISTER_LOONGARCH64_F13,
+ REGISTER_LOONGARCH64_F14,
+ REGISTER_LOONGARCH64_F15,
+ REGISTER_LOONGARCH64_F16,
+ REGISTER_LOONGARCH64_F17,
+ REGISTER_LOONGARCH64_F18,
+ REGISTER_LOONGARCH64_F19,
+ REGISTER_LOONGARCH64_F20,
+ REGISTER_LOONGARCH64_F21,
+ REGISTER_LOONGARCH64_F22,
+ REGISTER_LOONGARCH64_F23,
+ REGISTER_LOONGARCH64_F24,
+ REGISTER_LOONGARCH64_F25,
+ REGISTER_LOONGARCH64_F26,
+ REGISTER_LOONGARCH64_F27,
+ REGISTER_LOONGARCH64_F28,
+ REGISTER_LOONGARCH64_F29,
+ REGISTER_LOONGARCH64_F30,
+ REGISTER_LOONGARCH64_F31,
+
+ REGISTER_RISCV64_PC = 0,
+ REGISTER_RISCV64_SP,
+ REGISTER_RISCV64_FP,
+ REGISTER_RISCV64_RA,
+ REGISTER_RISCV64_GP,
+ REGISTER_RISCV64_TP,
+ REGISTER_RISCV64_T0,
+ REGISTER_RISCV64_T1,
+ REGISTER_RISCV64_T2,
+ REGISTER_RISCV64_S1,
+ REGISTER_RISCV64_A0,
+ REGISTER_RISCV64_A1,
+ REGISTER_RISCV64_A2,
+ REGISTER_RISCV64_A3,
+ REGISTER_RISCV64_A4,
+ REGISTER_RISCV64_A5,
+ REGISTER_RISCV64_A6,
+ REGISTER_RISCV64_A7,
+ REGISTER_RISCV64_S2,
+ REGISTER_RISCV64_S3,
+ REGISTER_RISCV64_S4,
+ REGISTER_RISCV64_S5,
+ REGISTER_RISCV64_S6,
+ REGISTER_RISCV64_S7,
+ REGISTER_RISCV64_S8,
+ REGISTER_RISCV64_S9,
+ REGISTER_RISCV64_S10,
+ REGISTER_RISCV64_S11,
+ REGISTER_RISCV64_T3,
+ REGISTER_RISCV64_T4,
+ REGISTER_RISCV64_T5,
+ REGISTER_RISCV64_T6,
+ REGISTER_RISCV64_F0,
+ REGISTER_RISCV64_F1,
+ REGISTER_RISCV64_F2,
+ REGISTER_RISCV64_F3,
+ REGISTER_RISCV64_F4,
+ REGISTER_RISCV64_F5,
+ REGISTER_RISCV64_F6,
+ REGISTER_RISCV64_F7,
+ REGISTER_RISCV64_F8,
+ REGISTER_RISCV64_F9,
+ REGISTER_RISCV64_F10,
+ REGISTER_RISCV64_F11,
+ REGISTER_RISCV64_F12,
+ REGISTER_RISCV64_F13,
+ REGISTER_RISCV64_F14,
+ REGISTER_RISCV64_F15,
+ REGISTER_RISCV64_F16,
+ REGISTER_RISCV64_F17,
+ REGISTER_RISCV64_F18,
+ REGISTER_RISCV64_F19,
+ REGISTER_RISCV64_F20,
+ REGISTER_RISCV64_F21,
+ REGISTER_RISCV64_F22,
+ REGISTER_RISCV64_F23,
+ REGISTER_RISCV64_F24,
+ REGISTER_RISCV64_F25,
+ REGISTER_RISCV64_F26,
+ REGISTER_RISCV64_F27,
+ REGISTER_RISCV64_F28,
+ REGISTER_RISCV64_F29,
+ REGISTER_RISCV64_F30,
+ REGISTER_RISCV64_F31
+
// other architectures here
} CorDebugRegister;
* The normal value for this is THREAD_RUNNING. Only the debugger
* can affect the debug state of a thread. Debug states do
* last across continues, so if you want to keep a thread
- * THREAD_SUSPENDed over mulitple continues, you can set it once
+ * THREAD_SUSPENDed over multiple continues, you can set it once
* and thereafter not have to worry about it.
*
* Suspending threads and resuming the process can cause deadlocks, though it's
- * usually unlikely. This is an intrinisc quality of threads and processes and is by-design.
+ * usually unlikely. This is an intrinsic quality of threads and processes and is by-design.
* A debugger can async break and resume the threads to break the deadlock.
*
* If the thread's user state includes USER_UNSAFE_POINT, then the thread may block a GC.
HRESULT CreateNativeBreakpoint(ICorDebugFunctionBreakpoint **ppBreakpoint);
};
+/*
+ICorDebugFunction5 is a logical extension to ICorDebugFunction.
+*/
+[
+ object,
+ local,
+ uuid(9D4DAB7B-3401-4F37-BD08-CA09F3FDF10F),
+ pointer_default(unique)
+]
+interface ICorDebugFunction5 : IUnknown
+{
+ /*
+ * Triggers a new JIT so the next time the function is called, it will be unoptimized. Will
+ * trigger a JIT even for R2R code.
+ */
+ HRESULT DisableOptimizations();
+
+ /*
+ * Indicates whether this method had optimizations disabled already.
+ */
+ HRESULT AreOptimizationsDisabled(BOOL *pOptimizationsDisabled);
+};
+
/*
ICorDebugCode represents an IL or native code blob.
* A JMC stepper will skip non-user code.
* User code must be a subset of debuggable code.
*
- * Returns S_OK if all methods are set succesfully.
+ * Returns S_OK if all methods are set successfully.
* Return failure if any are not set.
* On failure, some may still be set.
*/
[in, size_is(nTypeArgs)] ICorDebugType *ppTypeArgs[]);
/*
- * NewParamaterizedArray allocates a new array whose elements may be instances
+ * NewParameterizedArray allocates a new array whose elements may be instances
* of a generic type. The array is always created in the AppDomain the thread is
* currently in.
*/
* An ICorDebugReference will either cooperate with GCs such that its information is updated
* after the GC, or it will be implicitly neutered before the GC.
*
- * The ICorDebugReferenceValue inteface may be implicitly neutered after the debuggee
+ * The ICorDebugReferenceValue interface may be implicitly neutered after the debuggee
* has been continued. The derived ICorDebugHandleValue is not neutered until explicitly
* released or exposed.
*
HRESULT GetContext([out] ICorDebugContext **ppContext);
/*
- * IsValueClass returns true if the the class of this object is
+ * IsValueClass returns true if the class of this object is
* a value class.
*/
length_is(cdim)] ULONG32 dims[]);
/*
- * HasBaseIndicies returns whether or not the array has base indicies.
+ * HasBaseIndicies returns whether or not the array has base indices.
* If the answer is no, then all dimensions have a base index of 0.
*/
HRESULT GetBaseIndicies([in] ULONG32 cdim,
[out, size_is(cdim),
- length_is(cdim)] ULONG32 indicies[]);
+ length_is(cdim)] ULONG32 indices[]);
/*
* GetElement returns a value representing the given element in the array.
* A normal ICorDebugReference becomes neutered after the debuggee has been
* continued. A ICorDebugHandleValue will survive across continues and can be
- * dereferenced until the client explcitly disposes the handle.
+ * dereferenced until the client explicitly disposes the handle.
*
*
* ICorDebugHeapValu2::CreateHandle will create ICorDebugHandleValue
* class MyStringDict<T> : Dict<String,T>
* then the base type of "MyStringDict<int32>" will be "Dict<String,int32>".
*
- * This is a helper function - you could compute this from EnumerateTypeParemeters,
+ * This is a helper function - you could compute this from EnumerateTypeParameters,
* GetClass and the relevant metadata, but it is relatively painful: you would
* have to lookup the class, then the metadata of that class
* to find the "generic" base type, then instantiate this generic base type by
- * looking up the type paramaters to the initial type,
+ * looking up the type parameters to the initial type,
* and then perform the appropriate instantiation in the case where the class
* happens to be either a generic class or a normal class with a constructed type
* as its parent. Looking up the base types is useful to implement common
HRESULT EnumerateExceptionCallStack([out] ICorDebugExceptionObjectCallStackEnum** ppCallStackEnum);
};
+[
+ object,
+ local,
+ uuid(e3b2f332-cc46-4f1e-ab4e-5400e332195e),
+ pointer_default(unique)
+]
+interface ICorDebugExceptionObjectValue2 : IUnknown
+{
+ HRESULT ForceCatchHandlerFoundEvents([in] BOOL enableEvents);
+};
+
/* ------------------------------------------------------------------------- *
* Library definition
* ------------------------------------------------------------------------- */
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-//
-// APIs for hosting CoreCLR
-//
-
-#ifndef __CORECLR_HOST_H__
-#define __CORECLR_HOST_H__
-
-#if defined(_WIN32) && defined(_M_IX86)
-#define CORECLR_CALLING_CONVENTION __stdcall
-#else
-#define CORECLR_CALLING_CONVENTION
-#endif
-
-#include <stdint.h>
-
-// For each hosting API, we define a function prototype and a function pointer
-// The prototype is useful for implicit linking against the dynamic coreclr
-// library and the pointer for explicit dynamic loading (dlopen, LoadLibrary)
-#define CORECLR_HOSTING_API(function, ...) \
- extern "C" int CORECLR_CALLING_CONVENTION function(__VA_ARGS__); \
- typedef int (CORECLR_CALLING_CONVENTION *function##_ptr)(__VA_ARGS__)
-
-//
-// Initialize the CoreCLR. Creates and starts CoreCLR host and creates an app domain
-//
-// Parameters:
-// exePath - Absolute path of the executable that invoked the ExecuteAssembly (the native host application)
-// appDomainFriendlyName - Friendly name of the app domain that will be created to execute the assembly
-// propertyCount - Number of properties (elements of the following two arguments)
-// propertyKeys - Keys of properties of the app domain
-// propertyValues - Values of properties of the app domain
-// hostHandle - Output parameter, handle of the created host
-// domainId - Output parameter, id of the created app domain
-//
-// Returns:
-// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
-//
-CORECLR_HOSTING_API(coreclr_initialize,
- const char* exePath,
- const char* appDomainFriendlyName,
- int propertyCount,
- const char** propertyKeys,
- const char** propertyValues,
- void** hostHandle,
- unsigned int* domainId);
-
-//
-// Shutdown CoreCLR. It unloads the app domain and stops the CoreCLR host.
-//
-// Parameters:
-// hostHandle - Handle of the host
-// domainId - Id of the domain
-//
-// Returns:
-// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
-//
-CORECLR_HOSTING_API(coreclr_shutdown,
- void* hostHandle,
- unsigned int domainId);
-
-//
-// Shutdown CoreCLR. It unloads the app domain and stops the CoreCLR host.
-//
-// Parameters:
-// hostHandle - Handle of the host
-// domainId - Id of the domain
-// latchedExitCode - Latched exit code after domain unloaded
-//
-// Returns:
-// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
-//
-CORECLR_HOSTING_API(coreclr_shutdown_2,
- void* hostHandle,
- unsigned int domainId,
- int* latchedExitCode);
-
-//
-// Create a native callable function pointer for a managed method.
-//
-// Parameters:
-// hostHandle - Handle of the host
-// domainId - Id of the domain
-// entryPointAssemblyName - Name of the assembly which holds the custom entry point
-// entryPointTypeName - Name of the type which holds the custom entry point
-// entryPointMethodName - Name of the method which is the custom entry point
-// delegate - Output parameter, the function stores a native callable function pointer to the delegate at the specified address
-//
-// Returns:
-// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
-//
-CORECLR_HOSTING_API(coreclr_create_delegate,
- void* hostHandle,
- unsigned int domainId,
- const char* entryPointAssemblyName,
- const char* entryPointTypeName,
- const char* entryPointMethodName,
- void** delegate);
-
-//
-// Execute a managed assembly with given arguments
-//
-// Parameters:
-// hostHandle - Handle of the host
-// domainId - Id of the domain
-// argc - Number of arguments passed to the executed assembly
-// argv - Array of arguments passed to the executed assembly
-// managedAssemblyPath - Path of the managed assembly to execute (or NULL if using a custom entrypoint).
-// exitCode - Exit code returned by the executed assembly
-//
-// Returns:
-// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
-//
-CORECLR_HOSTING_API(coreclr_execute_assembly,
- void* hostHandle,
- unsigned int domainId,
- int argc,
- const char** argv,
- const char* managedAssemblyPath,
- unsigned int* exitCode);
-
-#undef CORECLR_HOSTING_API
-
-//
-// Callback types used by the hosts
-//
-typedef bool(CORECLR_CALLING_CONVENTION BundleProbeFn)(const char* path, int64_t* offset, int64_t* size, int64_t* compressedSize);
-typedef const void* (CORECLR_CALLING_CONVENTION PInvokeOverrideFn)(const char* libraryName, const char* entrypointName);
-
-
-#endif // __CORECLR_HOST_H__
#define IsMdRTSpecialName(x) ((x) & mdRTSpecialName)
#define IsMdInstanceInitializer(x, str) (((x) & mdRTSpecialName) && !strcmp((str), COR_CTOR_METHOD_NAME))
-#define IsMdInstanceInitializerW(x, str) (((x) & mdRTSpecialName) && !wcscmp((str), COR_CTOR_METHOD_NAME_W))
+#define IsMdInstanceInitializerW(x, str) (((x) & mdRTSpecialName) && !u16_strcmp((str), COR_CTOR_METHOD_NAME_W))
#define IsMdClassConstructor(x, str) (((x) & mdRTSpecialName) && !strcmp((str), COR_CCTOR_METHOD_NAME))
-#define IsMdClassConstructorW(x, str) (((x) & mdRTSpecialName) && !wcscmp((str), COR_CCTOR_METHOD_NAME_W))
+#define IsMdClassConstructorW(x, str) (((x) & mdRTSpecialName) && !u16_strcmp((str), COR_CCTOR_METHOD_NAME_W))
#define IsMdHasSecurity(x) ((x) & mdHasSecurity)
#define IsMdRequireSecObject(x) ((x) & mdRequireSecObject)
gpContravariant = 0x0002,
// Special constraints, applicable to any type parameters
- gpSpecialConstraintMask = 0x001C,
+ gpSpecialConstraintMask = 0x003C,
gpNoSpecialConstraint = 0x0000,
gpReferenceTypeConstraint = 0x0004, // type argument must be a reference type
gpNotNullableValueTypeConstraint = 0x0008, // type argument must be a value type but not Nullable
gpDefaultConstructorConstraint = 0x0010, // type argument must have a public default constructor
+ gpAllowByRefLike = 0x0020, // type argument can be ByRefLike
} CorGenericParamAttr;
// structures and enums moved from COR.H
} IMAGE_COR_ILMETHOD_TINY;
/************************************/
-// This strucuture is the 'fat' layout, where no compression is attempted.
+// This structure is the 'fat' layout, where no compression is attempted.
// Note that this structure can be added on at the end, thus making it extensible
typedef struct IMAGE_COR_ILMETHOD_FAT
{
#define CMOD_CALLCONV_NAME_STDCALL "CallConvStdcall"
#define CMOD_CALLCONV_NAME_THISCALL "CallConvThiscall"
#define CMOD_CALLCONV_NAME_FASTCALL "CallConvFastcall"
+#define CMOD_CALLCONV_NAME_SWIFT "CallConvSwift"
#define CMOD_CALLCONV_NAME_SUPPRESSGCTRANSITION "CallConvSuppressGCTransition"
#define CMOD_CALLCONV_NAME_MEMBERFUNCTION "CallConvMemberFunction"
****************************************************************************/
#ifndef SOS_INCLUDE
-#ifdef _BLD_CLR
#include "utilcode.h"
-#endif
#include "corhlpr.h"
#include <stdlib.h>
extern "C" {
/***************************************************************************/
-/* Note that this construtor does not set the LocalSig, but has the
- advantage that it does not have any dependancy on EE structures.
+/* Note that this constructor does not set the LocalSig, but has the
+ advantage that it does not have any dependency on EE structures.
inside the EE use the FunctionDesc constructor */
void __stdcall DecoderInit(void *pThis, COR_ILMETHOD *header)
{
+ memset(pThis, 0, sizeof(COR_ILMETHOD_DECODER));
COR_ILMETHOD_DECODER *decoder = (COR_ILMETHOD_DECODER *)pThis;
- memset(decoder, 0, sizeof(COR_ILMETHOD_DECODER));
if (header->Tiny.IsTiny())
{
decoder->SetMaxStack(header->Tiny.GetMaxStack());
#ifdef HOST_64BIT
if((((size_t) header) & 3) == 0) // header is aligned
#else
- _ASSERTE((((size_t) header) & 3) == 0); // header is aligned
+ assert((((size_t) header) & 3) == 0); // header is aligned
#endif
{
*((COR_ILMETHOD_FAT *)decoder) = header->Fat;
}
else {
// Fat format
- _ASSERTE((((size_t) outBuff) & 3) == 0); // header is dword aligned
+ assert((((size_t) outBuff) & 3) == 0); // header is dword aligned
COR_ILMETHOD_FAT* fatHeader = (COR_ILMETHOD_FAT*) outBuff;
outBuff += sizeof(COR_ILMETHOD_FAT);
*fatHeader = *header;
fatHeader->SetFlags(fatHeader->GetFlags() | CorILMethod_FatFormat);
- _ASSERTE((fatHeader->GetFlags() & CorILMethod_FormatMask) == CorILMethod_FatFormat);
+ assert((fatHeader->GetFlags() & CorILMethod_FormatMask) == CorILMethod_FatFormat);
if (moreSections)
fatHeader->SetFlags(fatHeader->GetFlags() | CorILMethod_MoreSects);
fatHeader->SetSize(sizeof(COR_ILMETHOD_FAT) / 4);
}
#ifndef SOS_INCLUDE
- _ASSERTE(&origBuff[size] == outBuff);
+#ifdef _DEBUG
+ assert(&origBuff[size] == outBuff);
+#endif
#endif // !SOS_INCLUDE
return(size);
}
if (size == 0)
return(0);
- _ASSERTE((((size_t) outBuff) & 3) == 0); // header is dword aligned
+ assert((((size_t) outBuff) & 3) == 0); // header is dword aligned
BYTE* origBuff = outBuff;
if (ehCount <= 0)
return 0;
fatClause->GetHandlerLength() > 0xFF) {
break; // fall through and generate as FAT
}
- _ASSERTE((fatClause->GetFlags() & ~0xFFFF) == 0);
- _ASSERTE((fatClause->GetTryOffset() & ~0xFFFF) == 0);
- _ASSERTE((fatClause->GetTryLength() & ~0xFF) == 0);
- _ASSERTE((fatClause->GetHandlerOffset() & ~0xFFFF) == 0);
- _ASSERTE((fatClause->GetHandlerLength() & ~0xFF) == 0);
+ assert((fatClause->GetFlags() & ~0xFFFF) == 0);
+ assert((fatClause->GetTryOffset() & ~0xFFFF) == 0);
+ assert((fatClause->GetTryLength() & ~0xFF) == 0);
+ assert((fatClause->GetHandlerOffset() & ~0xFFFF) == 0);
+ assert((fatClause->GetHandlerLength() & ~0xFF) == 0);
COR_ILMETHOD_SECT_EH_CLAUSE_SMALL* smallClause = (COR_ILMETHOD_SECT_EH_CLAUSE_SMALL*)&EHSect->Clauses[i];
smallClause->SetFlags((CorExceptionFlag) fatClause->GetFlags());
EHSect->Kind = CorILMethod_Sect_EHTable;
if (moreSections)
EHSect->Kind |= CorILMethod_Sect_MoreSects;
-#ifndef SOS_INCLUDE
- EHSect->DataSize = EHSect->Size(ehCount);
-#else
EHSect->DataSize = (BYTE) EHSect->Size(ehCount);
-#endif // !SOS_INCLUDE
EHSect->Reserved = 0;
- _ASSERTE(EHSect->DataSize == EHSect->Size(ehCount)); // make sure didn't overflow
+ assert(EHSect->DataSize == EHSect->Size(ehCount)); // make sure didn't overflow
outBuff = (BYTE*) &EHSect->Clauses[ehCount];
// Set the offsets for the exception type tokens.
if (ehTypeOffsets)
COR_ILMETHOD_SECT_EH_CLAUSE_SMALL* smallClause = (COR_ILMETHOD_SECT_EH_CLAUSE_SMALL*)&EHSect->Clauses[i];
if (smallClause->GetFlags() == COR_ILEXCEPTION_CLAUSE_NONE)
{
- _ASSERTE(! IsNilToken(smallClause->GetClassToken()));
+ assert(! IsNilToken(smallClause->GetClassToken()));
ehTypeOffsets[i] = (ULONG)((BYTE *)&smallClause->ClassToken - origBuff);
}
}
EHSect->SetDataSize(EHSect->Size(ehCount));
memcpy(EHSect->Clauses, clauses, ehCount * sizeof(COR_ILMETHOD_SECT_EH_CLAUSE_FAT));
outBuff = (BYTE*) &EHSect->Clauses[ehCount];
- _ASSERTE(&origBuff[size] == outBuff);
+ assert(&origBuff[size] == outBuff);
// Set the offsets for the exception type tokens.
if (ehTypeOffsets)
{
COR_ILMETHOD_SECT_EH_CLAUSE_FAT* fatClause = (COR_ILMETHOD_SECT_EH_CLAUSE_FAT*)&EHSect->Clauses[i];
if (fatClause->GetFlags() == COR_ILEXCEPTION_CLAUSE_NONE)
{
- _ASSERTE(! IsNilToken(fatClause->GetClassToken()));
+ assert(! IsNilToken(fatClause->GetClassToken()));
ehTypeOffsets[i] = (ULONG)((BYTE *)&fatClause->ClassToken - origBuff);
}
}
#define CORHLPR_TURNED_FPO_ON 1
#endif
+#include <assert.h>
#include "cor.h"
#include "corhdr.h"
#include "corerror.h"
#include "unreachable.h"
+#include <new>
-// This header is consumed both within the runtime and externally. In the former
-// case we need to wrap memory allocations, in the latter there is no
-// infrastructure to support this. Detect which way we're building and provide a
-// very simple abstraction layer (handles allocating bytes only).
-#ifdef _BLD_CLR
-#include "new.hpp"
-
+using std::nothrow;
#define NEW_NOTHROW(_bytes) new (nothrow) BYTE[_bytes]
#define NEW_THROWS(_bytes) new BYTE[_bytes]
{
ThrowOutOfMemory();
}
-#else
-#define NEW_NOTHROW(_bytes) new BYTE[_bytes]
-#define NEW_THROWS(_bytes) __CorHlprNewThrows(_bytes)
-static inline void DECLSPEC_NORETURN __CorHlprThrowOOM()
-{
- RaiseException(STATUS_NO_MEMORY, 0, 0, NULL);
- __UNREACHABLE();
-}
-static inline BYTE *__CorHlprNewThrows(size_t bytes)
-{
- BYTE *pbMemory = new BYTE[bytes];
- if (pbMemory == NULL)
- __CorHlprThrowOOM();
- return pbMemory;
-}
-inline void DECLSPEC_NORETURN THROW_OUT_OF_MEMORY()
-{
- __CorHlprThrowOOM();
-}
-#endif
-
//*****************************************************************************
// There are a set of macros commonly used in the helpers which you will want
#endif
-#ifndef _ASSERTE
-#define _ASSERTE(expr)
-#endif
-
#if !BIGENDIAN
#define VAL16(x) x
#define VAL32(x) x
return VAL16(TryOffset);
}
void SetTryOffset(DWORD Offset) {
- _ASSERTE((Offset & ~0xffff) == 0);
+ assert((Offset & ~0xffff) == 0);
TryOffset = VAL16(Offset);
}
return TryLength;
}
void SetTryLength(DWORD Length) {
- _ASSERTE((Length & ~0xff) == 0);
+ assert((Length & ~0xff) == 0);
TryLength = Length;
}
return VAL16(HandlerOffset);
}
void SetHandlerOffset(DWORD Offset) {
- _ASSERTE((Offset & ~0xffff) == 0);
+ assert((Offset & ~0xffff) == 0);
HandlerOffset = VAL16(Offset);
}
return HandlerLength;
}
void SetHandlerLength(DWORD Length) {
- _ASSERTE((Length & ~0xff) == 0);
+ assert((Length & ~0xff) == 0);
HandlerLength = Length;
}
/************************************/
-// This strucuture is the 'fat' layout, where no compression is attempted.
+// This structure is the 'fat' layout, where no compression is attempted.
// Note that this structure can be added on at the end, thus making it extensible
typedef struct tagCOR_ILMETHOD_FAT : IMAGE_COR_ILMETHOD_FAT
{
extern "C" {
/***************************************************************************/
/* COR_ILMETHOD_DECODER is the only way functions internal to the EE should
- fetch data from a COR_ILMETHOD. This way any dependancy on the file format
+ fetch data from a COR_ILMETHOD. This way any dependency on the file format
(and the multiple ways of encoding the header) is centralized to the
COR_ILMETHOD_DECODER constructor) */
void __stdcall DecoderInit(void * pThis, COR_ILMETHOD* header);
class COR_ILMETHOD_DECODER : public COR_ILMETHOD_FAT
{
public:
- // This returns an uninitialized decoder, suitable for placement new but nothing
- // else. Use with caution.
- COR_ILMETHOD_DECODER() {}
+ COR_ILMETHOD_DECODER() = default;
// Typically the ONLY way you should access COR_ILMETHOD is through
// this constructor so format changes are easier.
template <BOOL bGrow, BOOL bThrow>
void *_Alloc(SIZE_T iItems)
{
-#if defined(_BLD_CLR) && defined(_DEBUG)
+#if defined(_DEBUG)
{ // Exercise heap for OOM-fault injection purposes
BYTE * pb = NSQuickBytesHelper::_AllocBytes<bThrow>::Invoke(iItems);
_ASSERTE(!bThrow || pb != NULL); // _AllocBytes would have thrown if bThrow == TRUE
}
// Copy single byte string and hold it
- const char * SetStringNoThrow(const char * pStr, SIZE_T len)
+ const char * SetString(const char * pStr, SIZE_T len)
{
- LPSTR buffer = (LPSTR) AllocNoThrow(len + 1);
+ LPSTR buffer = (LPSTR) AllocThrows(len + 1);
- if (buffer != NULL)
- {
- memcpy(buffer, pStr, len);
- buffer[len] = 0;
- }
+ memcpy(buffer, pStr, len);
+ buffer[len] = 0;
return buffer;
}
template <class T> class CQuickArray : public CQuickArrayBase<T>
{
public:
- CQuickArray<T>()
+ CQuickArray()
{
this->Init();
}
- ~CQuickArray<T>()
+ ~CQuickArray()
{
this->Destroy();
}
HRESULT hr = S_OK;
mdToken rid = RidFromToken(token);
SIZE_T index = rid / 8;
- BYTE bit = (1 << (rid % 8));
+ BYTE bit = (BYTE)(1 << (rid % 8));
if (index >= buffer.Size())
{
{
mdToken rid = RidFromToken(token);
SIZE_T index = rid / 8;
- BYTE bit = (1 << (rid % 8));
+ BYTE bit = (BYTE)(1 << (rid % 8));
return ((index < buffer.Size()) && (buffer[index] & bit));
}
// make it easier to catch invalid signatures in trusted code (e.g. IL stubs, NGEN images, etc.)
if (pData + sizeof(void *) > pDataEnd)
{ // Not enough data in the buffer
- _ASSERTE(!"This signature is invalid. Note that caller should check that it is not comming from untrusted source!");
+ _ASSERTE(!"This signature is invalid. Note that caller should check that it is not coming from untrusted source!");
return META_E_BAD_SIGNATURE;
}
*ppvPointerOut = *(void * UNALIGNED *)pData;
{
public:
+ // Note: these flags can be #ifdef'ed, but no number should be re-used between different #ifdef conditions,
+ // so platform-independent code can know uniquely which number corresponds to which flag.
enum CorJitFlag
{
CORJIT_FLAG_CALL_GETJITFLAGS = 0xffffffff, // Indicates that the JIT should retrieve flags in the form of a
// pointer to a CORJIT_FLAGS value via ICorJitInfo::getJitFlags().
- CORJIT_FLAG_SPEED_OPT = 0,
- CORJIT_FLAG_SIZE_OPT = 1,
+
+ CORJIT_FLAG_SPEED_OPT = 0, // optimize for speed
+ CORJIT_FLAG_SIZE_OPT = 1, // optimize for code size
CORJIT_FLAG_DEBUG_CODE = 2, // generate "debuggable" code (no code-mangling optimizations)
CORJIT_FLAG_DEBUG_EnC = 3, // We are in Edit-n-Continue mode
CORJIT_FLAG_DEBUG_INFO = 4, // generate line and local-var info
- CORJIT_FLAG_MIN_OPT = 5, // disable all jit optimizations (not necesarily debuggable code)
- CORJIT_FLAG_UNUSED1 = 6,
- CORJIT_FLAG_MCJIT_BACKGROUND = 7, // Calling from multicore JIT background thread, do not call JitComplete
-
- #if defined(TARGET_X86)
-
- CORJIT_FLAG_PINVOKE_RESTORE_ESP = 8, // Restore ESP after returning from inlined PInvoke
- CORJIT_FLAG_TARGET_P4 = 9,
- CORJIT_FLAG_USE_FCOMI = 10, // Generated code may use fcomi(p) instruction
- CORJIT_FLAG_USE_CMOV = 11, // Generated code may use cmov instruction
-
- #else // !defined(TARGET_X86)
-
- CORJIT_FLAG_UNUSED2 = 8,
- CORJIT_FLAG_UNUSED3 = 9,
- CORJIT_FLAG_UNUSED4 = 10,
- CORJIT_FLAG_UNUSED5 = 11,
- CORJIT_FLAG_UNUSED6 = 12,
-
- #endif // !defined(TARGET_X86)
-
- CORJIT_FLAG_OSR = 13, // Generate alternate method for On Stack Replacement
-
- CORJIT_FLAG_ALT_JIT = 14, // JIT should consider itself an ALT_JIT
- CORJIT_FLAG_UNUSED8 = 15,
- CORJIT_FLAG_UNUSED9 = 16,
-
-
- #if defined(TARGET_X86) || defined(TARGET_AMD64) || defined(TARGET_ARM64)
- CORJIT_FLAG_FEATURE_SIMD = 17,
- #else
- CORJIT_FLAG_UNUSED10 = 17,
- #endif // !(defined(TARGET_X86) || defined(TARGET_AMD64) || defined(TARGET_ARM64))
-
- CORJIT_FLAG_MAKEFINALCODE = 18, // Use the final code generator, i.e., not the interpreter.
- CORJIT_FLAG_READYTORUN = 19, // Use version-resilient code generation
- CORJIT_FLAG_PROF_ENTERLEAVE = 20, // Instrument prologues/epilogues
- CORJIT_FLAG_UNUSED11 = 21,
- CORJIT_FLAG_PROF_NO_PINVOKE_INLINE = 22, // Disables PInvoke inlining
- CORJIT_FLAG_SKIP_VERIFICATION = 23, // (lazy) skip verification - determined without doing a full resolve. See comment below
- CORJIT_FLAG_PREJIT = 24, // jit or prejit is the execution engine.
- CORJIT_FLAG_RELOC = 25, // Generate relocatable code
- CORJIT_FLAG_IMPORT_ONLY = 26, // Only import the function
- CORJIT_FLAG_IL_STUB = 27, // method is an IL stub
- CORJIT_FLAG_PROCSPLIT = 28, // JIT should separate code into hot and cold sections
- CORJIT_FLAG_BBINSTR = 29, // Collect basic block profile information
- CORJIT_FLAG_BBOPT = 30, // Optimize method based on profile information
- CORJIT_FLAG_FRAMED = 31, // All methods have an EBP frame
- CORJIT_FLAG_UNUSED12 = 32,
- CORJIT_FLAG_PUBLISH_SECRET_PARAM = 33, // JIT must place stub secret param into local 0. (used by IL stubs)
- CORJIT_FLAG_UNUSED13 = 34,
- CORJIT_FLAG_SAMPLING_JIT_BACKGROUND = 35, // JIT is being invoked as a result of stack sampling for hot methods in the background
- CORJIT_FLAG_USE_PINVOKE_HELPERS = 36, // The JIT should use the PINVOKE_{BEGIN,END} helpers instead of emitting inline transitions
- CORJIT_FLAG_REVERSE_PINVOKE = 37, // The JIT should insert REVERSE_PINVOKE_{ENTER,EXIT} helpers into method prolog/epilog
- CORJIT_FLAG_TRACK_TRANSITIONS = 38, // The JIT should insert the REVERSE_PINVOKE helper variants that track transitions.
- CORJIT_FLAG_TIER0 = 39, // This is the initial tier for tiered compilation which should generate code as quickly as possible
- CORJIT_FLAG_TIER1 = 40, // This is the final tier (for now) for tiered compilation which should generate high quality code
+ CORJIT_FLAG_MIN_OPT = 5, // disable all jit optimizations (not necessarily debuggable code)
+ CORJIT_FLAG_ENABLE_CFG = 6, // generate CFG enabled code
+ CORJIT_FLAG_OSR = 7, // Generate alternate version for On Stack Replacement
+ CORJIT_FLAG_ALT_JIT = 8, // JIT should consider itself an ALT_JIT
+ CORJIT_FLAG_FROZEN_ALLOC_ALLOWED = 9, // JIT is allowed to use *_MAYBEFROZEN allocators
+ CORJIT_FLAG_MAKEFINALCODE = 10, // Use the final code generator, i.e., not the interpreter.
+ CORJIT_FLAG_READYTORUN = 11, // Use version-resilient code generation
+ CORJIT_FLAG_PROF_ENTERLEAVE = 12, // Instrument prologues/epilogues
+ CORJIT_FLAG_PROF_NO_PINVOKE_INLINE = 13, // Disables PInvoke inlining
+ CORJIT_FLAG_PREJIT = 14, // prejit is the execution engine.
+ CORJIT_FLAG_RELOC = 15, // Generate relocatable code
+ CORJIT_FLAG_IL_STUB = 16, // method is an IL stub
+ CORJIT_FLAG_PROCSPLIT = 17, // JIT should separate code into hot and cold sections
+ CORJIT_FLAG_BBINSTR = 18, // Collect basic block profile information
+ CORJIT_FLAG_BBINSTR_IF_LOOPS = 19, // JIT must instrument current method if it has loops
+ CORJIT_FLAG_BBOPT = 20, // Optimize method based on profile information
+ CORJIT_FLAG_FRAMED = 21, // All methods have an EBP frame
+ CORJIT_FLAG_PUBLISH_SECRET_PARAM = 22, // JIT must place stub secret param into local 0. (used by IL stubs)
+ CORJIT_FLAG_USE_PINVOKE_HELPERS = 23, // The JIT should use the PINVOKE_{BEGIN,END} helpers instead of emitting inline transitions
+ CORJIT_FLAG_REVERSE_PINVOKE = 24, // The JIT should insert REVERSE_PINVOKE_{ENTER,EXIT} helpers into method prolog/epilog
+ CORJIT_FLAG_TRACK_TRANSITIONS = 25, // The JIT should insert the helper variants that track transitions.
+ CORJIT_FLAG_TIER0 = 26, // This is the initial tier for tiered compilation which should generate code as quickly as possible
+ CORJIT_FLAG_TIER1 = 27, // This is the final tier (for now) for tiered compilation which should generate high quality code
+ CORJIT_FLAG_NO_INLINING = 28, // JIT should not inline any called method into this method
#if defined(TARGET_ARM)
- CORJIT_FLAG_RELATIVE_CODE_RELOCS = 41, // JIT should generate PC-relative address computations instead of EE relocation records
-#else // !defined(TARGET_ARM)
- CORJIT_FLAG_UNUSED15 = 41,
-#endif // !defined(TARGET_ARM)
+ CORJIT_FLAG_RELATIVE_CODE_RELOCS = 29, // JIT should generate PC-relative address computations instead of EE relocation records
+ CORJIT_FLAG_SOFTFP_ABI = 30, // Enable armel calling convention
+#endif
- CORJIT_FLAG_NO_INLINING = 42, // JIT should not inline any called method into this method
+#if defined(TARGET_X86) || defined(TARGET_AMD64)
+ CORJIT_FLAG_VECTOR512_THROTTLING = 31, // On x86/x64, 512-bit vector usage may incur CPU frequency throttling
+#endif
-#if defined(TARGET_ARM)
- CORJIT_FLAG_SOFTFP_ABI = 43, // JIT should generate PC-relative address computations instead of EE relocation records
-#else // !defined(TARGET_ARM)
- CORJIT_FLAG_UNUSED16 = 43,
-#endif // !defined(TARGET_ARM)
-
- CORJIT_FLAG_UNUSED17 = 44,
- CORJIT_FLAG_UNUSED18 = 45,
- CORJIT_FLAG_UNUSED19 = 46,
- CORJIT_FLAG_UNUSED20 = 47,
- CORJIT_FLAG_UNUSED21 = 48,
- CORJIT_FLAG_UNUSED22 = 49,
- CORJIT_FLAG_UNUSED23 = 50,
- CORJIT_FLAG_UNUSED24 = 51,
- CORJIT_FLAG_UNUSED25 = 52,
- CORJIT_FLAG_UNUSED26 = 53,
- CORJIT_FLAG_UNUSED27 = 54,
- CORJIT_FLAG_UNUSED28 = 55,
- CORJIT_FLAG_UNUSED29 = 56,
- CORJIT_FLAG_UNUSED30 = 57,
- CORJIT_FLAG_UNUSED31 = 58,
- CORJIT_FLAG_UNUSED32 = 59,
- CORJIT_FLAG_UNUSED33 = 60,
- CORJIT_FLAG_UNUSED34 = 61,
- CORJIT_FLAG_UNUSED35 = 62,
- CORJIT_FLAG_UNUSED36 = 63
};
CORJIT_FLAGS()
}
// DO NOT USE THIS FUNCTION! (except in very restricted special cases)
- uint64_t GetInstructionSetFlagsRaw()
+ uint64_t* GetInstructionSetFlagsRaw()
{
return instructionSetFlags.GetFlagsRaw();
}
+ CORINFO_InstructionSetFlags GetInstructionSetFlags()
+ {
+ return instructionSetFlags;
+ }
+
+ const int GetInstructionFlagsFieldCount()
+ {
+ return instructionSetFlags.GetInstructionFlagsFieldCount();
+ }
+
private:
uint64_t corJitFlags;
#if !DEFINITIONS_FROM_NON_IMPORTABLE_PLACES
-cpp_quote("#define CorDB_CONTROL_Profiling \"Cor_Enable_Profiling\"")
-cpp_quote("#define CorDB_CONTROL_ProfilingL L\"Cor_Enable_Profiling\"")
-
cpp_quote("#if 0")
UINT32 reserved;
} COR_PRF_EVENT_DATA;
+typedef struct
+{
+ UINT64 Ptr;
+ UINT32 Size;
+ UINT32 Type;
+} COR_PRF_FILTER_DATA;
+
+typedef STDMETHODCALLTYPE void EventPipeProviderCallback(
+ const UINT8 *source_id,
+ UINT32 is_enabled,
+ UINT8 level,
+ UINT64 match_any_keywords,
+ UINT64 match_all_keywords,
+ COR_PRF_FILTER_DATA *filter_data,
+ void *callback_data);
+
+typedef enum _COR_PRF_HANDLE_TYPE
+{
+ COR_PRF_HANDLE_TYPE_WEAK = 0x1,
+ COR_PRF_HANDLE_TYPE_STRONG = 0x2,
+ COR_PRF_HANDLE_TYPE_PINNED = 0x3,
+} COR_PRF_HANDLE_TYPE;
+
+typedef void** ObjectHandleID;
+
+/*
+* Callback for each object in the GC Heap
+*/
+typedef BOOL STDMETHODCALLTYPE (* ObjectCallback)(ObjectID object, void* callbackState);
+
/* -------------------------------------------------------------------------- *
* Forward declarations
* -------------------------------------------------------------------------- */
/*
* The CLR calls ThreadAssignedToOSThread to tell the profiler
- * that a managed thread is being implemented via a particualr OS thread.
+ * that a managed thread is being implemented via a particular OS thread.
* This callback exists so that the profiler can maintain an accurate
* OS to Managed thread mapping across fibres.
*/
/*
* The CLR calls RemotingClientSendingMessage to notify the profiler that
- * a remoting call is requiring the the caller to send an invocation request through
+ * a remoting call is requiring the caller to send an invocation request through
* a remoting channel.
*
* pCookie - if remoting GUID cookies are active, this value will correspond with the
} COR_PRF_GC_GENERATION_RANGE;
+/*
+ * COR_PRF_NONGC_GENERATION_RANGE describes a range of memory in the GetNonGCHeapBounds function.
+ */
+typedef struct COR_PRF_NONGC_HEAP_RANGE
+{
+ ObjectID rangeStart; // the start of the range
+ UINT_PTR rangeLength; // the used length of the range
+ UINT_PTR rangeLengthReserved; // the amount of memory reserved for the range (including rangeLength)
+
+} COR_PRF_NONGC_HEAP_RANGE;
+
/*
* COR_PRF_CLAUSE_TYPE defines the various clause codes for the EX clauses
// in-memory module is updated. Even when symbols are provided up-front in
// a call to the managed API Assembly.Load(byte[], byte[], ...) the runtime
// may not actually associate the symbolic data with the module until after
- // the ModuleLoadFinished callback has occured. This event provides a later
+ // the ModuleLoadFinished callback has occurred. This event provides a later
// opportunity to collect symbols for such modules.
//
// This event is controlled by the COR_PRF_HIGH_IN_MEMORY_SYMBOLS_UPDATED
{
COR_PRF_CODEGEN_DISABLE_INLINING = 0x0001,
COR_PRF_CODEGEN_DISABLE_ALL_OPTIMIZATIONS = 0x0002,
+ COR_PRF_CODEGEN_DEBUG_INFO = 0x0003,
} COR_PRF_CODEGEN_FLAGS;
-
/*
* The CLR implements the ICorProfilerInfo interface. This interface is
* used by a code profiler to communicate with the CLR to control event
* in generations 3 and 0. So by the time managed code starts executing, these
* generations will already contain objects. Generations 1 and 2 will be normally
* empty, except for dummy objects generated by the garbage collector (of size 12
- * bytes in 32-bit implementations of the CLR, larger in 64-bit implementaions).
+ * bytes in 32-bit implementations of the CLR, larger in 64-bit implementations).
* You may also see generation 2 ranges that are inside modules generated by ngen.
* These are "frozen objects" generated at ngen time rather than allocated by the
* garbage collector.
[out] ReJITID * pReJitId);
/*
- * Retrieves informaiton about dynamic methods
+ * Retrieves information about dynamic methods
*
* Certain methods like IL Stubs or LCG do not have
* associated metadata that can be retrieved using the IMetaDataImport APIs.
//Given the native code start address, return the native->IL mapping information for this jitted version of the code
HRESULT GetILToNativeMapping3(UINT_PTR pNativeCodeStartAddress, ULONG32 cMap, ULONG32 *pcMap, COR_DEBUG_IL_TO_NATIVE_MAP map[]);
- //Given the native code start address, return the the blocks of virtual memory that store this code (method code is not necessarily stored in a single contiguous memory region)
+ //Given the native code start address, return the blocks of virtual memory that store this code (method code is not necessarily stored in a single contiguous memory region)
HRESULT GetCodeInfo4(UINT_PTR pNativeCodeStartAddress, ULONG32 cCodeInfos, ULONG32* pcCodeInfos, COR_PRF_CODE_INFO codeInfos[]);
};
[in] LPCGUID pRelatedActivityId);
}
+[
+ object,
+ uuid(6E6C7EE2-0701-4EC2-9D29-2E8733B66934),
+ pointer_default(unique),
+ local
+]
+interface ICorProfilerInfo13 : ICorProfilerInfo12
+{
+ HRESULT CreateHandle(
+ [in] ObjectID object,
+ [in] COR_PRF_HANDLE_TYPE type,
+ [out] ObjectHandleID* pHandle);
+
+ HRESULT DestroyHandle(
+ [in] ObjectHandleID handle);
+
+ HRESULT GetObjectIDFromHandle(
+ [in] ObjectHandleID handle,
+ [out] ObjectID* pObject);
+}
+
+[
+ object,
+ uuid(F460E352-D76D-4FE9-835F-F6AF9D6E862D),
+ pointer_default(unique),
+ local
+]
+interface ICorProfilerInfo14 : ICorProfilerInfo13
+{
+ HRESULT EnumerateNonGCObjects([out] ICorProfilerObjectEnum** ppEnum);
+
+ HRESULT GetNonGCHeapBounds(
+ [in] ULONG cObjectRanges,
+ [out] ULONG *pcObjectRanges,
+ [out, size_is(cObjectRanges), length_is(*pcObjectRanges)] COR_PRF_NONGC_HEAP_RANGE ranges[]);
+
+
+ // EventPipeCreateProvider2 allows you to pass in a callback which will be called whenever a
+ // session enables your provider. The behavior of the callback matches the ETW behavior which
+ // can be counter intuitive. You will get a callback any time a session changes with the updated
+ // global keywords enabled for your session. The is_enabled parameter will be true if any
+ // session has your provider enabled. The source_id parameter will be a valid id if the callback
+ // was triggered due to a session enabling and it will be NULL if it was triggered due to a session
+ // disabling.
+ //
+ // Example:
+ // Session A enables your provider: callback with is_enabled == true, session_id == A, and keywords == Session A
+ // Session B enables your provider: callback with is_enabled == true, session_id == B, and keywords == Session A | Session B
+ // Session B disables your provider: callback with is_enabled == true, session_id == NULL, and keywords == Session A
+ // Session A disables your provider: callback with is_enabled == false, session_id == NULL, and keywords == 0
+ HRESULT EventPipeCreateProvider2(
+ [in, string] const WCHAR *providerName,
+ [in] EventPipeProviderCallback *pCallback,
+ [out] EVENTPIPE_PROVIDER *pProvider);
+}
+
+[
+ object,
+ uuid(B446462D-BD22-41DD-872D-DC714C49EB56),
+ pointer_default(unique),
+ local
+]
+interface ICorProfilerInfo15 : ICorProfilerInfo14
+{
+ /*
+ * EnumerateGCHeapObjects is a method that iterates over each object in the GC heap.
+ * For each object, it invokes the provided callback function which should return a bool
+ * indicating whether or not enumeration should continue.
+ * Enumerating the GC heap requires suspending the runtime. The profiler may accomplish this
+ * by starting from a state where the runtime is not suspended and by doing one of:
+ *
+ * From the same thread,
+ * Invoking ICorProfilerInfo10::SuspendRuntime()
+ * ...
+ * Invoking ICorProfilerInfo15::EnumerateGCHeapObjects()
+ * ...
+ * Invoking ICorProfilerInfo10::ResumeRuntime()
+ *
+ * or
+ *
+ * Invoke ICorProfilerInfo15::EnumerateGCHeapObjects() on its own, and leverage its
+ * built-in runtime suspension logic.
+ *
+ * Parameters:
+ * - callback: A function pointer to the callback function that will be invoked for each object in the GC heap.
+ * The callback function should accept an ObjectID and a void pointer as parameters and return a BOOL.
+ * - callbackState: A void pointer that can be used to pass state information to the callback function.
+ *
+ * Returns:
+ * - HRESULT: A code indicating the result of the operation. If the method succeeds,
+ * it returns S_OK. If it fails, it returns an error code.
+ */
+ HRESULT EnumerateGCHeapObjects(
+ [in] ObjectCallback callback,
+ [in] void* callbackState);
+}
+
/*
* This interface lets you iterate over methods in the runtime.
*/
#pragma warning(pop)
/* ------------------------------------------------------------------------- *
- * Library defintion
+ * Library definition
* ------------------------------------------------------------------------- */
[
} CorSymVarFlag;
/* ------------------------------------------------------------------------- *
- * Library defintion
+ * Library definition
*
* Use the _SxS coclasses for tools designed to work with .NET Framework
* 1.1 and above. On computers that only have version 1.0 installed, fall
/*
* Define a single variable not within a method. This is used for
- * certian fields in classes, bitfields, etc.
+ * certain fields in classes, bitfields, etc.
*/
HRESULT DefineField([in] mdTypeDef parent,
[in] const WCHAR *name,
/*
* Same as Initialize except that the final path name is the path string to
- * name the final location of the pdb file. This is used in build enviroments in
+ * name the final location of the pdb file. This is used in build environments in
* which the pdb is built in a temporary location and moved when the build is
* complete.
*/
// This describes information about the COM+ primitive types
//
-// Note: This file gets parsed by the Mono IL Linker (https://github.com/mono/linker/) which may throw an exception during parsing.
-// Specifically, this (https://github.com/mono/linker/blob/master/corebuild/integration/ILLink.Tasks/CreateRuntimeRootDescriptorFile.cs) will try to
+// Note: This file gets parsed by the IL Linker (https://github.com/dotnet/runtime/tree/main/src/tools/illink) which may throw an exception during parsing.
+// Specifically, this (https://github.com/dotnet/runtime/blob/main/src/tools/illink/src/ILLink.Tasks/CreateRuntimeRootDescriptorFile.cs) will try to
// parse this header, and it may throw an exception while doing that. If you edit this file and get a build failure on msbuild.exe D:\repos\coreclr\build.proj
// you might want to check out the parser linked above.
//
} T_CONTEXT, *PT_CONTEXT;
// _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY (see ExternalAPIs\Win9CoreSystem\inc\winnt.h)
-typedef struct _T_RUNTIME_FUNCTION {
+#ifdef HOST_UNIX
+typedef struct _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY {
DWORD BeginAddress;
union {
DWORD UnwindData;
DWORD H : 1;
DWORD CR : 2;
DWORD FrameSize : 9;
- } PackedUnwindData;
+ };
};
-} T_RUNTIME_FUNCTION, *PT_RUNTIME_FUNCTION;
+} IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY, * PIMAGE_ARM64_RUNTIME_FUNCTION_ENTRY;
-#ifdef HOST_UNIX
typedef
EXCEPTION_DISPOSITION
PVOID DispatcherContext
);
#endif
+
+typedef IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY T_RUNTIME_FUNCTION, * PT_RUNTIME_FUNCTION;
//
// Define exception dispatch context structure.
//
#define DAC_CS_NATIVE_DATA_SIZE 12
#elif defined(TARGET_FREEBSD) && defined(TARGET_AMD64)
#define DAC_CS_NATIVE_DATA_SIZE 24
+#elif defined(TARGET_FREEBSD) && defined(TARGET_ARM64)
+#define DAC_CS_NATIVE_DATA_SIZE 24
#elif defined(TARGET_LINUX) && defined(TARGET_ARM)
#define DAC_CS_NATIVE_DATA_SIZE 80
#elif defined(TARGET_LINUX) && defined(TARGET_ARM64)
-#define DAC_CS_NATIVE_DATA_SIZE 116
+#define DAC_CS_NATIVE_DATA_SIZE 104
#elif defined(TARGET_LINUX) && defined(TARGET_LOONGARCH64)
#define DAC_CS_NATIVE_DATA_SIZE 96
#elif defined(TARGET_LINUX) && defined(TARGET_X86)
#define DAC_CS_NATIVE_DATA_SIZE 96
#elif defined(TARGET_LINUX) && defined(TARGET_RISCV64)
#define DAC_CS_NATIVE_DATA_SIZE 96
+#elif defined(TARGET_LINUX) && defined(TARGET_POWERPC64)
+#define DAC_CS_NATIVE_DATA_SIZE 96
#elif defined(TARGET_NETBSD) && defined(TARGET_AMD64)
#define DAC_CS_NATIVE_DATA_SIZE 96
#elif defined(TARGET_NETBSD) && defined(TARGET_ARM)
+++ /dev/null
-//
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-#ifndef __CRST_TYPES_INCLUDED
-#define __CRST_TYPES_INCLUDED
-
-// **** THIS IS AN AUTOMATICALLY GENERATED HEADER FILE -- DO NOT EDIT!!! ****
-
-// This file describes the range of Crst types available and their mapping to a numeric level (used by the
-// runtime in debug mode to validate we're deadlock free). To modify these settings edit the
-// file:CrstTypes.def file and run the clr\artifacts\CrstTypeTool utility to generate a new version of this file.
-
-// Each Crst type is declared as a value in the following CrstType enum.
-enum CrstType
-{
- CrstAppDomainCache = 0,
- CrstAppDomainHandleTable = 1,
- CrstArgBasedStubCache = 2,
- CrstAssemblyList = 3,
- CrstAssemblyLoader = 4,
- CrstAvailableClass = 5,
- CrstAvailableParamTypes = 6,
- CrstBaseDomain = 7,
- CrstCCompRC = 8,
- CrstClassFactInfoHash = 9,
- CrstClassInit = 10,
- CrstClrNotification = 11,
- CrstCodeFragmentHeap = 12,
- CrstCodeVersioning = 13,
- CrstCOMCallWrapper = 14,
- CrstCOMWrapperCache = 15,
- CrstDataTest1 = 16,
- CrstDataTest2 = 17,
- CrstDbgTransport = 18,
- CrstDeadlockDetection = 19,
- CrstDebuggerController = 20,
- CrstDebuggerFavorLock = 21,
- CrstDebuggerHeapExecMemLock = 22,
- CrstDebuggerHeapLock = 23,
- CrstDebuggerJitInfo = 24,
- CrstDebuggerMutex = 25,
- CrstDelegateToFPtrHash = 26,
- CrstDomainLocalBlock = 27,
- CrstDynamicIL = 28,
- CrstDynamicMT = 29,
- CrstEtwTypeLogHash = 30,
- CrstEventPipe = 31,
- CrstEventStore = 32,
- CrstException = 33,
- CrstExecutableAllocatorLock = 34,
- CrstExecuteManRangeLock = 35,
- CrstExternalObjectContextCache = 36,
- CrstFCall = 37,
- CrstFuncPtrStubs = 38,
- CrstFusionAppCtx = 39,
- CrstGCCover = 40,
- CrstGlobalStrLiteralMap = 41,
- CrstHandleTable = 42,
- CrstIbcProfile = 43,
- CrstIJWFixupData = 44,
- CrstIJWHash = 45,
- CrstILStubGen = 46,
- CrstInlineTrackingMap = 47,
- CrstInstMethodHashTable = 48,
- CrstInterop = 49,
- CrstInteropData = 50,
- CrstIsJMCMethod = 51,
- CrstISymUnmanagedReader = 52,
- CrstJit = 53,
- CrstJitGenericHandleCache = 54,
- CrstJitInlineTrackingMap = 55,
- CrstJitPatchpoint = 56,
- CrstJitPerf = 57,
- CrstJumpStubCache = 58,
- CrstLeafLock = 59,
- CrstListLock = 60,
- CrstLoaderAllocator = 61,
- CrstLoaderAllocatorReferences = 62,
- CrstLoaderHeap = 63,
- CrstManagedObjectWrapperMap = 64,
- CrstMethodDescBackpatchInfoTracker = 65,
- CrstModule = 66,
- CrstModuleFixup = 67,
- CrstModuleLookupTable = 68,
- CrstMulticoreJitHash = 69,
- CrstMulticoreJitManager = 70,
- CrstNativeImageEagerFixups = 71,
- CrstNativeImageLoad = 72,
- CrstNls = 73,
- CrstNotifyGdb = 74,
- CrstObjectList = 75,
- CrstPEImage = 76,
- CrstPendingTypeLoadEntry = 77,
- CrstPgoData = 78,
- CrstPinnedByrefValidation = 79,
- CrstProfilerGCRefDataFreeList = 80,
- CrstProfilingAPIStatus = 81,
- CrstRCWCache = 82,
- CrstRCWCleanupList = 83,
- CrstReadyToRunEntryPointToMethodDescMap = 84,
- CrstReflection = 85,
- CrstReJITGlobalRequest = 86,
- CrstRetThunkCache = 87,
- CrstSavedExceptionInfo = 88,
- CrstSaveModuleProfileData = 89,
- CrstSecurityStackwalkCache = 90,
- CrstSigConvert = 91,
- CrstSingleUseLock = 92,
- CrstSpecialStatics = 93,
- CrstStackSampler = 94,
- CrstStressLog = 95,
- CrstStubCache = 96,
- CrstStubDispatchCache = 97,
- CrstStubUnwindInfoHeapSegments = 98,
- CrstSyncBlockCache = 99,
- CrstSyncHashLock = 100,
- CrstSystemBaseDomain = 101,
- CrstSystemDomain = 102,
- CrstSystemDomainDelayedUnloadList = 103,
- CrstThreadIdDispenser = 104,
- CrstThreadpoolTimerQueue = 105,
- CrstThreadpoolWaitThreads = 106,
- CrstThreadpoolWorker = 107,
- CrstThreadStore = 108,
- CrstTieredCompilation = 109,
- CrstTypeEquivalenceMap = 110,
- CrstTypeIDMap = 111,
- CrstUMEntryThunkCache = 112,
- CrstUMEntryThunkFreeListLock = 113,
- CrstUniqueStack = 114,
- CrstUnresolvedClassLock = 115,
- CrstUnwindInfoTableLock = 116,
- CrstVSDIndirectionCellLock = 117,
- CrstWrapperTemplate = 118,
- kNumberOfCrstTypes = 119
-};
-
-#endif // __CRST_TYPES_INCLUDED
-
-// Define some debug data in one module only -- vm\crst.cpp.
-#if defined(__IN_CRST_CPP) && defined(_DEBUG)
-
-// An array mapping CrstType to level.
-int g_rgCrstLevelMap[] =
-{
- 10, // CrstAppDomainCache
- 14, // CrstAppDomainHandleTable
- 3, // CrstArgBasedStubCache
- 0, // CrstAssemblyList
- 12, // CrstAssemblyLoader
- 4, // CrstAvailableClass
- 5, // CrstAvailableParamTypes
- 7, // CrstBaseDomain
- -1, // CrstCCompRC
- 13, // CrstClassFactInfoHash
- 11, // CrstClassInit
- -1, // CrstClrNotification
- 6, // CrstCodeFragmentHeap
- 9, // CrstCodeVersioning
- 0, // CrstCOMCallWrapper
- 5, // CrstCOMWrapperCache
- 3, // CrstDataTest1
- 0, // CrstDataTest2
- 0, // CrstDbgTransport
- 0, // CrstDeadlockDetection
- -1, // CrstDebuggerController
- 3, // CrstDebuggerFavorLock
- 0, // CrstDebuggerHeapExecMemLock
- 0, // CrstDebuggerHeapLock
- 4, // CrstDebuggerJitInfo
- 10, // CrstDebuggerMutex
- 0, // CrstDelegateToFPtrHash
- 16, // CrstDomainLocalBlock
- 0, // CrstDynamicIL
- 3, // CrstDynamicMT
- 0, // CrstEtwTypeLogHash
- 18, // CrstEventPipe
- 0, // CrstEventStore
- 0, // CrstException
- 0, // CrstExecutableAllocatorLock
- 0, // CrstExecuteManRangeLock
- 0, // CrstExternalObjectContextCache
- 4, // CrstFCall
- 7, // CrstFuncPtrStubs
- 10, // CrstFusionAppCtx
- 10, // CrstGCCover
- 13, // CrstGlobalStrLiteralMap
- 1, // CrstHandleTable
- 0, // CrstIbcProfile
- 8, // CrstIJWFixupData
- 0, // CrstIJWHash
- 7, // CrstILStubGen
- 3, // CrstInlineTrackingMap
- 17, // CrstInstMethodHashTable
- 20, // CrstInterop
- 5, // CrstInteropData
- 0, // CrstIsJMCMethod
- 7, // CrstISymUnmanagedReader
- 11, // CrstJit
- 0, // CrstJitGenericHandleCache
- 16, // CrstJitInlineTrackingMap
- 4, // CrstJitPatchpoint
- -1, // CrstJitPerf
- 6, // CrstJumpStubCache
- 0, // CrstLeafLock
- -1, // CrstListLock
- 15, // CrstLoaderAllocator
- 16, // CrstLoaderAllocatorReferences
- 3, // CrstLoaderHeap
- 3, // CrstManagedObjectWrapperMap
- 14, // CrstMethodDescBackpatchInfoTracker
- 5, // CrstModule
- 15, // CrstModuleFixup
- 4, // CrstModuleLookupTable
- 0, // CrstMulticoreJitHash
- 13, // CrstMulticoreJitManager
- 0, // CrstNativeImageEagerFixups
- 0, // CrstNativeImageLoad
- 0, // CrstNls
- 0, // CrstNotifyGdb
- 2, // CrstObjectList
- 5, // CrstPEImage
- 19, // CrstPendingTypeLoadEntry
- 4, // CrstPgoData
- 0, // CrstPinnedByrefValidation
- 0, // CrstProfilerGCRefDataFreeList
- 13, // CrstProfilingAPIStatus
- 4, // CrstRCWCache
- 0, // CrstRCWCleanupList
- 10, // CrstReadyToRunEntryPointToMethodDescMap
- 8, // CrstReflection
- 17, // CrstReJITGlobalRequest
- 4, // CrstRetThunkCache
- 3, // CrstSavedExceptionInfo
- 0, // CrstSaveModuleProfileData
- 0, // CrstSecurityStackwalkCache
- 4, // CrstSigConvert
- 5, // CrstSingleUseLock
- 0, // CrstSpecialStatics
- 0, // CrstStackSampler
- -1, // CrstStressLog
- 5, // CrstStubCache
- 0, // CrstStubDispatchCache
- 4, // CrstStubUnwindInfoHeapSegments
- 3, // CrstSyncBlockCache
- 0, // CrstSyncHashLock
- 5, // CrstSystemBaseDomain
- 13, // CrstSystemDomain
- 0, // CrstSystemDomainDelayedUnloadList
- 0, // CrstThreadIdDispenser
- 7, // CrstThreadpoolTimerQueue
- 7, // CrstThreadpoolWaitThreads
- 13, // CrstThreadpoolWorker
- 12, // CrstThreadStore
- 8, // CrstTieredCompilation
- 4, // CrstTypeEquivalenceMap
- 10, // CrstTypeIDMap
- 4, // CrstUMEntryThunkCache
- 3, // CrstUMEntryThunkFreeListLock
- 4, // CrstUniqueStack
- 7, // CrstUnresolvedClassLock
- 3, // CrstUnwindInfoTableLock
- 4, // CrstVSDIndirectionCellLock
- 3, // CrstWrapperTemplate
-};
-
-// An array mapping CrstType to a stringized name.
-LPCSTR g_rgCrstNameMap[] =
-{
- "CrstAppDomainCache",
- "CrstAppDomainHandleTable",
- "CrstArgBasedStubCache",
- "CrstAssemblyList",
- "CrstAssemblyLoader",
- "CrstAvailableClass",
- "CrstAvailableParamTypes",
- "CrstBaseDomain",
- "CrstCCompRC",
- "CrstClassFactInfoHash",
- "CrstClassInit",
- "CrstClrNotification",
- "CrstCodeFragmentHeap",
- "CrstCodeVersioning",
- "CrstCOMCallWrapper",
- "CrstCOMWrapperCache",
- "CrstDataTest1",
- "CrstDataTest2",
- "CrstDbgTransport",
- "CrstDeadlockDetection",
- "CrstDebuggerController",
- "CrstDebuggerFavorLock",
- "CrstDebuggerHeapExecMemLock",
- "CrstDebuggerHeapLock",
- "CrstDebuggerJitInfo",
- "CrstDebuggerMutex",
- "CrstDelegateToFPtrHash",
- "CrstDomainLocalBlock",
- "CrstDynamicIL",
- "CrstDynamicMT",
- "CrstEtwTypeLogHash",
- "CrstEventPipe",
- "CrstEventStore",
- "CrstException",
- "CrstExecutableAllocatorLock",
- "CrstExecuteManRangeLock",
- "CrstExternalObjectContextCache",
- "CrstFCall",
- "CrstFuncPtrStubs",
- "CrstFusionAppCtx",
- "CrstGCCover",
- "CrstGlobalStrLiteralMap",
- "CrstHandleTable",
- "CrstIbcProfile",
- "CrstIJWFixupData",
- "CrstIJWHash",
- "CrstILStubGen",
- "CrstInlineTrackingMap",
- "CrstInstMethodHashTable",
- "CrstInterop",
- "CrstInteropData",
- "CrstIsJMCMethod",
- "CrstISymUnmanagedReader",
- "CrstJit",
- "CrstJitGenericHandleCache",
- "CrstJitInlineTrackingMap",
- "CrstJitPatchpoint",
- "CrstJitPerf",
- "CrstJumpStubCache",
- "CrstLeafLock",
- "CrstListLock",
- "CrstLoaderAllocator",
- "CrstLoaderAllocatorReferences",
- "CrstLoaderHeap",
- "CrstManagedObjectWrapperMap",
- "CrstMethodDescBackpatchInfoTracker",
- "CrstModule",
- "CrstModuleFixup",
- "CrstModuleLookupTable",
- "CrstMulticoreJitHash",
- "CrstMulticoreJitManager",
- "CrstNativeImageEagerFixups",
- "CrstNativeImageLoad",
- "CrstNls",
- "CrstNotifyGdb",
- "CrstObjectList",
- "CrstPEImage",
- "CrstPendingTypeLoadEntry",
- "CrstPgoData",
- "CrstPinnedByrefValidation",
- "CrstProfilerGCRefDataFreeList",
- "CrstProfilingAPIStatus",
- "CrstRCWCache",
- "CrstRCWCleanupList",
- "CrstReadyToRunEntryPointToMethodDescMap",
- "CrstReflection",
- "CrstReJITGlobalRequest",
- "CrstRetThunkCache",
- "CrstSavedExceptionInfo",
- "CrstSaveModuleProfileData",
- "CrstSecurityStackwalkCache",
- "CrstSigConvert",
- "CrstSingleUseLock",
- "CrstSpecialStatics",
- "CrstStackSampler",
- "CrstStressLog",
- "CrstStubCache",
- "CrstStubDispatchCache",
- "CrstStubUnwindInfoHeapSegments",
- "CrstSyncBlockCache",
- "CrstSyncHashLock",
- "CrstSystemBaseDomain",
- "CrstSystemDomain",
- "CrstSystemDomainDelayedUnloadList",
- "CrstThreadIdDispenser",
- "CrstThreadpoolTimerQueue",
- "CrstThreadpoolWaitThreads",
- "CrstThreadpoolWorker",
- "CrstThreadStore",
- "CrstTieredCompilation",
- "CrstTypeEquivalenceMap",
- "CrstTypeIDMap",
- "CrstUMEntryThunkCache",
- "CrstUMEntryThunkFreeListLock",
- "CrstUniqueStack",
- "CrstUnresolvedClassLock",
- "CrstUnwindInfoTableLock",
- "CrstVSDIndirectionCellLock",
- "CrstWrapperTemplate",
-};
-
-// Define a special level constant for unordered locks.
-#define CRSTUNORDERED (-1)
-
-// Define inline helpers to map Crst types to names and levels.
-inline static int GetCrstLevel(CrstType crstType)
-{
- LIMITED_METHOD_CONTRACT;
- _ASSERTE(crstType >= 0 && crstType < kNumberOfCrstTypes);
- return g_rgCrstLevelMap[crstType];
-}
-inline static LPCSTR GetCrstName(CrstType crstType)
-{
- LIMITED_METHOD_CONTRACT;
- _ASSERTE(crstType >= 0 && crstType < kNumberOfCrstTypes);
- return g_rgCrstNameMap[crstType];
-}
-
-#endif // defined(__IN_CRST_CPP) && defined(_DEBUG)
--- /dev/null
+//
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//
+
+#ifndef __CRST_TYPES_INCLUDED
+#define __CRST_TYPES_INCLUDED
+
+// **** THIS IS AN AUTOMATICALLY GENERATED HEADER FILE -- DO NOT EDIT!!! ****
+
+// This file describes the range of Crst types available and their mapping to a numeric level (used by the
+// runtime in debug mode to validate we're deadlock free). To modify these settings edit the
+// file:CrstTypes.def file and run the clr\artifacts\CrstTypeTool utility to generate a new version of this file.
+
+// Each Crst type is declared as a value in the following CrstType enum.
+enum CrstType
+{
+ CrstAppDomainCache = 0,
+ CrstArgBasedStubCache = 1,
+ CrstAssemblyList = 2,
+ CrstAssemblyLoader = 3,
+ CrstAvailableClass = 4,
+ CrstAvailableParamTypes = 5,
+ CrstBaseDomain = 6,
+ CrstCCompRC = 7,
+ CrstClassFactInfoHash = 8,
+ CrstClassInit = 9,
+ CrstClrNotification = 10,
+ CrstCodeFragmentHeap = 11,
+ CrstCodeVersioning = 12,
+ CrstCOMCallWrapper = 13,
+ CrstCOMWrapperCache = 14,
+ CrstDataTest1 = 15,
+ CrstDataTest2 = 16,
+ CrstDbgTransport = 17,
+ CrstDeadlockDetection = 18,
+ CrstDebuggerController = 19,
+ CrstDebuggerFavorLock = 20,
+ CrstDebuggerHeapExecMemLock = 21,
+ CrstDebuggerHeapLock = 22,
+ CrstDebuggerJitInfo = 23,
+ CrstDebuggerMutex = 24,
+ CrstDelegateToFPtrHash = 25,
+ CrstDynamicIL = 26,
+ CrstDynamicMT = 27,
+ CrstEtwTypeLogHash = 28,
+ CrstEventPipe = 29,
+ CrstEventStore = 30,
+ CrstException = 31,
+ CrstExecutableAllocatorLock = 32,
+ CrstExecuteManRangeLock = 33,
+ CrstFCall = 34,
+ CrstFrozenObjectHeap = 35,
+ CrstFuncPtrStubs = 36,
+ CrstFusionAppCtx = 37,
+ CrstGCCover = 38,
+ CrstGenericDictionaryExpansion = 39,
+ CrstGlobalStrLiteralMap = 40,
+ CrstHandleTable = 41,
+ CrstIbcProfile = 42,
+ CrstIJWFixupData = 43,
+ CrstIJWHash = 44,
+ CrstILStubGen = 45,
+ CrstInlineTrackingMap = 46,
+ CrstInstMethodHashTable = 47,
+ CrstInterop = 48,
+ CrstInteropData = 49,
+ CrstIsJMCMethod = 50,
+ CrstISymUnmanagedReader = 51,
+ CrstJit = 52,
+ CrstJitGenericHandleCache = 53,
+ CrstJitInlineTrackingMap = 54,
+ CrstJitPatchpoint = 55,
+ CrstJitPerf = 56,
+ CrstJumpStubCache = 57,
+ CrstLeafLock = 58,
+ CrstListLock = 59,
+ CrstLoaderAllocator = 60,
+ CrstLoaderAllocatorReferences = 61,
+ CrstLoaderHeap = 62,
+ CrstManagedObjectWrapperMap = 63,
+ CrstMethodDescBackpatchInfoTracker = 64,
+ CrstMethodTableExposedObject = 65,
+ CrstModule = 66,
+ CrstModuleFixup = 67,
+ CrstModuleLookupTable = 68,
+ CrstMulticoreJitHash = 69,
+ CrstMulticoreJitManager = 70,
+ CrstNativeImageEagerFixups = 71,
+ CrstNativeImageLoad = 72,
+ CrstNls = 73,
+ CrstNotifyGdb = 74,
+ CrstObjectList = 75,
+ CrstPEImage = 76,
+ CrstPendingTypeLoadEntry = 77,
+ CrstPerfMap = 78,
+ CrstPgoData = 79,
+ CrstPinnedByrefValidation = 80,
+ CrstPinnedHeapHandleTable = 81,
+ CrstProfilerGCRefDataFreeList = 82,
+ CrstProfilingAPIStatus = 83,
+ CrstRCWCache = 84,
+ CrstRCWCleanupList = 85,
+ CrstReadyToRunEntryPointToMethodDescMap = 86,
+ CrstReflection = 87,
+ CrstReJITGlobalRequest = 88,
+ CrstRetThunkCache = 89,
+ CrstSavedExceptionInfo = 90,
+ CrstSaveModuleProfileData = 91,
+ CrstSigConvert = 92,
+ CrstSingleUseLock = 93,
+ CrstSpecialStatics = 94,
+ CrstStackSampler = 95,
+ CrstStressLog = 96,
+ CrstStubCache = 97,
+ CrstStubDispatchCache = 98,
+ CrstStubUnwindInfoHeapSegments = 99,
+ CrstSyncBlockCache = 100,
+ CrstSyncHashLock = 101,
+ CrstSystemBaseDomain = 102,
+ CrstSystemDomain = 103,
+ CrstSystemDomainDelayedUnloadList = 104,
+ CrstThreadIdDispenser = 105,
+ CrstThreadLocalStorageLock = 106,
+ CrstThreadStore = 107,
+ CrstTieredCompilation = 108,
+ CrstTypeEquivalenceMap = 109,
+ CrstTypeIDMap = 110,
+ CrstUMEntryThunkCache = 111,
+ CrstUMEntryThunkFreeListLock = 112,
+ CrstUniqueStack = 113,
+ CrstUnresolvedClassLock = 114,
+ CrstUnwindInfoTableLock = 115,
+ CrstVSDIndirectionCellLock = 116,
+ CrstWrapperTemplate = 117,
+ kNumberOfCrstTypes = 118
+};
+
+#endif // __CRST_TYPES_INCLUDED
+
+// Define some debug data in one module only -- vm\crst.cpp.
+#if defined(__IN_CRST_CPP) && defined(_DEBUG)
+
+// An array mapping CrstType to level.
+int g_rgCrstLevelMap[] =
+{
+ 10, // CrstAppDomainCache
+ 3, // CrstArgBasedStubCache
+ 3, // CrstAssemblyList
+ 14, // CrstAssemblyLoader
+ 4, // CrstAvailableClass
+ 5, // CrstAvailableParamTypes
+ 7, // CrstBaseDomain
+ -1, // CrstCCompRC
+ 15, // CrstClassFactInfoHash
+ 11, // CrstClassInit
+ -1, // CrstClrNotification
+ 6, // CrstCodeFragmentHeap
+ 9, // CrstCodeVersioning
+ 3, // CrstCOMCallWrapper
+ 10, // CrstCOMWrapperCache
+ 3, // CrstDataTest1
+ 0, // CrstDataTest2
+ 0, // CrstDbgTransport
+ 0, // CrstDeadlockDetection
+ -1, // CrstDebuggerController
+ 3, // CrstDebuggerFavorLock
+ 0, // CrstDebuggerHeapExecMemLock
+ 0, // CrstDebuggerHeapLock
+ 4, // CrstDebuggerJitInfo
+ 13, // CrstDebuggerMutex
+ 0, // CrstDelegateToFPtrHash
+ 0, // CrstDynamicIL
+ 10, // CrstDynamicMT
+ 0, // CrstEtwTypeLogHash
+ 20, // CrstEventPipe
+ 0, // CrstEventStore
+ 0, // CrstException
+ 0, // CrstExecutableAllocatorLock
+ 0, // CrstExecuteManRangeLock
+ 4, // CrstFCall
+ -1, // CrstFrozenObjectHeap
+ 7, // CrstFuncPtrStubs
+ 10, // CrstFusionAppCtx
+ 10, // CrstGCCover
+ 18, // CrstGenericDictionaryExpansion
+ 17, // CrstGlobalStrLiteralMap
+ 1, // CrstHandleTable
+ 0, // CrstIbcProfile
+ 8, // CrstIJWFixupData
+ 0, // CrstIJWHash
+ 7, // CrstILStubGen
+ 3, // CrstInlineTrackingMap
+ 19, // CrstInstMethodHashTable
+ 22, // CrstInterop
+ 10, // CrstInteropData
+ 0, // CrstIsJMCMethod
+ 7, // CrstISymUnmanagedReader
+ 11, // CrstJit
+ 0, // CrstJitGenericHandleCache
+ 12, // CrstJitInlineTrackingMap
+ 4, // CrstJitPatchpoint
+ -1, // CrstJitPerf
+ 6, // CrstJumpStubCache
+ 0, // CrstLeafLock
+ -1, // CrstListLock
+ 17, // CrstLoaderAllocator
+ 18, // CrstLoaderAllocatorReferences
+ 3, // CrstLoaderHeap
+ 3, // CrstManagedObjectWrapperMap
+ 10, // CrstMethodDescBackpatchInfoTracker
+ -1, // CrstMethodTableExposedObject
+ 5, // CrstModule
+ 18, // CrstModuleFixup
+ 4, // CrstModuleLookupTable
+ 0, // CrstMulticoreJitHash
+ 15, // CrstMulticoreJitManager
+ 3, // CrstNativeImageEagerFixups
+ 0, // CrstNativeImageLoad
+ 0, // CrstNls
+ 0, // CrstNotifyGdb
+ 2, // CrstObjectList
+ 5, // CrstPEImage
+ 21, // CrstPendingTypeLoadEntry
+ 0, // CrstPerfMap
+ 4, // CrstPgoData
+ 0, // CrstPinnedByrefValidation
+ 16, // CrstPinnedHeapHandleTable
+ 0, // CrstProfilerGCRefDataFreeList
+ 15, // CrstProfilingAPIStatus
+ 4, // CrstRCWCache
+ 0, // CrstRCWCleanupList
+ 10, // CrstReadyToRunEntryPointToMethodDescMap
+ 8, // CrstReflection
+ 16, // CrstReJITGlobalRequest
+ 4, // CrstRetThunkCache
+ 3, // CrstSavedExceptionInfo
+ 0, // CrstSaveModuleProfileData
+ 4, // CrstSigConvert
+ 5, // CrstSingleUseLock
+ 0, // CrstSpecialStatics
+ 0, // CrstStackSampler
+ -1, // CrstStressLog
+ 5, // CrstStubCache
+ 0, // CrstStubDispatchCache
+ 4, // CrstStubUnwindInfoHeapSegments
+ 3, // CrstSyncBlockCache
+ 0, // CrstSyncHashLock
+ 5, // CrstSystemBaseDomain
+ 15, // CrstSystemDomain
+ 0, // CrstSystemDomainDelayedUnloadList
+ 0, // CrstThreadIdDispenser
+ 5, // CrstThreadLocalStorageLock
+ 14, // CrstThreadStore
+ 8, // CrstTieredCompilation
+ 4, // CrstTypeEquivalenceMap
+ 10, // CrstTypeIDMap
+ 4, // CrstUMEntryThunkCache
+ 3, // CrstUMEntryThunkFreeListLock
+ 4, // CrstUniqueStack
+ 7, // CrstUnresolvedClassLock
+ 3, // CrstUnwindInfoTableLock
+ 4, // CrstVSDIndirectionCellLock
+ 3, // CrstWrapperTemplate
+};
+
+// An array mapping CrstType to a stringized name.
+LPCSTR g_rgCrstNameMap[] =
+{
+ "CrstAppDomainCache",
+ "CrstArgBasedStubCache",
+ "CrstAssemblyList",
+ "CrstAssemblyLoader",
+ "CrstAvailableClass",
+ "CrstAvailableParamTypes",
+ "CrstBaseDomain",
+ "CrstCCompRC",
+ "CrstClassFactInfoHash",
+ "CrstClassInit",
+ "CrstClrNotification",
+ "CrstCodeFragmentHeap",
+ "CrstCodeVersioning",
+ "CrstCOMCallWrapper",
+ "CrstCOMWrapperCache",
+ "CrstDataTest1",
+ "CrstDataTest2",
+ "CrstDbgTransport",
+ "CrstDeadlockDetection",
+ "CrstDebuggerController",
+ "CrstDebuggerFavorLock",
+ "CrstDebuggerHeapExecMemLock",
+ "CrstDebuggerHeapLock",
+ "CrstDebuggerJitInfo",
+ "CrstDebuggerMutex",
+ "CrstDelegateToFPtrHash",
+ "CrstDynamicIL",
+ "CrstDynamicMT",
+ "CrstEtwTypeLogHash",
+ "CrstEventPipe",
+ "CrstEventStore",
+ "CrstException",
+ "CrstExecutableAllocatorLock",
+ "CrstExecuteManRangeLock",
+ "CrstFCall",
+ "CrstFrozenObjectHeap",
+ "CrstFuncPtrStubs",
+ "CrstFusionAppCtx",
+ "CrstGCCover",
+ "CrstGenericDictionaryExpansion",
+ "CrstGlobalStrLiteralMap",
+ "CrstHandleTable",
+ "CrstIbcProfile",
+ "CrstIJWFixupData",
+ "CrstIJWHash",
+ "CrstILStubGen",
+ "CrstInlineTrackingMap",
+ "CrstInstMethodHashTable",
+ "CrstInterop",
+ "CrstInteropData",
+ "CrstIsJMCMethod",
+ "CrstISymUnmanagedReader",
+ "CrstJit",
+ "CrstJitGenericHandleCache",
+ "CrstJitInlineTrackingMap",
+ "CrstJitPatchpoint",
+ "CrstJitPerf",
+ "CrstJumpStubCache",
+ "CrstLeafLock",
+ "CrstListLock",
+ "CrstLoaderAllocator",
+ "CrstLoaderAllocatorReferences",
+ "CrstLoaderHeap",
+ "CrstManagedObjectWrapperMap",
+ "CrstMethodDescBackpatchInfoTracker",
+ "CrstMethodTableExposedObject",
+ "CrstModule",
+ "CrstModuleFixup",
+ "CrstModuleLookupTable",
+ "CrstMulticoreJitHash",
+ "CrstMulticoreJitManager",
+ "CrstNativeImageEagerFixups",
+ "CrstNativeImageLoad",
+ "CrstNls",
+ "CrstNotifyGdb",
+ "CrstObjectList",
+ "CrstPEImage",
+ "CrstPendingTypeLoadEntry",
+ "CrstPerfMap",
+ "CrstPgoData",
+ "CrstPinnedByrefValidation",
+ "CrstPinnedHeapHandleTable",
+ "CrstProfilerGCRefDataFreeList",
+ "CrstProfilingAPIStatus",
+ "CrstRCWCache",
+ "CrstRCWCleanupList",
+ "CrstReadyToRunEntryPointToMethodDescMap",
+ "CrstReflection",
+ "CrstReJITGlobalRequest",
+ "CrstRetThunkCache",
+ "CrstSavedExceptionInfo",
+ "CrstSaveModuleProfileData",
+ "CrstSigConvert",
+ "CrstSingleUseLock",
+ "CrstSpecialStatics",
+ "CrstStackSampler",
+ "CrstStressLog",
+ "CrstStubCache",
+ "CrstStubDispatchCache",
+ "CrstStubUnwindInfoHeapSegments",
+ "CrstSyncBlockCache",
+ "CrstSyncHashLock",
+ "CrstSystemBaseDomain",
+ "CrstSystemDomain",
+ "CrstSystemDomainDelayedUnloadList",
+ "CrstThreadIdDispenser",
+ "CrstThreadLocalStorageLock",
+ "CrstThreadStore",
+ "CrstTieredCompilation",
+ "CrstTypeEquivalenceMap",
+ "CrstTypeIDMap",
+ "CrstUMEntryThunkCache",
+ "CrstUMEntryThunkFreeListLock",
+ "CrstUniqueStack",
+ "CrstUnresolvedClassLock",
+ "CrstUnwindInfoTableLock",
+ "CrstVSDIndirectionCellLock",
+ "CrstWrapperTemplate",
+};
+
+// Define a special level constant for unordered locks.
+#define CRSTUNORDERED (-1)
+
+// Define inline helpers to map Crst types to names and levels.
+inline static int GetCrstLevel(CrstType crstType)
+{
+ LIMITED_METHOD_CONTRACT;
+ _ASSERTE(crstType >= 0 && crstType < kNumberOfCrstTypes);
+ return g_rgCrstLevelMap[crstType];
+}
+inline static LPCSTR GetCrstName(CrstType crstType)
+{
+ LIMITED_METHOD_CONTRACT;
+ _ASSERTE(crstType >= 0 && crstType < kNumberOfCrstTypes);
+ return g_rgCrstNameMap[crstType];
+}
+
+#endif // defined(__IN_CRST_CPP) && defined(_DEBUG)
#define __CrtWrap_h__
#include <stdint.h>
+#include <stddef.h>
#include <windows.h>
#include <objbase.h>
-#include <tchar.h>
#include "debugmacros.h"
#include <stdlib.h>
-#include <malloc.h>
#include <wchar.h>
#include <stdio.h>
// The .NET Foundation licenses this file to you under the MIT license.
//*****************************************************************************
// File: daccess.h
-//
+//
+
+//
+// Support for external access of runtime data structures. These
+// macros and templates hide the details of pointer and data handling
+// so that data structures and code can be compiled to work both
+// in-process and through a special memory access layer.
+//
+// This code assumes the existence of two different pieces of code,
+// the target, the runtime code that is going to be examined, and
+// the host, the code that's doing the examining. Access to the
+// target is abstracted so the target may be a live process on the
+// same machine, a live process on a different machine, a dump file
+// or whatever. No assumptions should be made about accessibility
+// of the target.
+//
+// This code assumes that the data in the target is static. Any
+// time the target's data changes the interfaces must be reset so
+// that potentially stale data is discarded.
+//
+// This code is intended for read access and there is no
+// way to write data back currently.
+//
+// DAC-ized code:
+// - is read-only (non-invasive). So DACized codepaths can not trigger a GC.
+// - has no Thread* object. In reality, DAC-ized codepaths are
+// ReadProcessMemory calls from out-of-process. Conceptually, they
+// are like a pure-native (preemptive) thread.
+////
+// This means that in particular, you cannot DACize a GCTRIGGERS function.
+// Neither can you DACize a function that throws if this will involve
+// allocating a new exception object. There may be
+// exceptions to these rules if you can guarantee that the DACized
+// part of the code path cannot cause a garbage collection (see
+// EditAndContinueModule::ResolveField for an example).
+// If you need to DACize a function that may trigger
+// a GC, it is probably best to refactor the function so that the DACized
+// part of the code path is in a separate function. For instance,
+// functions with GetOrCreate() semantics are hard to DAC-ize because
+// they the Create portion is inherently invasive. Instead, consider refactoring
+// into a GetOrFail() function that DAC can call; and then make GetOrCreate()
+// a wrapper around that.
+
+//
+// This code works by hiding the details of access to target memory.
+// Access is divided into two types:
+// 1. DPTR - access to a piece of data.
+// 2. VPTR - access to a class with a vtable. The class can only have
+// a single vtable pointer at the beginning of the class instance.
+// Things only need to be declared as VPTRs when it is necessary to
+// call virtual functions in the host. In that case the access layer
+// must do extra work to provide a host vtable for the object when
+// it is retrieved so that virtual functions can be called.
+//
+// When compiling with DACCESS_COMPILE the macros turn into templates
+// which replace pointers with smart pointers that know how to fetch
+// data from the target process and provide a host process version of it.
+// Normal data structure access will transparently receive a host copy
+// of the data and proceed, so code such as
+// typedef DPTR(Class) PTR_Class;
+// PTR_Class cls;
+// int val = cls->m_Int;
+// will work without modification. The appropriate operators are overloaded
+// to provide transparent access, such as the -> operator in this case.
+// Note that the convention is to create an appropriate typedef for
+// each type that will be accessed. This hides the particular details
+// of the type declaration and makes the usage look more like regular code.
+//
+// The ?PTR classes also have an implicit base type cast operator to
+// produce a host-pointer instance of the given type. For example
+// Class* cls = PTR_Class(addr);
+// works by implicit conversion from the PTR_Class created by wrapping
+// to a host-side Class instance. Again, this means that existing code
+// can work without modification.
+//
+// Code Example:
+//
+// typedef struct _rangesection
+// {
+// PTR_IJitManager pjit;
+// PTR_RangeSection pright;
+// PTR_RangeSection pleft;
+// ... Other fields omitted ...
+// } RangeSection;
+//
+// RangeSection* pRS = m_RangeTree;
+//
+// while (pRS != NULL)
+// {
+// if (currentPC < pRS->LowAddress)
+// pRS=pRS->pleft;
+// else if (currentPC > pRS->HighAddress)
+// pRS=pRS->pright;
+// else
+// {
+// return pRS->_pjit;
+// }
+// }
+//
+// This code does not require any modifications. The global reference
+// provided by m_RangeTree will be a host version of the RangeSection
+// instantiated by conversion. The references to pRS->pleft and
+// pRS->pright will refer to DPTRs due to the modified declaration.
+// In the assignment statement the compiler will automatically use
+// the implicit conversion from PTR_RangeSection to RangeSection*,
+// causing a host instance to be created. Finally, if an appropriate
+// section is found the use of pRS->_pjit will cause an implicit
+// conversion from PTR_IJitManager to IJitManager. The VPTR code
+// will look at target memory to determine the actual derived class
+// for the JitManager and instantiate the right class in the host so
+// that host virtual functions can be used just as they would in
+// the target.
+//
+// There are situations where code modifications are required, though.
+//
+// 1. Any time the actual value of an address matters, such as using
+// it as a search key in a tree, the target address must be used.
+//
+// An example of this is the RangeSection tree used to locate JIT
+// managers. A portion of this code is shown above. Each
+// RangeSection node in the tree describes a range of addresses
+// managed by the JitMan. These addresses are just being used as
+// values, not to dereference through, so there are not DPTRs. When
+// searching the range tree for an address the address used in the
+// search must be a target address as that's what values are kept in
+// the RangeSections. In the code shown above, currentPC must be a
+// target address as the RangeSections in the tree are all target
+// addresses. Use dac_cast<TADDR> to retrieve the target address
+// of a ?PTR, as well as to convert a host address to the
+// target address used to retrieve that particular instance. Do not
+// use dac_cast with any raw target pointer types (such as BYTE*).
+//
+// 2. Any time an address is modified, such as by address arithmetic,
+// the arithmetic must be performed on the target address.
+//
+// When a host instance is created it is created for the type in use.
+// There is no particular relation to any other instance, so address
+// arithmetic cannot be used to get from one instance to any other
+// part of memory. For example
+// char* Func(Class* cls)
+// {
+// // String follows the basic Class data.
+// return (char*)(cls + 1);
+// }
+// does not work with external access because the Class* used would
+// have retrieved only a Class worth of data. There is no string
+// following the host instance. Instead, this code should use
+// dac_cast<TADDR> to get the target address of the Class
+// instance, add sizeof(*cls) and then create a new ?PTR to access
+// the desired data. Note that the newly retrieved data will not
+// be contiguous with the Class instance, so address arithmetic
+// will still not work.
+//
+// Previous Code:
+//
+// BOOL IsTarget(LPVOID ip)
+// {
+// StubCallInstrs* pStubCallInstrs = GetStubCallInstrs();
+//
+// if (ip == (LPVOID) &(pStubCallInstrs->m_op))
+// {
+// return TRUE;
+// }
+//
+// Modified Code:
+//
+// BOOL IsTarget(LPVOID ip)
+// {
+// StubCallInstrs* pStubCallInstrs = GetStubCallInstrs();
+//
+// if ((TADDR)ip == dac_cast<TADDR>(pStubCallInstrs) +
+// (TADDR)offsetof(StubCallInstrs, m_op))
+// {
+// return TRUE;
+// }
+//
+// The parameter ip is a target address, so the host pStubCallInstrs
+// cannot be used to derive an address from. The member & reference
+// has to be replaced with a conversion from host to target address
+// followed by explicit offsetting for the field.
+//
+// PTR_HOST_MEMBER_TADDR is a convenience macro that encapsulates
+// these two operations, so the above code could also be:
+//
+// if ((TADDR)ip ==
+// PTR_HOST_MEMBER_TADDR(StubCallInstrs, pStubCallInstrs, m_op))
+//
+// 3. Any time the amount of memory referenced through an address
+// changes, such as by casting to a different type, a new ?PTR
+// must be created.
+//
+// Host instances are created and stored based on both the target
+// address and size of access. The access code has no way of knowing
+// all possible ways that data will be retrieved for a given address
+// so if code changes the way it accesses through an address a new
+// ?PTR must be used, which may lead to a difference instance and
+// different host address. This means that pointer identity does not hold
+// across casts, so code like
+// Class* cls = PTR_Class(addr);
+// Class2* cls2 = PTR_Class2(addr);
+// return cls == cls2;
+// will fail because the host-side instances have no relation to each
+// other. That isn't a problem, since by rule #1 you shouldn't be
+// relying on specific host address values.
+//
+// Previous Code:
+//
+// return (ArrayClass *) m_pMethTab->GetClass();
+//
+// Modified Code:
+//
+// return PTR_ArrayClass(m_pMethTab->GetClass());
+//
+// The ?PTR templates have an implicit conversion from a host pointer
+// to a target address, so the cast above constructs a new
+// PTR_ArrayClass by implicitly converting the host pointer result
+// from GetClass() to its target address and using that as the address
+// of the new PTR_ArrayClass. As mentioned, the actual host-side
+// pointer values may not be the same.
+//
+// Host pointer identity can be assumed as long as the type of access
+// is the same. In the example above, if both accesses were of type
+// Class then the host pointer will be the same, so it is safe to
+// retrieve the target address of an instance and then later get
+// a new host pointer for the target address using the same type as
+// the host pointer in that case will be the same. This is enabled
+// by caching all of the retrieved host instances. This cache is searched
+// by the addr:size pair and when there's a match the existing instance
+// is reused. This increases performance and also allows simple
+// pointer identity to hold. It does mean that host memory grows
+// in proportion to the amount of target memory being referenced,
+// so retrieving extraneous data should be avoided.
+// The host-side data cache grows until the Flush() method is called,
+// at which point all host-side data is discarded. No host
+// instance pointers should be held across a Flush().
+//
+// Accessing into an object can lead to some unusual behavior. For
+// example, the SList class relies on objects to contain an SLink
+// instance that it uses for list maintenance. This SLink can be
+// embedded anywhere in the larger object. The SList access is always
+// purely to an SLink, so when using the access layer it will only
+// retrieve an SLink's worth of data. The SList template will then
+// do some address arithmetic to determine the start of the real
+// object and cast the resulting pointer to the final object type.
+// When using the access layer this results in a new ?PTR being
+// created and used, so a new instance will result. The internal
+// SLink instance will have no relation to the new object instance
+// even though in target address terms one is embedded in the other.
+// The assumption of data stability means that this won't cause
+// a problem, but care must be taken with the address arithmetic,
+// as laid out in rules #2 and #3.
+//
+// 4. Global address references cannot be used. Any reference to a
+// global piece of code or data, such as a function address, global
+// variable or class static variable, must be changed.
+//
+// The external access code may load at a different base address than
+// the target process code. Global addresses are therefore not
+// meaningful and must be replaced with something else. There isn't
+// a single solution, so replacements must be done on a case-by-case
+// basis.
+//
+// The simplest case is a global or class static variable. All
+// declarations must be replaced with a special declaration that
+// compiles into a modified accessor template value when compiled for
+// external data access. Uses of the variable automatically are fixed
+// up by the template instance. Note that assignment to the global
+// must be independently ifdef'ed as the external access layer should
+// not make any modifications.
+//
+// Macros allow for simple declaration of a class static and global
+// values that compile into an appropriate templated value.
+//
+// Previous Code:
+//
+// static RangeSection* m_RangeTree;
+// RangeSection* ExecutionManager::m_RangeTree;
+//
+// extern ThreadStore* g_pThreadStore;
+// ThreadStore* g_pThreadStore = &StaticStore;
+// class SystemDomain : public BaseDomain {
+// ...
+// ArrayListStatic m_appDomainIndexList;
+// ...
+// }
+//
+// SystemDomain::m_appDomainIndexList;
+//
+// extern DWORD gThreadTLSIndex;
+//
+// DWORD gThreadTLSIndex = TLS_OUT_OF_INDEXES;
+//
+// Modified Code:
+//
+// typedef DPTR(RangeSection) PTR_RangeSection;
+// SPTR_DECL(RangeSection, m_RangeTree);
+// SPTR_IMPL(RangeSection, ExecutionManager, m_RangeTree);
+//
+// typedef DPTR(ThreadStore) PTR_ThreadStore
+// GPTR_DECL(ThreadStore, g_pThreadStore);
+// GPTR_IMPL_INIT(ThreadStore, g_pThreadStore, &StaticStore);
+//
+// class SystemDomain : public BaseDomain {
+// ...
+// SVAL_DECL(ArrayListStatic; m_appDomainIndexList);
+// ...
+// }
+//
+// SVAL_IMPL(ArrayListStatic, SystemDomain, m_appDomainIndexList);
+//
+// GVAL_DECL(DWORD, gThreadTLSIndex);
+//
+// GVAL_IMPL_INIT(DWORD, gThreadTLSIndex, TLS_OUT_OF_INDEXES);
+//
+// When declaring the variable, the first argument declares the
+// variable's type and the second argument declares the variable's
+// name. When defining the variable the arguments are similar, with
+// an extra class name parameter for the static class variable case.
+// If an initializer is needed the IMPL_INIT macro should be used.
+//
+// Things get slightly more complicated when declaring an embedded
+// array. In this case the data element is not a single element and
+// therefore cannot be represented by a ?PTR. In the case of a global
+// array, you should use the GARY_DECL and GARY_IMPL macros.
+// We durrently have no support for declaring static array data members
+// or initialized arrays. Array data members that are dynamically allocated
+// need to be treated as pointer members. To reference individual elements
+// you must use pointer arithmetic (see rule 2 above). An array declared
+// as a local variable within a function does not need to be DACized.
+//
+//
+// All uses of ?VAL_DECL must have a corresponding entry given in the
+// DacGlobals structure in src\inc\dacvars.h. For SVAL_DECL the entry
+// is class__name. For GVAL_DECL the entry is dac__name. You must add
+// these entries in dacvars.h using the DEFINE_DACVAR macro. Note that
+// these entries also are used for dumping memory in mini dumps and
+// heap dumps. If it's not appropriate to dump a variable, (e.g.,
+// it's an array or some other value that is not important to have
+// in a minidump) a second macro, DEFINE_DACVAR_NO_DUMP, will allow
+// you to make the required entry in the DacGlobals structure without
+// dumping its value. If the variable is implemented with one of the VOLATILE_* macros
+// then the DEFINE_DACVAR_VOLATILE macro must be used.
+//
+// For convenience, here is a list of the various variable declaration and
+// initialization macros:
+// SVAL_DECL(type, name) static non-pointer data class MyClass
+// member declared within {
+// the class declaration // static int i;
+// SVAL_DECL(int, i);
+// }
+//
+// SVAL_IMPL(type, cls, name) static non-pointer data // int MyClass::i;
+// member defined outside SVAL_IMPL(int, MyClass, i);
+// the class declaration
+//
+// SVAL_IMPL_INIT(type, cls, static non-pointer data // int MyClass::i = 0;
+// name, val) member defined and SVAL_IMPL_INIT(int, MyClass, i, 0);
+// initialized outside the
+// class declaration
+// ------------------------------------------------------------------------------------------------
+// VOLATILE_SVAL_DECL(type, name) static volatile class MyClass
+// non-pointer data {
+// member declared // static Volatile<int> i;
+// within the class VOLATILE_SVAL_DECL(int, i);
+// declaration }
+//
+// VOLATILE_SVAL_IMPL(type, cls, static volatile
+// name) non-pointer data // Volatile<int> MyClass::i;
+// member defined VOLATILE_SVAL_IMPL(int, MyClass, i);
+// outside the
+// class declaration
+//
+// VOLATILE_SVAL_IMPL_INIT( static volatile
+// type, cls, name) non-pointer data // Volatile<int> MyClass::i = 0;
+// member defined VOLATILE_SVAL_IMPL_INIT(int, MyClass, i, 0);
+// and initialized
+// outside the
+// class declaration
+// ------------------------------------------------------------------------------------------------
+// SPTR_DECL(type, name) static pointer data class MyClass
+// member declared within {
+// the class declaration // static int * pInt;
+// SPTR_DECL(int, pInt);
+// }
+//
+// SPTR_IMPL(type, cls, name) static pointer data // int * MyClass::pInt;
+// member defined outside SPTR_IMPL(int, MyClass, pInt);
+// the class declaration
+//
+// SPTR_IMPL_INIT(type, cls, static pointer data // int * MyClass::pInt = NULL;
+// name, val) member defined and SPTR_IMPL_INIT(int, MyClass, pInt, NULL);
+// initialized outside the
+// class declaration
+// ------------------------------------------------------------------------------------------------
+// VOLATILE_SPTR_DECL(type, name) static volatile class MyClass
+// pointer data {
+// member declared // static Volatile<int*> i;
+// within the class VOLATILE_SPTR_DECL(int, i);
+// declaration }
+//
+// VOLATILE_SPTR_IMPL(type, cls, static volatile
+// name) pointer data // Volatile<int*> MyClass::i;
+// member defined VOLATILE_SPTR_IMPL(int, MyClass, i);
+// outside the
+// class declaration
+//
+// VOLATILE_SPTR_IMPL_INIT( static volatile
+// type, cls, name) pointer data // Volatile<int*> MyClass::i = 0;
+// member defined VOLATILE_SPTR_IMPL_INIT(int, MyClass, i, 0);
+// and initialized
+// outside the
+// class declaration
+// ------------------------------------------------------------------------------------------------
+// GVAL_DECL(type, name) extern declaration of // extern int g_i
+// global non-pointer GVAL_DECL(int, g_i);
+// variable
+//
+// GVAL_IMPL(type, name) declaration of a // int g_i
+// global non-pointer GVAL_IMPL(int, g_i);
+// variable
+//
+// GVAL_IMPL_INIT (type, declaration and // int g_i = 0;
+// name, initialization of a GVAL_IMPL_INIT(int, g_i, 0);
+// val) global non-pointer
+// variable
+// ****Note****
+// If you use GVAL_? to declare a global variable of a structured type and you need to
+// access a member of the type, you cannot use the dot operator. Instead, you must take the
+// address of the variable and use the arrow operator. For example:
+// struct
+// {
+// int x;
+// char ch;
+// } MyStruct;
+// GVAL_IMPL(MyStruct, g_myStruct);
+// int i = (&g_myStruct)->x;
+// ------------------------------------------------------------------------------------------------
+// GPTR_DECL(type, name) extern declaration of // extern int * g_pInt
+// global pointer GPTR_DECL(int, g_pInt);
+// variable
+//
+// GPTR_IMPL(type, name) declaration of a // int * g_pInt
+// global pointer GPTR_IMPL(int, g_pInt);
+// variable
+//
+// GPTR_IMPL_INIT (type, declaration and // int * g_pInt = 0;
+// name, initialization of a GPTR_IMPL_INIT(int, g_pInt, NULL);
+// val) global pointer
+// variable
+// ------------------------------------------------------------------------------------------------
+// GARY_DECL(type, name) extern declaration of // extern int g_rgIntList[MAX_ELEMENTS];
+// a global array GPTR_DECL(int, g_rgIntList, MAX_ELEMENTS);
+// variable
+//
+// GARY_IMPL(type, name) declaration of a // int g_rgIntList[MAX_ELEMENTS];
+// global pointer GPTR_IMPL(int, g_rgIntList, MAX_ELEMENTS);
+// variable
+//
+//
+// Certain pieces of code, such as the stack walker, rely on identifying
+// an object from its vtable address. As the target vtable addresses
+// do not necessarily correspond to the vtables used in the host, these
+// references must be translated. The access layer maintains translation
+// tables for all classes used with VPTR and can return the target
+// vtable pointer for any host vtable in the known list of VPTR classes.
+//
+// ----- Errors:
+//
+// All errors in the access layer are reported via exceptions. The
+// formal access layer methods catch all such exceptions and turn
+// them into the appropriate error, so this generally isn't visible
+// to users of the access layer.
+//
+// ----- DPTR Declaration:
+//
+// Create a typedef for the type with typedef DPTR(type) PTR_type;
+// Replace type* with PTR_type.
+//
+// ----- VPTR Declaration:
+//
+// VPTR can only be used on classes that have a single vtable
+// pointer at the beginning of the object. This should be true
+// for a normal single-inheritance object.
+//
+// All of the classes that may be instantiated need to be identified
+// and marked. In the base class declaration add either
+// VPTR_BASE_VTABLE_CLASS if the class is abstract or
+// VPTR_BASE_CONCRETE_VTABLE_CLASS if the class is concrete. In each
+// derived class add VPTR_VTABLE_CLASS. If you end up with compile or
+// link errors for an unresolved method called VPtrSize you missed a
+// derived class declaration.
+//
+//
+// All classes to be instantiated must be listed in src\inc\vptr_list.h.
+//
+// Create a typedef for the type with typedef VPTR(type) PTR_type;
+// When using a VPTR, replace Class* with PTR_Class.
+//
+// ----- Specific Macros:
+//
+// PTR_TO_TADDR(ptr)
+// Retrieves the raw target address for a ?PTR.
+// See code:dac_cast for the preferred alternative
+//
+// PTR_HOST_TO_TADDR(host)
+// Given a host address of an instance produced by a ?PTR reference,
+// return the original target address. The host address must
+// be an exact match for an instance.
+// See code:dac_cast for the preferred alternative
+//
+// PTR_HOST_INT_TO_TADDR(host)
+// Given a host address which resides somewhere within an instance
+// produced by a ?PTR reference (a host interior pointer) return the
+// corresponding target address. This is useful for evaluating
+// relative pointers (e.g. RelativePointer<T>) where calculating the
+// target address requires knowledge of the target address of the
+// relative pointer field itself. This lookup is slower than that for
+// a non-interior host pointer so use it sparingly.
+//
+// VPTR_HOST_VTABLE_TO_TADDR(host)
+// Given the host vtable pointer for a known VPTR class, return
+// the target vtable pointer.
+//
+// PTR_HOST_MEMBER_TADDR(type, host, memb)
+// Retrieves the target address of a host instance pointer and
+// offsets it by the given member's offset within the type.
+//
+// PTR_HOST_INT_MEMBER_TADDR(type, host, memb)
+// As above but will work for interior host pointers (see the
+// description of PTR_HOST_INT_TO_TADDR for an explanation of host
+// interior pointers).
+//
+// PTR_READ(addr, size)
+// Reads a block of memory from the target and returns a host
+// pointer for it. Useful for reading blocks of data from the target
+// whose size is only known at runtime, such as raw code for a jitted
+// method. If the data being read is actually an object, use SPTR
+// instead to get better type semantics.
+//
+// DAC_EMPTY()
+// DAC_EMPTY_ERR()
+// DAC_EMPTY_RET(retVal)
+// DAC_UNEXPECTED()
+// Provides an empty method implementation when compiled
+// for DACCESS_COMPILE. For example, use to stub out methods needed
+// for vtable entries but otherwise unused.
+//
+// These macros are designed to turn into normal code when compiled
+// without DACCESS_COMPILE.
+//
+//*****************************************************************************
+
#ifndef __daccess_h__
#define __daccess_h__
+#ifndef NATIVEAOT
#include <stdint.h>
+#if !defined(HOST_WINDOWS)
+#include <pal_mstypes.h>
+#endif
+
#include "switches.h"
#include "safemath.h"
#include "corerror.h"
-#ifdef PAL_STDCPP_COMPAT
+// Keep in sync with the definitions in dbgutil.cpp and createdump.h
+#define DACCESS_TABLE_SYMBOL "g_dacTable"
+
#include <type_traits>
-#else
-#include "clr_std/type_traits"
#include "crosscomp.h"
-#endif
+
+#include <dn-u16.h>
+
+// Information stored in the DAC table of interest to the DAC implementation
+// Note that this information is shared between all instantiations of ClrDataAccess, so initialize
+// it just once in code:ClrDataAccess.GetDacGlobals (rather than use fields in ClrDataAccess);
+struct DacTableInfo
+{
+ // On Windows, the first DWORD is the 32-bit timestamp read out of the runtime dll's debug directory.
+ // The remaining 3 DWORDS must all be 0.
+ // On Mac, this is the 16-byte UUID of the runtime dll.
+ // It is used to validate that mscorwks is the same version as mscordacwks
+ DWORD dwID0;
+ DWORD dwID1;
+ DWORD dwID2;
+ DWORD dwID3;
+};
+
+// The header of the DAC table. This includes the number of globals, the number of vptrs, and
+// the DacTableInfo structure. We need the DacTableInfo and DacTableHeader structs outside
+// of a DACCESS_COMPILE since soshost walks the Dac table headers to find the UUID of CoreCLR
+// in the target process.
+struct DacTableHeader
+{
+ ULONG numGlobals;
+ ULONG numVptrs;
+ DacTableInfo info;
+};
//
// This version of things wraps pointer access in
// Define TADDR as a non-pointer value so use of it as a pointer
// will not work properly. Define it as unsigned so
// pointer comparisons aren't affected by sign.
-// This requires special casting to ULONG64 to sign-extend if necessary.
-typedef ULONG_PTR TADDR;
+typedef uintptr_t TADDR;
-// TSIZE_T used for counts or ranges that need to span the size of a
+// TSIZE_T used for counts or ranges that need to span the size of a
// target pointer. For cross-plat, this may be different than SIZE_T
// which reflects the host pointer size.
typedef SIZE_T TSIZE_T;
-#define VPTR_CLASS_METHODS(name)
+#endif // !NATIVEAOT
+
// Used for base classes that can be instantiated directly.
// The fake vfn is still used to force a vtable even when
// all the normal vfns are ifdef'ed out.
-#define VPTR_BASE_CONCRETE_VTABLE_CLASS(name) \
-public: name(TADDR addr, TADDR vtAddr) {} \
- VPTR_CLASS_METHODS(name)
+#define VPTR_BASE_CONCRETE_VTABLE_CLASS(name)
//
// This version of the macros turns into normal pointers
// Declare TADDR as a non-pointer type so that arithmetic
// can be done on it directly, as with the DACCESS_COMPILE definition.
// This also helps expose pointer usage that may need to be changed.
-typedef ULONG_PTR TADDR;
+typedef uintptr_t TADDR;
typedef void* PTR_VOID;
typedef LPVOID* PTR_PTR_VOID;
static store_type var
#define _SPTR_IMPL(acc_type, store_type, cls, var) \
store_type cls::var
-
#define GVAL_DECL(type, var) \
extern type var
#define GVAL_IMPL(type, var) \
// TADDR <- ?PTR(Src) - Get TADDR of PTR object (DPtr etc.)
// TADDR <- Src * - Get TADDR of dac host object instance
//
-// Note that there is no direct convertion to other host-pointer types (because we don't
+// Note that there is no direct conversion to other host-pointer types (because we don't
// know if you want a DPTR or VPTR etc.). However, due to the implicit DAC conversions,
// you can just use dac_cast<PTR_Foo> and assign that to a Foo*.
//
// dac_cast<PTR_AppDomain>(pBD)
// dac_cast<PTR_BaseDomain>(pAD)
//
-// Example comparsions of some old and new syntax, where
+// Example comparisons of some old and new syntax, where
// h is a host pointer, such as "Foo *h;"
// p is a DPTR, such as "PTR_Foo p;"
//
//
//----------------------------------------------------------------------------
-typedef ArrayDPTR(BYTE) PTR_BYTE;
+typedef DPTR(size_t) PTR_size_t;
typedef ArrayDPTR(uint8_t) PTR_uint8_t;
+typedef DPTR(PTR_uint8_t) PTR_PTR_uint8_t;
+typedef DPTR(int32_t) PTR_int32_t;
+typedef DPTR(uint32_t) PTR_uint32_t;
+typedef DPTR(uint64_t) PTR_uint64_t;
+typedef DPTR(uintptr_t) PTR_uintptr_t;
+typedef DPTR(TADDR) PTR_TADDR;
+
+#ifndef NATIVEAOT
+typedef ArrayDPTR(BYTE) PTR_BYTE;
typedef DPTR(PTR_BYTE) PTR_PTR_BYTE;
-typedef DPTR(PTR_uint8_t) PTR_PTR_uint8_t;
typedef DPTR(PTR_PTR_BYTE) PTR_PTR_PTR_BYTE;
typedef ArrayDPTR(signed char) PTR_SBYTE;
typedef ArrayDPTR(const BYTE) PTR_CBYTE;
typedef DPTR(WORD) PTR_WORD;
typedef DPTR(USHORT) PTR_USHORT;
typedef DPTR(DWORD) PTR_DWORD;
-typedef DPTR(uint32_t) PTR_uint32_t;
typedef DPTR(LONG) PTR_LONG;
typedef DPTR(ULONG) PTR_ULONG;
typedef DPTR(INT32) PTR_INT32;
typedef DPTR(INT64) PTR_INT64;
typedef DPTR(UINT64) PTR_UINT64;
typedef DPTR(SIZE_T) PTR_SIZE_T;
-typedef DPTR(size_t) PTR_size_t;
-typedef DPTR(TADDR) PTR_TADDR;
typedef DPTR(int) PTR_int;
typedef DPTR(BOOL) PTR_BOOL;
typedef DPTR(unsigned) PTR_unsigned;
typedef DPTR(IMAGE_SECTION_HEADER) PTR_IMAGE_SECTION_HEADER;
typedef DPTR(IMAGE_EXPORT_DIRECTORY) PTR_IMAGE_EXPORT_DIRECTORY;
typedef DPTR(IMAGE_TLS_DIRECTORY) PTR_IMAGE_TLS_DIRECTORY;
+#endif
//----------------------------------------------------------------------------
//
typedef TADDR PCODE;
typedef DPTR(PCODE) PTR_PCODE;
typedef DPTR(PTR_PCODE) PTR_PTR_PCODE;
-
-// TARGET_CONSISTENCY_CHECK represents a condition that should not fail unless the DAC target is corrupt.
-// This is in contrast to ASSERTs in DAC infrastructure code which shouldn't fail regardless of the memory
-// read from the target. At the moment we treat these the same, but in the future we will want a mechanism
-// for disabling just the target consistency checks (eg. for tests that intentionally use corrupted targets).
-// @dbgtodo : Separating asserts and target consistency checks is tracked by DevDiv Bugs 31674
-#define TARGET_CONSISTENCY_CHECK(expr,msg) _ASSERTE_MSG(expr,msg)
-
// For cross compilation, controlling type layout is important
// We add a simple macro here which defines DAC_ALIGNAS to the C++11 alignas operator
// This helps force the alignment of the next member
// The Windows compilers will align the first member to the alignment size of the
// class. Linux will align the first member to its natural alignment
#define DAC_ALIGNAS(a) alignas(a)
+
#endif // #ifndef __daccess_h__
struct MSLAYOUT DacpModuleData
{
CLRDATA_ADDRESS Address = 0;
- CLRDATA_ADDRESS PEAssembly = 0; // A PEAssembly addr
+ CLRDATA_ADDRESS PEAssembly = 0; // Actually the module address in .NET 9+
CLRDATA_ADDRESS ilBase = 0;
CLRDATA_ADDRESS metadataStart = 0;
ULONG64 metadataSize = 0;
CLRDATA_ADDRESS FileReferencesMap = 0;
CLRDATA_ADDRESS ManifestModuleReferencesMap = 0;
- CLRDATA_ADDRESS pLookupTableHeap = 0;
- CLRDATA_ADDRESS pThunkHeap = 0;
+ CLRDATA_ADDRESS LoaderAllocator = 0;
+ CLRDATA_ADDRESS ThunkHeap = 0;
ULONG64 dwModuleIndex = 0;
{
BOOL bIsFree = FALSE; // everything else is NULL if this is true.
CLRDATA_ADDRESS Module = 0;
+ // Note: DacpMethodTableData::Class is really a pointer to the canonical method table
CLRDATA_ADDRESS Class = 0;
CLRDATA_ADDRESS ParentMethodTable = 0;
WORD wNumInterfaces = 0;
WORD wNumMethods = 0;
+ // Note: Always 0, since .NET 9
WORD wNumVtableSlots = 0;
+ // Note: Always 0, since .NET 9
WORD wNumVirtuals = 0;
DWORD BaseSize = 0;
DWORD ComponentSize = 0;
OptimizationTier_ReadyToRun,
OptimizationTier_OptimizedTier1OSR,
OptimizationTier_QuickJittedInstrumented,
- OptimizationTier_OptimizedTier1Instrumented
+ OptimizationTier_OptimizedTier1Instrumented,
};
CLRDATA_ADDRESS NativeCodeAddr;
CLRDATA_ADDRESS NativeCodeVersionNodePtr;
};
-// 2.x version
-struct MSLAYOUT DacpTieredVersionData_2x
-{
- enum TieredState
- {
- NON_TIERED,
- TIERED_0,
- TIERED_1,
- TIERED_UNKNOWN
- };
-
- CLRDATA_ADDRESS NativeCodeAddr;
- TieredState TieredInfo;
- CLRDATA_ADDRESS NativeCodeVersionNodePtr;
-};
-
// for JITType
enum JITTypes {TYPE_UNKNOWN=0,TYPE_JIT,TYPE_PJIT};
struct MSLAYOUT DacpGcHeapDetails
{
- CLRDATA_ADDRESS heapAddr = 0; // Only filled in in server mode, otherwise NULL
+ CLRDATA_ADDRESS heapAddr = 0; // Only filled in server mode, otherwise NULL
CLRDATA_ADDRESS alloc_allocated = 0;
CLRDATA_ADDRESS mark_array = 0;
CLRDATA_ADDRESS mem = 0;
// pass this to request if non-null to get the next segments.
CLRDATA_ADDRESS next = 0;
- CLRDATA_ADDRESS gc_heap = 0; // only filled in in server mode, otherwise NULL
+ CLRDATA_ADDRESS gc_heap = 0; // only filled in server mode, otherwise NULL
// computed field: if this is the ephemeral segment highMark includes the ephemeral generation
CLRDATA_ADDRESS highAllocMark = 0;
struct MSLAYOUT DacpGcHeapAnalyzeData
{
- CLRDATA_ADDRESS heapAddr = 0; // Only filled in in server mode, otherwise NULL
+ CLRDATA_ADDRESS heapAddr = 0; // Only filled in server mode, otherwise NULL
CLRDATA_ADDRESS internal_root_array = 0;
ULONG64 internal_root_array_index = 0;
BOOL IsDynamic = FALSE;
BOOL IsInMemory = FALSE;
BOOL IsFileLayout = FALSE;
- CLRDATA_ADDRESS PEAssembly = 0;
+ CLRDATA_ADDRESS PEAssembly = 0; // Actually the module address in .NET 9+
CLRDATA_ADDRESS LoadedPEAddress = 0;
ULONG64 LoadedPESize = 0;
CLRDATA_ADDRESS InMemoryPdbAddress = 0;
//
// DbgEngineMetrics.h
//
-// This file contains the defintion of CLR_ENGINE_METRICS. This struct is used for Silverlight debugging.
+// This file contains the definition of CLR_ENGINE_METRICS. This struct is used for Silverlight debugging.
//
// ======================================================================================
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#ifndef __DBG_TARGET_CONTEXT_INCLUDED
-#define __DBG_TARGET_CONTEXT_INCLUDED
-
-#include <dbgportable.h>
-#include <stddef.h>
-#include "crosscomp.h"
-
-//
-// The right side of the debugger can be built to target multiple platforms. This means it is not
-// safe to use the CONTEXT structure directly: the context of the platform we're building for might not match
-// that of the one the debugger is targetting. So all right side code will use the DT_CONTEXT abstraction
-// instead. When the debugger target is the local platform this will just resolve back into CONTEXT, but cross
-// platform we'll provide a hand-rolled version.
-//
-
-//
-// For cross platform cases we also need to provide a helper function for byte-swapping a context structure
-// should the endian-ness of the debugger and debuggee platforms differ. This is called ByteSwapContext and is
-// obviously a no-op for those cases where the left and right sides agree on storage format.
-//
-// NOTE: Any changes to the field layout of DT_CONTEXT must be tracked in the associated definition of
-// ByteSwapContext.
-//
-
-//
-// **** NOTE: Keep these in sync with pal/inc/pal.h ****
-//
-
-// This odd define pattern is needed because in DBI we set _TARGET_ to match the host and
-// DBG_TARGET to control our targeting. In x-plat DBI DBG_TARGET won't match _TARGET_ and
-// DBG_TARGET needs to take precedence
-#if defined(DBG_TARGET_X86)
-#define DTCONTEXT_IS_X86
-#elif defined (DBG_TARGET_AMD64)
-#define DTCONTEXT_IS_AMD64
-#elif defined (DBG_TARGET_ARM)
-#define DTCONTEXT_IS_ARM
-#elif defined (DBG_TARGET_ARM64)
-#define DTCONTEXT_IS_ARM64
-#elif defined (TARGET_X86)
-#define DTCONTEXT_IS_X86
-#elif defined (TARGET_AMD64)
-#define DTCONTEXT_IS_AMD64
-#elif defined (TARGET_ARM)
-#define DTCONTEXT_IS_ARM
-#elif defined (TARGET_ARM64)
-#define DTCONTEXT_IS_ARM64
-#elif defined (TARGET_LOONGARCH64)
-#define DTCONTEXT_IS_LOONGARCH64
-#elif defined (TARGET_RISCV64)
-#define DTCONTEXT_IS_RISCV64
-#endif
-
-#if defined(DTCONTEXT_IS_X86)
-
-#define DT_SIZE_OF_80387_REGISTERS 80
-
-#define DT_CONTEXT_i386 0x00010000
-#define DT_CONTEXT_CONTROL (DT_CONTEXT_i386 | 0x00000001L) // SS:SP, CS:IP, FLAGS, BP
-#define DT_CONTEXT_INTEGER (DT_CONTEXT_i386 | 0x00000002L) // AX, BX, CX, DX, SI, DI
-#define DT_CONTEXT_SEGMENTS (DT_CONTEXT_i386 | 0x00000004L)
-#define DT_CONTEXT_FLOATING_POINT (DT_CONTEXT_i386 | 0x00000008L) // 387 state
-#define DT_CONTEXT_DEBUG_REGISTERS (DT_CONTEXT_i386 | 0x00000010L)
-#define DT_CONTEXT_EXTENDED_REGISTERS (DT_CONTEXT_i386 | 0x00000020L)
-
-#define DT_CONTEXT_FULL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_SEGMENTS)
-#define DT_CONTEXT_ALL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_SEGMENTS | DT_CONTEXT_FLOATING_POINT | DT_CONTEXT_DEBUG_REGISTERS | DT_CONTEXT_EXTENDED_REGISTERS)
-
-#define DT_MAXIMUM_SUPPORTED_EXTENSION 512
-
-typedef struct {
- DWORD ControlWord;
- DWORD StatusWord;
- DWORD TagWord;
- DWORD ErrorOffset;
- DWORD ErrorSelector;
- DWORD DataOffset;
- DWORD DataSelector;
- BYTE RegisterArea[DT_SIZE_OF_80387_REGISTERS];
- DWORD Cr0NpxState;
-} DT_FLOATING_SAVE_AREA;
-
-typedef struct {
- ULONG ContextFlags;
-
- ULONG Dr0;
- ULONG Dr1;
- ULONG Dr2;
- ULONG Dr3;
- ULONG Dr6;
- ULONG Dr7;
-
- DT_FLOATING_SAVE_AREA FloatSave;
-
- ULONG SegGs;
- ULONG SegFs;
- ULONG SegEs;
- ULONG SegDs;
-
- ULONG Edi;
- ULONG Esi;
- ULONG Ebx;
- ULONG Edx;
- ULONG Ecx;
- ULONG Eax;
-
- ULONG Ebp;
- ULONG Eip;
- ULONG SegCs;
- ULONG EFlags;
- ULONG Esp;
- ULONG SegSs;
-
- UCHAR ExtendedRegisters[DT_MAXIMUM_SUPPORTED_EXTENSION];
-
-} DT_CONTEXT;
-
-// Since the target is little endian in this case we only have to provide a real implementation of
-// ByteSwapContext if the platform we're building on is big-endian.
-#ifdef BIGENDIAN
-inline void ByteSwapContext(DT_CONTEXT *pContext)
-{
- // Our job is simplified since the context has large contiguous ranges with fields of the same size. Keep
- // the following logic in sync with the definition of DT_CONTEXT above.
- BYTE *pbContext = (BYTE*)pContext;
-
- // The first span consists of 4 byte fields.
- DWORD cbFields = (offsetof(DT_CONTEXT, FloatSave) + offsetof(DT_FLOATING_SAVE_AREA, RegisterArea)) / 4;
- for (DWORD i = 0; i < cbFields; i++)
- {
- ByteSwapPrimitive(pbContext, pbContext, 4);
- pbContext += 4;
- }
-
- // Then there's a float save area containing 8 byte fields.
- cbFields = sizeof(pContext->FloatSave.RegisterArea);
- for (DWORD i = 0; i < cbFields; i++)
- {
- ByteSwapPrimitive(pbContext, pbContext, 8);
- pbContext += 8;
- }
-
- // Back to 4 byte fields.
- cbFields = (offsetof(DT_CONTEXT, ExtendedRegisters) - offsetof(DT_CONTEXT, SegGs)) / 4;
- for (DWORD i = 0; i < cbFields; i++)
- {
- ByteSwapPrimitive(pbContext, pbContext, 4);
- pbContext += 4;
- }
-
- // We don't know the formatting of the extended register area, but the debugger doesn't access this data
- // on the left side, so just leave it in left-side format for now.
-
- // Validate that we converted up to where we think we did as a hedge against DT_CONTEXT layout changes.
- _PASSERT((pbContext - ((BYTE*)pContext)) == (sizeof(DT_CONTEXT) - sizeof(pContext->ExtendedRegisters)));
-}
-#else // BIGENDIAN
-inline void ByteSwapContext(DT_CONTEXT *pContext)
-{
-}
-#endif // BIGENDIAN
-
-#elif defined(DTCONTEXT_IS_AMD64)
-
-#define DT_CONTEXT_AMD64 0x00100000L
-
-#define DT_CONTEXT_CONTROL (DT_CONTEXT_AMD64 | 0x00000001L)
-#define DT_CONTEXT_INTEGER (DT_CONTEXT_AMD64 | 0x00000002L)
-#define DT_CONTEXT_SEGMENTS (DT_CONTEXT_AMD64 | 0x00000004L)
-#define DT_CONTEXT_FLOATING_POINT (DT_CONTEXT_AMD64 | 0x00000008L)
-#define DT_CONTEXT_DEBUG_REGISTERS (DT_CONTEXT_AMD64 | 0x00000010L)
-
-#define DT_CONTEXT_FULL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT)
-#define DT_CONTEXT_ALL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_SEGMENTS | DT_CONTEXT_FLOATING_POINT | DT_CONTEXT_DEBUG_REGISTERS)
-
-typedef struct {
- ULONGLONG Low;
- LONGLONG High;
-} DT_M128A;
-
-typedef struct {
- WORD ControlWord;
- WORD StatusWord;
- BYTE TagWord;
- BYTE Reserved1;
- WORD ErrorOpcode;
- DWORD ErrorOffset;
- WORD ErrorSelector;
- WORD Reserved2;
- DWORD DataOffset;
- WORD DataSelector;
- WORD Reserved3;
- DWORD MxCsr;
- DWORD MxCsr_Mask;
- DT_M128A FloatRegisters[8];
- DT_M128A XmmRegisters[16];
- BYTE Reserved4[96];
-} DT_XMM_SAVE_AREA32;
-
-typedef struct DECLSPEC_ALIGN(16) {
-
- DWORD64 P1Home;
- DWORD64 P2Home;
- DWORD64 P3Home;
- DWORD64 P4Home;
- DWORD64 P5Home;
- DWORD64 P6Home;
-
- DWORD ContextFlags;
- DWORD MxCsr;
-
- WORD SegCs;
- WORD SegDs;
- WORD SegEs;
- WORD SegFs;
- WORD SegGs;
- WORD SegSs;
- DWORD EFlags;
-
- DWORD64 Dr0;
- DWORD64 Dr1;
- DWORD64 Dr2;
- DWORD64 Dr3;
- DWORD64 Dr6;
- DWORD64 Dr7;
-
- DWORD64 Rax;
- DWORD64 Rcx;
- DWORD64 Rdx;
- DWORD64 Rbx;
- DWORD64 Rsp;
- DWORD64 Rbp;
- DWORD64 Rsi;
- DWORD64 Rdi;
- DWORD64 R8;
- DWORD64 R9;
- DWORD64 R10;
- DWORD64 R11;
- DWORD64 R12;
- DWORD64 R13;
- DWORD64 R14;
- DWORD64 R15;
-
- DWORD64 Rip;
-
- union {
- DT_XMM_SAVE_AREA32 FltSave;
- struct {
- DT_M128A Header[2];
- DT_M128A Legacy[8];
- DT_M128A Xmm0;
- DT_M128A Xmm1;
- DT_M128A Xmm2;
- DT_M128A Xmm3;
- DT_M128A Xmm4;
- DT_M128A Xmm5;
- DT_M128A Xmm6;
- DT_M128A Xmm7;
- DT_M128A Xmm8;
- DT_M128A Xmm9;
- DT_M128A Xmm10;
- DT_M128A Xmm11;
- DT_M128A Xmm12;
- DT_M128A Xmm13;
- DT_M128A Xmm14;
- DT_M128A Xmm15;
- };
- };
-
- DT_M128A VectorRegister[26];
- DWORD64 VectorControl;
-
- DWORD64 DebugControl;
- DWORD64 LastBranchToRip;
- DWORD64 LastBranchFromRip;
- DWORD64 LastExceptionToRip;
- DWORD64 LastExceptionFromRip;
-} DT_CONTEXT;
-
-#elif defined(DTCONTEXT_IS_ARM)
-
-#define DT_CONTEXT_ARM 0x00200000L
-
-#define DT_CONTEXT_CONTROL (DT_CONTEXT_ARM | 0x1L)
-#define DT_CONTEXT_INTEGER (DT_CONTEXT_ARM | 0x2L)
-#define DT_CONTEXT_FLOATING_POINT (DT_CONTEXT_ARM | 0x4L)
-#define DT_CONTEXT_DEBUG_REGISTERS (DT_CONTEXT_ARM | 0x8L)
-
-#define DT_CONTEXT_FULL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT)
-#define DT_CONTEXT_ALL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT | DT_CONTEXT_DEBUG_REGISTERS)
-
-#define DT_ARM_MAX_BREAKPOINTS 8
-#define DT_ARM_MAX_WATCHPOINTS 1
-
-typedef struct {
- ULONGLONG Low;
- LONGLONG High;
-} DT_NEON128;
-
-typedef DECLSPEC_ALIGN(8) struct {
-
- //
- // Control flags.
- //
-
- DWORD ContextFlags;
-
- //
- // Integer registers
- //
-
- DWORD R0;
- DWORD R1;
- DWORD R2;
- DWORD R3;
- DWORD R4;
- DWORD R5;
- DWORD R6;
- DWORD R7;
- DWORD R8;
- DWORD R9;
- DWORD R10;
- DWORD R11;
- DWORD R12;
-
- //
- // Control Registers
- //
-
- DWORD Sp;
- DWORD Lr;
- DWORD Pc;
- DWORD Cpsr;
-
- //
- // Floating Point/NEON Registers
- //
-
- DWORD Fpscr;
- DWORD Padding;
- union {
- DT_NEON128 Q[16];
- ULONGLONG D[32];
- DWORD S[32];
- };
-
- //
- // Debug registers
- //
-
- DWORD Bvr[DT_ARM_MAX_BREAKPOINTS];
- DWORD Bcr[DT_ARM_MAX_BREAKPOINTS];
- DWORD Wvr[DT_ARM_MAX_WATCHPOINTS];
- DWORD Wcr[DT_ARM_MAX_WATCHPOINTS];
-
- DWORD Padding2[2];
-
-} DT_CONTEXT;
-
-#elif defined(DTCONTEXT_IS_ARM64)
-
-#define DT_CONTEXT_ARM64 0x00400000L
-
-#define DT_CONTEXT_CONTROL (DT_CONTEXT_ARM64 | 0x1L)
-#define DT_CONTEXT_INTEGER (DT_CONTEXT_ARM64 | 0x2L)
-#define DT_CONTEXT_FLOATING_POINT (DT_CONTEXT_ARM64 | 0x4L)
-#define DT_CONTEXT_DEBUG_REGISTERS (DT_CONTEXT_ARM64 | 0x8L)
-
-#define DT_CONTEXT_FULL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT)
-#define DT_CONTEXT_ALL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT | DT_CONTEXT_DEBUG_REGISTERS)
-
-#define DT_ARM64_MAX_BREAKPOINTS 8
-#define DT_ARM64_MAX_WATCHPOINTS 2
-
-typedef struct {
- ULONGLONG Low;
- LONGLONG High;
-} DT_NEON128;
-
-typedef DECLSPEC_ALIGN(16) struct {
- //
- // Control flags.
- //
-
- /* +0x000 */ DWORD ContextFlags;
-
- //
- // Integer registers
- //
-
- /* +0x004 */ DWORD Cpsr; // NZVF + DAIF + CurrentEL + SPSel
- /* +0x008 */ union {
- struct {
- DWORD64 X0;
- DWORD64 X1;
- DWORD64 X2;
- DWORD64 X3;
- DWORD64 X4;
- DWORD64 X5;
- DWORD64 X6;
- DWORD64 X7;
- DWORD64 X8;
- DWORD64 X9;
- DWORD64 X10;
- DWORD64 X11;
- DWORD64 X12;
- DWORD64 X13;
- DWORD64 X14;
- DWORD64 X15;
- DWORD64 X16;
- DWORD64 X17;
- DWORD64 X18;
- DWORD64 X19;
- DWORD64 X20;
- DWORD64 X21;
- DWORD64 X22;
- DWORD64 X23;
- DWORD64 X24;
- DWORD64 X25;
- DWORD64 X26;
- DWORD64 X27;
- DWORD64 X28;
- };
- DWORD64 X[29];
- };
- /* +0x0f0 */ DWORD64 Fp;
- /* +0x0f8 */ DWORD64 Lr;
- /* +0x100 */ DWORD64 Sp;
- /* +0x108 */ DWORD64 Pc;
-
- //
- // Floating Point/NEON Registers
- //
-
- /* +0x110 */ DT_NEON128 V[32];
- /* +0x310 */ DWORD Fpcr;
- /* +0x314 */ DWORD Fpsr;
-
- //
- // Debug registers
- //
-
- /* +0x318 */ DWORD Bcr[DT_ARM64_MAX_BREAKPOINTS];
- /* +0x338 */ DWORD64 Bvr[DT_ARM64_MAX_BREAKPOINTS];
- /* +0x378 */ DWORD Wcr[DT_ARM64_MAX_WATCHPOINTS];
- /* +0x380 */ DWORD64 Wvr[DT_ARM64_MAX_WATCHPOINTS];
- /* +0x390 */
-
-} DT_CONTEXT;
-
-#elif defined(DTCONTEXT_IS_LOONGARCH64)
-
-#define DT_CONTEXT_LOONGARCH64 0x00800000L
-
-#define DT_CONTEXT_CONTROL (DT_CONTEXT_LOONGARCH64 | 0x1L)
-#define DT_CONTEXT_INTEGER (DT_CONTEXT_LOONGARCH64 | 0x2L)
-#define DT_CONTEXT_FLOATING_POINT (DT_CONTEXT_LOONGARCH64 | 0x4L)
-#define DT_CONTEXT_DEBUG_REGISTERS (DT_CONTEXT_LOONGARCH64 | 0x8L)
-
-#define DT_CONTEXT_FULL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT)
-#define DT_CONTEXT_ALL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT | DT_CONTEXT_DEBUG_REGISTERS)
-
-#define DT_LOONGARCH64_MAX_BREAKPOINTS 8
-#define DT_LOONGARCH64_MAX_WATCHPOINTS 2
-
-typedef struct DECLSPEC_ALIGN(16) {
-
- //
- // Control flags.
- //
-
- /* +0x000 */ DWORD ContextFlags;
-
- //
- // Integer registers.
- //
- DWORD64 R0;
- DWORD64 Ra;
- DWORD64 Tp;
- DWORD64 Sp;
- DWORD64 A0;//DWORD64 V0;
- DWORD64 A1;//DWORD64 V1;
- DWORD64 A2;
- DWORD64 A3;
- DWORD64 A4;
- DWORD64 A5;
- DWORD64 A6;
- DWORD64 A7;
- DWORD64 T0;
- DWORD64 T1;
- DWORD64 T2;
- DWORD64 T3;
- DWORD64 T4;
- DWORD64 T5;
- DWORD64 T6;
- DWORD64 T7;
- DWORD64 T8;
- DWORD64 X0;
- DWORD64 Fp;
- DWORD64 S0;
- DWORD64 S1;
- DWORD64 S2;
- DWORD64 S3;
- DWORD64 S4;
- DWORD64 S5;
- DWORD64 S6;
- DWORD64 S7;
- DWORD64 S8;
- DWORD64 Pc;
-
- //
- // Floating Point Registers: FPR64/LSX/LASX.
- //
- ULONGLONG F[4*32];
- DWORD64 Fcc;
- DWORD Fcsr;
-} DT_CONTEXT;
-
-#elif defined(DTCONTEXT_IS_RISCV64)
-
-#define DT_CONTEXT_RISCV64 0x01000000L
-
-#define DT_CONTEXT_CONTROL (DT_CONTEXT_RISCV64 | 0x1L)
-#define DT_CONTEXT_INTEGER (DT_CONTEXT_RISCV64 | 0x2L)
-#define DT_CONTEXT_FLOATING_POINT (DT_CONTEXT_RISCV64 | 0x4L)
-#define DT_CONTEXT_DEBUG_REGISTERS (DT_CONTEXT_RISCV64 | 0x8L)
-
-#define DT_CONTEXT_FULL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT)
-#define DT_CONTEXT_ALL (DT_CONTEXT_CONTROL | DT_CONTEXT_INTEGER | DT_CONTEXT_FLOATING_POINT | DT_CONTEXT_DEBUG_REGISTERS)
-
-#define DT_RISCV64_MAX_BREAKPOINTS 8
-#define DT_RISCV64_MAX_WATCHPOINTS 2
-
-typedef struct DECLSPEC_ALIGN(16) {
- //
- // Control flags.
- //
-
- /* +0x000 */ DWORD ContextFlags;
-
- //
- // Integer registers
- //
- DWORD64 R0;
- DWORD64 Ra;
- DWORD64 Sp;
- DWORD64 Gp;
- DWORD64 Tp;
- DWORD64 T0;
- DWORD64 T1;
- DWORD64 T2;
- DWORD64 Fp;
- DWORD64 S1;
- DWORD64 A0;
- DWORD64 A1;
- DWORD64 A2;
- DWORD64 A3;
- DWORD64 A4;
- DWORD64 A5;
- DWORD64 A6;
- DWORD64 A7;
- DWORD64 S2;
- DWORD64 S3;
- DWORD64 S4;
- DWORD64 S5;
- DWORD64 S6;
- DWORD64 S7;
- DWORD64 S8;
- DWORD64 S9;
- DWORD64 S10;
- DWORD64 S11;
- DWORD64 T3;
- DWORD64 T4;
- DWORD64 T5;
- DWORD64 T6;
- DWORD64 Pc;
-
- //
- // Floating Point Registers
- //
- ULONGLONG F[32];
- DWORD Fcsr;
-} DT_CONTEXT;
-
-static_assert(sizeof(DT_CONTEXT) == sizeof(T_CONTEXT), "DT_CONTEXT size must equal the T_CONTEXT size");
-
-#else
-#error Unsupported platform
-#endif
-
-
-#endif // __DBG_TARGET_CONTEXT_INCLUDED
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//*****************************************************************************
-// dbgutil.h
-//
-
-//
-//*****************************************************************************
-
-#pragma once
-#include <cor.h>
-#include <cordebug.h>
-#include <metahost.h>
-
-//
-// Various common helpers used by multiple debug components.
-//
-
-// Returns the RVA of the resource section for the module specified by the given data target and module base.
-// Returns failure if the module doesn't have a resource section.
-//
-// Arguments
-// pDataTarget - dataTarget for the process we are inspecting
-// moduleBaseAddress - base address of a module we should inspect
-// pwImageFileMachine - updated with the Machine from the IMAGE_FILE_HEADER
-// pdwResourceSectionRVA - updated with the resultant RVA on success
-HRESULT GetMachineAndResourceSectionRVA(ICorDebugDataTarget* pDataTarget,
- ULONG64 moduleBaseAddress,
- WORD* pwImageFileMachine,
- DWORD* pdwResourceSectionRVA);
-
-HRESULT GetResourceRvaFromResourceSectionRva(ICorDebugDataTarget* pDataTarget,
- ULONG64 moduleBaseAddress,
- DWORD resourceSectionRva,
- DWORD type,
- DWORD name,
- DWORD language,
- DWORD* pResourceRva,
- DWORD* pResourceSize);
-
-HRESULT GetResourceRvaFromResourceSectionRvaByName(ICorDebugDataTarget* pDataTarget,
- ULONG64 moduleBaseAddress,
- DWORD resourceSectionRva,
- DWORD type,
- LPCWSTR pwszName,
- DWORD language,
- DWORD* pResourceRva,
- DWORD* pResourceSize);
-
-// Traverses down one level in the PE resource tree structure
-//
-// Arguments:
-// pDataTarget - the data target for inspecting this process
-// id - the id of the next node in the resource tree you want
-// moduleBaseAddress - the base address of the module being inspected
-// resourceDirectoryRVA - the base address of the beginning of the resource directory for this
-// level of the tree
-// pNextLevelRVA - out - The RVA for the next level tree directory or the RVA of the resource entry
-//
-// Returns:
-// S_OK if succesful or an appropriate failing HRESULT
-HRESULT GetNextLevelResourceEntryRVA(ICorDebugDataTarget* pDataTarget,
- DWORD id,
- ULONG64 moduleBaseAddress,
- DWORD resourceDirectoryRVA,
- DWORD* pNextLevelRVA);
-
-// Traverses down one level in the PE resource tree structure
-//
-// Arguments:
-// pDataTarget - the data target for inspecting this process
-// name - the name of the next node in the resource tree you want
-// moduleBaseAddress - the base address of the module being inspected
-// resourceDirectoryRVA - the base address of the beginning of the resource directory for this
-// level of the tree
-// resourceSectionRVA - the rva of the beginning of the resource section of the PE file
-// pNextLevelRVA - out - The RVA for the next level tree directory or the RVA of the resource entry
-//
-// Returns:
-// S_OK if succesful or an appropriate failing HRESULT
-HRESULT GetNextLevelResourceEntryRVAByName(ICorDebugDataTarget* pDataTarget,
- LPCWSTR pwzName,
- ULONG64 moduleBaseAddress,
- DWORD resourceDirectoryRva,
- DWORD resourceSectionRva,
- DWORD* pNextLevelRva);
-
-// A small wrapper that reads from the data target and throws on error
-HRESULT ReadFromDataTarget(ICorDebugDataTarget* pDataTarget,
- ULONG64 addr,
- BYTE* pBuffer,
- ULONG32 bytesToRead);
#ifndef __DebugMacros_h__
#define __DebugMacros_h__
+#include "stacktrace.h"
#include "debugmacrosext.h"
#include "palclr.h"
class SString;
bool GetStackTraceAtContext(SString & s, struct _CONTEXT * pContext);
-void _cdecl DbgWriteEx(LPCTSTR szFmt, ...);
bool _DbgBreakCheck(LPCSTR szFile, int iLine, LPCSTR szExpr, BOOL fConstrained = FALSE);
extern VOID ANALYZER_NORETURN DbgAssertDialog(const char *szFile, int iLine, const char *szExpr);
-extern int _DbgBreakCount;
-
#define PRE_ASSERTE /* if you need to change modes before doing asserts override */
#define POST_ASSERTE /* put it back */
#define VERIFY(stmt) _ASSERTE((stmt))
-#define _ASSERTE_ALL_BUILDS(file, expr) _ASSERTE((expr))
-
-#define FreeBuildDebugBreak() DebugBreak()
+#define _ASSERTE_ALL_BUILDS(expr) _ASSERTE((expr))
#else // !_DEBUG
-#define _DbgBreakCount 0
-
#define _ASSERTE(expr) ((void)0)
#define _ASSERTE_MSG(expr, msg) ((void)0)
#define VERIFY(stmt) (void)(stmt)
-void __FreeBuildDebugBreak();
-void DECLSPEC_NORETURN __FreeBuildAssertFail(const char *szFile, int iLine, const char *szExpr);
-
-#define FreeBuildDebugBreak() __FreeBuildDebugBreak()
-
// At this point, EEPOLICY_HANDLE_FATAL_ERROR may or may not be defined. It will be defined
// if we are building the VM folder, but outside VM, its not necessarily defined.
//
// but if it is defined, we will use it.
//
// Failing here implies an error in the runtime - hence we use COR_E_EXECUTIONENGINE.
-
#ifdef EEPOLICY_HANDLE_FATAL_ERROR
-#define _ASSERTE_ALL_BUILDS(file, expr) if (!(expr)) EEPOLICY_HANDLE_FATAL_ERROR(COR_E_EXECUTIONENGINE);
+#define _ASSERTE_ALL_BUILDS(expr) if (!(expr)) EEPOLICY_HANDLE_FATAL_ERROR(COR_E_EXECUTIONENGINE);
#else // !EEPOLICY_HANDLE_FATAL_ERROR
-#define _ASSERTE_ALL_BUILDS(file, expr) if (!(expr)) __FreeBuildAssertFail(file, __LINE__, #expr);
+void DECLSPEC_NORETURN __FreeBuildAssertFail(const char *szFile, int iLine, const char *szExpr);
+#define _ASSERTE_ALL_BUILDS(expr) if (!(expr)) __FreeBuildAssertFail(__FILE__, __LINE__, #expr);
#endif // EEPOLICY_HANDLE_FATAL_ERROR
#endif
#ifdef _DEBUG_IMPL
-// A macro to execute a statement only in _DEBUG_IMPL.
-#define DEBUG_IMPL_STMT(stmt) stmt
-
#define _ASSERTE_IMPL(expr) _ASSERTE((expr))
#if defined(_M_IX86)
#define _DbgBreak() DebugBreak()
#endif
-extern VOID DebBreak();
extern VOID DebBreakHr(HRESULT hr);
#ifndef IfFailGoto
#define _DbgBreak() {}
-#define DEBUG_IMPL_STMT(stmt)
-
#define _ASSERTE_IMPL(expr)
#define IfFailGoto(EXPR, LABEL) \
#undef _ASSERT
#define _ASSERT _ASSERTE
-#endif
+#endif // __DebugMacros_h__
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#ifndef DEBUGGER_DUMPCOMMON_H
-#define DEBUGGER_DUMPCOMMON_H
-
-#ifdef HOST_UNIX
-typedef enum _MINIDUMP_TYPE {
- MiniDumpNormal = 0x00000000,
- MiniDumpWithDataSegs = 0x00000001,
- MiniDumpWithFullMemory = 0x00000002,
- MiniDumpWithHandleData = 0x00000004,
- MiniDumpFilterMemory = 0x00000008,
- MiniDumpScanMemory = 0x00000010,
- MiniDumpWithUnloadedModules = 0x00000020,
- MiniDumpWithIndirectlyReferencedMemory = 0x00000040,
- MiniDumpFilterModulePaths = 0x00000080,
- MiniDumpWithProcessThreadData = 0x00000100,
- MiniDumpWithPrivateReadWriteMemory = 0x00000200,
- MiniDumpWithoutOptionalData = 0x00000400,
- MiniDumpWithFullMemoryInfo = 0x00000800,
- MiniDumpWithThreadInfo = 0x00001000,
- MiniDumpWithCodeSegs = 0x00002000,
- MiniDumpWithoutAuxiliaryState = 0x00004000,
- MiniDumpWithFullAuxiliaryState = 0x00008000,
- MiniDumpWithPrivateWriteCopyMemory = 0x00010000,
- MiniDumpIgnoreInaccessibleMemory = 0x00020000,
- MiniDumpWithTokenInformation = 0x00040000,
- MiniDumpWithModuleHeaders = 0x00080000,
- MiniDumpFilterTriage = 0x00100000,
- MiniDumpWithAvxXStateContext = 0x00200000,
- MiniDumpValidTypeFlags = 0x003fffff,
-} MINIDUMP_TYPE;
-#endif // HOST_UNIX
-
-#if defined(DACCESS_COMPILE) || defined(RIGHT_SIDE_COMPILE)
-
-// When debugging against minidumps, we frequently need to ignore errors
-// due to the dump not having memory content.
-// You should be VERY careful using these macros. Because our code does not
-// distinguish target types, when you allow memory to be missing because a dump
-// target may not have that memory content by-design you are also implicitly
-// allowing that same data to be missing from a live debugging target.
-// Also, be aware that these macros exist in code under vm\. You must be careful to
-// only allow them to change execution for DAC and DBI.
-// Be careful state is such that execution can continue if the target is missing
-// memory.
-// In general, there are two solutions to this problem:
-// a) add the memory to all minidumps
-// b) stop forcing the memory to always be present
-// All decisions between a & b focus on cost. For a, cost is adding the memory & a complete
-// path to locate it to the dump, both in terms of dump generation time and most
-// especially in terms of dump size (we cannot make MiniDumpNormal many MB for trivial
-// apps).
-// For b, cost is that we lose some of our validation when we have to turn off asserts
-// and other checks for targets that should always have the missing memory present
-// because we have no concept of allowing it to be missing only from a dump.
-
-// This seemingly awkward try block starting tag is so that when the macro is used over
-// multiple source lines we don't create a useless try/catch block. This is important
-// when using the macros in vm\ code.
-#define EX_TRY_ALLOW_DATATARGET_MISSING_MEMORY EX_TRY
-#define EX_END_CATCH_ALLOW_DATATARGET_MISSING_MEMORY \
- EX_CATCH \
- { \
- if ((GET_EXCEPTION()->GetHR() != HRESULT_FROM_WIN32(ERROR_PARTIAL_COPY)) && \
- (GET_EXCEPTION()->GetHR() != CORDBG_E_READVIRTUAL_FAILURE) ) \
- { \
- EX_RETHROW; \
- } \
- } \
- EX_END_CATCH(SwallowAllExceptions)
-
-#define EX_TRY_ALLOW_DATATARGET_MISSING_MEMORY_WITH_HANDLER EX_TRY
-#define EX_CATCH_ALLOW_DATATARGET_MISSING_MEMORY_WITH_HANDLER \
- EX_CATCH \
- { \
- if ((GET_EXCEPTION()->GetHR() != HRESULT_FROM_WIN32(ERROR_PARTIAL_COPY)) && \
- (GET_EXCEPTION()->GetHR() != CORDBG_E_READVIRTUAL_FAILURE) ) \
- { \
- EX_RETHROW; \
- } \
- else \
-
-#define EX_TRY_ALLOW_DATATARGET_MISSING_OR_INCONSISTENT_MEMORY EX_TRY
-#define EX_END_CATCH_ALLOW_DATATARGET_MISSING_OR_INCONSISTENT_MEMORY \
- EX_CATCH \
- { \
- if ((GET_EXCEPTION()->GetHR() != HRESULT_FROM_WIN32(ERROR_PARTIAL_COPY)) && \
- (GET_EXCEPTION()->GetHR() != CORDBG_E_READVIRTUAL_FAILURE) && \
- (GET_EXCEPTION()->GetHR() != CORDBG_E_TARGET_INCONSISTENT)) \
- { \
- EX_RETHROW; \
- } \
- } \
- EX_END_CATCH(SwallowAllExceptions)
-
-
-#define EX_END_CATCH_ALLOW_DATATARGET_MISSING_MEMORY_WITH_HANDLER \
- } \
- EX_END_CATCH(SwallowAllExceptions)
-
-// Only use this version for wrapping single source lines, or you'll make debugging
-// painful.
-#define ALLOW_DATATARGET_MISSING_MEMORY(sourceCode) \
- EX_TRY \
- { \
- sourceCode \
- } \
- EX_END_CATCH_ALLOW_DATATARGET_MISSING_MEMORY
-
-#define ALLOW_DATATARGET_MISSING_OR_INCONSISTENT_MEMORY(sourceCode) \
- EX_TRY \
- { \
- sourceCode \
- } \
- EX_END_CATCH_ALLOW_DATATARGET_MISSING_OR_INCONSISTENT_MEMORY
-
-#else
-#define EX_TRY_ALLOW_DATATARGET_MISSING_MEMORY
-#define EX_END_CATCH_ALLOW_DATATARGET_MISSING_MEMORY
-#define EX_TRY_ALLOW_DATATARGET_MISSING_MEMORY_WITH_HANDLER \
- #error This macro is only intended for use in DAC code!
-#define EX_CATCH_ALLOW_DATATARGET_MISSING_MEMORY_WITH_HANDLER \
- #error This macro is only intended for use in DAC code!
-#define EX_END_CATCH_ALLOW_DATATARGET_MISSING_MEMORY_WITH_HANDLER \
- #error This macro is only intended for use in DAC code!
-
-
-#define ALLOW_DATATARGET_MISSING_MEMORY(sourceCode) \
- sourceCode
-
-#endif // defined(DACCESS_COMPILE) || defined(RIGHT_SIDE_COMPILE)
-
-
-#endif //DEBUGGER_DUMPCOMMON_H
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//-----------------------------------------------------------------------------
-// Entrypoint markers
-// Used to identify all external entrypoints into the CLR (via COM, exports, etc)
-// and perform various tasks on all of them
-//-----------------------------------------------------------------------------
-
-
-#ifndef __ENTRYPOINTS_h__
-#define __ENTRYPOINTS_h__
-
-#define BEGIN_ENTRYPOINT_THROWS
-#define END_ENTRYPOINT_THROWS
-#define BEGIN_ENTRYPOINT_THROWS_WITH_THREAD(____thread)
-#define END_ENTRYPOINT_THROWS_WITH_THREAD
-#define BEGIN_ENTRYPOINT_NOTHROW_WITH_THREAD(___thread)
-#define END_ENTRYPOINT_NOTHROW_WITH_THREAD
-#define BEGIN_ENTRYPOINT_NOTHROW
-#define END_ENTRYPOINT_NOTHROW
-#define BEGIN_ENTRYPOINT_VOIDRET
-#define END_ENTRYPOINT_VOIDRET
-#define BEGIN_CLEANUP_ENTRYPOINT
-#define END_CLEANUP_ENTRYPOINT
-
-#endif // __ENTRYPOINTS_h__
-
-
#include "corerror.h"
#include "stresslog.h"
#include "staticcontract.h"
-#include "entrypoints.h"
#if !defined(_DEBUG_IMPL) && defined(_DEBUG) && !defined(DACCESS_COMPILE)
#define _DEBUG_IMPL 1
public:
Exception() {LIMITED_METHOD_DAC_CONTRACT; m_innerException = NULL;}
virtual ~Exception() {LIMITED_METHOD_DAC_CONTRACT; if (m_innerException != NULL) Exception::Delete(m_innerException); }
+#ifdef DACCESS_COMPILE
+ void * operator new(size_t size);
+ void operator delete(void* ptr);
+#endif
virtual BOOL IsDomainBound() {return m_innerException!=NULL && m_innerException->IsDomainBound();} ;
virtual HRESULT GetHR() = 0;
virtual void GetMessage(SString &s);
+#ifdef FEATURE_COMINTEROP
virtual IErrorInfo *GetErrorInfo() { LIMITED_METHOD_CONTRACT; return NULL; }
virtual HRESULT SetErrorInfo() { LIMITED_METHOD_CONTRACT; return S_OK; }
+#endif // FEATURE_COMINTEROP
void SetInnerException(Exception * pInnerException) { LIMITED_METHOD_CONTRACT; m_innerException = pInnerException; }
// Dynamic type query for catchers
{
friend bool DebugIsEECxxExceptionPointer(void* pv);
+#ifdef FEATURE_COMINTEROP
private:
IErrorInfo *m_pErrorInfo;
+#endif // FEATURE_COMINTEROP
public:
COMException();
COMException(HRESULT hr) ;
+#ifdef FEATURE_COMINTEROP
COMException(HRESULT hr, IErrorInfo *pErrorInfo);
~COMException();
// Virtual overrides
IErrorInfo *GetErrorInfo();
void GetMessage(SString &result);
+#endif
protected:
virtual Exception *CloneHelper()
{
WRAPPER_NO_CONTRACT;
+#ifdef FEATURE_COMINTEROP
return new COMException(m_hr, m_pErrorInfo);
+#else
+ return new COMException(m_hr);
+#endif
}
};
// Virtual overrides
HRESULT GetHR();
+#ifdef FEATURE_COMINTEROP
IErrorInfo *GetErrorInfo();
+#endif // FEATURE_COMINTEROP
void GetMessage(SString &result);
protected:
// Virtual overrides
virtual BOOL IsDomainBound() {return Exception::IsDomainBound() ||(m_delegatedException!=NULL && m_delegatedException->IsDomainBound());} ;
HRESULT GetHR();
+#ifdef FEATURE_COMINTEROP
IErrorInfo *GetErrorInfo();
+#endif // FEATURE_COMINTEROP
void GetMessage(SString &result);
virtual Exception *Clone();
}
inline COMException::COMException()
- : HRException(),
- m_pErrorInfo(NULL)
+ : HRException()
+#ifdef FEATURE_COMINTEROP
+ , m_pErrorInfo(NULL)
+#endif // FEATURE_COMINTEROP
{
WRAPPER_NO_CONTRACT;
}
inline COMException::COMException(HRESULT hr)
- : HRException(hr),
- m_pErrorInfo(NULL)
+ : HRException(hr)
+#ifdef FEATURE_COMINTEROP
+ , m_pErrorInfo(NULL)
+#endif // FEATURE_COMINTEROP
{
LIMITED_METHOD_CONTRACT;
}
+#ifdef FEATURE_COMINTEROP
inline COMException::COMException(HRESULT hr, IErrorInfo *pErrorInfo)
: HRException(hr),
m_pErrorInfo(pErrorInfo)
{
LIMITED_METHOD_CONTRACT;
}
+#endif // FEATURE_COMINTEROP
inline SEHException::SEHException()
{
void DECLSPEC_NORETURN ThrowHR(HRESULT hr);
void DECLSPEC_NORETURN ThrowHR(HRESULT hr, SString const &msg);
+void DECLSPEC_NORETURN ThrowHR(HRESULT hr, UINT uText);
void DECLSPEC_NORETURN ThrowWin32(DWORD err);
void DECLSPEC_NORETURN ThrowLastError();
void DECLSPEC_NORETURN ThrowOutOfMemory();
// ******************************************************************************
// WARNING!!!: This code is also used by SOS in the diagnostics repo. Should be
// updated in a backwards and forwards compatible way.
-// See: https://github.com/dotnet/diagnostics/blob/master/src/inc/gcdecoder.cpp
+// See: https://github.com/dotnet/diagnostics/blob/main/src/shared/inc/gcdecoder.cpp
// ******************************************************************************
#ifdef TARGET_X86
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-//
-// GC Object Pointer Location Series Stuff
-//
-
-
-
-#ifndef _GCDESC_H_
-#define _GCDESC_H_
-
-#ifdef HOST_64BIT
-typedef uint32_t HALF_SIZE_T;
-#else // HOST_64BIT
-typedef uint16_t HALF_SIZE_T;
-#endif
-
-
-typedef size_t *JSlot;
-
-
-//
-// These two classes make up the apparatus with which the object references
-// within an object can be found.
-//
-// CGCDescSeries:
-//
-// The CGCDescSeries class describes a series of object references within an
-// object by describing the size of the series (which has an adjustment which
-// will be explained later) and the starting point of the series.
-//
-// The series size is adjusted when the map is created by subtracting the
-// GetBaseSize() of the object. On retieval of the size the total size
-// of the object is added back. For non-array objects the total object
-// size is equal to the base size, so this returns the same value. For
-// array objects this will yield the size of the data portion of the array.
-// Since arrays containing object references will contain ONLY object references
-// this is a fast way of handling arrays and normal objects without a
-// conditional test
-//
-//
-//
-// CGCDesc:
-//
-// The CGCDesc is a collection of CGCDescSeries objects to describe all the
-// different runs of pointers in a particular object. <TODO> [add more on the strange
-// way the CGCDesc grows backwards in memory behind the MethodTable]
-//</TODO>
-
-struct val_serie_item
-{
- HALF_SIZE_T nptrs;
- HALF_SIZE_T skip;
- void set_val_serie_item (HALF_SIZE_T nptrs, HALF_SIZE_T skip)
- {
- this->nptrs = nptrs;
- this->skip = skip;
- }
-};
-
-typedef DPTR(class CGCDescSeries) PTR_CGCDescSeries;
-typedef DPTR(class MethodTable) PTR_MethodTable;
-class CGCDescSeries
-{
-public:
- union
- {
- size_t seriessize; // adjusted length of series (see above) in bytes
- val_serie_item val_serie[1]; //coded serie for value class array
- };
-
- size_t startoffset;
-
- size_t GetSeriesCount ()
- {
- return seriessize/sizeof(JSlot);
- }
-
- void SetSeriesCount (size_t newcount)
- {
- seriessize = newcount * sizeof(JSlot);
- }
-
- void IncSeriesCount (size_t increment = 1)
- {
- seriessize += increment * sizeof(JSlot);
- }
-
- size_t GetSeriesSize ()
- {
- return seriessize;
- }
-
- void SetSeriesSize (size_t newsize)
- {
- seriessize = newsize;
- }
-
- void SetSeriesValItem (val_serie_item item, int index)
- {
- val_serie [index] = item;
- }
-
- void SetSeriesOffset (size_t newoffset)
- {
- startoffset = newoffset;
- }
-
- size_t GetSeriesOffset ()
- {
- return startoffset;
- }
-};
-
-
-
-
-
-typedef DPTR(class CGCDesc) PTR_CGCDesc;
-class CGCDesc
-{
- // Don't construct me, you have to hand me a ptr to the *top* of my storage in Init.
- CGCDesc () {}
-
- //
- // NOTE: for alignment reasons, NumSeries is stored as a size_t.
- // This makes everything nicely 8-byte aligned on IA64.
- //
-public:
- static size_t ComputeSize (size_t NumSeries)
- {
- _ASSERTE (ptrdiff_t(NumSeries) > 0);
-
- return sizeof(size_t) + NumSeries*sizeof(CGCDescSeries);
- }
-
- // For value type array
- static size_t ComputeSizeRepeating (size_t NumSeries)
- {
- _ASSERTE (ptrdiff_t(NumSeries) > 0);
-
- return sizeof(size_t) + sizeof(CGCDescSeries) +
- (NumSeries-1)*sizeof(val_serie_item);
- }
-
-#ifndef DACCESS_COMPILE
- static void Init (void* mem, size_t NumSeries)
- {
- *((size_t*)mem-1) = NumSeries;
- }
-
- static void InitValueClassSeries (void* mem, size_t NumSeries)
- {
- *((ptrdiff_t*)mem-1) = -((ptrdiff_t)NumSeries);
- }
-#endif
-
- static PTR_CGCDesc GetCGCDescFromMT (MethodTable * pMT)
- {
- // If it doesn't contain pointers, there isn't a GCDesc
- PTR_MethodTable mt(pMT);
-
- return PTR_CGCDesc(mt);
- }
-
- size_t GetNumSeries ()
- {
- return *(PTR_size_t(PTR_CGCDesc(this))-1);
- }
-
- // Returns lowest series in memory.
- // Cannot be used for valuetype arrays
- PTR_CGCDescSeries GetLowestSeries ()
- {
- _ASSERTE (ptrdiff_t(GetNumSeries()) > 0);
- return PTR_CGCDescSeries(PTR_uint8_t(PTR_CGCDesc(this))
- - ComputeSize(GetNumSeries()));
- }
-
- // Returns highest series in memory.
- PTR_CGCDescSeries GetHighestSeries ()
- {
- return PTR_CGCDescSeries(PTR_size_t(PTR_CGCDesc(this))-1)-1;
- }
-
- // Returns number of immediate pointers this object has. It should match the number of
- // pointers enumerated by go_through_object_cl macro. The implementation shape has intentional
- // similarity with the go_through_object family of macros.
- // size is only used if you have an array of value types.
-#ifndef DACCESS_COMPILE
- static size_t GetNumPointers (MethodTable* pMT, size_t ObjectSize, size_t NumComponents)
- {
- size_t NumOfPointers = 0;
-
- if (pMT->ContainsPointers())
- {
- CGCDesc* map = GetCGCDescFromMT(pMT);
- CGCDescSeries* cur = map->GetHighestSeries();
- ptrdiff_t cnt = (ptrdiff_t)map->GetNumSeries();
-
- if (cnt >= 0)
- {
- CGCDescSeries* last = map->GetLowestSeries();
- do
- {
- NumOfPointers += (cur->GetSeriesSize() + ObjectSize) / sizeof(JSlot);
- cur--;
- }
- while (cur >= last);
- }
- else
- {
- /* Handle the repeating case - array of valuetypes */
- for (ptrdiff_t __i = 0; __i > cnt; __i--)
- {
- NumOfPointers += cur->val_serie[__i].nptrs;
- }
-
- NumOfPointers *= NumComponents;
- }
- }
-
-#ifndef FEATURE_REDHAWK
- if (pMT->Collectible())
- {
- NumOfPointers += 1;
- }
-#endif
-
- return NumOfPointers;
- }
-#endif
-
- // Size of the entire slot map.
- size_t GetSize ()
- {
- ptrdiff_t numSeries = (ptrdiff_t) GetNumSeries();
- if (numSeries < 0)
- {
- return ComputeSizeRepeating(-numSeries);
- }
- else
- {
- return ComputeSize(numSeries);
- }
- }
-
- uint8_t *GetStartOfGCData()
- {
- return ((uint8_t *)this) - GetSize();
- }
-
-private:
-
- BOOL IsValueClassSeries()
- {
- return ((ptrdiff_t) GetNumSeries()) < 0;
- }
-
-};
-
-#define MAX_SIZE_FOR_VALUECLASS_IN_ARRAY 0xffff
-#define MAX_PTRS_FOR_VALUECLASSS_IN_ARRAY 0xffff
-
-
-#endif // _GCDESC_H_
* to the standard code-manager spec.
*/
-// ******************************************************************************
-// WARNING!!!: This header is also used by the runtime repo.
-// See: https://github.com/dotnet/runtime/blob/main/src/coreclr/inc/gcdump.h
-// ******************************************************************************
-
/*****************************************************************************/
#ifndef __GCDUMP_H__
#define __GCDUMP_H__
// ******************************************************************************
// WARNING!!!: These values are used by SOS in the diagnostics repo. Values should
// added or removed in a backwards and forwards compatible way.
-// See: https://github.com/dotnet/diagnostics/blob/master/src/inc/gcinfo.h
+// See: https://github.com/dotnet/diagnostics/blob/main/src/shared/inc/gcinfo.h
// ******************************************************************************
/*****************************************************************************/
/*****************************************************************************/
#include "daccess.h"
-#include "windef.h" // For BYTE
-
-// Some declarations in this file are used on non-x86 platforms, but most are x86-specific.
// Use the lower 2 bits of the offsets stored in the tables
// to encode properties
const unsigned OFFSET_MASK = 0x3; // mask to access the low 2 bits
//
-// Note for untracked locals the flags allowed are "pinned" and "byref"
-// and for tracked locals the flags allowed are "this" and "byref"
// Note that these definitions should also match the definitions of
// GC_CALL_INTERIOR and GC_CALL_PINNED in VM/gc.h
//
const unsigned byref_OFFSET_FLAG = 0x1; // the offset is an interior ptr
const unsigned pinned_OFFSET_FLAG = 0x2; // the offset is a pinned ptr
-#if !defined(TARGET_X86) || !defined(FEATURE_EH_FUNCLETS)
+#if defined(TARGET_X86)
+// JIT32_ENCODER has additional restriction on x86 without funclets:
+// - for untracked locals the flags allowed are "pinned" and "byref"
+// - for tracked locals the flags allowed are "this" and "byref"
const unsigned this_OFFSET_FLAG = 0x2; // the offset is "this"
#endif
// The current GCInfo Version
//-----------------------------------------------------------------------------
-#define GCINFO_VERSION 2
+#define GCINFO_VERSION 3
//-----------------------------------------------------------------------------
// GCInfoToken: A wrapper that contains the GcInfo data and version number.
struct GCInfoToken
{
PTR_VOID Info;
- UINT32 Version;
+ uint32_t Version;
+
+#ifdef FEATURE_NATIVEAOT
+ GCInfoToken(PTR_VOID info)
+ {
+ Info = info;
+ Version = GCINFO_VERSION;
+ }
+#endif
- static UINT32 ReadyToRunVersionToGcInfoVersion(UINT32 readyToRunMajorVersion)
+ static uint32_t ReadyToRunVersionToGcInfoVersion(uint32_t readyToRunMajorVersion, uint32_t readyToRunMinorVersion)
{
- // GcInfo version is current from ReadyToRun version 2.0
+ // Once MINIMUM_READYTORUN_MAJOR_VERSION is bumped to 10+
+ // delete the following and just return GCINFO_VERSION
+ //
+ // R2R 9.0 and 9.1 use GCInfo v2
+ // R2R 9.2 uses GCInfo v3
+ if (readyToRunMajorVersion == 9 && readyToRunMinorVersion < 2)
+ return 2;
+
return GCINFO_VERSION;
}
};
// ******************************************************************************
// WARNING!!!: These values are used by SOS in the diagnostics repo. Values should
// added or removed in a backwards and forwards compatible way.
-// See: https://github.com/dotnet/diagnostics/blob/master/src/inc/gcinfodecoder.h
+// See: https://github.com/dotnet/diagnostics/blob/main/src/shared/inc/gcinfodecoder.h
// ******************************************************************************
#ifndef _GC_INFO_DECODER_
#else
-#ifdef FEATURE_REDHAWK
+#ifdef FEATURE_NATIVEAOT
+
+#include "gcinfo.h"
typedef ArrayDPTR(const uint8_t) PTR_CBYTE;
+#ifdef TARGET_X86
+// Bridge few additional pointer types used in x86 unwinding code
+typedef DPTR(DWORD) PTR_DWORD;
+typedef DPTR(WORD) PTR_WORD;
+typedef DPTR(BYTE) PTR_BYTE;
+typedef DPTR(signed char) PTR_SBYTE;
+typedef DPTR(INT32) PTR_INT32;
+#endif
#define LIMITED_METHOD_CONTRACT
#define SUPPORTS_DAC
#define SSIZE_T intptr_t
#define LPVOID void*
+#define CHECK_APP_DOMAIN 0
+
typedef void * OBJECTREF;
#define GET_CALLER_SP(pREGDISPLAY) ((TADDR)0)
-struct GCInfoToken
-{
- PTR_VOID Info;
- UINT32 Version;
-
- GCInfoToken(PTR_VOID info)
- {
- Info = info;
- Version = 2;
- }
-};
-
-#else // FEATURE_REDHAWK
+#else // FEATURE_NATIVEAOT
// Stuff from cgencpu.h:
typedef void (*GCEnumCallback)(
void * hCallback, // callback data
- OBJECTREF* pObject, // address of obect-reference we are reporting
+ OBJECTREF* pObject, // address of object-reference we are reporting
uint32_t flags // is this a pinned and/or interior pointer
);
#include "regdisp.h"
-#endif // FEATURE_REDHAWK
+#endif // FEATURE_NATIVEAOT
#ifndef _strike_h
NoReportUntracked
= 0x0080, // EnumGCRefs/EnumerateLiveSlots should *not* include
// any untracked slots
+ ReportFPBasedSlotsOnly
+ = 0x0200, // EnumGCRefs/EnumerateLiveSlots should only include
+ // slots that are based on the frame pointer
};
#endif // !_strike_h
DECODE_RETURN_KIND = 0x2000,
#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
DECODE_HAS_TAILCALLS = 0x4000,
-#endif // TARGET_ARM || TARGET_ARM64 || TARGET_LOONGARCH64 || TARGET_RISCV64
+#endif // TARGET_ARM || TARGET_ARM64 || TARGET_LOONGARCH64
};
enum GcInfoHeaderFlags
{
GC_INFO_IS_VARARG = 0x1,
- GC_INFO_HAS_SECURITY_OBJECT = 0x2,
+ // unused = 0x2, // was GC_INFO_HAS_SECURITY_OBJECT
GC_INFO_HAS_GS_COOKIE = 0x4,
GC_INFO_HAS_PSP_SYM = 0x8,
GC_INFO_HAS_GENERICS_INST_CONTEXT_MASK = 0x30,
#elif defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
GC_INFO_HAS_TAILCALLS = 0x80,
#endif // TARGET_AMD64
- GC_INFO_HAS_EDIT_AND_CONTINUE_PRESERVED_SLOTS = 0x100,
+ GC_INFO_HAS_EDIT_AND_CONTINUE_INFO = 0x100,
GC_INFO_REVERSE_PINVOKE_FRAME = 0x200,
GC_INFO_FLAGS_BIT_SIZE_VERSION_1 = 9,
m_pCurrent = m_pBuffer = dac_cast<PTR_size_t>((size_t)dac_cast<TADDR>(pBuffer) & ~((size_t)sizeof(size_t)-1));
m_RelPos = m_InitialRelPos = (int)((size_t)dac_cast<TADDR>(pBuffer) % sizeof(size_t)) * 8/*BITS_PER_BYTE*/;
+ // There are always some bits in the GC info, at least the header.
+ // It is ok to prefetch.
+ m_current = *m_pCurrent >> m_RelPos;
}
BitStreamReader(const BitStreamReader& other)
m_InitialRelPos = other.m_InitialRelPos;
m_pCurrent = other.m_pCurrent;
m_RelPos = other.m_RelPos;
+ m_current = other.m_current;
}
const BitStreamReader& operator=(const BitStreamReader& other)
m_InitialRelPos = other.m_InitialRelPos;
m_pCurrent = other.m_pCurrent;
m_RelPos = other.m_RelPos;
+ m_current = other.m_current;
return *this;
}
_ASSERTE(numBits > 0 && numBits <= BITS_PER_SIZE_T);
- size_t result = (*m_pCurrent) >> m_RelPos;
+ size_t result = m_current;
+ m_current >>= numBits;
int newRelPos = m_RelPos + numBits;
- if(newRelPos >= BITS_PER_SIZE_T)
+ if(newRelPos > BITS_PER_SIZE_T)
{
m_pCurrent++;
+ m_current = *m_pCurrent;
newRelPos -= BITS_PER_SIZE_T;
- if(newRelPos > 0)
- {
- size_t extraBits = (*m_pCurrent) << (numBits - newRelPos);
- result ^= extraBits;
- }
+ size_t extraBits = m_current << (numBits - newRelPos);
+ result |= extraBits;
+ m_current >>= newRelPos;
}
m_RelPos = newRelPos;
- result &= SAFE_SHIFT_LEFT(1, numBits) - 1;
+ result &= ((size_t)-1 >> (BITS_PER_SIZE_T - numBits));
return result;
}
- // This version reads one bit, returning zero/non-zero (not 0/1)
+ // This version reads one bit
// NOTE: This routine is perf-critical
__forceinline size_t ReadOneFast()
{
SUPPORTS_DAC;
- size_t result = (*m_pCurrent) & (((size_t)1) << m_RelPos);
- if(++m_RelPos == BITS_PER_SIZE_T)
+ // "m_RelPos == BITS_PER_SIZE_T" means that m_current
+ // is not yet fetched. Do that now.
+ if(m_RelPos == BITS_PER_SIZE_T)
{
m_pCurrent++;
+ m_current = *m_pCurrent;
m_RelPos = 0;
}
+
+ m_RelPos++;
+ size_t result = m_current & 1;
+ m_current >>= 1;
+
return result;
}
size_t adjPos = pos + m_InitialRelPos;
m_pCurrent = m_pBuffer + adjPos / BITS_PER_SIZE_T;
m_RelPos = (int)(adjPos % BITS_PER_SIZE_T);
+
+ // we always call SetCurrentPos just before reading.
+ // It is ok to prefetch.
+ m_current = *m_pCurrent >> m_RelPos;
_ASSERTE(GetCurrentPos() == pos);
}
{
SUPPORTS_DAC;
- SetCurrentPos(GetCurrentPos() + numBitsToSkip);
- }
+ size_t pos = GetCurrentPos() + numBitsToSkip;
+ size_t adjPos = pos + m_InitialRelPos;
+ m_pCurrent = m_pBuffer + adjPos / BITS_PER_SIZE_T;
+ m_RelPos = (int)(adjPos % BITS_PER_SIZE_T);
- __forceinline void AlignUpToByte()
- {
- if(m_RelPos <= BITS_PER_SIZE_T - 8)
+ // Skipping ahead may go to a position at the edge-exclusive
+ // end of the stream. The location may have no more data.
+ // We will not prefetch on word boundary - in case
+ // the next word in in an unreadable page.
+ if (m_RelPos == 0)
{
- m_RelPos = (m_RelPos + 7) & ~7;
+ m_pCurrent--;
+ m_RelPos = BITS_PER_SIZE_T;
+ m_current = 0;
}
else
{
- m_RelPos = 0;
- m_pCurrent++;
+ m_current = *m_pCurrent >> m_RelPos;
}
- }
- __forceinline size_t ReadBitAtPos( size_t pos )
- {
- size_t adjPos = pos + m_InitialRelPos;
- size_t* ptr = m_pBuffer + adjPos / BITS_PER_SIZE_T;
- int relPos = (int)(adjPos % BITS_PER_SIZE_T);
- return (*ptr) & (((size_t)1) << relPos);
+ _ASSERTE(GetCurrentPos() == pos);
}
// See the corresponding methods on BitStreamWriter for more information on the format
//--------------------------------------------------------------------------
- inline size_t DecodeVarLengthUnsigned( int base )
+ size_t DecodeVarLengthUnsignedMore ( int base )
{
_ASSERTE((base > 0) && (base < (int)BITS_PER_SIZE_T));
size_t numEncodings = size_t{ 1 } << base;
- size_t result = 0;
- for(int shift=0; ; shift+=base)
+ size_t result = numEncodings;
+ for(int shift=base; ; shift+=base)
{
_ASSERTE(shift+base <= (int)BITS_PER_SIZE_T);
size_t currentChunk = Read(base+1);
- result |= (currentChunk & (numEncodings-1)) << shift;
+ result ^= (currentChunk & (numEncodings-1)) << shift;
if(!(currentChunk & numEncodings))
{
// Extension bit is not set, we're done.
}
}
+ __forceinline size_t DecodeVarLengthUnsigned(int base)
+ {
+ _ASSERTE((base > 0) && (base < (int)BITS_PER_SIZE_T));
+
+ size_t result = Read(base + 1);
+ if (result & ((size_t)1 << base))
+ {
+ result ^= DecodeVarLengthUnsignedMore(base);
+ }
+
+ return result;
+ }
+
inline SSIZE_T DecodeVarLengthSigned( int base )
{
_ASSERTE((base > 0) && (base < (int)BITS_PER_SIZE_T));
int m_InitialRelPos;
PTR_size_t m_pCurrent;
int m_RelPos;
+ size_t m_current;
};
struct GcSlotDesc
//------------------------------------------------------------------------
bool IsInterruptible();
+ bool HasInterruptibleRanges();
#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
+ bool IsSafePoint();
+ bool AreSafePointsInterruptible();
+ bool IsInterruptibleSafePoint();
+ bool CouldBeInterruptibleSafePoint();
+
// This is used for gccoverage
bool IsSafePoint(UINT32 codeOffset);
- typedef void EnumerateSafePointsCallback (UINT32 offset, void * hCallback);
+ typedef void EnumerateSafePointsCallback (GcInfoDecoder* decoder, UINT32 offset, void * hCallback);
void EnumerateSafePoints(EnumerateSafePointsCallback * pCallback, void * hCallback);
#endif
// Miscellaneous method information
//------------------------------------------------------------------------
- INT32 GetSecurityObjectStackSlot();
INT32 GetGSCookieStackSlot();
UINT32 GetGSCookieValidRangeStart();
UINT32 GetGSCookieValidRangeEnd();
bool WantsReportOnlyLeaf();
#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
bool HasTailCalls();
-#endif // TARGET_ARM || TARGET_ARM64 || TARGET_LOONGARCH64 || TARGET_RISCV64
+#endif // TARGET_ARM || TARGET_ARM64 || TARGET_LOONGARCH64 || defined(TARGET_RISCV64)
ReturnKind GetReturnKind();
UINT32 GetCodeLength();
UINT32 GetStackBaseRegister();
UINT32 GetSizeOfEditAndContinuePreservedArea();
+#ifdef TARGET_ARM64
+ UINT32 GetSizeOfEditAndContinueFixedStackFrame();
+#endif
size_t GetNumBytesRead();
#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
UINT32 m_InstructionOffset;
// Pre-decoded information
+ GcInfoHeaderFlags m_headerFlags;
bool m_IsInterruptible;
- bool m_IsVarArg;
- bool m_GenericSecretParamIsMD;
- bool m_GenericSecretParamIsMT;
-#ifdef TARGET_AMD64
- bool m_WantsReportOnlyLeaf;
-#elif defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
- bool m_HasTailCalls;
-#endif // TARGET_AMD64
- INT32 m_SecurityObjectStackSlot;
INT32 m_GSCookieStackSlot;
INT32 m_ReversePInvokeFrameStackSlot;
UINT32 m_ValidRangeStart;
UINT32 m_CodeLength;
UINT32 m_StackBaseRegister;
UINT32 m_SizeOfEditAndContinuePreservedArea;
+#ifdef TARGET_ARM64
+ UINT32 m_SizeOfEditAndContinueFixedStackFrame;
+#endif
ReturnKind m_ReturnKind;
#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
UINT32 m_NumSafePoints;
UINT32 m_SafePointIndex;
- UINT32 FindSafePoint(UINT32 codeOffset);
+ UINT32 NarrowSafePointSearch(size_t savedPos, UINT32 breakOffset, UINT32* searchEnd);
+ UINT32 FindSafePoint(UINT32 codeOffset);
#endif
UINT32 m_NumInterruptibleRanges;
#endif
UINT32 m_Version;
+ bool PredecodeFatHeader(int remainingFlags);
+
static bool SetIsInterruptibleCB (UINT32 startOffset, UINT32 stopOffset, void * hCallback);
OBJECTREF* GetRegisterSlot(
{
_ASSERTE(slotIndex < slotDecoder.GetNumSlots());
const GcSlotDesc* pSlot = slotDecoder.GetSlotDesc(slotIndex);
+ bool reportFpBasedSlotsOnly = (inputFlags & ReportFPBasedSlotsOnly);
if(slotIndex < slotDecoder.GetNumRegisters())
{
UINT32 regNum = pSlot->Slot.RegisterNumber;
- if( reportScratchSlots || !IsScratchRegister( regNum, pRD ) )
+ if( ( reportScratchSlots || !IsScratchRegister( regNum, pRD ) ) && !reportFpBasedSlotsOnly )
{
ReportRegisterToGC(
regNum,
{
INT32 spOffset = pSlot->Slot.Stack.SpOffset;
GcStackSlotBase spBase = pSlot->Slot.Stack.Base;
- if( reportScratchSlots || !IsScratchStackSlot(spOffset, spBase, pRD) )
+
+ if( ( reportScratchSlots || !IsScratchStackSlot(spOffset, spBase, pRD) ) &&
+ ( !reportFpBasedSlotsOnly || (GC_FRAMEREG_REL == spBase ) ) )
{
ReportStackSlotToGC(
spOffset,
#include "gcinfotypes.h"
#include "gcinfodecoder.h"
-// ******************************************************************************
-// WARNING!!!: This header is also used by the runtime repo.
-// See: https://github.com/dotnet/runtime/blob/main/src/coreclr/inc/gcinfodumper.h
-// ******************************************************************************
+// *****************************************************************************
+// WARNING!!!: These values and code are used in the runtime repo and SOS in the
+// diagnostics repo. Should updated in a backwards and forwards compatible way.
+// See: https://github.com/dotnet/diagnostics/blob/main/src/shared/inc/gcinfodumper.h
+// https://github.com/dotnet/runtime/blob/main/src/coreclr/inc/gcinfodumper.h
+// *****************************************************************************
//
// This class dumps the contents of the gc encodings, providing outputs
static void LivePointerCallback (
LPVOID hCallback, // callback data
- OBJECTREF* pObject, // address of obect-reference we are reporting
+ OBJECTREF* pObject, // address of object-reference we are reporting
uint32_t flags // is this a pinned and/or interior pointer
DAC_ARG(DacSlotLocation loc)); // the location the pointer came from
#ifndef __GCINFOTYPES_H__
#define __GCINFOTYPES_H__
-#ifndef FEATURE_REDHAWK
+#ifndef FEATURE_NATIVEAOT
#include "gcinfo.h"
#endif
-// ******************************************************************************
-// WARNING!!!: This header is also used by the runtime repo.
-// See: https://github.com/dotnet/runtime/blob/main/src/coreclr/inc/gcinfotypes.h
-// ******************************************************************************
+#ifdef _MSC_VER
+#include <intrin.h>
+#endif // _MSC_VER
+
+// *****************************************************************************
+// WARNING!!!: These values and code are used in the runtime repo and SOS in the
+// diagnostics repo. Should updated in a backwards and forwards compatible way.
+// See: https://github.com/dotnet/diagnostics/blob/main/src/shared/inc/gcinfotypes.h
+// https://github.com/dotnet/runtime/blob/main/src/coreclr/inc/gcinfotypes.h
+// *****************************************************************************
#define PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
#define BITS_PER_SIZE_T ((int)sizeof(size_t)*8)
-
-//--------------------------------------------------------------------------------
-// It turns out, that ((size_t)x) << y == x, when y is not a literal
-// and its value is BITS_PER_SIZE_T
-// I guess the processor only shifts of the right operand modulo BITS_PER_SIZE_T
-// In many cases, we want the above operation to yield 0,
-// hence the following macros
-//--------------------------------------------------------------------------------
-__forceinline size_t SAFE_SHIFT_LEFT(size_t x, size_t count)
-{
- _ASSERTE(count <= BITS_PER_SIZE_T);
- return (x << 1) << (count - 1);
-}
-__forceinline size_t SAFE_SHIFT_RIGHT(size_t x, size_t count)
-{
- _ASSERTE(count <= BITS_PER_SIZE_T);
- return (x >> 1) >> (count - 1);
-}
-
inline UINT32 CeilOfLog2(size_t x)
{
+ // it is ok to use bsr or clz unconditionally
_ASSERTE(x > 0);
- UINT32 result = (x & (x - 1)) ? 1 : 0;
- while (x != 1)
- {
- result++;
- x >>= 1;
- }
- return result;
+
+ x = (x << 1) - 1;
+
+#ifdef TARGET_64BIT
+#ifdef _MSC_VER
+ DWORD result;
+ _BitScanReverse64(&result, (unsigned long)x);
+ return (UINT32)result;
+#else // _MSC_VER
+ // LZCNT returns index starting from MSB, whereas BSR gives the index from LSB.
+ // 63 ^ LZCNT here is equivalent to 63 - LZCNT since the LZCNT result is always between 0 and 63.
+ // This saves an instruction, as subtraction from constant requires either MOV/SUB or NEG/ADD.
+ return (UINT32)63 ^ (UINT32)__builtin_clzl((unsigned long)x);
+#endif // _MSC_VER
+#else // TARGET_64BIT
+#ifdef _MSC_VER
+ DWORD result;
+ _BitScanReverse(&result, (unsigned int)x);
+ return (UINT32)result;
+#else // _MSC_VER
+ return (UINT32)31 ^ (UINT32)__builtin_clz((unsigned int)x);
+#endif // _MSC_VER
+#endif
}
enum GcSlotFlags
// Stack offsets must be 8-byte aligned, so we use this unaligned
// offset to represent that the method doesn't have a security object
-#define NO_SECURITY_OBJECT (-1)
#define NO_GS_COOKIE (-1)
#define NO_STACK_BASE_REGISTER (0xffffffff)
#define NO_SIZE_OF_EDIT_AND_CONTINUE_PRESERVED_AREA (0xffffffff)
#define STACK_BASE_REGISTER_ENCBASE 2 // FP encoded as 0, SP as 2.
#define SIZE_OF_STACK_AREA_ENCBASE 3
#define SIZE_OF_EDIT_AND_CONTINUE_PRESERVED_AREA_ENCBASE 4
+#define SIZE_OF_EDIT_AND_CONTINUE_FIXED_STACK_FRAME_ENCBASE 4
#define REVERSE_PINVOKE_FRAME_ENCBASE 6
#define NUM_REGISTERS_ENCBASE 3
#define NUM_STACK_SLOTS_ENCBASE 2
#define DENORMALIZE_STACK_SLOT(x) ((x)<<3)
#define NORMALIZE_CODE_LENGTH(x) ((x)>>2) // All Instructions are 4 bytes long
#define DENORMALIZE_CODE_LENGTH(x) ((x)<<2)
-#define NORMALIZE_STACK_BASE_REGISTER(x) ((x)^8) // Encode Frame pointer X8 as zero
-#define DENORMALIZE_STACK_BASE_REGISTER(x) ((x)^8)
+#define NORMALIZE_STACK_BASE_REGISTER(x) ((x) == 8 ? 0 : 1) // Encode Frame pointer X8 as zero, sp/x2 as 1
+#define DENORMALIZE_STACK_BASE_REGISTER(x) ((x) == 0 ? 8 : 2)
#define NORMALIZE_SIZE_OF_STACK_AREA(x) ((x)>>3)
#define DENORMALIZE_SIZE_OF_STACK_AREA(x) ((x)<<3)
#define CODE_OFFSETS_NEED_NORMALIZATION 0
#define SIZE_OF_RETURN_KIND_IN_SLIM_HEADER 2
#define SIZE_OF_RETURN_KIND_IN_FAT_HEADER 4
#define STACK_BASE_REGISTER_ENCBASE 2
-// FP encoded as 0, SP as 2??
+// FP encoded as 0, SP as 1
#define SIZE_OF_STACK_AREA_ENCBASE 3
#define SIZE_OF_EDIT_AND_CONTINUE_PRESERVED_AREA_ENCBASE 4
#define SIZE_OF_EDIT_AND_CONTINUE_FIXED_STACK_FRAME_ENCBASE 4
#define LIVESTATE_RLE_RUN_ENCBASE 2
#define LIVESTATE_RLE_SKIP_ENCBASE 4
+
#else
#ifndef TARGET_X86
static const char* gcDetailedStartMsg()
{
STATIC_CONTRACT_LEAF;
- return "*GC* %d(gen0:%d)(%d)(alloc: %Id)(%s)(%d)";
+ return "*GC* %d(gen0:%d)(%d)(alloced for %.3fms, g0 %zd (b: %zd, %zd/h) (%.3fmb/ms), g3 %zd (%.3fmb/ms), g4 %zd (%.3fmb/ms))(%s)(%d)(%d)(heap size: %.3fmb max: %.3fmb)";
}
static const char* gcDetailedEndMsg()
{
STATIC_CONTRACT_LEAF;
- return "*EGC* %Id(gen0:%Id)(%Id)(%d)(%s)(%s)(%s)(ml: %d->%d)";
+ return "*EGC* %zd(gen0:%zd)(heap size: %.3fmb)(%d)(%s)(%s)(%s)(ml: %d->%d)\n";
}
static const char* gcStartMarkMsg()
static const char* gcStartCompactMsg()
{
STATIC_CONTRACT_LEAF;
- return "---- Compact Phase on heap %d: %Ix(%Ix)----";
+ return "---- Compact Phase on heap %d: %zx(%zx)----";
}
static const char* gcEndCompactMsg()
static const char* gcMemCopyMsg()
{
STATIC_CONTRACT_LEAF;
- return " mc: [%Ix->%Ix, %Ix->%Ix[";
+ return " mc: [%zx->%zx, %zx->%zx[";
}
static const char* gcPlanPlugMsg()
{
STATIC_CONTRACT_LEAF;
- return "(%Ix)[%Ix->%Ix, NA: [%Ix(%Id), %Ix[: %Ix(%d), x: %Ix (%s)";
+ return "(%zx)[%zx->%zx, NA: [%zx(%zd), %zx[: %zx(%d), x: %zx (%s)";
}
static const char* gcPlanPinnedPlugMsg()
{
STATIC_CONTRACT_LEAF;
- return "(%Ix)PP: [%Ix, %Ix[%Ix](m:%d)";
+ return "(%zx)PP: [%zx, %zx[%zx](m:%d)";
}
static const char* gcDesiredNewAllocationMsg()
{
STATIC_CONTRACT_LEAF;
- return "h%d g%d surv: %Id current: %Id alloc: %Id (%d%%) f: %d%% new-size: %Id new-alloc: %Id";
+ return "h%d g%d surv: %zd current: %zd alloc: %zd (%d%%) f: %d%% new-size: %zd new-alloc: %zd";
}
static const char* gcMakeUnusedArrayMsg()
{
STATIC_CONTRACT_LEAF;
- return "Making unused array [%Ix, %Ix[";
+ return "Making unused array [%zx, %zx[";
}
static const char* gcStartBgcThread()
STATIC_CONTRACT_LEAF;
return "Relocating reference *(%p) from %p to %p";
}
+
+ static const char* gcLoggingIsOffMsg()
+ {
+ STATIC_CONTRACT_LEAF;
+ return "TraceGC is not turned on";
+ }
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-// GetProductVersionNumber.h
-//
-// Helper function to retrieve the file version number of a file.
-//
-// ======================================================================================
-
-
-
-#ifndef __GetProductVersionNumber_h__
-#define __GetProductVersionNumber_h__
-
-#include "contract.h"
-#include "sstring.h"
-#include "holder.h"
-#include "ex.h"
-
-//---------------------------------------------------------------------------------------
-//
-// Given the full path to an image, return the product version number.
-//
-// Arguments:
-// szFullPath - full path to the image
-// pdwVersionMS - out parameter; return the most significant 4 bytes of the version number according to
-// the VS_FIXEDFILEINFO convention
-// pdwVersionLS - out parameter; return the least significant 4 bytes of the version number according to
-// the VS_FIXEDFILEINFO convention
-//
-// Notes:
-// Throws on error
-
-void inline GetProductVersionNumber(SString &szFullPath, DWORD * pdwVersionMS, DWORD * pdwVersionLS)
-{
- WRAPPER_NO_CONTRACT;
-#ifndef TARGET_UNIX
-
- DWORD dwDummy = 0;
- DWORD dwFileInfoSize = 0;
-
- // Get the size of all of the file version information.
- dwFileInfoSize = GetFileVersionInfoSize(szFullPath, &dwDummy);
- if (dwFileInfoSize == 0)
- {
- ThrowLastError();
- }
-
- // Create the buffer to store the file information.
- NewHolder<BYTE> pbFileInfo(new BYTE[dwFileInfoSize]);
-
- // Actually retrieve the file version information.
- if (!GetFileVersionInfo(szFullPath, NULL, dwFileInfoSize, pbFileInfo))
- {
- ThrowLastError();
- }
-
- // Now retrieve only the relevant version information, which will be returned in a VS_FIXEDFILEINFO.
- UINT uVersionInfoSize = 0;
- VS_FIXEDFILEINFO * pVersionInfo = NULL;
-
- if (!VerQueryValue(pbFileInfo, W("\\"), reinterpret_cast<LPVOID *>(&pVersionInfo), &uVersionInfoSize))
- {
- ThrowLastError();
- }
- _ASSERTE(uVersionInfoSize == sizeof(VS_FIXEDFILEINFO));
-
- *pdwVersionMS = pVersionInfo->dwProductVersionMS;
- *pdwVersionLS = pVersionInfo->dwProductVersionLS;
-#else
- *pdwVersionMS = 0;
- *pdwVersionLS = 0;
-#endif // TARGET_UNIX
-}
-
-#endif // __GetProductVersionNumber_h__
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-//=========================================================================
-
-//
-// HillClimbing.h
-//
-// Defines classes for the ThreadPool's HillClimbing concurrency-optimization
-// algorithm.
-//
-
-//=========================================================================
-
-#ifndef _HILLCLIMBING_H
-#define _HILLCLIMBING_H
-
-enum HillClimbingStateTransition
-{
- Warmup,
- Initializing,
- RandomMove,
- ClimbingMove,
- ChangePoint,
- Stabilizing,
- Starvation, //used by ThreadpoolMgr
- ThreadTimedOut, //used by ThreadpoolMgr
- Undefined,
-};
-
-#define HillClimbingLogCapacity 200
-
-struct HillClimbingLogEntry
-{
- DWORD TickCount;
- HillClimbingStateTransition Transition;
- int NewControlSetting;
- int LastHistoryCount;
- float LastHistoryMean;
-};
-
-typedef DPTR(HillClimbingLogEntry) PTR_HillClimbingLogEntry;
-
-#endif
#include "volatile.h"
#include "palclr.h"
-#ifdef PAL_STDCPP_COMPAT
#include <utility>
#include <type_traits>
-#else
-#include "clr_std/utility"
-#include "clr_std/type_traits"
-#endif
#if defined(FEATURE_COMINTEROP) && !defined(STRIKE)
#include <Activation.h>
//-----------------------------------------------------------------------------
// Holder is the base class of all holder objects. Any backout object should derive from it.
-// (Eventually some additional bookeeping and exception handling code will be placed in this
+// (Eventually some additional bookkeeping and exception handling code will be placed in this
// base class.)
//
// There are several ways to use this class:
void DoAcquire()
{
- // Insert any global or thread bookeeping here
+ // Insert any global or thread bookkeeping here
}
void DoRelease()
{
- // Insert any global or thread bookeeping here
+ // Insert any global or thread bookkeeping here
}
#ifdef _DEBUG
FORCEINLINE void Acquire()
{
STATIC_CONTRACT_WRAPPER;
- // Insert any global or thread bookeeping here
+ // Insert any global or thread bookkeeping here
_ASSERTE(!m_acquired);
FORCEINLINE void Release()
{
STATIC_CONTRACT_WRAPPER;
- // Insert any global or thread bookeeping here
+ // Insert any global or thread bookkeeping here
if (m_acquired)
{
FORCEINLINE BOOL Acquire()
{
STATIC_CONTRACT_WRAPPER;
- // Insert any global or thread bookeeping here
+ // Insert any global or thread bookkeeping here
_ASSERTE(!m_acquired);
FORCEINLINE void Release()
{
STATIC_CONTRACT_WRAPPER;
- // Insert any global or thread bookeeping here
+ // Insert any global or thread bookkeeping here
if (m_acquired)
{
#endif
template <typename _TYPE, void (*_RELEASEF)(_TYPE*)>
-class SpecializedWrapper : public Wrapper<_TYPE*, DoNothing<_TYPE*>, _RELEASEF, NULL>
+class SpecializedWrapper : public Wrapper<_TYPE*, DoNothing<_TYPE*>, _RELEASEF, 0>
{
- using BaseT = Wrapper<_TYPE*, DoNothing<_TYPE*>, _RELEASEF, NULL>;
+ using BaseT = Wrapper<_TYPE*, DoNothing<_TYPE*>, _RELEASEF, 0>;
public:
FORCEINLINE SpecializedWrapper() : BaseT(NULL, FALSE)
{
template<typename _TYPE>
using DoNothingHolder = SpecializedWrapper<_TYPE, DoNothing<_TYPE*>>;
+#ifndef SOS_INCLUDE
template<typename _TYPE>
using ReleaseHolder = SpecializedWrapper<_TYPE, DoTheRelease<_TYPE>>;
+#endif // SOS_INCLUDE
template<typename _TYPE>
using NonVMComHolder = SpecializedWrapper<_TYPE, DoTheRelease<_TYPE>>;
// } // foo->DecRef() on out of scope
//
//-----------------------------------------------------------------------------
+
template<typename _TYPE>
-class ExecutableWriterHolder;
+class ExecutableWriterHolderNoLog;
-template <typename TYPE>
+class ExecutableAllocator;
+
+template <typename TYPE, typename LOGGER=ExecutableAllocator>
FORCEINLINE void StubRelease(TYPE* value)
{
if (value)
{
- ExecutableWriterHolder<TYPE> stubWriterHolder(value, sizeof(TYPE));
+#ifdef LOG_EXECUTABLE_ALLOCATOR_STATISTICS
+#ifdef HOST_UNIX
+ LOGGER::LogUsage(__FILE__, __LINE__, __PRETTY_FUNCTION__);
+#else
+ LOGGER::LogUsage(__FILE__, __LINE__, __FUNCTION__);
+#endif
+#endif // LOG_EXECUTABLE_ALLOCATOR_STATISTICS
+ ExecutableWriterHolderNoLog<TYPE> stubWriterHolder(value, sizeof(TYPE));
stubWriterHolder.GetRW()->DecRef();
}
}
template<typename _TYPE>
using NewHolder = SpecializedWrapper<_TYPE, Delete<_TYPE>>;
- //-----------------------------------------------------------------------------
-// NewExecutableHolder : New'ed memory holder for executable memory.
-//
-// {
-// NewExecutableHolder<Foo> foo = (Foo*) new (executable) Byte[num];
-// } // delete foo on out of scope
-//-----------------------------------------------------------------------------
-// IJW
-template<class T> void DeleteExecutable(T *p);
-
-template<typename _TYPE>
-using NewExecutableHolder = SpecializedWrapper<_TYPE, DeleteExecutable<_TYPE>>;
-
//-----------------------------------------------------------------------------
// NewArrayHolder : New []'ed pointer holder
// {
typedef Wrapper<void *, DoNothing, VoidUnmapViewOfFile> MapViewHolder;
-#ifdef WszDeleteFile
-// Deletes a file with the specified path. Do not use if you care about failures
-// deleting the file, as failures are ignored by VoidDeleteFile.
-FORCEINLINE void VoidDeleteFile(LPCWSTR wszFilePath) { WszDeleteFile(wszFilePath); }
-typedef Wrapper<LPCWSTR, DoNothing<LPCWSTR>, VoidDeleteFile, NULL> DeleteFileHolder;
-#endif // WszDeleteFile
-
-
//-----------------------------------------------------------------------------
// Misc holders
//-----------------------------------------------------------------------------
// A holder for HMODULE.
FORCEINLINE void HolderFreeLibrary(HMODULE h) { FreeLibrary(h); }
-typedef Wrapper<HMODULE, DoNothing<HMODULE>, HolderFreeLibrary, NULL> HModuleHolder;
+typedef Wrapper<HMODULE, DoNothing<HMODULE>, HolderFreeLibrary, 0> HModuleHolder;
template <typename T> FORCEINLINE
void DoLocalFree(T* pMem)
typedef Wrapper<HKEY,DoNothing,RegKeyRelease> RegKeyHolder;
#endif // HOST_WINDOWS
-class ErrorModeHolder
+class ErrorModeHolder final
{
- UINT m_oldMode;
+#ifdef HOST_WINDOWS
+ BOOL m_revert;
+ DWORD m_oldMode;
public:
- ErrorModeHolder(UINT newMode){m_oldMode=SetErrorMode(newMode);};
- ~ErrorModeHolder(){SetErrorMode(m_oldMode);};
- UINT OldMode() {return m_oldMode;};
+ ErrorModeHolder()
+ : m_revert{ FALSE }
+ {
+ DWORD newMode = SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS;
+ m_revert = ::SetThreadErrorMode(newMode, &m_oldMode);
+ }
+ ~ErrorModeHolder() noexcept
+ {
+ if (m_revert != FALSE)
+ (void)::SetThreadErrorMode(m_oldMode, NULL);
+ }
+#endif // HOST_WINDOWS
};
#ifdef HOST_WINDOWS
//
// {
// HKEYHolder hFoo = NULL;
-// WszRegOpenKeyEx(HKEY_CLASSES_ROOT, L"Interface",0, KEY_READ, hFoo);
+// RegOpenKeyEx(HKEY_CLASSES_ROOT, L"Interface",0, KEY_READ, hFoo);
//
// } // close key on out of scope via RegCloseKey.
//-----------------------------------------------------------------------------
}
FORCEINLINE void Release()
{
- // Insert any global or thread bookeeping here
+ // Insert any global or thread bookkeeping here
if (m_acquired)
{
virtual void Free(void* p) = 0;
};
-// This class wraps an allocator that does not allow zero-length allocations,
-// producing one that does (every zero-length allocation produces a pointer to the same
-// statically-allocated memory, and freeing that pointer is a no-op).
-class AllowZeroAllocator: public IAllocator
-{
- int m_zeroLenAllocTarg;
- IAllocator* m_alloc;
-
-public:
- AllowZeroAllocator(IAllocator* alloc) : m_alloc(alloc) {}
-
- void* Alloc(size_t sz)
- {
- if (sz == 0)
- {
- return (void*)(&m_zeroLenAllocTarg);
- }
- else
- {
- return m_alloc->Alloc(sz);
- }
- }
-
- void* ArrayAlloc(size_t elemSize, size_t numElems)
- {
- if (elemSize == 0 || numElems == 0)
- {
- return (void*)(&m_zeroLenAllocTarg);
- }
- else
- {
- return m_alloc->ArrayAlloc(elemSize, numElems);
- }
- }
-
- virtual void Free(void * p)
- {
- if (p != (void*)(&m_zeroLenAllocTarg))
- {
- m_alloc->Free(p);
- }
- }
-};
-
#endif // _IALLOCATOR_DEFINED_
SCOUNT_T Subtract(const IndexerBasePrototype &i) const;
CHECK DoCheck(SCOUNT_T delta) const;
};
-
};
-
template <typename CONTAINER>
class CheckedIteratorBase
{
+ DEFINE_MEMBER_EXISTENCE_CHECK(m_revision);
protected:
#if defined(_DEBUG)
const CONTAINER *m_container;
int m_revision;
#endif
- CHECK CheckRevision() const
+ template<typename Dummy = CONTAINER>
+ typename std::enable_if<has_m_revision<Dummy>::value, CHECK>::type CheckRevision() const
{
LIMITED_METHOD_CONTRACT;
SUPPORTS_DAC;
-#if defined(_DEBUG) && (defined(_MSC_VER) || defined(__llvm__))
- __if_exists(CONTAINER::m_revision)
- {
- CHECK_MSG(m_revision == m_container->m_revision,
- "Use of Iterator after container has been modified");
- }
+#if defined(_DEBUG)
+ CHECK_MSG(m_revision == m_container->m_revision,
+ "Use of Iterator after container has been modified");
#endif
CHECK_OK;
}
+ template<typename Dummy = CONTAINER>
+ typename std::enable_if<!has_m_revision<Dummy>::value, CHECK>::type CheckRevision() const { CHECK_OK; }
+
CheckedIteratorBase()
{
LIMITED_METHOD_DAC_CONTRACT;
CheckedIteratorBase(const CONTAINER *container)
{
- LIMITED_METHOD_CONTRACT;
#if defined(_DEBUG)
m_container = container;
-#if defined(_MSC_VER) || defined(__llvm__)
- __if_exists(CONTAINER::m_revision)
- {
- m_revision = m_container->m_revision;
- }
+ Init(container, has_m_revision<CONTAINER>());
#endif
+ }
+
+ void Init(const CONTAINER *container, std::true_type)
+ {
+#if defined(_DEBUG)
+ m_revision = container->m_revision;
#endif
}
- void Resync(const CONTAINER *container)
+ void Init(const CONTAINER *container, std::false_type) { /* No-op */ }
+
+ template<typename Dummy = CONTAINER>
+ typename std::enable_if<has_m_revision<Dummy>::value, void>::type Resync(const CONTAINER *container)
{
LIMITED_METHOD_DAC_CONTRACT;
-#if defined(_DEBUG) && (defined(_MSC_VER) || defined(__llvm__))
- __if_exists(CONTAINER::m_revision)
- {
- m_revision = m_container->m_revision;
- }
+#if defined(_DEBUG)
+ m_revision = m_container->m_revision;
#endif
}
+ template<typename Dummy = CONTAINER>
+ typename std::enable_if<!has_m_revision<Dummy>::value, void>::type Resync(const CONTAINER *container) { /* No-op */ }
+
#if defined(_DEBUG)
const CONTAINER *GetContainerDebug() const
{
EM_NORC = 218, // Nanoradio Optimized RISC
EM_CSR_KALIMBA = 219, // CSR Kalimba architecture family
EM_AMDGPU = 224, // AMD GPU architecture
+ EM_RISCV = 243,
EM_LOONGARCH = 258, // LoongArch processor
// A request has been made to the maintainer of the official registry for
ODK_PAGESIZE = 11 // Page size information
};
+// LoongArch Specific e_flags
+enum : unsigned {
+ EF_LARCH_ABI = 0x0003,
+ EF_LARCH_ABI_LP32 = 0x0001,
+ EF_LARCH_ABI_XLP32 = 0x0002,
+ EF_LARCH_ABI_LP64 = 0x0003,
+};
+
// Hexagon-specific e_flags
enum {
// Object processor version flags, bits[11:0]
void setBinding(unsigned char b) { setBindingAndType(b, getType()); }
void setType(unsigned char t) { setBindingAndType(getBinding(), t); }
void setBindingAndType(unsigned char b, unsigned char t) {
- st_info = (b << 4) + (t & 0x0f);
+ st_info = (unsigned char)((b << 4) + (t & 0x0f));
}
};
void setBinding(unsigned char b) { setBindingAndType(b, getType()); }
void setType(unsigned char t) { setBindingAndType(getBinding(), t); }
void setBindingAndType(unsigned char b, unsigned char t) {
- st_info = (b << 4) + (t & 0x0f);
+ st_info = (unsigned char)((b << 4) + (t & 0x0f));
}
};
#define LL_EVERYTHING 10
-#define LL_INFO1000000 9 // can be expected to generate 1,000,000 logs per small but not trival run
-#define LL_INFO100000 8 // can be expected to generate 100,000 logs per small but not trival run
-#define LL_INFO10000 7 // can be expected to generate 10,000 logs per small but not trival run
-#define LL_INFO1000 6 // can be expected to generate 1,000 logs per small but not trival run
-#define LL_INFO100 5 // can be expected to generate 100 logs per small but not trival run
-#define LL_INFO10 4 // can be expected to generate 10 logs per small but not trival run
+#define LL_INFO1000000 9 // can be expected to generate 1,000,000 logs per small but not trivial run
+#define LL_INFO100000 8 // can be expected to generate 100,000 logs per small but not trivial run
+#define LL_INFO10000 7 // can be expected to generate 10,000 logs per small but not trivial run
+#define LL_INFO1000 6 // can be expected to generate 1,000 logs per small but not trivial run
+#define LL_INFO100 5 // can be expected to generate 100 logs per small but not trivial run
+#define LL_INFO10 4 // can be expected to generate 10 logs per small but not trivial run
#define LL_WARNING 3
#define LL_ERROR 2
#define LL_FATALERROR 1
#define ERROR 0
#define FATALERROR 0
+#ifdef _DEBUG
+#define _LOGALLOC
+#endif
+
#ifndef LOGGING
#define LOG(x)
bool LoggingOn(DWORD facility, DWORD level);
bool Logging2On(DWORD facility, DWORD level);
-#define LOG(x) do { if (LoggingEnabled()) { LogSpew x; } } while (0)
+#ifdef DACCESS_COMPILE
+
+/*
+ *
+ * Logging for the DAC is an incomplete feature, see more in
+ * https://github.com/dotnet/runtime/issues/77922
+ *
+ * As of now, logging need to be opt-in. Any logging done through
+ * DAC_LOG (or it variants) will be available in the log for both the runtime and the DAC build
+ * And the normal LOG macro will be available only for the runtime.
+ *
+ */
+
+#define LOG(x) do { } while (0)
+#define LOG2(x) do { } while (0)
+#define LOGALWAYS(x) do { } while (0)
+#define DAC_LOG(x) do { if (LoggingEnabled()) { LogSpew x; } } while (0)
+#define DAC_LOG2(x) do { if (LoggingEnabled()) { LogSpew2 x; } } while (0)
+#define DAC_LOGALWAYS(x) LogSpewAlways x
+
+#else
+
+#define LOG(x) do { if (LoggingEnabled()) { LogSpew x; } } while (0)
+#define LOG2(x) do { if (LoggingEnabled()) { LogSpew2 x; } } while (0)
+#define LOGALWAYS(x) LogSpewAlways x
+#define DAC_LOG(x) LOG(x)
+#define DAC_LOG2(x) LOG2(x)
+#define DAC_LOGALWAYS(x) LOGALWAYS(x)
-#define LOG2(x) do { if (LoggingEnabled()) { LogSpew2 x; } } while (0)
-
-#define LOGALWAYS(x) LogSpewAlways x
+#endif
#endif
#define _WIN_PATH_APIS_WRAPPER_
class SString;
+#ifdef HOST_WINDOWS
+
HMODULE
LoadLibraryExWrapper(
_In_ LPCWSTR lpLibFileName,
_In_ GET_FILEEX_INFO_LEVELS fInfoLevelId,
_Out_writes_bytes_(sizeof(WIN32_FILE_ATTRIBUTE_DATA)) LPVOID lpFileInformation
);
-BOOL
-DeleteFileWrapper(
- _In_ LPCWSTR lpFileName
- );
-HANDLE
-FindFirstFileExWrapper(
- _In_ LPCWSTR lpFileName,
- _In_ FINDEX_INFO_LEVELS fInfoLevelId,
- _Out_writes_bytes_(sizeof(WIN32_FIND_DATAW)) LPVOID lpFindFileData,
- _In_ FINDEX_SEARCH_OPS fSearchOp,
- _Reserved_ LPVOID lpSearchFilter,
- _In_ DWORD dwAdditionalFlags
- );
-
-#ifndef HOST_UNIX
BOOL
CopyFileExWrapper(
_In_ LPCWSTR lpExistingFileName,
_Inout_opt_ LPBOOL pbCancel,
_In_ DWORD dwCopyFlags
);
-#endif //HOST_UNIX
-
-BOOL
-MoveFileExWrapper(
- _In_ LPCWSTR lpExistingFileName,
- _In_opt_ LPCWSTR lpNewFileName,
- _In_ DWORD dwFlags
- );
+#endif //HOST_WINDOWS
DWORD
SearchPathWrapper(
_Out_opt_ LPWSTR * lpFilePart
);
-
-UINT WINAPI GetTempFileNameWrapper(
- _In_ LPCTSTR lpPathName,
- _In_ LPCTSTR lpPrefixString,
- _In_ UINT uUnique,
- SString& lpTempFileName
- );
-
-DWORD WINAPI GetTempPathWrapper(
- SString& lpBuffer
- );
-
-DWORD WINAPI GetCurrentDirectoryWrapper(
- SString& lpBuffer
- );
-
DWORD
GetModuleFileNameWrapper(
_In_opt_ HMODULE hModule,
// File types for the database.
enum FILETYPE
{
- FILETYPE_UNKNOWN, // Unknown or undefined type.
- FILETYPE_CLB, // Native .clb file format.
- FILETYPE_CLX, // An obsolete file format.
- FILETYPE_NTPE, // Windows PE executable.
- FILETYPE_NTOBJ, // .obj file format (with .clb embedded).
- FILETYPE_TLB // Typelib format.
+ FILETYPE_UNKNOWN, // Unknown or undefined type.
+ FILETYPE_CLB, // Native .clb file format.
+ FILETYPE_NTPE, // Windows PE executable.
};
enum MAPPINGTYPE
#define COMPRESSED_MODEL_STREAM_A "#~"
#define ENC_MODEL_STREAM_A "#-"
#define MINIMAL_MD_STREAM_A "#JTD"
-#define HOT_MODEL_STREAM_A "#!"
#ifdef FEATURE_METADATA_EMIT_PORTABLE_PDB
#define PDB_STREAM_A "#Pdb"
#endif // FEATURE_METADATA_EMIT_PORTABLE_PDB
#define COMPRESSED_MODEL_STREAM W("#~")
#define ENC_MODEL_STREAM W("#-")
#define MINIMAL_MD_STREAM W("#JTD")
-#define HOT_MODEL_STREAM W("#!")
#ifdef FEATURE_METADATA_EMIT_PORTABLE_PDB
#define PDB_STREAM W("#Pdb")
#endif // FEATURE_METADATA_EMIT_PORTABLE_PDB
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//****************************************************************************
-// File: metadata.h
-//
-
-//
-// Notes:
-// Common includes for EE & metadata internal. This file contains
-// definition of CorMetaDataScope
-//****************************************************************************
-
-#ifndef _METADATA_H_
-#define _METADATA_H_
-
-#include "ex.h"
-
-class CorProfileData;
-class IMetaModelCommon;
-class MDInternalRW;
-class UTSemReadWrite;
-
-inline int IsGlobalMethodParentTk(mdTypeDef td)
-{
- LIMITED_METHOD_CONTRACT;
-
- return (td == mdTypeDefNil || td == mdTokenNil);
-}
-
-typedef enum CorInternalStates
-{
- tdNoTypes = 0x00000000,
- tdAllAssemblies = 0x00000001,
- tdAllTypes = 0xffffffff,
-} CorInternalStates;
-
-//
-// MetaData custom value names.
-//
-enum CorIfaceAttr
-{
- ifDual = 0, // Interface derives from IDispatch.
- ifVtable = 1, // Interface derives from IUnknown.
- ifDispatch = 2, // Interface is a dispinterface.
- ifInspectable = 3, // Interface derives from IInspectable.
- ifLast = 4, // The last member of the enum.
-};
-
-inline BOOL IsDispatchBasedItf(CorIfaceAttr ifaceAttr)
-{
- return (ifaceAttr == ifDual || ifaceAttr == ifDispatch);
-}
-
-enum CorClassIfaceAttr
-{
- clsIfNone = 0, // No class interface is generated.
- clsIfAutoDisp = 1, // A dispatch only class interface is generated.
- clsIfAutoDual = 2, // A dual class interface is generated.
- clsIfLast = 3, // The last member of the enum.
-};
-
-//
-// The default values for the COM interface and class interface types.
-//
-#define DEFAULT_COM_INTERFACE_TYPE ifDual
-#define DEFAULT_CLASS_INTERFACE_TYPE clsIfAutoDisp
-
-#define HANDLE_UNCOMPRESSED(func) (E_FAIL)
-#define HANDLE_UNCOMPRESSED_BOOL(func) (false)
-
-class TOKENLIST : public CDynArray<mdToken>
-{
-};
-
-
-typedef enum tagEnumType
-{
- MDSimpleEnum = 0x0, // simple enumerator that doesn't allocate memory
-
- // You could get this kind of enum if you perform a non-simple query (such as EnumMethodWithName).
- //
- MDDynamicArrayEnum = 0x2, // dynamic array that holds tokens
-} EnumType;
-
-//*****************************************
-// Enumerator used by MetaDataInternal
-//*****************************************
-struct HENUMInternal
-{
- DWORD m_tkKind; // kind of tables that the enum is holding the result
- uint32_t m_ulCount; // count of total entries holding by the enumerator
-
- EnumType m_EnumType;
-
- struct {
- uint32_t m_ulStart;
- uint32_t m_ulEnd;
- uint32_t m_ulCur;
- } u;
-
- // m_cursor will go away when we no longer support running EE with uncompressed
- // format. WHEN WE REMOVE THIS, REMOVE ITS VESTIAGES FROM ZeroEnum as well
- //
- union {
- void* m_alignpad; // The first item is m_cursor[] is a pointer
- char m_cursor[32]; // cursor holding query result for read/write mode
- };
-
- // TOKENLIST daTKList; // dynamic arrays of token list
- HENUMInternal() : m_EnumType(MDSimpleEnum) { LIMITED_METHOD_DAC_CONTRACT; }
-
- // in-place initialization
- static void InitDynamicArrayEnum(
- HENUMInternal *pEnum); // HENUMInternal to be initialized
-
- static void InitSimpleEnum(
- DWORD tkKind, // kind of token that we are iterating
- ULONG ridStart, // starting rid
- ULONG ridEnd, // end rid
- HENUMInternal *pEnum); // HENUMInternal to be initialized
-
- // Specialized helper which should be better than always calling memset
- inline
- static void ZeroEnum(
- HENUMInternal *pEnum)
- {
- // we use this to avoid the memset that will happen otherwise.
- // this should be inlined in its caller. we are seeing a large
- // number of calls to memset from MDInternalRO::EnumPermissionSetsInit
- // on x64 which we can eliminate with this code.
- pEnum->m_tkKind = 0;
- pEnum->m_ulCount = 0;
- pEnum->m_EnumType = MDSimpleEnum;
- pEnum->u.m_ulStart = 0;
- pEnum->u.m_ulEnd = 0;
- pEnum->u.m_ulCur = 0;
-
- // TODO: remove this when we remove m_cursor from the HENUMInternal structure
- _ASSERTE(IS_ALIGNED(pEnum->m_cursor, sizeof(DWORD)));
- _ASSERTE((sizeof(HENUMInternal) - offsetof(HENUMInternal, m_cursor)) == (8 * sizeof(DWORD)));
-
- DWORD* pBuffer = (DWORD*)pEnum->m_cursor;
- pBuffer[0] = 0;
- pBuffer[1] = 0;
- pBuffer[2] = 0;
- pBuffer[3] = 0;
- pBuffer[4] = 0;
- pBuffer[5] = 0;
- pBuffer[6] = 0;
- pBuffer[7] = 0;
- }
-
- // This will only clear the content of enum and will not free the memory of enum
- static void ClearEnum(
- HENUMInternal *pmdEnum);
-
- // create a HENUMInternal. This will allocate the memory
- __checkReturn
- static HRESULT CreateSimpleEnum(
- DWORD tkKind, // kind of token that we are iterating
- ULONG ridStart, // starting rid
- ULONG ridEnd, // end rid
- HENUMInternal **ppEnum); // return the created HENUMInternal
-
- __checkReturn
- static HRESULT CreateDynamicArrayEnum(
- DWORD tkKind, // kind of token that we are iterating
- HENUMInternal **ppEnum); // return the created HENUMInternal
-
- // Destory Enum. This will free the memory
- static void DestroyEnum(
- HENUMInternal *pmdEnum);
-
- static void DestroyEnumIfEmpty(
- HENUMInternal **ppEnum); // reset the enumerator pointer to NULL if empty
-
- __checkReturn
- static HRESULT EnumWithCount(
- HENUMInternal *pEnum, // enumerator
- ULONG cMax, // max tokens that caller wants
- mdToken rTokens[], // output buffer to fill the tokens
- ULONG *pcTokens); // number of tokens fill to the buffer upon return
-
- __checkReturn
- static HRESULT EnumWithCount(
- HENUMInternal *pEnum, // enumerator
- ULONG cMax, // max tokens that caller wants
- mdToken rTokens1[], // first output buffer to fill the tokens
- mdToken rTokens2[], // second output buffer to fill the tokens
- ULONG *pcTokens); // number of tokens fill to the buffer upon return
-
- __checkReturn
- static HRESULT AddElementToEnum(
- HENUMInternal *pEnum, // return the created HENUMInternal
- mdToken tk); // token to fill
-
- //*****************************************
- // Get next value contained in the enumerator
- //*****************************************
- static bool EnumNext(
- HENUMInternal *phEnum, // [IN] the enumerator to retrieve information
- mdToken *ptk); // [OUT] token to scope the search
-
- __checkReturn
- static HRESULT GetCount(
- HENUMInternal *phEnum, // [IN] the enumerator to retrieve information
- ULONG *pCount); // ]OUT] the index of the desired item
-
- __checkReturn
- static HRESULT GetElement(
- HENUMInternal *phEnum, // [IN] the enumerator to retrieve information
- ULONG ix, // ]IN] the index of the desired item
- mdToken *ptk); // [OUT] token to fill
-
-};
-
-
-
-//*****************************************
-// Default Value for field, param or property. Returned by GetDefaultValue
-//*****************************************
-typedef struct _MDDefaultValue
-{
-#if BIGENDIAN
- _MDDefaultValue(void)
- {
- m_bType = ELEMENT_TYPE_END;
- }
- ~_MDDefaultValue(void)
- {
- if (m_bType == ELEMENT_TYPE_STRING)
- {
- delete[] m_wzValue;
- }
- }
-#endif
-
- // type of default value
- BYTE m_bType; // CorElementType for the default value
-
- // the default value
- union
- {
- BOOL m_bValue; // ELEMENT_TYPE_BOOLEAN
- CHAR m_cValue; // ELEMENT_TYPE_I1
- BYTE m_byteValue; // ELEMENT_TYPE_UI1
- SHORT m_sValue; // ELEMENT_TYPE_I2
- USHORT m_usValue; // ELEMENT_TYPE_UI2
- LONG m_lValue; // ELEMENT_TYPE_I4
- ULONG m_ulValue; // ELEMENT_TYPE_UI4
- LONGLONG m_llValue; // ELEMENT_TYPE_I8
- ULONGLONG m_ullValue; // ELEMENT_TYPE_UI8
- FLOAT m_fltValue; // ELEMENT_TYPE_R4
- DOUBLE m_dblValue; // ELEMENT_TYPE_R8
- LPCWSTR m_wzValue; // ELEMENT_TYPE_STRING
- IUnknown *m_unkValue; // ELEMENT_TYPE_CLASS
- };
- ULONG m_cbSize; // default value size (for blob)
-
-} MDDefaultValue;
-
-
-
-//*****************************************
-// structure use to in GetAllEventAssociates and GetAllPropertyAssociates
-//*****************************************
-typedef struct
-{
- mdMethodDef m_memberdef;
- DWORD m_dwSemantics;
-} ASSOCIATE_RECORD;
-
-
-//
-// structure use to retrieve class layout informaiton
-//
-typedef struct
-{
- RID m_ridFieldCur; // indexing to the field table
- RID m_ridFieldEnd; // end index to field table
-} MD_CLASS_LAYOUT;
-
-
-// Structure for describing the Assembly MetaData.
-typedef struct
-{
- USHORT usMajorVersion; // Major Version.
- USHORT usMinorVersion; // Minor Version.
- USHORT usBuildNumber; // Build Number.
- USHORT usRevisionNumber; // Revision Number.
- LPCSTR szLocale; // Locale.
-} AssemblyMetaDataInternal;
-
-
-
-// Callback definition for comparing signatures.
-// (*PSIGCOMPARE) (BYTE ScopeSignature[], DWORD ScopeSignatureLength,
-// BYTE ExternalSignature[], DWORD ExternalSignatureLength,
-// void* SignatureData);
-typedef BOOL (*PSIGCOMPARE)(PCCOR_SIGNATURE, DWORD, PCCOR_SIGNATURE, DWORD, void*);
-
-
-// {1B119F60-C507-4024-BB39-F8223FB3E1FD}
-EXTERN_GUID(IID_IMDInternalImport, 0x1b119f60, 0xc507, 0x4024, 0xbb, 0x39, 0xf8, 0x22, 0x3f, 0xb3, 0xe1, 0xfd);
-
-#undef INTERFACE
-#define INTERFACE IMDInternalImport
-DECLARE_INTERFACE_(IMDInternalImport, IUnknown)
-{
- //*****************************************************************************
- // return the count of entries of a given kind in a scope
- // For example, pass in mdtMethodDef will tell you how many MethodDef
- // contained in a scope
- //*****************************************************************************
- STDMETHOD_(ULONG, GetCountWithTokenKind)(// return hresult
- DWORD tkKind) PURE; // [IN] pass in the kind of token.
-
- //*****************************************************************************
- // enumerator for typedef
- //*****************************************************************************
- __checkReturn
- STDMETHOD(EnumTypeDefInit)( // return hresult
- HENUMInternal *phEnum) PURE; // [OUT] buffer to fill for enumerator data
-
- //*****************************************************************************
- // enumerator for MethodImpl
- //*****************************************************************************
- __checkReturn
- STDMETHOD(EnumMethodImplInit)( // return hresult
- mdTypeDef td, // [IN] TypeDef over which to scope the enumeration.
- HENUMInternal *phEnumBody, // [OUT] buffer to fill for enumerator data for MethodBody tokens.
- HENUMInternal *phEnumDecl) PURE; // [OUT] buffer to fill for enumerator data for MethodDecl tokens.
-
- ULONG EnumMethodImplGetCount(
- HENUMInternal *phEnumBody, // [IN] MethodBody enumerator.
- HENUMInternal *phEnumDecl) // [IN] MethodDecl enumerator.
- {
- return phEnumBody->m_ulCount;
- }
-
- STDMETHOD_(void, EnumMethodImplReset)(
- HENUMInternal *phEnumBody, // [IN] MethodBody enumerator.
- HENUMInternal *phEnumDecl) PURE; // [IN] MethodDecl enumerator.
-
- __checkReturn
- STDMETHOD(EnumMethodImplNext)( // return hresult (S_OK = TRUE, S_FALSE = FALSE or error code)
- HENUMInternal *phEnumBody, // [IN] input enum for MethodBody
- HENUMInternal *phEnumDecl, // [IN] input enum for MethodDecl
- mdToken *ptkBody, // [OUT] return token for MethodBody
- mdToken *ptkDecl) PURE; // [OUT] return token for MethodDecl
-
- STDMETHOD_(void, EnumMethodImplClose)(
- HENUMInternal *phEnumBody, // [IN] MethodBody enumerator.
- HENUMInternal *phEnumDecl) PURE; // [IN] MethodDecl enumerator.
-
- //*****************************************
- // Enumerator helpers for memberdef, memberref, interfaceimp,
- // event, property, exception, param
- //*****************************************
-
- __checkReturn
- STDMETHOD(EnumGlobalFunctionsInit)( // return hresult
- HENUMInternal *phEnum) PURE; // [OUT] buffer to fill for enumerator data
-
- __checkReturn
- STDMETHOD(EnumGlobalFieldsInit)( // return hresult
- HENUMInternal *phEnum) PURE; // [OUT] buffer to fill for enumerator data
-
- __checkReturn
- STDMETHOD(EnumInit)( // return S_FALSE if record not found
- DWORD tkKind, // [IN] which table to work on
- mdToken tkParent, // [IN] token to scope the search
- HENUMInternal *phEnum) PURE; // [OUT] the enumerator to fill
-
- __checkReturn
- STDMETHOD(EnumAllInit)( // return S_FALSE if record not found
- DWORD tkKind, // [IN] which table to work on
- HENUMInternal *phEnum) PURE; // [OUT] the enumerator to fill
-
- bool EnumNext(
- HENUMInternal *phEnum, // [IN] the enumerator to retrieve information
- mdToken *ptk) // [OUT] token to scope the search
- {
- _ASSERTE(phEnum && ptk);
- if (phEnum->u.m_ulCur >= phEnum->u.m_ulEnd)
- return false;
-
- if ( phEnum->m_EnumType == MDSimpleEnum )
- {
- *ptk = phEnum->u.m_ulCur | phEnum->m_tkKind;
- phEnum->u.m_ulCur++;
- }
- else
- {
- TOKENLIST *pdalist = (TOKENLIST *)&(phEnum->m_cursor);
-
- _ASSERTE( phEnum->m_EnumType == MDDynamicArrayEnum );
- *ptk = *( pdalist->Get(phEnum->u.m_ulCur++) );
- }
- return true;
- }
-
- ULONG EnumGetCount(
- HENUMInternal *phEnum) // [IN] the enumerator to retrieve information
- {
- _ASSERTE(phEnum);
- return phEnum->m_ulCount;
- }
-
- void EnumReset(
- HENUMInternal *phEnum) // [IN] the enumerator to be reset
- {
- _ASSERTE(phEnum);
- _ASSERTE( phEnum->m_EnumType == MDSimpleEnum || phEnum->m_EnumType == MDDynamicArrayEnum);
-
- phEnum->u.m_ulCur = phEnum->u.m_ulStart;
- } // MDInternalRW::EnumReset
-
- void EnumClose(
- HENUMInternal *phEnum) // [IN] the enumerator to be closed
- {
- _ASSERTE( phEnum->m_EnumType == MDSimpleEnum ||
- phEnum->m_EnumType == MDDynamicArrayEnum);
- if (phEnum->m_EnumType == MDDynamicArrayEnum)
- HENUMInternal::ClearEnum(phEnum);
- }
-
- //*****************************************
- // Enumerator helpers for CustomAttribute
- //*****************************************
- __checkReturn
- STDMETHOD(EnumCustomAttributeByNameInit)(// return S_FALSE if record not found
- mdToken tkParent, // [IN] token to scope the search
- LPCSTR szName, // [IN] CustomAttribute's name to scope the search
- HENUMInternal *phEnum) PURE; // [OUT] the enumerator to fill
-
- //*****************************************
- // Nagivator helper to navigate back to the parent token given a token.
- // For example, given a memberdef token, it will return the containing typedef.
- //
- // the mapping is as following:
- // ---given child type---------parent type
- // mdMethodDef mdTypeDef
- // mdFieldDef mdTypeDef
- // mdInterfaceImpl mdTypeDef
- // mdParam mdMethodDef
- // mdProperty mdTypeDef
- // mdEvent mdTypeDef
- //
- //*****************************************
- __checkReturn
- STDMETHOD(GetParentToken)(
- mdToken tkChild, // [IN] given child token
- mdToken *ptkParent) PURE; // [OUT] returning parent
-
- //*****************************************
- // Custom value helpers
- //*****************************************
- __checkReturn
- STDMETHOD(GetCustomAttributeProps)( // S_OK or error.
- mdCustomAttribute at, // [IN] The attribute.
- mdToken *ptkType) PURE; // [OUT] Put attribute type here.
-
- __checkReturn
- STDMETHOD(GetCustomAttributeAsBlob)(
- mdCustomAttribute cv, // [IN] given custom value token
- void const **ppBlob, // [OUT] return the pointer to internal blob
- ULONG *pcbSize) PURE; // [OUT] return the size of the blob
-
- // returned void in v1.0/v1.1
- __checkReturn
- STDMETHOD (GetScopeProps)(
- LPCSTR *pszName, // [OUT] scope name
- GUID *pmvid) PURE; // [OUT] version id
-
- // finding a particular method
- __checkReturn
- STDMETHOD(FindMethodDef)(
- mdTypeDef classdef, // [IN] given typedef
- LPCSTR szName, // [IN] member name
- PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
- ULONG cbSigBlob, // [IN] count of bytes in the signature blob
- mdMethodDef *pmd) PURE; // [OUT] matching memberdef
-
- // return a iSeq's param given a MethodDef
- __checkReturn
- STDMETHOD(FindParamOfMethod)( // S_OK or error.
- mdMethodDef md, // [IN] The owning method of the param.
- ULONG iSeq, // [IN] The sequence # of the param.
- mdParamDef *pparamdef) PURE; // [OUT] Put ParamDef token here.
-
- //*****************************************
- //
- // GetName* functions
- //
- //*****************************************
-
- // return the name and namespace of typedef
- __checkReturn
- STDMETHOD(GetNameOfTypeDef)(
- mdTypeDef classdef, // given classdef
- LPCSTR *pszname, // return class name(unqualified)
- LPCSTR *psznamespace) PURE; // return the name space name
-
- __checkReturn
- STDMETHOD(GetIsDualOfTypeDef)(
- mdTypeDef classdef, // [IN] given classdef.
- ULONG *pDual) PURE; // [OUT] return dual flag here.
-
- __checkReturn
- STDMETHOD(GetIfaceTypeOfTypeDef)(
- mdTypeDef classdef, // [IN] given classdef.
- ULONG *pIface) PURE; // [OUT] 0=dual, 1=vtable, 2=dispinterface
-
- // get the name of either methoddef
- __checkReturn
- STDMETHOD(GetNameOfMethodDef)( // return the name of the memberdef in UTF8
- mdMethodDef md, // given memberdef
- LPCSTR *pszName) PURE;
-
- __checkReturn
- STDMETHOD(GetNameAndSigOfMethodDef)(
- mdMethodDef methoddef, // [IN] given memberdef
- PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to a blob value of CLR signature
- ULONG *pcbSigBlob, // [OUT] count of bytes in the signature blob
- LPCSTR *pszName) PURE;
-
- // return the name of a FieldDef
- __checkReturn
- STDMETHOD(GetNameOfFieldDef)(
- mdFieldDef fd, // given memberdef
- LPCSTR *pszName) PURE;
-
- // return the name of typeref
- __checkReturn
- STDMETHOD(GetNameOfTypeRef)(
- mdTypeRef classref, // [IN] given typeref
- LPCSTR *psznamespace, // [OUT] return typeref name
- LPCSTR *pszname) PURE; // [OUT] return typeref namespace
-
- // return the resolutionscope of typeref
- __checkReturn
- STDMETHOD(GetResolutionScopeOfTypeRef)(
- mdTypeRef classref, // given classref
- mdToken *ptkResolutionScope) PURE;
-
- // Find the type token given the name.
- __checkReturn
- STDMETHOD(FindTypeRefByName)(
- LPCSTR szNamespace, // [IN] Namespace for the TypeRef.
- LPCSTR szName, // [IN] Name of the TypeRef.
- mdToken tkResolutionScope, // [IN] Resolution Scope fo the TypeRef.
- mdTypeRef *ptk) PURE; // [OUT] TypeRef token returned.
-
- // return the TypeDef properties
- // returned void in v1.0/v1.1
- __checkReturn
- STDMETHOD(GetTypeDefProps)(
- mdTypeDef classdef, // given classdef
- DWORD *pdwAttr, // return flags on class, tdPublic, tdAbstract
- mdToken *ptkExtends) PURE; // [OUT] Put base class TypeDef/TypeRef here
-
- // return the item's guid
- __checkReturn
- STDMETHOD(GetItemGuid)(
- mdToken tkObj, // [IN] given item.
- CLSID *pGuid) PURE; // [out[ put guid here.
-
- // Get enclosing class of the NestedClass.
- __checkReturn
- STDMETHOD(GetNestedClassProps)( // S_OK or error
- mdTypeDef tkNestedClass, // [IN] NestedClass token.
- mdTypeDef *ptkEnclosingClass) PURE; // [OUT] EnclosingClass token.
-
- // Get count of Nested classes given the enclosing class.
- __checkReturn
- STDMETHOD(GetCountNestedClasses)( // return count of Nested classes.
- mdTypeDef tkEnclosingClass, // Enclosing class.
- ULONG *pcNestedClassesCount) PURE;
-
- // Return array of Nested classes given the enclosing class.
- __checkReturn
- STDMETHOD(GetNestedClasses)( // Return actual count.
- mdTypeDef tkEnclosingClass, // [IN] Enclosing class.
- mdTypeDef *rNestedClasses, // [OUT] Array of nested class tokens.
- ULONG ulNestedClasses, // [IN] Size of array.
- ULONG *pcNestedClasses) PURE;
-
- // return the ModuleRef properties
- // returned void in v1.0/v1.1
- __checkReturn
- STDMETHOD(GetModuleRefProps)(
- mdModuleRef mur, // [IN] moduleref token
- LPCSTR *pszName) PURE; // [OUT] buffer to fill with the moduleref name
-
- //*****************************************
- //
- // GetSig* functions
- //
- //*****************************************
- __checkReturn
- STDMETHOD(GetSigOfMethodDef)(
- mdMethodDef tkMethodDef, // [IN] given MethodDef
- ULONG * pcbSigBlob, // [OUT] count of bytes in the signature blob
- PCCOR_SIGNATURE * ppSig) PURE;
-
- __checkReturn
- STDMETHOD(GetSigOfFieldDef)(
- mdFieldDef tkFieldDef, // [IN] given FieldDef
- ULONG * pcbSigBlob, // [OUT] count of bytes in the signature blob
- PCCOR_SIGNATURE * ppSig) PURE;
-
- __checkReturn
- STDMETHOD(GetSigFromToken)(
- mdToken tk, // FieldDef, MethodDef, Signature or TypeSpec token
- ULONG * pcbSig,
- PCCOR_SIGNATURE * ppSig) PURE;
-
-
-
- //*****************************************
- // get method property
- //*****************************************
- __checkReturn
- STDMETHOD(GetMethodDefProps)(
- mdMethodDef md, // The method for which to get props.
- DWORD *pdwFlags) PURE;
-
- //*****************************************
- // return method implementation informaiton, like RVA and implflags
- //*****************************************
- // returned void in v1.0/v1.1
- __checkReturn
- STDMETHOD(GetMethodImplProps)(
- mdToken tk, // [IN] MethodDef
- ULONG *pulCodeRVA, // [OUT] CodeRVA
- DWORD *pdwImplFlags) PURE; // [OUT] Impl. Flags
-
- //*****************************************
- // return method implementation informaiton, like RVA and implflags
- //*****************************************
- __checkReturn
- STDMETHOD(GetFieldRVA)(
- mdFieldDef fd, // [IN] fielddef
- ULONG *pulCodeRVA) PURE; // [OUT] CodeRVA
-
- //*****************************************
- // get field property
- //*****************************************
- __checkReturn
- STDMETHOD(GetFieldDefProps)(
- mdFieldDef fd, // [IN] given fielddef
- DWORD *pdwFlags) PURE; // [OUT] return fdPublic, fdPrive, etc flags
-
- //*****************************************************************************
- // return default value of a token(could be paramdef, fielddef, or property
- //*****************************************************************************
- __checkReturn
- STDMETHOD(GetDefaultValue)(
- mdToken tk, // [IN] given FieldDef, ParamDef, or Property
- MDDefaultValue *pDefaultValue) PURE;// [OUT] default value to fill
-
-
- //*****************************************
- // get dispid of a MethodDef or a FieldDef
- //*****************************************
- __checkReturn
- STDMETHOD(GetDispIdOfMemberDef)( // return hresult
- mdToken tk, // [IN] given methoddef or fielddef
- ULONG *pDispid) PURE; // [OUT] Put the dispid here.
-
- //*****************************************
- // return TypeRef/TypeDef given an InterfaceImpl token
- //*****************************************
- __checkReturn
- STDMETHOD(GetTypeOfInterfaceImpl)( // return the TypeRef/typedef token for the interfaceimpl
- mdInterfaceImpl iiImpl, // given a interfaceimpl
- mdToken *ptkType) PURE;
-
- //*****************************************
- // look up function for TypeDef
- //*****************************************
- __checkReturn
- STDMETHOD(FindTypeDef)(
- LPCSTR szNamespace, // [IN] Namespace for the TypeDef.
- LPCSTR szName, // [IN] Name of the TypeDef.
- mdToken tkEnclosingClass, // [IN] TypeRef/TypeDef Token for the enclosing class.
- mdTypeDef *ptypedef) PURE; // [IN] return typedef
-
- //*****************************************
- // return name and sig of a memberref
- //*****************************************
- __checkReturn
- STDMETHOD(GetNameAndSigOfMemberRef)( // return name here
- mdMemberRef memberref, // given memberref
- PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to a blob value of CLR signature
- ULONG *pcbSigBlob, // [OUT] count of bytes in the signature blob
- LPCSTR *pszName) PURE;
-
- //*****************************************************************************
- // Given memberref, return the parent. It can be TypeRef, ModuleRef, MethodDef
- //*****************************************************************************
- __checkReturn
- STDMETHOD(GetParentOfMemberRef)(
- mdMemberRef memberref, // given memberref
- mdToken *ptkParent) PURE; // return the parent token
-
- __checkReturn
- STDMETHOD(GetParamDefProps)(
- mdParamDef paramdef, // given a paramdef
- USHORT *pusSequence, // [OUT] slot number for this parameter
- DWORD *pdwAttr, // [OUT] flags
- LPCSTR *pszName) PURE; // [OUT] return the name of the parameter
-
- __checkReturn
- STDMETHOD(GetPropertyInfoForMethodDef)( // Result.
- mdMethodDef md, // [IN] memberdef
- mdProperty *ppd, // [OUT] put property token here
- LPCSTR *pName, // [OUT] put pointer to name here
- ULONG *pSemantic) PURE; // [OUT] put semantic here
-
- //*****************************************
- // class layout/sequence information
- //*****************************************
- __checkReturn
- STDMETHOD(GetClassPackSize)( // return error if class doesn't have packsize
- mdTypeDef td, // [IN] give typedef
- ULONG *pdwPackSize) PURE; // [OUT] 1, 2, 4, 8, or 16
-
- __checkReturn
- STDMETHOD(GetClassTotalSize)( // return error if class doesn't have total size info
- mdTypeDef td, // [IN] give typedef
- ULONG *pdwClassSize) PURE; // [OUT] return the total size of the class
-
- __checkReturn
- STDMETHOD(GetClassLayoutInit)(
- mdTypeDef td, // [IN] give typedef
- MD_CLASS_LAYOUT *pLayout) PURE; // [OUT] set up the status of query here
-
- __checkReturn
- STDMETHOD(GetClassLayoutNext)(
- MD_CLASS_LAYOUT *pLayout, // [IN|OUT] set up the status of query here
- mdFieldDef *pfd, // [OUT] return the fielddef
- ULONG *pulOffset) PURE; // [OUT] return the offset/ulSequence associate with it
-
- //*****************************************
- // marshal information of a field
- //*****************************************
- __checkReturn
- STDMETHOD(GetFieldMarshal)( // return error if no native type associate with the token
- mdFieldDef fd, // [IN] given fielddef
- PCCOR_SIGNATURE *pSigNativeType, // [OUT] the native type signature
- ULONG *pcbNativeType) PURE; // [OUT] the count of bytes of *ppvNativeType
-
-
- //*****************************************
- // property APIs
- //*****************************************
- // find a property by name
- __checkReturn
- STDMETHOD(FindProperty)(
- mdTypeDef td, // [IN] given a typdef
- LPCSTR szPropName, // [IN] property name
- mdProperty *pProp) PURE; // [OUT] return property token
-
- // returned void in v1.0/v1.1
- __checkReturn
- STDMETHOD(GetPropertyProps)(
- mdProperty prop, // [IN] property token
- LPCSTR *szProperty, // [OUT] property name
- DWORD *pdwPropFlags, // [OUT] property flags.
- PCCOR_SIGNATURE *ppvSig, // [OUT] property type. pointing to meta data internal blob
- ULONG *pcbSig) PURE; // [OUT] count of bytes in *ppvSig
-
- //**********************************
- // Event APIs
- //**********************************
- __checkReturn
- STDMETHOD(FindEvent)(
- mdTypeDef td, // [IN] given a typdef
- LPCSTR szEventName, // [IN] event name
- mdEvent *pEvent) PURE; // [OUT] return event token
-
- // returned void in v1.0/v1.1
- __checkReturn
- STDMETHOD(GetEventProps)(
- mdEvent ev, // [IN] event token
- LPCSTR *pszEvent, // [OUT] Event name
- DWORD *pdwEventFlags, // [OUT] Event flags.
- mdToken *ptkEventType) PURE; // [OUT] EventType class
-
-
- //**********************************
- // find a particular associate of a property or an event
- //**********************************
- __checkReturn
- STDMETHOD(FindAssociate)(
- mdToken evprop, // [IN] given a property or event token
- DWORD associate, // [IN] given a associate semantics(setter, getter, testdefault, reset, AddOn, RemoveOn, Fire)
- mdMethodDef *pmd) PURE; // [OUT] return method def token
-
- // Note, void function in v1.0/v1.1
- __checkReturn
- STDMETHOD(EnumAssociateInit)(
- mdToken evprop, // [IN] given a property or an event token
- HENUMInternal *phEnum) PURE; // [OUT] cursor to hold the query result
-
- // returned void in v1.0/v1.1
- __checkReturn
- STDMETHOD(GetAllAssociates)(
- HENUMInternal *phEnum, // [IN] query result form GetPropertyAssociateCounts
- ASSOCIATE_RECORD *pAssociateRec, // [OUT] struct to fill for output
- ULONG cAssociateRec) PURE; // [IN] size of the buffer
-
-
- //**********************************
- // Get info about a PermissionSet.
- //**********************************
- // returned void in v1.0/v1.1
- __checkReturn
- STDMETHOD(GetPermissionSetProps)(
- mdPermission pm, // [IN] the permission token.
- DWORD *pdwAction, // [OUT] CorDeclSecurity.
- void const **ppvPermission, // [OUT] permission blob.
- ULONG *pcbPermission) PURE; // [OUT] count of bytes of pvPermission.
-
- //****************************************
- // Get the String given the String token.
- // Returns a pointer to the string, or NULL in case of error.
- //****************************************
- __checkReturn
- STDMETHOD(GetUserString)(
- mdString stk, // [IN] the string token.
- ULONG *pchString, // [OUT] count of characters in the string.
- BOOL *pbIs80Plus, // [OUT] specifies where there are extended characters >= 0x80.
- LPCWSTR *pwszUserString) PURE;
-
- //*****************************************************************************
- // p-invoke APIs.
- //*****************************************************************************
- __checkReturn
- STDMETHOD(GetPinvokeMap)(
- mdToken tk, // [IN] FieldDef, MethodDef.
- DWORD *pdwMappingFlags, // [OUT] Flags used for mapping.
- LPCSTR *pszImportName, // [OUT] Import name.
- mdModuleRef *pmrImportDLL) PURE; // [OUT] ModuleRef token for the target DLL.
-
- //*****************************************************************************
- // helpers to convert a text signature to a com format
- //*****************************************************************************
- __checkReturn
- STDMETHOD(ConvertTextSigToComSig)( // Return hresult.
- BOOL fCreateTrIfNotFound, // [IN] create typeref if not found
- LPCSTR pSignature, // [IN] class file format signature
- CQuickBytes *pqbNewSig, // [OUT] place holder for CLR signature
- ULONG *pcbCount) PURE; // [OUT] the result size of signature
-
- //*****************************************************************************
- // Assembly MetaData APIs.
- //*****************************************************************************
- // returned void in v1.0/v1.1
- __checkReturn
- STDMETHOD(GetAssemblyProps)(
- mdAssembly mda, // [IN] The Assembly for which to get the properties.
- const void **ppbPublicKey, // [OUT] Pointer to the public key.
- ULONG *pcbPublicKey, // [OUT] Count of bytes in the public key.
- ULONG *pulHashAlgId, // [OUT] Hash Algorithm.
- LPCSTR *pszName, // [OUT] Buffer to fill with name.
- AssemblyMetaDataInternal *pMetaData,// [OUT] Assembly MetaData.
- DWORD *pdwAssemblyFlags) PURE;// [OUT] Flags.
-
- // returned void in v1.0/v1.1
- __checkReturn
- STDMETHOD(GetAssemblyRefProps)(
- mdAssemblyRef mdar, // [IN] The AssemblyRef for which to get the properties.
- const void **ppbPublicKeyOrToken, // [OUT] Pointer to the public key or token.
- ULONG *pcbPublicKeyOrToken, // [OUT] Count of bytes in the public key or token.
- LPCSTR *pszName, // [OUT] Buffer to fill with name.
- AssemblyMetaDataInternal *pMetaData,// [OUT] Assembly MetaData.
- const void **ppbHashValue, // [OUT] Hash blob.
- ULONG *pcbHashValue, // [OUT] Count of bytes in the hash blob.
- DWORD *pdwAssemblyRefFlags) PURE; // [OUT] Flags.
-
- // returned void in v1.0/v1.1
- __checkReturn
- STDMETHOD(GetFileProps)(
- mdFile mdf, // [IN] The File for which to get the properties.
- LPCSTR *pszName, // [OUT] Buffer to fill with name.
- const void **ppbHashValue, // [OUT] Pointer to the Hash Value Blob.
- ULONG *pcbHashValue, // [OUT] Count of bytes in the Hash Value Blob.
- DWORD *pdwFileFlags) PURE; // [OUT] Flags.
-
- // returned void in v1.0/v1.1
- __checkReturn
- STDMETHOD(GetExportedTypeProps)(
- mdExportedType mdct, // [IN] The ExportedType for which to get the properties.
- LPCSTR *pszNamespace, // [OUT] Namespace.
- LPCSTR *pszName, // [OUT] Name.
- mdToken *ptkImplementation, // [OUT] mdFile or mdAssemblyRef that provides the ExportedType.
- mdTypeDef *ptkTypeDef, // [OUT] TypeDef token within the file.
- DWORD *pdwExportedTypeFlags) PURE; // [OUT] Flags.
-
- // returned void in v1.0/v1.1
- __checkReturn
- STDMETHOD(GetManifestResourceProps)(
- mdManifestResource mdmr, // [IN] The ManifestResource for which to get the properties.
- LPCSTR *pszName, // [OUT] Buffer to fill with name.
- mdToken *ptkImplementation, // [OUT] mdFile or mdAssemblyRef that provides the ExportedType.
- DWORD *pdwOffset, // [OUT] Offset to the beginning of the resource within the file.
- DWORD *pdwResourceFlags) PURE;// [OUT] Flags.
-
- __checkReturn
- STDMETHOD(FindExportedTypeByName)( // S_OK or error
- LPCSTR szNamespace, // [IN] Namespace of the ExportedType.
- LPCSTR szName, // [IN] Name of the ExportedType.
- mdExportedType tkEnclosingType, // [IN] ExportedType for the enclosing class.
- mdExportedType *pmct) PURE; // [OUT] Put ExportedType token here.
-
- __checkReturn
- STDMETHOD(FindManifestResourceByName)( // S_OK or error
- LPCSTR szName, // [IN] Name of the ManifestResource.
- mdManifestResource *pmmr) PURE; // [OUT] Put ManifestResource token here.
-
- __checkReturn
- STDMETHOD(GetAssemblyFromScope)( // S_OK or error
- mdAssembly *ptkAssembly) PURE; // [OUT] Put token here.
-
- __checkReturn
- STDMETHOD(GetCustomAttributeByName)( // S_OK or error
- mdToken tkObj, // [IN] Object with Custom Attribute.
- LPCUTF8 szName, // [IN] Name of desired Custom Attribute.
- const void **ppData, // [OUT] Put pointer to data here.
- ULONG *pcbData) PURE; // [OUT] Put size of data here.
-
- // Note: The return type of this method was void in v1
- __checkReturn
- STDMETHOD(GetTypeSpecFromToken)( // S_OK or error.
- mdTypeSpec typespec, // [IN] Signature token.
- PCCOR_SIGNATURE *ppvSig, // [OUT] return pointer to token.
- ULONG *pcbSig) PURE; // [OUT] return size of signature.
-
- __checkReturn
- STDMETHOD(SetUserContextData)( // S_OK or E_NOTIMPL
- IUnknown *pIUnk) PURE; // The user context.
-
- __checkReturn
- STDMETHOD_(BOOL, IsValidToken)( // True or False.
- mdToken tk) PURE; // [IN] Given token.
-
- __checkReturn
- STDMETHOD(TranslateSigWithScope)(
- IMDInternalImport *pAssemImport, // [IN] import assembly scope.
- const void *pbHashValue, // [IN] hash value for the import assembly.
- ULONG cbHashValue, // [IN] count of bytes in the hash value.
- PCCOR_SIGNATURE pbSigBlob, // [IN] signature in the importing scope
- ULONG cbSigBlob, // [IN] count of bytes of signature
- IMetaDataAssemblyEmit *pAssemEmit, // [IN] assembly emit scope.
- IMetaDataEmit *emit, // [IN] emit interface
- CQuickBytes *pqkSigEmit, // [OUT] buffer to hold translated signature
- ULONG *pcbSig) PURE; // [OUT] count of bytes in the translated signature
-
- STDMETHOD_(IMetaModelCommon*, GetMetaModelCommon)( // Return MetaModelCommon interface.
- ) PURE;
-
- STDMETHOD_(IUnknown *, GetCachedPublicInterface)(BOOL fWithLock) PURE; // return the cached public interface
- __checkReturn
- STDMETHOD(SetCachedPublicInterface)(IUnknown *pUnk) PURE; // no return value
- STDMETHOD_(UTSemReadWrite*, GetReaderWriterLock)() PURE; // return the reader writer lock
- __checkReturn
- STDMETHOD(SetReaderWriterLock)(UTSemReadWrite * pSem) PURE;
-
- STDMETHOD_(mdModule, GetModuleFromScope)() PURE; // [OUT] Put mdModule token here.
-
-
- //-----------------------------------------------------------------
- // Additional custom methods
-
- // finding a particular method
- __checkReturn
- STDMETHOD(FindMethodDefUsingCompare)(
- mdTypeDef classdef, // [IN] given typedef
- LPCSTR szName, // [IN] member name
- PCCOR_SIGNATURE pvSigBlob, // [IN] point to a blob value of CLR signature
- ULONG cbSigBlob, // [IN] count of bytes in the signature blob
- PSIGCOMPARE pSignatureCompare, // [IN] Routine to compare signatures
- void* pSignatureArgs, // [IN] Additional info to supply the compare function
- mdMethodDef *pmd) PURE; // [OUT] matching memberdef
-
- // Additional v2 methods.
-
- //*****************************************
- // return a field offset for a given field
- //*****************************************
- __checkReturn
- STDMETHOD(GetFieldOffset)(
- mdFieldDef fd, // [IN] fielddef
- ULONG *pulOffset) PURE; // [OUT] FieldOffset
-
- __checkReturn
- STDMETHOD(GetMethodSpecProps)(
- mdMethodSpec ms, // [IN] The method instantiation
- mdToken *tkParent, // [OUT] MethodDef or MemberRef
- PCCOR_SIGNATURE *ppvSigBlob, // [OUT] point to the blob value of meta data
- ULONG *pcbSigBlob) PURE; // [OUT] actual size of signature blob
-
- __checkReturn
- STDMETHOD(GetTableInfoWithIndex)(
- ULONG index, // [IN] pass in the table index
- void **pTable, // [OUT] pointer to table at index
- void **pTableSize) PURE; // [OUT] size of table at index
-
- __checkReturn
- STDMETHOD(ApplyEditAndContinue)(
- void *pDeltaMD, // [IN] the delta metadata
- ULONG cbDeltaMD, // [IN] length of pData
- IMDInternalImport **ppv) PURE; // [OUT] the resulting metadata interface
-
- //**********************************
- // Generics APIs
- //**********************************
- __checkReturn
- STDMETHOD(GetGenericParamProps)( // S_OK or error.
- mdGenericParam rd, // [IN] The type parameter
- ULONG* pulSequence, // [OUT] Parameter sequence number
- DWORD* pdwAttr, // [OUT] Type parameter flags (for future use)
- mdToken *ptOwner, // [OUT] The owner (TypeDef or MethodDef)
- DWORD *reserved, // [OUT] The kind (TypeDef/Ref/Spec, for future use)
- LPCSTR *szName) PURE; // [OUT] The name
-
- __checkReturn
- STDMETHOD(GetGenericParamConstraintProps)( // S_OK or error.
- mdGenericParamConstraint rd, // [IN] The constraint token
- mdGenericParam *ptGenericParam, // [OUT] GenericParam that is constrained
- mdToken *ptkConstraintType) PURE; // [OUT] TypeDef/Ref/Spec constraint
-
- //*****************************************************************************
- // This function gets the "built for" version of a metadata scope.
- // NOTE: if the scope has never been saved, it will not have a built-for
- // version, and an empty string will be returned.
- //*****************************************************************************
- __checkReturn
- STDMETHOD(GetVersionString)( // S_OK or error.
- LPCSTR *pVer) PURE; // [OUT] Put version string here.
-
-
- __checkReturn
- STDMETHOD(GetTypeDefRefTokenInTypeSpec)(// return S_FALSE if enclosing type does not have a token
- mdTypeSpec tkTypeSpec, // [IN] TypeSpec token to look at
- mdToken *tkEnclosedToken) PURE; // [OUT] The enclosed type token
-
-#define MD_STREAM_VER_1X 0x10000
-#define MD_STREAM_VER_2_B1 0x10001
-#define MD_STREAM_VER_2 0x20000
- STDMETHOD_(DWORD, GetMetadataStreamVersion)() PURE; //returns DWORD with major version of
- // MD stream in senior word and minor version--in junior word
-
- __checkReturn
- STDMETHOD(GetNameOfCustomAttribute)(// S_OK or error
- mdCustomAttribute mdAttribute, // [IN] The Custom Attribute
- LPCUTF8 *pszNamespace, // [OUT] Namespace of Custom Attribute.
- LPCUTF8 *pszName) PURE; // [OUT] Name of Custom Attribute.
-
- STDMETHOD(SetOptimizeAccessForSpeed)(// S_OK or error
- BOOL fOptSpeed) PURE;
-
- STDMETHOD(SetVerifiedByTrustedSource)(// S_OK or error
- BOOL fVerified) PURE;
-
- STDMETHOD(GetRvaOffsetData)(
- DWORD *pFirstMethodRvaOffset, // [OUT] Offset (from start of metadata) to the first RVA field in MethodDef table.
- DWORD *pMethodDefRecordSize, // [OUT] Size of each record in MethodDef table.
- DWORD *pMethodDefCount, // [OUT] Number of records in MethodDef table.
- DWORD *pFirstFieldRvaOffset, // [OUT] Offset (from start of metadata) to the first RVA field in FieldRVA table.
- DWORD *pFieldRvaRecordSize, // [OUT] Size of each record in FieldRVA table.
- DWORD *pFieldRvaCount // [OUT] Number of records in FieldRVA table.
- ) PURE;
-
- //----------------------------------------------------------------------------------------
- // !!! READ THIS !!!
- //
- // New methods have to be added at the end. The order and signatures of the existing methods
- // have to be preserved. We need to maintain a backward compatibility for this interface to
- // allow ildasm to work on SingleCLR.
- //
- //----------------------------------------------------------------------------------------
-
-}; // IMDInternalImport
-
-
-// {E03D7730-D7E3-11d2-8C0D-00C04FF7431A}
-EXTERN_GUID(IID_IMDInternalImportENC, 0xe03d7730, 0xd7e3, 0x11d2, 0x8c, 0xd, 0x0, 0xc0, 0x4f, 0xf7, 0x43, 0x1a);
-
-#undef INTERFACE
-#define INTERFACE IMDInternalImportENC
-DECLARE_INTERFACE_(IMDInternalImportENC, IMDInternalImport)
-{
-private:
- using IMDInternalImport::ApplyEditAndContinue;
-public:
- // ENC only methods here.
- STDMETHOD(ApplyEditAndContinue)( // S_OK or error.
- MDInternalRW *pDelta) PURE; // Interface to MD with the ENC delta.
-
- STDMETHOD(EnumDeltaTokensInit)( // return hresult
- HENUMInternal *phEnum) PURE; // [OUT] buffer to fill for enumerator data
-
-}; // IMDInternalImportENC
-
-// {F102C526-38CB-49ed-9B5F-498816AE36E0}
-EXTERN_GUID(IID_IMDInternalEmit, 0xf102c526, 0x38cb, 0x49ed, 0x9b, 0x5f, 0x49, 0x88, 0x16, 0xae, 0x36, 0xe0);
-
-#undef INTERFACE
-#define INTERFACE IMDInternalEmit
-DECLARE_INTERFACE_(IMDInternalEmit, IUnknown)
-{
- STDMETHOD(ChangeMvid)( // S_OK or error.
- REFGUID newMvid) PURE; // GUID to use as the MVID
-
- STDMETHOD(SetMDUpdateMode)(
- ULONG updateMode, ULONG *pPreviousUpdateMode) PURE;
-
-}; // IMDInternalEmit
-
-#ifdef FEATURE_METADATA_CUSTOM_DATA_SOURCE
-
-struct IMDCustomDataSource;
-class CMiniMdSchema;
-struct CMiniTableDef;
-namespace MetaData
-{
- class DataBlob;
-}
-
-// {CC0C8F7A-A00B-493D-80B6-CE0C92491670}
-EXTERN_GUID(IID_IMDCustomDataSource, 0xcc0c8f7a, 0xa00b, 0x493d, 0x80, 0xb6, 0xce, 0xc, 0x92, 0x49, 0x16, 0x70);
-
-#undef INTERFACE
-#define INTERFACE IMDCustomDataSource
-DECLARE_INTERFACE_(IMDCustomDataSource, IUnknown)
-{
- STDMETHOD(GetSchema)(CMiniMdSchema* pSchema) PURE;
- STDMETHOD(GetTableDef)(ULONG32 tableIndex, CMiniTableDef* pTableDef) PURE;
- STDMETHOD(GetBlobHeap)(MetaData::DataBlob* pBlobHeapData) PURE;
- STDMETHOD(GetGuidHeap)(MetaData::DataBlob* pGuidHeapData) PURE;
- STDMETHOD(GetStringHeap)(MetaData::DataBlob* pStringHeapData) PURE;
- STDMETHOD(GetUserStringHeap)(MetaData::DataBlob* pUserStringHeapData) PURE;
- STDMETHOD(GetTableRecords)(ULONG32 tableIndex, MetaData::DataBlob* pTableRecordData) PURE;
- STDMETHOD(GetTableSortable)(ULONG32 tableIndex, BOOL* pSortable) PURE;
- STDMETHOD(GetStorageSignature)(MetaData::DataBlob* pStorageSignature) PURE;
-
-}; // IMDCustomDataSource
-
-// {503F79FB-7AAE-4364-BDA6-8E235D173AEC}
-EXTERN_GUID(IID_IMetaDataDispenserCustom,
- 0x503f79fb, 0x7aae, 0x4364, 0xbd, 0xa6, 0x8e, 0x23, 0x5d, 0x17, 0x3a, 0xec);
-
-#undef INTERFACE
-#define INTERFACE IMetaDataDispenserCustom
-DECLARE_INTERFACE_(IMetaDataDispenserCustom, IUnknown)
-{
- STDMETHOD(OpenScopeOnCustomDataSource)( // Return code.
- IMDCustomDataSource *pCustomSource, // [in] The scope to open.
- DWORD dwOpenFlags, // [in] Open mode flags.
- REFIID riid, // [in] The interface desired.
- IUnknown **ppIUnk) PURE; // [out] Return interface on success.
-
-}; // IMetaDataDispenserCustom
-
-#endif // FEATURE_METADATA_CUSTOM_DATA_SOURCE
-
-#ifdef FEATURE_METADATA_DEBUGGEE_DATA_SOURCE
-struct ICorDebugDataTarget;
-HRESULT CreateRemoteMDInternalRWSource(TADDR mdInternalRWRemoteAddress, ICorDebugDataTarget* pDataTarget, DWORD defines, DWORD dataStructureVersion, IMDCustomDataSource** ppDataSource);
-#endif
-
-enum MetaDataReorderingOptions {
- NoReordering=0x0,
- ReArrangeStringPool=0x1
-};
-
-#ifdef __HOLDER_H_
-
-void DECLSPEC_NORETURN ThrowHR(HRESULT hr);
-
-// This wrapper class ensures that the HENUMInternal is EnumClose'd no matter how the scope is exited.
-class HENUMTypeDefInternalHolder
-{
-public:
- FORCEINLINE HENUMTypeDefInternalHolder(IMDInternalImport *pInternalImport)
- {
- WRAPPER_NO_CONTRACT;
-
- m_pInternalImport = pInternalImport;
- m_fAcquired = FALSE;
- }
-
- FORCEINLINE VOID EnumTypeDefInit()
- {
- CONTRACTL {
- THROWS;
- } CONTRACTL_END;
-
- _ASSERTE(!m_fAcquired);
- HRESULT hr = m_pInternalImport->EnumTypeDefInit(&m_hEnum);
- if (FAILED(hr))
- {
- ThrowHR(hr);
- }
- m_fAcquired = TRUE;
-
- }
-
- FORCEINLINE HRESULT EnumTypeDefInitNoThrow()
- {
- WRAPPER_NO_CONTRACT;
-
- _ASSERTE(!m_fAcquired);
- HRESULT hr = m_pInternalImport->EnumTypeDefInit(&m_hEnum);
- if (FAILED(hr))
- {
- return hr;
- }
- m_fAcquired = TRUE;
-
- return hr;
- }
-
- FORCEINLINE ~HENUMTypeDefInternalHolder()
- {
- WRAPPER_NO_CONTRACT;
-
- if (m_fAcquired)
- {
- m_pInternalImport->EnumClose(&m_hEnum);
- }
- }
-
- FORCEINLINE HENUMInternal* operator& ()
- {
- LIMITED_METHOD_CONTRACT;
-
- _ASSERTE(m_fAcquired);
- return &m_hEnum;
- }
-
-private:
- FORCEINLINE HENUMTypeDefInternalHolder(const HENUMTypeDefInternalHolder &)
- {
- LIMITED_METHOD_CONTRACT;
-
- _ASSERTE(!"Don't try to assign this class.");
- }
-
-private:
- IMDInternalImport *m_pInternalImport;
- HENUMInternal m_hEnum;
- BOOL m_fAcquired;
-};
-
-
-// This wrapper class ensures that the HENUMInternal is EnumClose'd no matter how the scope is exited.
-class HENUMInternalHolder
-{
-public:
- FORCEINLINE HENUMInternalHolder(IMDInternalImport *pInternalImport)
- {
- WRAPPER_NO_CONTRACT;
-
- m_pInternalImport = pInternalImport;
- m_fAcquired = FALSE;
- }
-
- FORCEINLINE VOID EnumGlobalFunctionsInit()
- {
- CONTRACTL {
- THROWS;
- } CONTRACTL_END;
-
- _ASSERTE(!m_fAcquired);
- HRESULT hr = m_pInternalImport->EnumGlobalFunctionsInit(&m_hEnum);
- if (FAILED(hr))
- {
- ThrowHR(hr);
- }
- m_fAcquired = TRUE;
-
- }
-
-
- FORCEINLINE VOID EnumGlobalFieldsInit()
- {
- CONTRACTL {
- THROWS;
- } CONTRACTL_END;
-
- _ASSERTE(!m_fAcquired);
- HRESULT hr = m_pInternalImport->EnumGlobalFieldsInit(&m_hEnum);
- if (FAILED(hr))
- {
- ThrowHR(hr);
- }
- m_fAcquired = TRUE;
-
- }
-
- FORCEINLINE VOID EnumTypeDefInit()
- {
- CONTRACTL {
- THROWS;
- } CONTRACTL_END;
-
- _ASSERTE(!m_fAcquired);
- HRESULT hr = m_pInternalImport->EnumTypeDefInit(&m_hEnum);
- if (FAILED(hr))
- {
- ThrowHR(hr);
- }
- m_fAcquired = TRUE;
- }
-
- FORCEINLINE VOID EnumAssociateInit(mdToken tkParent) // [IN] token to scope the search
- {
- CONTRACTL {
- THROWS;
- } CONTRACTL_END;
-
- _ASSERTE(!m_fAcquired);
- IfFailThrow(m_pInternalImport->EnumAssociateInit(tkParent, &m_hEnum));
- m_fAcquired = TRUE;
- }
-
- FORCEINLINE VOID EnumInit(DWORD tkKind, // [IN] which table to work on
- mdToken tkParent // [IN] token to scope the search
- )
- {
- CONTRACTL {
- THROWS;
- } CONTRACTL_END;
-
- HRESULT hr = EnumInitNoThrow(tkKind, tkParent);
- if (FAILED(hr))
- {
- ThrowHR(hr);
- }
- }
-
- __checkReturn
- FORCEINLINE HRESULT EnumInitNoThrow(DWORD tkKind, // [IN] which table to work on
- mdToken tkParent // [IN] token to scope the search
- )
- {
- CONTRACTL {
- NOTHROW;
- } CONTRACTL_END;
-
- _ASSERTE(!m_fAcquired);
- HRESULT hr = m_pInternalImport->EnumInit(tkKind, tkParent, &m_hEnum);
- if (SUCCEEDED(hr))
- {
- m_fAcquired = TRUE;
- }
- return hr;
- }
-
- FORCEINLINE VOID EnumAllInit(DWORD tkKind // [IN] which table to work on
- )
- {
- CONTRACTL {
- THROWS;
- } CONTRACTL_END;
-
- _ASSERTE(!m_fAcquired);
- HRESULT hr = m_pInternalImport->EnumAllInit(tkKind, &m_hEnum);
- if (FAILED(hr))
- {
- ThrowHR(hr);
- }
- m_fAcquired = TRUE;
-
- }
-
- FORCEINLINE ULONG EnumGetCount()
- {
- CONTRACTL {
- NOTHROW;
- GC_NOTRIGGER;
- CONSISTENCY_CHECK(m_fAcquired);
- } CONTRACTL_END;
-
- return m_pInternalImport->EnumGetCount(&m_hEnum);
- }
-
- FORCEINLINE bool EnumNext(mdToken * pTok)
- {
- CONTRACTL {
- NOTHROW;
- GC_NOTRIGGER;
- CONSISTENCY_CHECK(m_fAcquired);
- } CONTRACTL_END;
-
- return m_pInternalImport->EnumNext(&m_hEnum, pTok);
- }
-
- FORCEINLINE void EnumReset()
- {
- CONTRACTL {
- NOTHROW;
- GC_NOTRIGGER;
- CONSISTENCY_CHECK(m_fAcquired);
- } CONTRACTL_END;
-
- return m_pInternalImport->EnumReset(&m_hEnum);
- }
-
- FORCEINLINE ~HENUMInternalHolder()
- {
- WRAPPER_NO_CONTRACT;
-
- if (m_fAcquired)
- {
- // Ignore the error
- (void)m_pInternalImport->EnumClose(&m_hEnum);
- }
- }
-
- FORCEINLINE HENUMInternal* operator& ()
- {
- LIMITED_METHOD_CONTRACT;
-
- _ASSERTE(m_fAcquired);
- return &m_hEnum;
- }
-
-private:
- FORCEINLINE HENUMInternalHolder(const HENUMInternalHolder &)
- {
- WRAPPER_NO_CONTRACT;
-
- _ASSERTE(!"Don't try to assign this class.");
- }
-
-
-protected:
- IMDInternalImport *m_pInternalImport;
- HENUMInternal m_hEnum;
- BOOL m_fAcquired;
-};
-
-class HENUMInternalMethodImplHolder : protected HENUMInternalHolder
-{
- public:
- FORCEINLINE HENUMInternalMethodImplHolder(IMDInternalImport *pInternalImport)
- : HENUMInternalHolder(pInternalImport)
- {
- WRAPPER_NO_CONTRACT;
- }
-
- FORCEINLINE ~HENUMInternalMethodImplHolder()
- {
- WRAPPER_NO_CONTRACT;
-
- if (m_fAcquired)
- {
- // Ignore the error
- (void)m_pInternalImport->EnumClose(&m_hEnum2);
- }
- }
-
- FORCEINLINE void EnumMethodImplInit(mdToken tkParent // [IN] token to scope the search
- )
- {
- CONTRACTL {
- THROWS;
- } CONTRACTL_END;
-
- HRESULT hr = EnumMethodImplInitNoThrow(tkParent);
- if (FAILED(hr))
- {
- ThrowHR(hr);
- }
- }
-
- __checkReturn
- FORCEINLINE HRESULT EnumMethodImplInitNoThrow(mdToken tkParent // [IN] token to scope the search
- )
- {
- CONTRACTL {
- NOTHROW;
- } CONTRACTL_END;
-
- _ASSERTE(!m_fAcquired);
- HRESULT hr = m_pInternalImport->EnumMethodImplInit(tkParent, &m_hEnum, &m_hEnum2);
- if (SUCCEEDED(hr))
- {
- m_fAcquired = TRUE;
- }
- return hr;
- }
-
- __checkReturn
- FORCEINLINE HRESULT EnumMethodImplNext(
- mdToken *ptkImpl,
- mdToken *ptkDecl)
- {
- CONTRACTL {
- NOTHROW;
- GC_NOTRIGGER;
- CONSISTENCY_CHECK(m_fAcquired);
- } CONTRACTL_END;
-
- return m_pInternalImport->EnumMethodImplNext(&m_hEnum, &m_hEnum2, ptkImpl, ptkDecl);
- }
-
- FORCEINLINE ULONG EnumMethodImplGetCount()
- {
- CONTRACTL {
- NOTHROW;
- GC_NOTRIGGER;
- CONSISTENCY_CHECK(m_fAcquired);
- } CONTRACTL_END;
-
- return m_pInternalImport->EnumMethodImplGetCount(&m_hEnum, &m_hEnum2);
- }
-
- protected:
- HENUMInternal m_hEnum2;
-};
-
-#endif //__HOLDER_H_
-
-#endif // _METADATA_H_
typedef enum
{
- Unknown = 0,
+ UnknownIndex = 0,
Identity = 1,
Runtime = 2,
} LIBRARY_PROVIDER_INDEX_TYPE;
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-/* -------------------------------------------------------------------------- *
- * Microsoft .NET Framework Service
- * -------------------------------------------------------------------------- */
-
-#ifndef IN_MSCOREE
-cpp_quote("#if 0") // So that the outputted header file doesn't cause redefines
-
-import "unknwn.idl";
-
-cpp_quote("#endif")
-
-// CLSID_CorSvcWorker
-cpp_quote("EXTERN_GUID(CLSID_CorSvcWorker, 0x8ed1a844, 0x32a7, 0x4a67, 0xba, 0x62, 0xf8, 0xd5, 0xaf, 0xdf, 0xf4, 0x60);")
-
-// CLSID_CorSvcBindToWorker
-cpp_quote("EXTERN_GUID(CLSID_CorSvcBindToWorker, 0x9f74fb09, 0x4221, 0x40b4, 0xae, 0x21, 0xae, 0xb6, 0xdf, 0xf2, 0x99, 0x4e);")
-
-#pragma midl_echo("STDAPI CorGetSvc(IUnknown **pIUnknown);")
-
-[
- uuid(d69cca64-16f7-485c-8cf1-67063e44f0c3),
- version(2.0),
- helpstring("Common Language Runtime Execution Engine 2.0 Library")
-]
-library mscorsvc
-{
- importlib("stdole32.tlb");
-
-#endif // IN_MSCOREE
-
-
- //*****************************************************************************
- // ICorSvcDependencies is used to enumerate the dependencies of an
- // IL image. It is used by the native image service.
- //*****************************************************************************[
-
- [
- object,
- oleautomation,
- uuid(ddb34005-9ba3-4025-9554-f00a2df5dbf5),
- pointer_default(unique),
- ]
- interface ICorSvcDependencies : IUnknown
- {
- HRESULT GetAssemblyDependencies(
- [in] BSTR pAssemblyName,
- [out] SAFEARRAY(BSTR) *pDependencies,
- [out] DWORD *assemblyNGenSetting,
- [out] BSTR *pNativeImageIdentity,
- [out] BSTR *pAssemblyDisplayName,
- [out] SAFEARRAY(DWORD) *pDependencyLoadSetting,
- [out] SAFEARRAY(DWORD) *pDependencyNGenSetting
- );
- }
-
- //*****************************************************************************
- // ICorSvcWorker contains methods for generating native images and enumerating
- // their dependencies.
- //*****************************************************************************[
-
- typedef enum
- {
- ScenarioDefault = 0x00000000, // No special scenario flags
- ScenarioAll = 0x00000001, // All scenarios (used to indicate all configurations)
- ScenarioDebug = 0x00000002, // Unoptimized debuggable code
- ScenarioProfile = 0x00000008, // Used for profiling (enter/leave notifications)
- ScenarioTuningDataCollection = 0x00000010, // Used to gather IBC data
- ScenarioLegacy = 0x00000020, // Follow hard dependencies only
-
- ScenarioNgenLastRetry = 0x00010000, // Ngen failed last time and this a final retry
- ScenarioAutoNGen = 0x00100000, // This is an Auto NGen request
- ScenarioRepositoryOnly = 0x00200000, // Install from repository only, no real NGen
- } OptimizationScenario;
-
- typedef enum
- {
- ScenarioEmitFixups = 0x00010000, // Emit fixups for Vulcan
- ScenarioProfileInfo = 0x00020000 // Generate a PE section with profile ranges data
- } PrivateOptimizationScenario;
-
- typedef struct _SvcWorkerPriority
- {
- DWORD dwPriorityClass;
- } SvcWorkerPriority;
-
- [
- object,
- oleautomation,
- uuid(d1047bc2-67c0-400c-a94c-e64446a67fbe),
- pointer_default(unique),
- ]
- interface ICorSvcWorker : IUnknown
- {
- HRESULT SetPriority(
- [in] SvcWorkerPriority priority
- );
-
- HRESULT OptimizeAssembly(
- [in] BSTR pAssemblyName,
- [in] BSTR pApplicationName,
- [in] OptimizationScenario scenario,
- [in] SAFEARRAY(BSTR) loadAlwaysList,
- [in] SAFEARRAY(BSTR) loadSometimesList,
- [in] SAFEARRAY(BSTR) loadNeverList,
- [out] BSTR *pNativeImageIdentity
- );
-
- HRESULT DeleteNativeImage(
- [in] BSTR pAssemblyName,
- [in] BSTR pNativeImage
- );
-
- HRESULT DisplayNativeImages(
- [in] BSTR pAssemblyName
- );
-
- HRESULT GetCorSvcDependencies(
- [in] BSTR pApplicationName,
- [in] OptimizationScenario scenario,
- [out] ICorSvcDependencies **pCorSvcDependencies
- );
-
- HRESULT Stop(
- );
- }
-
- [
- object,
- oleautomation,
- uuid(f3358a7d-0061-4776-880e-a2f21b9ef93e),
- pointer_default(unique),
- ]
- interface ICorSvcWorker2 : ICorSvcWorker {
- // Create a PDB for the NGEN image that was generated for pAssemblyName
- // when compiled with the given appbase and scenario.
- HRESULT CreatePdb([in] BSTR pAssemblyName,
- [in] BSTR pAppBaseOrConfig,
- [in] OptimizationScenario scenario,
- [in] BSTR pNativeImagePath,
- [in] BSTR pPdbPath);
- };
-
- [
- object,
- oleautomation,
- uuid(DC516615-47BE-477e-8B55-C5ABE0D76B8F),
- pointer_default(unique),
- ]
- interface ICorSvcWorker3 : ICorSvcWorker2 {
- // Create a PDB for the NGEN image that was generated for pAssemblyName
- // when compiled with the given appbase and scenario. Optionally include
- // source lines information in the geneated PDB
- HRESULT CreatePdb2([in] BSTR pAssemblyName,
- [in] BSTR pAppBaseOrConfig,
- [in] OptimizationScenario scenario,
- [in] BSTR pNativeImagePath,
- [in] BSTR pPdbPath,
- [in] BOOL pdbLines,
- [in] BSTR managedPdbSearchPath);
- };
-
- //*****************************************************************************
- // ICorSvcSetPrivateAttributes sets private attributes that are used just for
- // the initial compilation
- //*****************************************************************************[
-
- typedef enum
- {
- DbgTypePdb = 0x00000001, // Generate a pdb for the NGen image
- } NGenPrivateAttributesFlags;
-
- typedef struct _NGenPrivateAttributes
- {
- DWORD Flags;
- DWORD ZapStats;
- BSTR DbgDir;
- } NGenPrivateAttributes;
-
- [
- object,
- oleautomation,
- uuid(b18e0b40-c089-4350-8328-066c668bccc2),
- pointer_default(unique),
- ]
- interface ICorSvcSetPrivateAttributes : IUnknown
- {
- HRESULT SetNGenPrivateAttributes(
- [in] NGenPrivateAttributes ngenPrivateAttributes
- );
-
- }
-
- //*****************************************************************************
- // ICorSvcRepository controls native images repository
- //*****************************************************************************[
-
- typedef enum
- {
- RepositoryDefault = 0x0, // default settings
- MoveFromRepository = 0x1, // move the native images from repository
- CopyToRepository = 0x2, // copy the generated native images to repository
- IgnoreRepository = 0x4, // Do not use the repository
- } RepositoryFlags;
-
- [
- object,
- oleautomation,
- uuid(d5346658-b5fd-4353-9647-07ad4783d5a0),
- pointer_default(unique),
- ]
- interface ICorSvcRepository : IUnknown
- {
- HRESULT SetRepository(
- [in] BSTR pRepositoryDir,
- [in] RepositoryFlags repositoryFlags
- );
-
- }
-
- //*****************************************************************************
- // ICorSvcLogger is used to log various messages to the service process
- //*****************************************************************************[
-
- typedef enum CorSvcLogLevel
- {
- LogLevel_Error,
- LogLevel_Warning,
- LogLevel_Success,
- LogLevel_Info
- } CorSvcLogLevel;
-
- [
- object,
- oleautomation,
- uuid(d189ff1a-e266-4f13-9637-4b9522279ffc),
- pointer_default(unique),
- ]
- interface ICorSvcLogger : IUnknown
- {
- HRESULT Log(
- [in] CorSvcLogLevel logLevel,
- [in] BSTR message
- );
- }
-
- //*****************************************************************************
- // ICorSvcPooledWorker is used to determine whether a worker process can be
- // reused
- //*****************************************************************************[
-
- [
- object,
- oleautomation,
- uuid(0631e7e2-6046-4fde-8b6d-a09b64fda6f3),
- pointer_default(unique),
- ]
- interface ICorSvcPooledWorker : IUnknown
- {
- HRESULT CanReuseProcess(
- [in] OptimizationScenario scenario,
- [in] ICorSvcLogger *pCorSvcLogger,
- [out] BOOL *pCanContinue
- );
- }
-
-
- //*****************************************************************************
- // ICorSvcBindToWorker is used to bind to a specific runtime version.
- //*****************************************************************************[
-
-
- [
- object,
- oleautomation,
- uuid(5c6fb596-4828-4ed5-b9dd-293dad736fb5),
- pointer_default(unique),
- ]
- interface ICorSvcBindToWorker : IUnknown
- {
- HRESULT BindToRuntimeWorker(
- [in] BSTR pRuntimeVersion,
- [in] DWORD ParentProcessID,
- [in] BSTR pInterruptEventName,
- [in] ICorSvcLogger *pCorSvcLogger,
- [out] ICorSvcWorker **pCorSvcWorker
- );
- }
-
-#ifndef IN_MSCOREE
-}
-
-typedef enum
-{
- Service_NoAction = -1 ,
- Service_Start = 0x0, // start service
- Service_Stop = 0x1, // Stop service
- Service_Pause = 0x2, // pause service
- Service_Continue = 0x3, // continue a paused service
- Service_Interrogate = 0x4, // continue a paused service
- Service_StartPaused = 0x5, // pause service. start and pause if it's stopped
-} ControlServiceAction;
-
-// Haven't seen a better way of doing this. Everybody seems to be duplicating
-// into IDLs (for example wtypes.idl)
-typedef struct _COR_SERVICE_STATUS
-{
- WCHAR sServiceName[64];
- DWORD dwServiceType;
- DWORD dwCurrentState;
- DWORD dwControlsAccepted;
- DWORD dwWin32ExitCode;
- DWORD dwServiceSpecificExitCode;
- DWORD dwCheckPoint;
- DWORD dwWaitHint;
-} COR_SERVICE_STATUS, *LPCOR_SERVICE_STATUS;
-
-/* -------------------------------------------------------------------------- *
- * ICorSvc is implemented by the service dispatcher and contains APIs
- * for installing/uninstalling/starting/stopping the native image service,
- * as well as marshaling logic that provides the ICorOptSvcManager interface.
- * -------------------------------------------------------------------------- */
-typedef struct _ServiceOptions
-{
- BOOL RunAsWindowsService;
- BOOL RunAsPrivateRuntime;
- BOOL StartPaused;
-} ServiceOptions;
-
-
-[
- object,
- uuid(3eef5ff0-3680-4f20-8a8f-9051aca66b22),
- pointer_default(unique),
-]
-interface ICorSvc : IUnknown
-{
- HRESULT GetServiceManagerInterface(
- [in] IUnknown **pIUnknown
- );
-
- HRESULT InstallService(
- );
-
- HRESULT UninstallService(
- );
-
- HRESULT ControlService(
- [in] ControlServiceAction Action,
- [out] LPCOR_SERVICE_STATUS lpServiceStatus
- );
-
- HRESULT RunService(
- [in] ServiceOptions options
- );
-}
-
-[
- object,
- uuid(01c10030-6c81-4671-bd51-14b184c673b2),
- pointer_default(unique),
-]
-interface ICompileProgressNotification : IUnknown
-{
- // Notify the installer that compilation has started, and give it an
- // estimation of how long it will take.
- HRESULT CompileStarted(
- [in] DWORD cAssembliesToCompile,
- [in] DWORD cTimeEstimate
- );
-
- // Notify the installer that one more assembly has been compiled. The
- // installer can return E_ABORT from ProgressNotification if it wants to
- // abort the compilation.
- HRESULT ProgressNotification(
- [in] DWORD cAssembly,
- [in] BSTR pAssemblyName,
- [in] BOOL isStartNotification, // if TRUE: we're starting to compile, if FALSE, we finished
- [in] HRESULT hrResult,
- [in] BSTR errorExplanation,
- [in] DWORD cTimeRemainingEstimate
- );
-
-
-}
-
-/*
- * Ndp v4 interface that provides a threadID in notification messages
- */
-[
- object,
- uuid(98E5BDE2-E9A0-4ADE-9CB2-6CD06FDB1A85),
- pointer_default(unique),
-]
-interface ICompileProgressNotification2 : IUnknown
-{
- // Notify the installer that compilation has started, and give it an
- // estimation of how long it will take.
- HRESULT CompileStarted(
- [in] DWORD cAssembliesToCompile,
- [in] DWORD cTimeEstimate,
- [in] DWORD threadID
- );
-
- // Notify the installer that one more assembly has been compiled. The
- // installer can return E_ABORT from ProgressNotification if it wants to
- // abort the compilation.
- HRESULT ProgressNotification(
- [in] DWORD cAssembly,
- [in] BSTR pAssemblyName,
- [in] BOOL isStartNotification, // if TRUE: we're starting to compile, if FALSE, we finished
- [in] HRESULT hrResult,
- [in] BSTR errorExplanation,
- [in] DWORD cTimeRemainingEstimate,
- [in] DWORD threadID
- );
-
-
-}
-
-typedef enum
-{
- DefaultOptimizeFlags = 0x0, // default settings
- TolerateCompilationFailures = 0x1, // continue after encoutering compilation failures
- OptimizeNGenQueueOnly = 0x2 // only take work items from the NGen Queue
-} OptimizeFlags;
-
-
-[
- object,
- uuid(0523feee-eb0e-4857-b2aa-db787521d077),
- pointer_default(unique),
-]
-interface ICorSvcInstaller : IUnknown
-{
- HRESULT Install(
- [in] BSTR path
- );
-
- HRESULT Uninstall(
- [in] BSTR path
- );
-
- HRESULT Optimize(
- [in] ICompileProgressNotification *pCompileProgressNotification,
- [in] OptimizeFlags optimizeFlags
- );
-
- HRESULT SetLogger(
- [in] ICorSvcLogger *pCorSvcLogger
- );
-}
-
-typedef enum
-{
- DefaultFlags = 0x0, // default settings
- AllowPartialNames = 0x1, // input path allows partial names
- KeepPriority = 0x2, // keep priority after ngen completes
- NoRoot = 0x4, // Do not persist NGen root (automatically initiated NGen)
-} GeneralFlags;
-
-typedef enum
-{
- Priority_None = -1,
- Priority_0 = 0x0, // NGen offline queue. Do not use for anything else
- Priority_1 = 0x1,
- Priority_2 = 0x2,
- Priority_3 = 0x3, // If you add or remove priorities, update Priority_Lowest
-
- Priority_Default = Priority_3,
- Priority_Lowest = Priority_3,
- Priority_LowestAggressive = Priority_2, // The lowest priority for which assemblies are compiled aggressively
- Priority_Highest = Priority_0,
- Priority_Highest_Root = Priority_1,
- Priority_Lowest_Root = Priority_3
-} PriorityLevel;
-
-
-/* -------------------------------------------------------------------------- *
- * ICorSvcAdvancedInstaller is implemented by the service manager and
- * used by installers with custom install requirements
- * such as special scenarios or hosting requirements).
- * -------------------------------------------------------------------------- */
-
-[
- object,
- uuid(0871fb80-3ea0-47cc-9b51-d92e2aee75db),
- pointer_default(unique),
-]
-interface ICorSvcAdvancedInstaller : IUnknown
-{
- HRESULT Install(
- [in] BSTR path,
- [in] OptimizationScenario optScenario,
- [in] BSTR config,
- [in] GeneralFlags generalFlags,
- [in] PriorityLevel priorityLevel
- );
-
- HRESULT Uninstall(
- [in] BSTR path,
- [in] OptimizationScenario optScenario,
- [in] BSTR config,
- [in] GeneralFlags generalFlags
- );
-}
-
-
-/* -------------------------------------------------------------------------- *
- * ICorSvcOptimizer is implemented by the service manager and is called
- * by installers and other tools to repair the native image caches.
- * -------------------------------------------------------------------------- */
-
-typedef enum
-{
- UpdateDefault = 0x0, // no hints about the scope of the update
- Force = 0x1, // force generation of new native images
- PostReboot = 0x2 // Update must happen after reboot
-} UpdateFlags;
-
-
-[
- object,
- uuid(94af0ec4-c10d-45d4-a625-d68d1b02a396),
- pointer_default(unique),
-]
-interface ICorSvcOptimizer : IUnknown
-{
- // Optimize the native image for a given application or assembly (will regenerate
- // native images that are out of date)
- HRESULT Update(
- [in] BSTR path,
- [in] UpdateFlags updateFlags,
- [in] GeneralFlags generalFlags
- );
-
- HRESULT Display(
- [in] BSTR path,
- [in] GeneralFlags generalFlags
- );
-
- HRESULT ScheduleWork(
- [in] PriorityLevel priorityLevel
- );
-}
-
-[
- object,
- uuid(ee3b09c2-0110-4b6e-a73f-a3d6562f98ab),
- pointer_default(unique)
-]
-interface ICorSvcOptimizer2 : ICorSvcOptimizer {
- // generate a PDB for the given native image
- HRESULT CreatePdb([in] BSTR nativeImagePath, [in] BSTR pdbPath);
-}
-
-[
- object,
- uuid(6EED164F-61EE-4a07-ABE8-670F92B4B7A9),
- pointer_default(unique)
-]
-interface ICorSvcOptimizer3 : ICorSvcOptimizer2 {
- // generate a PDB for the given native image, optionally including source lines info
- HRESULT CreatePdb2([in] BSTR nativeImagePath, [in] BSTR pdbPath, [in] BOOL pdbLines, [in] BSTR managedPdbSearchPath);
-}
-
-typedef enum
-{
- NewWorkAvailable = 0x0, // Notify the service that there is new work to do.
- ClientWorkStart = 0x1, // Notify the service that there is client starting to do work.
- ClientWorkDone = 0x2, // Notify the service that the client is done doing work.
- UpdatePostReboot = 0x3, // Notify the service that it should do an 'ngen update' after reboot
- NewWorkAvailableWithDelay = 0x4, // Like NewWorkAvailable, but service should wait a while before working
-} ServiceNotification;
-
-
-/* -------------------------------------------------------------------------- *
- * ICorSvcManager is implemented by the service manager and used by
- * the service controller in balancing the need to generate native images
- * with the desire to not interfere with the usage of the computer.
- * -------------------------------------------------------------------------- */
-[
- object,
- uuid(8f416a48-d663-4a7e-9732-fbca3fc46ea8),
- pointer_default(unique),
-]
-interface ICorSvcManager : IUnknown
-{
- // Schedule work only for selected priority level
- HRESULT ScheduleWorkForSinglePriorityLevel(
- [in] PriorityLevel priorityLevel,
- [in] BSTR pInterruptEventName,
- [out] BOOL* pWorkScheduled
- );
-
- // Do scheduled work
- HRESULT Optimize(
- [in] DWORD dwWorkerPriorityClass,
- [in] ICompileProgressNotification *pCompileProgressNotification,
- [in] BSTR pInterruptEventName
- );
-
- // Notify the service of new work
- HRESULT NotifyService(ServiceNotification notification);
-
- HRESULT IsWorkAvailable ([in] PriorityLevel priorityLevel,
- [out] BOOL* pWorkAvailable);
-
- HRESULT Update(
- [in] UpdateFlags updateFlags,
- [in] BSTR pInterruptEventName
- );
-
- HRESULT SetSvcLogger(
- [in] ICorSvcLogger *pCorSvcLogger
- );
-}
-
-[
- object,
- uuid(29626056-8031-441b-affa-7a82480058b3),
- pointer_default(unique),
-]
-interface ICorSvcManager2 : IUnknown
-{
- HRESULT SetRuntimeVersion(BSTR version);
-
- HRESULT SetPackageMoniker(BSTR moniker);
-
- HRESULT SetLocalAppData(BSTR directory);
-}
-
-[
- object,
- uuid(35e5d609-ec3d-4fc2-9ba2-5f99e42ff42f),
- pointer_default(unique),
-]
-interface ICorSvcSetLegacyServiceBehavior : IUnknown
-{
- HRESULT SetLegacyServiceBehavior();
-}
-
-[
- object,
- uuid(115466A4-7005-4CA3-971F-01F0A2C8EF09),
- pointer_default(unique),
-]
-interface ICorSvcSetTaskBootTriggerState : IUnknown
-{
- HRESULT SetTaskBootTriggerState(BOOL bEnabled);
-}
-
-[
- object,
- uuid(261DD1E3-F07E-4B8D-B54E-F26889413626),
- pointer_default(unique),
-]
-interface ICorSvcSetTaskDelayStartTriggerState : IUnknown
-{
- HRESULT SetTaskDelayStartTriggerState(BOOL bEnabled);
-}
-
-#endif // IN_MSCOREE
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-
-#ifndef __new__hpp
-#define __new__hpp
-
-#if defined(_MSC_VER) && _MSC_VER < 1900
-#define NOEXCEPT
-#else
-#define NOEXCEPT noexcept
-#endif
-
-struct NoThrow { int x; };
-extern const NoThrow nothrow;
-
-void * __cdecl operator new(size_t n, const NoThrow&) NOEXCEPT;
-void * __cdecl operator new[](size_t n, const NoThrow&) NOEXCEPT;
-
-#ifdef _DEBUG
-void DisableThrowCheck();
-#endif
-
-#endif
#if defined(HOST_64BIT)
// TODO: bump up the windows CODE_ALIGN to 16 and iron out any nibble map bugs that exist.
-// TODO: there is something wrong with USE_INDIRECT_CODEHEADER with CODE_ALIGN=16
# define CODE_ALIGN 4
# define LOG2_CODE_ALIGN 2
#else
#define ASSEMBLY_SEPARATOR_STR ", "
#define ASSEMBLY_SEPARATOR_WSTR W(", ")
#define ASSEMBLY_SEPARATOR_LEN 2
-#define BACKSLASH_CHAR '\\'
-#define BACKSLASH_WCHAR W('\\')
#define NESTED_SEPARATOR_CHAR '+'
#define NESTED_SEPARATOR_WCHAR W('+')
#define NESTED_SEPARATOR_STR "+"
//*****************************************************************************
// Enum to track which version of the OS we are running
-// Note that NT5 (Win2k) is the minimum supported platform. Any code using
+// Note that Win7 is the minimum supported platform. Any code using
// utilcode (which includes the CLR's execution engine) will fail to start
-// on a pre-Win2k platform. This is enforced by InitRunningOnVersionStatus.
-//
-// Note: The value is used for data mining from links clicked by user in shim dialog - see code:FWLinkTemplateFromTextID
-// Please do not modify existing values, adding new ones is fine.
+// on a pre-Win7 platform. This is enforced by InitRunningOnVersionStatus.
//*****************************************************************************
typedef enum {
RUNNING_ON_STATUS_UNINITED = 0,
#define PAL_CPP_THROW(type, obj) do { SCAN_THROW_MARKER; throw obj; } while (false)
#define PAL_CPP_RETHROW do { SCAN_THROW_MARKER; throw; } while (false)
#define PAL_CPP_CATCH_DERIVED(type, obj) catch (type * obj)
+#define PAL_CPP_CATCH_NON_DERIVED(type, obj) catch (type obj)
+#define PAL_CPP_CATCH_NON_DERIVED_NOARG(type) catch (type)
#define PAL_CPP_CATCH_ALL catch (...)
#define PAL_CPP_CATCH_EXCEPTION_NOARG catch (Exception *)
#include "palclr_win.h"
+#ifndef IMAGE_FILE_MACHINE_LOONGARCH64
+#define IMAGE_FILE_MACHINE_LOONGARCH64 0x6264 // LOONGARCH64.
+#endif
+
#endif // defined(HOST_WINDOWS)
typedef HMODULE NATIVE_LIBRARY_HANDLE;
#endif // HOST_WINDOWS
-#ifndef FALLTHROUGH
-#define FALLTHROUGH __fallthrough
-#endif // FALLTHROUGH
-
#endif // __PALCLR_WIN_H__
#include "cor.h"
#include "corhdr.h"
+#include "corcompile.h"
+
#include "readytorun.h"
typedef DPTR(struct READYTORUN_CORE_HEADER) PTR_READYTORUN_CORE_HEADER;
typedef DPTR(struct READYTORUN_HEADER) PTR_READYTORUN_HEADER;
typedef DWORD RVA;
#ifdef _MSC_VER
-// Wrapper to suppress ambigous overload problems with MSVC.
+// Wrapper to suppress ambiguous overload problems with MSVC.
inline CHECK CheckOverflow(RVA value1, COUNT_T value2)
{
WRAPPER_NO_CONTRACT;
#define IMAGE_FILE_MACHINE_NATIVE IMAGE_FILE_MACHINE_ARM64
#elif defined(TARGET_LOONGARCH64)
#define IMAGE_FILE_MACHINE_NATIVE IMAGE_FILE_MACHINE_LOONGARCH64
+#elif defined(TARGET_POWERPC64)
+#define IMAGE_FILE_MACHINE_NATIVE IMAGE_FILE_MACHINE_POWERPC
#elif defined(TARGET_S390X)
#define IMAGE_FILE_MACHINE_NATIVE IMAGE_FILE_MACHINE_UNKNOWN
#elif defined(TARGET_RISCV64)
DWORD GetCheckSum() const;
WORD GetMachine() const;
WORD GetCharacteristics() const;
- DWORD GetFileAlignment() const;
- DWORD GetSectionAlignment() const;
SIZE_T GetSizeOfStackReserve() const;
SIZE_T GetSizeOfStackCommit() const;
SIZE_T GetSizeOfHeapReserve() const;
BOOL HasReadyToRunHeader() const;
READYTORUN_HEADER *GetReadyToRunHeader() const;
- void GetEXEStackSizes(SIZE_T *PE_SizeOfStackReserve, SIZE_T *PE_SizeOfStackCommit) const;
-
// Native DLLMain Entrypoint
BOOL HasNativeEntryPoint() const;
void *GetNativeEntryPoint() const;
// Look up a named symbol in the export directory
PTR_VOID GetExport(LPCSTR exportName) const;
+#ifdef _DEBUG
+ // Stress mode for relocations
+ static BOOL GetForceRelocs();
+ static BOOL ForceRelocForDLL(LPCWSTR lpFileName);
+#endif
+
#ifdef DACCESS_COMPILE
void EnumMemoryRegions(CLRDataEnumMemoryFlags flags, bool enumThis);
#endif
// Protected API for subclass use
// ------------------------------------------------------------
- // Checking utilites
+ // Checking utilities
static CHECK CheckBounds(RVA rangeBase, COUNT_T rangeSize, RVA rva);
static CHECK CheckBounds(RVA rangeBase, COUNT_T rangeSize, RVA rva, COUNT_T size);
GC_NOTRIGGER;
}
CONTRACTL_END;
- m_base=NULL;
- m_flags=NULL;
- m_size=NULL;
+ m_base=(TADDR)0;
+ m_flags=0;
+ m_size=0;
m_pNTHeaders=NULL;
m_pCorHeader=NULL;
m_pReadyToRunHeader=NULL;
return VAL32(FindNTHeaders()->OptionalHeader.CheckSum);
}
-inline DWORD PEDecoder::GetFileAlignment() const
-{
- CONTRACTL
- {
- INSTANCE_CHECK;
- PRECONDITION(CheckNTHeaders());
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- //even though some data in OptionalHeader is different for 32 and 64, this field is the same
- return VAL32(FindNTHeaders()->OptionalHeader.FileAlignment);
-}
-
-inline DWORD PEDecoder::GetSectionAlignment() const
-{
- CONTRACTL
- {
- INSTANCE_CHECK;
- PRECONDITION(CheckNTHeaders());
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- //even though some data in OptionalHeader is different for 32 and 64, this field is the same
- return VAL32(FindNTHeaders()->OptionalHeader.SectionAlignment);
-}
-
inline WORD PEDecoder::GetMachine() const
{
CONTRACTL
return VAL16(FindNTHeaders()->FileHeader.Characteristics);
}
-inline SIZE_T PEDecoder::GetSizeOfStackReserve() const
-{
- CONTRACTL
- {
- INSTANCE_CHECK;
- PRECONDITION(CheckNTHeaders());
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- if (Has32BitNTHeaders())
- return (SIZE_T) VAL32(GetNTHeaders32()->OptionalHeader.SizeOfStackReserve);
- else
- return (SIZE_T) VAL64(GetNTHeaders64()->OptionalHeader.SizeOfStackReserve);
-}
-
-
-inline SIZE_T PEDecoder::GetSizeOfStackCommit() const
-{
- CONTRACTL
- {
- INSTANCE_CHECK;
- PRECONDITION(CheckNTHeaders());
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- if (Has32BitNTHeaders())
- return (SIZE_T) VAL32(GetNTHeaders32()->OptionalHeader.SizeOfStackCommit);
- else
- return (SIZE_T) VAL64(GetNTHeaders64()->OptionalHeader.SizeOfStackCommit);
-}
-
-
inline SIZE_T PEDecoder::GetSizeOfHeapReserve() const
{
CONTRACTL
return dac_cast<PTR_IMAGE_SECTION_HEADER>(
dac_cast<TADDR>(pNTHeaders) +
- FIELD_OFFSET(IMAGE_NT_HEADERS, OptionalHeader) +
+ offsetof(IMAGE_NT_HEADERS, OptionalHeader) +
VAL16(pNTHeaders->FileHeader.SizeOfOptionalHeader));
}
// 2) It can have multiple instantiations with different seeds
// 3) It behaves the same regardless of whether we build with VC++ or GCC
//
-// If you are working in the VM, we have a convenience method: code:GetRandomInt. This usess a thread-local
-// Random instance if a Thread object is available, and otherwise falls back to a global instance
-// with a spin-lock.
-//
+// If you are working in the VM, we have a convenience method: code:GetRandomInt.
#ifndef _CLRRANDOM_H_
#define _CLRRANDOM_H_
// Forbid the use of srand()/rand(), as these are globally shared facilities and our use of them would
// interfere with native user code in the same process. This override is not compatible with stl headers.
//
-#if !defined(DO_NOT_DISABLE_RAND) && !defined(USE_STL)
+#if !defined(DO_NOT_DISABLE_RAND)
#ifdef srand
#undef srand
#endif
#define rand Do_not_use_rand
-#endif //!DO_NOT_DISABLE_RAND && !USE_STL
+#endif //!DO_NOT_DISABLE_RAND
class CLRRandom
#define READYTORUN_SIGNATURE 0x00525452 // 'RTR'
-// Keep these in sync with src/coreclr/tools/Common/Internal/Runtime/ModuleHeaders.cs
-#define READYTORUN_MAJOR_VERSION 0x0006
-#define READYTORUN_MINOR_VERSION 0x0000
+// Keep these in sync with
+// src/coreclr/tools/Common/Internal/Runtime/ModuleHeaders.cs
+// src/coreclr/nativeaot/Runtime/inc/ModuleHeaders.h
+// If you update this, ensure you run `git grep MINIMUM_READYTORUN_MAJOR_VERSION`
+// and handle pending work.
+#define READYTORUN_MAJOR_VERSION 10
+#define READYTORUN_MINOR_VERSION 0x0001
-#define MINIMUM_READYTORUN_MAJOR_VERSION 0x006
+#define MINIMUM_READYTORUN_MAJOR_VERSION 10
// R2R Version 2.1 adds the InliningInfo section
// R2R Version 2.2 adds the ProfileDataInfo section
// R2R 3.0 is not backward compatible with 2.x.
// R2R Version 6.0 changes managed layout for sequential types with any unmanaged non-blittable fields.
// R2R 6.0 is not backward compatible with 5.x or earlier.
+// R2R Version 8.0 Changes the alignment of the Int128 type
+// R2R Version 9.0 adds support for the Vector512 type
+// R2R Version 9.1 adds new helpers to allocate objects on frozen segments
+// R2R Version 9.2 adds MemZero and NativeMemSet helpers
+// R2R Version 9.3 adds BulkWriteBarrier helper
+// uses GCInfo v3, which makes safe points in partially interruptible code interruptible.
+// R2R Version 10.0 adds support for the statics being allocated on a per type basis instead of on a per module basis
+// R2R Version 10.1 adds Unbox_TypeTest helper
struct READYTORUN_CORE_HEADER
{
READYTORUN_FLAG_NONSHARED_PINVOKE_STUBS = 0x00000008, // PInvoke stubs compiled into image are non-shareable (no secret parameter)
READYTORUN_FLAG_EMBEDDED_MSIL = 0x00000010, // MSIL is embedded in the composite R2R executable
READYTORUN_FLAG_COMPONENT = 0x00000020, // This is the header describing a component assembly of composite R2R
+ READYTORUN_FLAG_MULTIMODULE_VERSION_BUBBLE = 0x00000040, // This R2R module has multiple modules within its version bubble (For versions before version 6.2, all modules are assumed to possibly have this characteristic)
+ READYTORUN_FLAG_UNRELATED_R2R_CODE = 0x00000080, // This R2R module has code in it that would not be naturally encoded into this module
};
enum class ReadyToRunSectionType : uint32_t
OwnerCompositeExecutable = 116, // Added in V4.1
PgoInstrumentationData = 117, // Added in V5.2
ManifestAssemblyMvids = 118, // Added in V5.3
+ CrossModuleInlineInfo = 119, // Added in V6.2
+ HotColdMap = 120, // Added in V8.0
+ MethodIsGenericMap = 121, // Added in V9.0
+ EnclosingTypeMap = 122, // Added in V9.0
+ TypeGenericInfoMap = 123, // Added in V9.0
// If you add a new section consider whether it is a breaking or non-breaking change.
// Usually it is non-breaking, but if it is preferable to have older runtimes fail
IMAGE_DATA_DIRECTORY Section;
};
+enum class ReadyToRunImportSectionType : uint8_t
+{
+ Unknown = 0,
+ StubDispatch = 2,
+ StringHandle = 3,
+ ILBodyFixups = 7,
+};
+
+enum class ReadyToRunImportSectionFlags : uint16_t
+{
+ None = 0x0000,
+ Eager = 0x0001, // Section at module load time.
+ PCode = 0x0004, // Section contains pointers to code
+};
+
+// All values in this enum should within a nibble (4 bits).
+enum class ReadyToRunTypeGenericInfo : uint8_t
+{
+ GenericCountMask = 0x3,
+ HasConstraints = 0x4,
+ HasVariance = 0x8,
+};
+
+// All values in this enum should fit within 2 bits.
+enum class ReadyToRunGenericInfoGenericCount : uint32_t
+{
+ Zero = 0,
+ One = 1,
+ Two = 2,
+ MoreThanTwo = 3
+};
+
+enum class ReadyToRunEnclosingTypeMap
+{
+ MaxTypeCount = 0xFFFE
+};
+
//
// READYTORUN_IMPORT_SECTION describes image range with references to code or runtime data structures
//
//
struct READYTORUN_IMPORT_SECTION
{
- IMAGE_DATA_DIRECTORY Section; // Section containing values to be fixed up
- USHORT Flags; // One or more of ReadyToRunImportSectionFlags
- BYTE Type; // One of ReadyToRunImportSectionType
- BYTE EntrySize;
- DWORD Signatures; // RVA of optional signature descriptors
- DWORD AuxiliaryData; // RVA of optional auxiliary data (typically GC info)
-};
-
-enum ReadyToRunImportSectionType
-{
- READYTORUN_IMPORT_SECTION_TYPE_UNKNOWN = 0,
-};
-
-enum ReadyToRunImportSectionFlags
-{
- READYTORUN_IMPORT_SECTION_FLAGS_EAGER = 0x0001,
+ IMAGE_DATA_DIRECTORY Section; // Section containing values to be fixed up
+ ReadyToRunImportSectionFlags Flags; // One or more of ReadyToRunImportSectionFlags
+ ReadyToRunImportSectionType Type; // One of ReadyToRunImportSectionType
+ BYTE EntrySize;
+ DWORD Signatures; // RVA of optional signature descriptors
+ DWORD AuxiliaryData; // RVA of optional auxiliary data (typically GC info)
};
//
enum ReadyToRunFieldSigFlags
{
- READYTORUN_FIELD_SIG_IndexInsteadOfToken = 0x08,
READYTORUN_FIELD_SIG_MemberRefToken = 0x10,
READYTORUN_FIELD_SIG_OwnerType = 0x40,
};
enum ReadyToRunVirtualFunctionOverrideFlags
{
READYTORUN_VIRTUAL_OVERRIDE_None = 0x00,
- READYTORUN_VIRTUAL_OVERRIDE_VirtualFunctionOverriden = 0x01,
+ READYTORUN_VIRTUAL_OVERRIDE_VirtualFunctionOverridden = 0x01,
+};
+
+enum class ReadyToRunCrossModuleInlineFlags : uint32_t
+{
+ CrossModuleInlinee = 0x1,
+ HasCrossModuleInliners = 0x2,
+ CrossModuleInlinerIndexShift = 2,
+
+ InlinerRidHasModule = 0x1,
+ InlinerRidShift = 1,
};
//
READYTORUN_FIXUP_Check_VirtualFunctionOverride = 0x33, /* Generate a runtime check to ensure that virtual function resolution has equivalent behavior at runtime as at compile time. If not equivalent, code will not be used */
READYTORUN_FIXUP_Verify_VirtualFunctionOverride = 0x34, /* Generate a runtime check to ensure that virtual function resolution has equivalent behavior at runtime as at compile time. If not equivalent, generate runtime failure. */
+
+ READYTORUN_FIXUP_Check_IL_Body = 0x35, /* Check to see if an IL method is defined the same at runtime as at compile time. A failed match will cause code not to be used. */
+ READYTORUN_FIXUP_Verify_IL_Body = 0x36, /* Verify an IL body is defined the same at compile time and runtime. A failed match will cause a hard runtime failure. */
};
//
READYTORUN_HELPER_WriteBarrier = 0x30,
READYTORUN_HELPER_CheckedWriteBarrier = 0x31,
READYTORUN_HELPER_ByRefWriteBarrier = 0x32,
+ READYTORUN_HELPER_BulkWriteBarrier = 0x33,
// Array helpers
READYTORUN_HELPER_Stelem_Ref = 0x38,
READYTORUN_HELPER_Ldelema_Ref = 0x39,
- READYTORUN_HELPER_MemSet = 0x40,
+ READYTORUN_HELPER_MemZero = 0x3E,
+ READYTORUN_HELPER_MemSet = 0x3F,
+ READYTORUN_HELPER_NativeMemSet = 0x40,
READYTORUN_HELPER_MemCpy = 0x41,
// PInvoke helpers
READYTORUN_HELPER_Unbox = 0x5A,
READYTORUN_HELPER_Unbox_Nullable = 0x5B,
READYTORUN_HELPER_NewMultiDimArr = 0x5C,
+ READYTORUN_HELPER_Unbox_TypeTest = 0x5D,
// Helpers used with generic handle lookup cases
READYTORUN_HELPER_NewObject = 0x60,
READYTORUN_HELPER_GenericGcTlsBase = 0x66,
READYTORUN_HELPER_GenericNonGcTlsBase = 0x67,
READYTORUN_HELPER_VirtualFuncPtr = 0x68,
+ READYTORUN_HELPER_IsInstanceOfException = 0x69,
+ READYTORUN_HELPER_NewMaybeFrozenArray = 0x6A,
+ READYTORUN_HELPER_NewMaybeFrozenObject = 0x6B,
// Long mul/div/shift ops
READYTORUN_HELPER_LMul = 0xC0,
// Floating point ops
READYTORUN_HELPER_DblRem = 0xE0,
READYTORUN_HELPER_FltRem = 0xE1,
+
+ // Unused since READYTORUN_MAJOR_VERSION 10.0
READYTORUN_HELPER_DblRound = 0xE2,
READYTORUN_HELPER_FltRound = 0xE3,
#ifdef FEATURE_EH_FUNCLETS
- // Personality rountines
+ // Personality routines
READYTORUN_HELPER_PersonalityRoutine = 0xF0,
READYTORUN_HELPER_PersonalityRoutineFilterFunclet = 0xF1,
#endif
READYTORUN_INSTRUCTION_Dp=23,
READYTORUN_INSTRUCTION_Rdm=24,
READYTORUN_INSTRUCTION_AvxVnni=25,
+ READYTORUN_INSTRUCTION_Rcpc=26,
+ READYTORUN_INSTRUCTION_Movbe=27,
+ READYTORUN_INSTRUCTION_X86Serialize=28,
+ READYTORUN_INSTRUCTION_Avx512F=29,
+ READYTORUN_INSTRUCTION_Avx512F_VL=30,
+ READYTORUN_INSTRUCTION_Avx512BW=31,
+ READYTORUN_INSTRUCTION_Avx512BW_VL=32,
+ READYTORUN_INSTRUCTION_Avx512CD=33,
+ READYTORUN_INSTRUCTION_Avx512CD_VL=34,
+ READYTORUN_INSTRUCTION_Avx512DQ=35,
+ READYTORUN_INSTRUCTION_Avx512DQ_VL=36,
+ READYTORUN_INSTRUCTION_Avx512Vbmi=37,
+ READYTORUN_INSTRUCTION_Avx512Vbmi_VL=38,
+ READYTORUN_INSTRUCTION_VectorT128=39,
+ READYTORUN_INSTRUCTION_VectorT256=40,
+ READYTORUN_INSTRUCTION_VectorT512=41,
+ READYTORUN_INSTRUCTION_Rcpc2=42,
+ READYTORUN_INSTRUCTION_Sve=43,
+ READYTORUN_INSTRUCTION_Avx10v1=44,
+ READYTORUN_INSTRUCTION_Avx10v1_V512=46,
+ READYTORUN_INSTRUCTION_EVEX=47,
};
#endif // DEBUG_REGDISPLAY
TADDR SP;
- TADDR ControlPC;
+ TADDR ControlPC; // LOONGARCH: use RA for PC
+
+#if defined(TARGET_AMD64) && defined(TARGET_WINDOWS)
+ TADDR SSP;
+#endif
};
inline PCODE GetControlPC(const REGDISPLAY_BASE *pRD) {
return (LPVOID)display->GetEbpLocation();
}
+inline void SetRegdisplayPCTAddr(REGDISPLAY *display, TADDR addr)
+{
+ display->PCTAddr = addr;
+ display->ControlPC = *PTR_PCODE(addr);
+}
+
// This function tells us if the given stack pointer is in one of the frames of the functions called by the given frame
inline BOOL IsInCalleesFrames(REGDISPLAY *display, LPVOID stackPointer) {
inline TADDR GetRegdisplayFP(REGDISPLAY *display) {
LIMITED_METHOD_CONTRACT;
- return (TADDR)NULL;
+ return 0;
}
inline TADDR GetRegdisplayFPAddress(REGDISPLAY *display) {
LIMITED_METHOD_CONTRACT;
- return (TADDR)NULL;
+ return 0;
}
// This function tells us if the given stack pointer is in one of the frames of the functions called by the given frame
#else // TARGET_AMD64
PORTABILITY_ASSERT("GetRegdisplayStackMark NYI for this platform (Regdisp.h)");
- return (TADDR)NULL;
+ return NULL;
#endif // TARGET_AMD64
}
memset(this, 0, sizeof(REGDISPLAY));
// Setup the pointer to ControlPC field
- pPC = &ControlPC;
+ pPC = (DWORD *)&ControlPC;
}
};
}
#endif // FEATURE_EH_FUNCLETS
-inline void FillRegDisplay(const PREGDISPLAY pRD, PT_CONTEXT pctx, PT_CONTEXT pCallerCtx = NULL)
+inline void FillRegDisplay(const PREGDISPLAY pRD, PT_CONTEXT pctx, PT_CONTEXT pCallerCtx = NULL, bool fLightUnwind = false)
{
WRAPPER_NO_CONTRACT;
pRD->IsCallerSPValid = TRUE; // Don't add usage of this field. This is only temporary.
}
+#ifdef DEBUG_REGDISPLAY
+ pRD->_pThread = NULL;
+#endif // DEBUG_REGDISPLAY
+
+ // This will setup the PC and SP
+ SyncRegDisplayToCurrentContext(pRD);
+
+#if !defined(DACCESS_COMPILE)
+#if defined(TARGET_AMD64) && defined(TARGET_WINDOWS)
+ pRD->SSP = GetSSP(pctx);
+#endif
+#endif // !DACCESS_COMPILE
+
+ if (fLightUnwind)
+ return;
+
FillContextPointers(&pRD->ctxPtrsOne, pctx);
#if defined(TARGET_ARM)
pRD->volatileCurrContextPointers.T6 = &pctx->T6;
#endif // TARGET_RISCV64
-#ifdef DEBUG_REGDISPLAY
- pRD->_pThread = NULL;
-#endif // DEBUG_REGDISPLAY
-
- // This will setup the PC and SP
- SyncRegDisplayToCurrentContext(pRD);
#endif // !FEATURE_EH_FUNCLETS
}
return (PTR_size_t)(PTR_BYTE(regs) + OFFSET_OF_REGISTERS[regNum]);
#elif defined(TARGET_AMD64)
_ASSERTE(regNum < 16);
- return ®s->Rax + regNum;
+ return (size_t *)®s->Rax + regNum;
#elif defined(TARGET_ARM)
_ASSERTE(regNum < 16);
return (size_t *)®s->R0 + regNum;
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//*****************************************************************************
-// File: registrywrapper.h
-//
-// Wrapper around Win32 Registry Functions allowing redirection of .NET
-// Framework root registry location
-//
-//*****************************************************************************
-#ifndef __REGISTRYWRAPPER_H
-#define __REGISTRYWRAPPER_H
-
-
-#define ClrRegCreateKeyEx RegCreateKeyExW
-#define ClrRegOpenKeyEx RegOpenKeyExW
-#define IsNgenOffline() false
-
-
-#endif // __REGISTRYWRAPPER_H
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#pragma once
-
-// This class acts a smart pointer which calls the Release method on any object
-// you place in it when the ReleaseHolder class falls out of scope. You may use it
-// just like you would a standard pointer to a COM object (including if (foo),
-// if (!foo), if (foo == 0), etc) except for two caveats:
-// 1. This class never calls AddRef and it always calls Release when it
-// goes out of scope.
-// 2. You should never use & to try to get a pointer to a pointer unless
-// you call Release first, or you will leak whatever this object contains
-// prior to updating its internal pointer.
-template<class T>
-class ReleaseHolder
-{
-public:
- ReleaseHolder()
- : m_ptr(nullptr)
- {}
-
- ReleaseHolder(T* ptr)
- : m_ptr(ptr)
- {}
-
- ~ReleaseHolder()
- {
- Release();
- }
-
- void operator=(T *ptr)
- {
- Release();
-
- m_ptr = ptr;
- }
-
- T* operator->()
- {
- return m_ptr;
- }
-
- operator T*()
- {
- return m_ptr;
- }
-
- void** operator&()
- {
- return (void**)&m_ptr;
- }
-
- T* GetPtr() const
- {
- return m_ptr;
- }
-
- T* Detach()
- {
- T* pT = m_ptr;
- m_ptr = nullptr;
- return pT;
- }
-
- void Release()
- {
- if (m_ptr != nullptr)
- {
- m_ptr->Release();
- m_ptr = nullptr;
- }
- }
-
-private:
- T* m_ptr;
-};
-
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//{{NO_DEPENDENCIES}}
-// Used by mscorrc.rc
-//
-
-
-// For (failing) hresults of facility FACILITY_URT, we store
-// unparameterized description strings in the range
-// 0x6000..0x9000.
-#define MSG_FOR_URT_HR(hr) (0x6000 + (HRESULT_CODE(hr)))
-#define MAX_URT_HRESULT_CODE 0x3000
-
-#define HR_FOR_URT_MSG(code) (((code) >=0x6000 && (code) <= 0x6000+MAX_URT_HRESULT_CODE) ? \
- MAKE_HRESULT(SEVERITY_ERROR, FACILITY_URT, (code) - 0x6000) : \
- (code))
-
-#ifndef HRESULT_CODE
-#define HRESULT_CODE(hr) ((hr) & 0xFFFF)
-#endif // HRESULT_CODE
-
-
-//-----------------------------------------------------------------------------
-// Resource strings for MDA descriptions.
-//-----------------------------------------------------------------------------
-
-#define MDARC_DEBUGGER_FIBER_MODE_NOT_SUPPORTED 0x1934
-
-#define IDS_RTL 0x01F5
-
-#define IDS_DS_ACTIVESESSIONS 0x1701
-#define IDS_DS_DATASOURCENAME 0x1702
-#define IDS_DS_DATASOURCEREADONLY 0x1703
-#define IDS_DS_DBMSNAME 0x1704
-#define IDS_DS_DBMSVER 0x1705
-#define IDS_DS_IDENTIFIERCASE 0x1706
-#define IDS_DS_DSOTHREADMODEL 0x1707
-
-#define IDS_EE_NDIRECT_UNSUPPORTED_SIG 0x1708
-#define IDS_EE_NDIRECT_BADNATL 0x170a
-#define IDS_EE_NDIRECT_LOADLIB_WIN 0x170b
-#define IDS_EE_NDIRECT_GETPROCADDRESS_WIN 0x170c
-#define IDS_EE_COM_UNSUPPORTED_SIG 0x170d
-#define IDS_EE_NOSYNCHRONIZED 0x170f
-#define IDS_EE_NDIRECT_BADNATL_THISCALL 0x1710
-#define IDS_EE_MULTIPLE_CALLCONV_UNSUPPORTED 0x1711
-
-#define IDS_EE_LOAD_BAD_MAIN_SIG 0x1712
-#define IDS_EE_COM_UNSUPPORTED_TYPE 0x1713
-
-#define IDS_EE_NOTNDIRECT 0x1719
-#define IDS_EE_RETHROW_NOT_ALLOWED 0x171d
-#define IDS_EE_INVALID_OLE_VARIANT 0x171e
-
-#define IDS_EE_FILE_NOT_FOUND 0x80070002
-#define IDS_EE_PATH_TOO_LONG 0x8007006F
-#define IDS_EE_PROC_NOT_FOUND 0x8007007F
-#define IDS_EE_ALREADY_EXISTS 0x800700B7
-#define IDS_EE_BAD_USER_PROFILE 0x800704E5
-#define IDS_INET_E_CANNOT_CONNECT 0x1799 // 0x800C0004
-#define IDS_INET_E_RESOURCE_NOT_FOUND 0x1a60 // 0x800C0005
-#define IDS_INET_E_CONNECTION_TIMEOUT 0x1a1e // 0x800C000B
-#define IDS_INET_E_SECURITY_PROBLEM 0x800C000E
-
-#define IDS_EE_TO_MANY_ARGUMENTS_IN_MAIN 0x1721
-#define IDS_EE_FAILED_TO_FIND_MAIN 0x1722
-#define IDS_EE_ILLEGAL_TOKEN_FOR_MAIN 0x1723
-#define IDS_EE_MAIN_METHOD_MUST_BE_STATIC 0x1724
-#define IDS_EE_MAIN_METHOD_HAS_INVALID_RTN 0x1725
-#define IDS_EE_VTABLECALLSNOTSUPPORTED 0x1726
-
-#define IDS_EE_BADMARSHALFIELD_STRING 0x1727
-#define IDS_EE_BADMARSHALFIELD_NOCUSTOMMARSH 0x1728
-#define IDS_EE_BADMARSHALFIELD_FIXEDARRAY_ZEROSIZE 0x172a
-#define IDS_EE_BADMARSHALFIELD_LAYOUTCLASS 0x172b
-#define IDS_EE_BADMARSHALFIELD_ARRAY 0x172c
-
-#define IDS_EE_BADMARSHALPARAM_NO_LPTSTR 0x172d
-
-#define IDS_EE_SAFEARRAYTYPEMISMATCH 0x1738
-#define IDS_EE_SAFEARRAYRANKMISMATCH 0x1739
-#define IDS_EE_BADMARSHAL_GENERIC 0x173a
-#define IDS_EE_BADMARSHAL_CHAR 0x173b
-#define IDS_EE_BADMARSHAL_BOOLEAN 0x173c
-#define IDS_EE_BADMARSHAL_I1 0x173d
-#define IDS_EE_BADMARSHAL_I2 0x173e
-#define IDS_EE_BADMARSHAL_I4 0x173f
-#define IDS_EE_BADMARSHAL_I8 0x1740
-#define IDS_EE_BADMARSHAL_I 0x1741
-#define IDS_EE_BADMARSHAL_R4 0x1742
-#define IDS_EE_BADMARSHAL_R8 0x1743
-#define IDS_EE_BADMARSHAL_PTR 0x1745
-#define IDS_EE_BADMARSHAL_NOLAYOUT 0x1746
-#define IDS_EE_BADMARSHALPARAM_STRING 0x1747
-#define IDS_EE_BADMARSHALPARAM_STRINGBUILDER 0x1748
-#define IDS_EE_BADMARSHAL_DELEGATE 0x1749
-#define IDS_EE_BADMARSHAL_FNPTR 0x174a
-#define IDS_EE_BADMARSHAL_INTERFACE 0x174b
-#define IDS_EE_BADMARSHAL_CLASS 0x174c
-#define IDS_EE_BADMARSHAL_VALUETYPE 0x174d
-#define IDS_EE_BADMARSHAL_OBJECT 0x174e
-#define IDS_EE_BADMARSHALFIELD_OBJECT 0x174f
-#define IDS_EE_BADMARSHALPARAM_DECIMAL 0x1750
-#define IDS_EE_BADMARSHAL_GUID 0x1751
-#define IDS_EE_BADMARSHAL_DATETIME 0x1753
-#define IDS_EE_BADMARSHAL_ARRAY 0x1754
-#define IDS_EE_BADMARSHAL_BADMANAGED 0x1756
-#define IDS_EE_SRC_OBJ_NOT_COMOBJECT 0x1757
-#define IDS_EE_CANNOT_COERCE_COMOBJECT 0x1759
-#define IDS_EE_BADMARSHAL_AUTOLAYOUT 0x175a
-#define IDS_EE_BADMARSHAL_RESTRICTION 0x175d
-#define IDS_EE_BADMARSHAL_ASANYRESTRICTION 0x175f
-#define IDS_EE_BADMARSHAL_VBBYVALSTRRESTRICTION 0x1760
-#define IDS_EE_BADMARSHAL_AWORESTRICTION 0x1761
-#define IDS_EE_BADMARSHAL_ARGITERATORRESTRICTION 0x1765
-#define IDS_EE_BADMARSHAL_HANDLEREFRESTRICTION 0x1766
-
-#define IDS_EE_ADUNLOAD_NOT_ALLOWED 0x1767
-
-#define IDS_CANNOT_MARSHAL 0x1770
-#define IDS_CANNOT_MARSHAL_RECURSIVE_DEF 0x1771
-#define IDS_EE_HASH_VAL_FAILED 0x1772
-
-
-#define IDS_CLASSLOAD_GENERAL 0x80131522
-#define IDS_CLASSLOAD_BADFORMAT 0x1774
-#define IDS_CLASSLOAD_BYREFARRAY 0x1775
-#define IDS_CLASSLOAD_BYREFLIKEARRAY 0x1776
-#define IDS_CLASSLOAD_MISSINGMETHOD 0x1777
-#define IDS_CLASSLOAD_STATICVIRTUAL 0x1778
-#define IDS_CLASSLOAD_REDUCEACCESS 0x1779
-#define IDS_CLASSLOAD_BADPINVOKE 0x177a
-#define IDS_CLASSLOAD_VALUECLASSTOOLARGE 0x177b
-#define IDS_CLASSLOAD_NOTIMPLEMENTED 0x177c
-#define IDS_CLASSLOAD_PARENTNULL 0x177d
-#define IDS_CLASSLOAD_PARENTINTERFACE 0x177e
-#define IDS_CLASSLOAD_INTERFACEOBJECT 0x177f
-#define IDS_CLASSLOAD_INTERFACENULL 0x1780
-#define IDS_CLASSLOAD_NOTINTERFACE 0x1781
-#define IDS_CLASSLOAD_VALUEINSTANCEFIELD 0x1782
-#define IDS_CLASSLOAD_EXPLICIT_GENERIC 0x1783
-#define IDS_CLASSLOAD_RANK_TOOLARGE 0x1785
-#define IDS_CLASSLOAD_BAD_UNMANAGED_RVA 0x1787
-#define IDS_CLASSLOAD_ENCLOSING 0x1789
-#define IDS_CLASSLOAD_EXPLICIT_LAYOUT 0x178a
-#define IDS_CLASSLOAD_SEALEDPARENT 0x178b
-#define IDS_CLASSLOAD_NOMETHOD_NAME 0x178c
-#define IDS_CLASSLOAD_BADSPECIALMETHOD 0x178e
-#define IDS_CLASSLOAD_MI_DECLARATIONNOTFOUND 0x178f
-#define IDS_CLASSLOAD_MI_MULTIPLEOVERRIDES 0x1790
-#define IDS_CLASSLOAD_MI_ACCESS_FAILURE 0x1791
-#define IDS_CLASSLOAD_MI_BADSIGNATURE 0x1793
-#define IDS_CLASSLOAD_MI_NOTIMPLEMENTED 0x1794
-#define IDS_CLASSLOAD_MI_MUSTBEVIRTUAL 0x1796
-#define IDS_CLASSLOAD_MISSINGMETHODRVA 0x1797
-#define IDS_CLASSLOAD_FIELDTOOLARGE 0x1798
-#define IDS_CLASSLOAD_CANTEXTEND 0x179a
-#define IDS_CLASSLOAD_ZEROSIZE 0x179b
-#define IDS_CLASSLOAD_TYPESPEC 0x179c
-#define IDS_CLASSLOAD_BAD_FIELD 0x179d
-#define IDS_CLASSLOAD_MI_ILLEGAL_BODY 0x179e
-#define IDS_CLASSLOAD_MI_ILLEGAL_TOKEN_BODY 0x17a0
-#define IDS_CLASSLOAD_MI_ILLEGAL_TOKEN_DECL 0x17a1
-#define IDS_CLASSLOAD_MI_SEALED_DECL 0x17a2
-#define IDS_CLASSLOAD_MI_FINAL_DECL 0x17a3
-#define IDS_CLASSLOAD_MI_NONVIRTUAL_DECL 0x17a4
-#define IDS_CLASSLOAD_MI_BODY_DECL_MISMATCH 0x17a5
-#define IDS_CLASSLOAD_MI_MISSING_SIG_BODY 0x17a6
-#define IDS_CLASSLOAD_MI_MISSING_SIG_DECL 0x17a7
-#define IDS_CLASSLOAD_MI_BADRETURNTYPE 0x17a8
-#define IDS_CLASSLOAD_STATICVIRTUAL_NOTIMPL 0x17a9
-
-#define IDS_CLASSLOAD_TOOMANYGENERICARGS 0x17ab
-#define IDS_ERROR 0x17b0
-#define IDS_DEBUG_SERVICE_CAPTION 0x17b4
-#define IDS_DEBUG_USERBREAKPOINT 0x17b6
-#define IDS_DEBUG_UNHANDLEDEXCEPTION 0x17b7
-#define IDS_DEBUG_UNHANDLEDEXCEPTION_IPC 0x17b8
-#define IDS_PERFORMANCEMON_FUNCNOTFOUND 0x17bb
-#define IDS_PERFORMANCEMON_FUNCNOTFOUND_TITLE 0x17bc
-#define IDS_PERFORMANCEMON_PSAPINOTFOUND 0x17bd
-#define IDS_PERFORMANCEMON_PSAPINOTFOUND_TITLE 0x17be
-
-#define IDS_DEBUG_UNHANDLED_EXCEPTION_MSG 0x17c0
-#define IDS_DEBUG_USER_BREAKPOINT_MSG 0x17c1
-
-#define IDS_INVALID_REDIM 0x17c3
-#define IDS_INVALID_PINVOKE_CALLCONV 0x17c4
-#define IDS_CLASSLOAD_NSTRUCT_EXPLICIT_OFFSET 0x17c7
-#define IDS_EE_BADPINVOKEFIELD_NOTMARSHALABLE 0x17c9
-#define IDS_WRONGSIZEARRAY_IN_NSTRUCT 0x17ca
-
-#define IDS_EE_INVALIDLCIDPARAM 0x17cd
-#define IDS_EE_BADMARSHAL_NESTEDARRAY 0x17ce
-#define IDS_EE_INVALIDCOMSOURCEITF 0x17d1
-#define IDS_EE_CANNOT_COERCE_BYREF_VARIANT 0x17d2
-#define IDS_EE_WRAPPER_MUST_HAVE_DEF_CONS 0x17d3
-#define IDS_EE_INVALID_STD_DISPID_NAME 0x17d4
-#define IDS_EE_NO_IDISPATCH_ON_TARGET 0x17d5
-#define IDS_EE_NON_STD_NAME_WITH_STD_DISPID 0x17d6
-#define IDS_EE_INVOKE_NEW_ENUM_INVALID_RETURN 0x17d7
-#define IDS_EE_COM_OBJECT_RELEASE_RACE 0x17d8
-#define IDS_EE_COM_OBJECT_NO_LONGER_HAS_WRAPPER 0x17d9
-#define IDS_EE_CALLBACK_NOT_CALLED_FROM_CCTOR 0x17da
-#define IDS_EE_CALLBACK_ALREADY_REGISTERED 0x17de
-#define IDS_EE_NDIRECT_BADNATL_CALLCONV 0x17df
-#define IDS_EE_CANNOTCAST 0x17e0
-#define IDS_EE_NOTISOMORPHIC 0x17e1
-
-#define IDS_EE_NOCUSTOMMARSHALER 0x17e7
-#define IDS_EE_SIZECONTROLOUTOFRANGE 0x17e8
-#define IDS_EE_SIZECONTROLBADTYPE 0x17e9
-#define IDS_EE_SAFEARRAYSZARRAYMISMATCH 0x17eb
-#define IDS_EE_INVALID_VT_FOR_CUSTOM_MARHALER 0x17ec
-#define IDS_EE_BAD_COMEXTENDS_CLASS 0x17ed
-
-#define IDS_EE_ERRORTITLE 0x17f0
-#define IDS_EE_ERRORMESSAGETEMPLATE 0x17f1
-
-#define IDS_EE_LOCAL_COGETCLASSOBJECT_FAILED 0x17f5
-
-#define IDS_EE_MISSING_FIELD 0x17f7
-#define IDS_EE_MISSING_METHOD 0x17f8
-
-#define IDS_EE_INTERFACE_NOT_DISPATCH_BASED 0x17f9
-
-#define IDS_EE_UNHANDLED_EXCEPTION 0x17fc
-#define IDS_EE_EXCEPTION_TOSTRING_FAILED 0x17fd
-
-#define IDS_CLASSLOAD_EQUIVALENTSTRUCTMETHODS 0x17fe
-#define IDS_CLASSLOAD_EQUIVALENTSTRUCTFIELDS 0x17ff
-
-#define IDS_EE_NO_IDISPATCH 0x1a02
-
-
-#define IDS_EE_SIGTOOCOMPLEX 0x1a03
-#define IDS_EE_STRUCTTOOCOMPLEX 0x1a04
-#define IDS_EE_STRUCTARRAYTOOLARGE 0x1a05
-#define IDS_EE_BADMARSHALFIELD_NOSTRINGBUILDER 0x1a06
-#define IDS_EE_NAME_UNKNOWN 0x1a07
-#define IDS_EE_NO_BACKING_CLASS_FACTORY 0x1a0b
-#define IDS_EE_NAME_UNKNOWN_UNQ 0x1a0c
-#define IDS_EE_STRING_TOOLONG 0x1a0d
-#define IDS_EE_VARARG_NOT_SUPPORTED 0x1a0f
-
-#define IDS_EE_INVALID_CA 0x1a10
-
-#define IDS_EE_THREAD_CANNOT_GET 0x1a15
-#define IDS_EE_THREAD_BAD_STATE 0x1a1b
-#define IDS_EE_THREAD_ABORT_WHILE_SUSPEND 0x1a1c
-
-#define IDS_EE_NOVARIANTRETURN 0x1a1d
-
-#define IDS_EE_METHOD_NOT_FOUND_ON_EV_PROV 0x1a24
-#define IDS_EE_BAD_COMEVENTITF_CLASS 0x1a25
-
-#define IDS_EE_COREXEMAIN2_FAILED_TITLE 0x1a2b
-#define IDS_EE_COREXEMAIN2_FAILED_TEXT 0x1a2c
-
-#define IDS_EE_ICUSTOMMARSHALERNOTIMPL 0x1a2e
-#define IDS_EE_GETINSTANCENOTIMPL 0x1a2f
-
-#define IDS_EE_BADMARSHAL_CUSTOMMARSHALER 0x1a30
-
-#define IDS_CLASSLOAD_COMIMPCANNOTHAVELAYOUT 0x1a31
-#define IDS_EE_INVALIDCOMDEFITF 0x1a32
-#define IDS_EE_COMDEFITFNOTSUPPORTED 0x1a33
-
-#define IDS_EE_CLASS_TO_VARIANT_TLB_NOT_REG 0x1a35
-#define IDS_EE_CANNOT_MAP_TO_MANAGED_VC 0x1a36
-
-#define IDS_EE_MARSHAL_UNMAPPABLE_CHAR 0x1a37
-
-#define IDS_EE_BADMARSHAL_SAFEHANDLENATIVETOCOM 0x1a3a
-#define IDS_EE_BADMARSHAL_ABSTRACTOUTSAFEHANDLE 0x1a3b
-#define IDS_EE_BADMARSHAL_RETURNSHCOMTONATIVE 0x1a3c
-#define IDS_EE_BADMARSHAL_SAFEHANDLE 0x1a3d
-
-#define IDS_EE_SAFEHANDLECLOSED 0x1a3f
-#define IDS_EE_SAFEHANDLECANNOTSETHANDLE 0x1a40
-
-#define IDS_EE_BADMARSHAL_ABSTRACTRETSAFEHANDLE 0x1a44
-#define IDS_EE_SH_IN_VARIANT_NOT_SUPPORTED 0x1a47
-
-#define IDS_EE_BADMARSHAL_SYSARRAY 0x1a48
-#define IDS_EE_VAR_WRAP_IN_VAR_NOT_SUPPORTED 0x1a49
-#define IDS_EE_RECORD_NON_SUPPORTED_FIELDS 0x1a4a
-
-#define IDS_CLASSLOAD_TYPEWRONGNUMGENERICARGS 0x1a4b
-#define IDS_CLASSLOAD_NSTRUCT_NEGATIVE_OFFSET 0x1a4d
-
-#define IDS_CLASSLOAD_INVALIDINSTANTIATION 0x1a59
-
-#define IDS_EE_CLASSLOAD_INVALIDINSTANTIATION 0x1a59
-#define IDS_EE_BADMARSHALFIELD_ZEROLENGTHFIXEDSTRING 0x1a5a
-
-#define IDS_EE_BADMARSHAL_CRITICALHANDLENATIVETOCOM 0x1a62
-#define IDS_EE_BADMARSHAL_ABSTRACTOUTCRITICALHANDLE 0x1a63
-#define IDS_EE_BADMARSHAL_RETURNCHCOMTONATIVE 0x1a64
-#define IDS_EE_BADMARSHAL_CRITICALHANDLE 0x1a65
-
-#define IDS_EE_BADMARSHAL_ABSTRACTRETCRITICALHANDLE 0x1a6a
-#define IDS_EE_CH_IN_VARIANT_NOT_SUPPORTED 0x1a6b
-
-#define IDS_CLASSLOAD_CONSTRAINT_MISMATCH_ON_IMPLICIT_OVERRIDE 0x1a6f
-#define IDS_CLASSLOAD_CONSTRAINT_MISMATCH_ON_IMPLICIT_IMPLEMENTATION 0x1a70
-#define IDS_CLASSLOAD_CONSTRAINT_MISMATCH_ON_LOCAL_METHOD_IMPL 0x1a71
-#define IDS_CLASSLOAD_CONSTRAINT_MISMATCH_ON_PARENT_METHOD_IMPL 0x1a72
-#define IDS_CLASSLOAD_CONSTRAINT_MISMATCH_ON_INTERFACE_METHOD_IMPL 0x1a73
-
-#define IDS_EE_NDIRECT_BADNATL_VARARGS_CALLCONV 0x1a75
-
-#define IDS_CLASSLOAD_VARIANCE_IN_METHOD_ARG 0x1a79
-#define IDS_CLASSLOAD_VARIANCE_IN_METHOD_RESULT 0x1a7a
-#define IDS_CLASSLOAD_VARIANCE_IN_BASE 0x1a7b
-#define IDS_CLASSLOAD_VARIANCE_IN_INTERFACE 0x1a7c
-#define IDS_CLASSLOAD_VARIANCE_IN_CONSTRAINT 0x1a7d
-#define IDS_CLASSLOAD_VARIANCE_CLASS 0x1a7e
-#define IDS_CLASSLOAD_BADVARIANCE 0x1a7f
-
-#define IDS_CLASSLOAD_OVERLAPPING_INTERFACES 0x1a80
-#define IDS_CLASSLOAD_32BITCLRLOADING64BITASSEMBLY 0x1a81
-#define IDS_EE_ASSEMBLY_GETTYPE_CANNONT_HAVE_ASSEMBLY_SPEC 0x1a84
-
-#define IDS_EE_CANNOT_HAVE_ASSEMBLY_SPEC 0x1a86
-#define IDS_EE_NEEDS_ASSEMBLY_SPEC 0x1a87
-
-#define IDS_EE_FILELOAD_ERROR_GENERIC 0x1a88
-
-#define IDS_EE_BADMARSHAL_UNSUPPORTED_SIG 0x1a89
-#define IDS_EE_BADMARSHAL_STRINGARRAY 0x1a8a
-#define IDS_EE_BADMARSHAL_OBJECTARRAY 0x1a8b
-#define IDS_EE_BADMARSHAL_DATETIMEARRAY 0x1a8c
-#define IDS_EE_BADMARSHAL_DECIMALARRAY 0x1a8d
-#define IDS_EE_BADMARSHAL_SAFEHANDLEARRAY 0x1a8f
-#define IDS_EE_BADMARSHAL_CRITICALHANDLEARRAY 0x1a90
-#define IDS_EE_BADMARSHALFIELD_ERROR_MSG 0x1a92
-#define IDS_EE_BADMARSHAL_ERROR_MSG 0x1a93
-#define IDS_EE_COM_INVISIBLE_PARENT 0x1a97
-
-#define IDS_EE_REMOTE_COGETCLASSOBJECT_FAILED 0x1a98
-#define IDS_EE_CREATEINSTANCE_FAILED 0x1a99
-#define IDS_EE_CREATEINSTANCE_LIC_FAILED 0x1a9a
-
-#define IDS_EE_RCW_INVALIDCAST_ITF 0x1a9b
-#define IDS_EE_RCW_INVALIDCAST_EVENTITF 0x1a9c
-#define IDS_EE_RCW_INVALIDCAST_IENUMERABLE 0x1a9d
-#define IDS_EE_RCW_INVALIDCAST_MNGSTDITF 0x1a9e
-#define IDS_EE_RCW_INVALIDCAST_COMOBJ_TO_MD 0x1a9f
-#define IDS_EE_RCW_INVALIDCAST_TO_NON_COMOBJTYPE 0x1aa0
-#define IDS_EE_RCW_INVALIDCAST_MD_TO_MD 0x1aa1
-
-#define IDS_EE_GENERIC 0x1aa2
-#define IDS_EE_BADMARSHAL_GENERICS_RESTRICTION 0x1aa3
-
-#define IDS_EE_THREAD_ABORT 0x1aa4
-#define IDS_EE_THREAD_INTERRUPTED 0x1aa5
-#define IDS_EE_OUT_OF_MEMORY 0x1aa6
-
-#define IDS_EE_ATTEMPT_TO_CREATE_GENERIC_CCW 0x1aa9
-#define IDS_EE_ATTEMPT_TO_CREATE_NON_ABSTRACT_CCW 0x1aaa
-#define IDS_EE_COMIMPORT_METHOD_NO_INTERFACE 0x1aab
-#define IDS_EE_OUT_OF_MEMORY_WITHIN_RANGE 0x1aac
-#define IDS_EE_ARRAY_DIMENSIONS_EXCEEDED 0x1aad
-#define IDS_EE_OUT_OF_SYNCBLOCKS 0x1aae
-
-#define IDS_CLASSLOAD_MI_CANNOT_OVERRIDE 0x1ab3
-#define IDS_CLASSLOAD_COLLECTIBLEFIXEDVTATTR 0x1ab6
-#define IDS_CLASSLOAD_EQUIVALENTBADTYPE 0x1ab7
-#define IDS_EE_CODEEXECUTION_CONTAINSGENERICVAR 0x1abb
-#define IDS_CLASSLOAD_WRONGCPU 0x1abc
-#define IDS_EE_CREATEINSTANCEFROMAPP_FAILED 0x1abd
-
-#define IDS_IBC_MISSING_EXTERNAL_TYPE 0x1ac5
-#define IDS_IBC_MISSING_EXTERNAL_METHOD 0x1ac6
-#define IDS_EE_HWINTRINSIC_NGEN_DISALLOWED 0x1ac7
-#define IDS_CLASSLOAD_MI_FINAL_IMPL 0x1ac8
-#define IDS_CLASSLOAD_AMBIGUOUS_OVERRIDE 0x1ac9
-#define IDS_CLASSLOAD_UNSUPPORTED_DISPATCH 0x1aca
-#define IDS_CLASSLOAD_METHOD_NOT_IMPLEMENTED 0x1acb
-
-#define BFA_INVALID_TOKEN_TYPE 0x2001
-#define BFA_INVALID_TOKEN 0x2003
-#define BFA_UNABLE_TO_GET_NESTED_PROPS 0x2005
-#define BFA_METHOD_TOKEN_OUT_OF_RANGE 0x2006
-#define BFA_METHOD_NAME_TOO_LONG 0x2007
-#define BFA_METHOD_IN_A_ENUM 0x2009
-#define BFA_METHOD_WITH_NONZERO_RVA 0x200a
-#define BFA_ABSTRACT_METHOD_WITH_RVA 0x200b
-#define BFA_RUNTIME_METHOD_WITH_RVA 0x200c
-#define BFA_INTERNAL_METHOD_WITH_RVA 0x200d
-#define BFA_AB_METHOD_IN_AB_CLASS 0x200e
-#define BFA_NONVIRT_AB_METHOD 0x200f
-#define BFA_NONAB_NONCCTOR_METHOD_ON_INT 0x2010
-#define BFA_VIRTUAL_PINVOKE_METHOD 0x2011
-#define BFA_VIRTUAL_STATIC_METHOD 0x2012
-#define BFA_VIRTUAL_INSTANCE_CTOR 0x2013
-#define BFA_VIRTUAL_NONAB_INT_METHOD 0x2014
-#define BFA_NONVIRT_INST_INT_METHOD 0x2015
-#define BFA_SYNC_METHOD_IN_VT 0x2016
-#define BFA_NONSTATIC_GLOBAL_METHOD 0x2017
-#define BFA_GLOBAL_INST_CTOR 0x2018
-#define BFA_BAD_PLACE_FOR_GENERIC_METHOD 0x2019
-#define BFA_GENERIC_METHOD_RUNTIME_IMPL 0x201a
-#define BFA_BAD_RUNTIME_IMPL 0x201b
-#define BFA_BAD_FLAGS_ON_DELEGATE 0x201c
-#define BFA_UNKNOWN_DELEGATE_METHOD 0x201d
-#define BFA_GENERIC_METHODS_INST 0x201e
-#define BFA_BAD_FIELD_TOKEN 0x201f
-#define BFA_INVALID_FIELD_ACC_FLAGS 0x2020
-#define BFA_FIELD_LITERAL_AND_INIT 0x2021
-#define BFA_NONSTATIC_GLOBAL_FIELD 0x2022
-#define BFA_INSTANCE_FIELD_IN_INT 0x2023
-#define BFA_INSTANCE_FIELD_IN_ENUM 0x2024
-#define BFA_NONVIRT_NO_SEARCH 0x2025
-#define BFA_MANAGED_NATIVE_NYI 0x2027
-#define BFA_BAD_IMPL_FLAGS 0x2028
-#define BFA_BAD_UNMANAGED_ENTRY_POINT 0x2029
-#define BFA_GENCODE_NOT_BE_VARARG 0x202b
-#define BFA_CANNOT_INHERIT_FROM_DELEGATE 0x202c
-#define BFA_DELEGATE_CLASS_NOTSEALED 0x202d
-#define BFA_ENCLOSING_TYPE_NOT_FOUND 0x202e
-#define BFA_ILLEGAL_DELEGATE_METHOD 0x202f
-#define BFA_MISSING_DELEGATE_METHOD 0x2030
-#define BFA_MULT_TYPE_SAME_NAME 0x2031
-#define BFA_INVALID_METHOD_TOKEN 0x2032
-#define BFA_ECALLS_MUST_BE_IN_SYS_MOD 0x2034
-#define BFA_CANT_GET_CLASSLAYOUT 0x2035
-#define BFA_CALLCONV_NOT_LOCAL_SIG 0x2036
-#define BFA_BAD_CLASS_TOKEN 0x2037
-#define BFA_BAD_IL_RANGE 0x2038
-#define BFA_METHODDEF_WO_TYPEDEF_PARENT 0x2039
-#define BFA_METHODDEF_PARENT_NO_MEMBERS 0x203a
-#define BFA_INVALID_TOKEN_IN_MANIFESTRES 0x203c
-#define BFA_EMPTY_ASSEMDEF_NAME 0x203d
-#define BFA_BAD_IL 0x203e
-#define BFA_CLASSLOAD_VALUETYPEMISMATCH 0x203f
-#define BFA_METHODDECL_NOT_A_METHODDEF 0x2040
-#define BFA_DUPLICATE_DELEGATE_METHOD 0x2041
-#define BFA_ECALLS_MUST_HAVE_ZERO_RVA 0x2042
-#define BFA_METADATA_CORRUPT 0x2043
-#define BFA_BAD_SIGNATURE 0x2044
-#define BFA_TYPEREG_NAME_TOO_LONG 0x2045
-#define BFA_BAD_TYPEREF_TOKEN 0x2046
-#define BFA_BAD_CLASS_INT_CA 0x2047
-#define BFA_BAD_CLASS_INT_CA_FORMAT 0x2048
-#define BFA_BAD_COMPLUS_SIG 0x2049
-#define BFA_BAD_ELEM_IN_SIZEOF 0x204b
-#define BFA_IJW_IN_COLLECTIBLE_ALC 0x204c
-
-#define IDS_CLASSLOAD_INTERFACE_NO_ACCESS 0x204f
-
-#define BFA_BAD_CA_HEADER 0x2050
-#define BFA_BAD_STRING_TOKEN 0x2052
-#define BFA_BAD_STRING_TOKEN_RANGE 0x2053
-#define BFA_FIXUP_WRONG_PLATFORM 0x2054
-#define BFA_UNEXPECTED_GENERIC_TOKENTYPE 0x2055
-#define BFA_MDARRAY_BADRANK 0x2056
-#define BFA_SDARRAY_BADRANK 0x2057
-#define BFA_BAD_PACKING_SIZE 0x2058
-#define BFA_UNEXPECTED_ARRAY_TYPE 0x2059
-#define BFA_BAD_VISIBILITY 0x205a
-#define BFA_FAMILY_ON_GLOBAL 0x205b
-#define BFA_NOFIND_EXPORTED_TYPE 0x205c
-#define BFA_NOT_AN_ARRAY 0x205d
-#define BFA_EXPECTED_METHODDEF_OR_MEMBERREF 0x205e
-
-#define IDS_CLASSLOAD_BAD_METHOD_COUNT 0x2062
-#define IDS_CLASSLOAD_BAD_FIELD_COUNT 0x2063
-#define IDS_CLASSLOAD_MUST_BE_BYVAL 0x2064
-#define IDS_CLASSLOAD_BAD_VARIANCE_SIG 0x2065
-#define IDS_CLASSLOAD_VARIANCE_IN_DELEGATE 0x2066
-
-#define BFA_UNEXPECTED_FIELD_SIGNATURE 0x2068
-#define BFA_UNEXPECTED_TOKEN_AFTER_CLASSVALTYPE 0x2069
-#define BFA_FNPTR_CANNOT_BE_A_FIELD 0x206a
-#define BFA_FNPTR_CANNOT_BE_GENERIC 0x206b
-#define BFA_UNEXPECTED_TOKEN_AFTER_GENINST 0x206c
-#define BFA_TYPEDBYREFCANNOTHAVEBYREF 0x206e
-
-#define IDS_CLASSLOAD_MI_BAD_SIG 0x2070
-
-#define IDS_EE_TOOMANYFIELDS 0x2072
-
-#define IDS_EE_NDIRECT_GETPROCADDRESS_NONAME 0x2073
-#define IDS_EE_CLASS_CONSTRAINTS_VIOLATION 0x2076
-#define IDS_EE_METHOD_CONSTRAINTS_VIOLATION 0x2077
-#define IDS_CLASSLOAD_TOO_MANY_METHODS 0x2078
-#define IDS_CLASSLOAD_ENUM_EXTRA_GENERIC_TYPE_PARAM 0x2079
-
-#define IDS_CLASSLOAD_GENERICTYPE_RECURSIVE 0x207D
-#define IDS_EE_JIT_COMPILER_ERROR 0x207F
-
-#define IDS_ER_APPLICATION 0x2082
-#define IDS_ER_UNKNOWN 0x2083
-#define IDS_ER_FRAMEWORK_VERSION 0x2084
-#define IDS_ER_UNHANDLEDEXCEPTION 0x2085
-#define IDS_ER_UNHANDLEDEXCEPTIONMSG 0x2086
-#define IDS_ER_MANAGEDFAILFAST 0x2087
-#define IDS_ER_MANAGEDFAILFASTMSG 0x2088
-#define IDS_ER_UNMANAGEDFAILFAST 0x2089
-#define IDS_ER_STACK_OVERFLOW 0x208a
-#define IDS_ER_STACK 0x208b
-#define IDS_ER_WORDAT 0x208c
-#define IDS_ER_UNMANAGEDFAILFASTMSG 0x208d
-#define IDS_ER_UNHANDLEDEXCEPTIONINFO 0x208e
-#define IDS_ER_MESSAGE_TRUNCATE 0x208f
-
-#define IDS_EE_OBJECT_TO_VARIANT_NOT_SUPPORTED 0x2090
-#define IDS_EE_OBJECT_TO_ITF_NOT_SUPPORTED 0x2091
-
-#define IDS_EE_BADMARSHALFIELD_DECIMAL 0x2099
-
-#define IDS_EE_CANNOTCASTSAME 0x209a
-#define IDS_EE_CANNOTCAST_HELPER_BYTE 0x209b
-#define IDS_EE_CANNOTCAST_HELPER_PATH 0x209c
-
-// For ForwardInteropStubAttribute
-#ifdef FEATURE_COMINTEROP
-#define IDS_EE_INTEROP_STUB_CA_MUST_BE_WITHIN_SAME_ASSEMBLY 0x2107
-#define IDS_EE_INTEROP_STUB_CA_STUB_CLASS_MUST_NOT_BE_GENERIC 0x2108
-#define IDS_EE_INTEROP_STUB_CA_STUB_CLASS_MUST_NOT_BE_INTERFACE 0x2109
-#define IDS_EE_INTEROP_STUB_CA_STUB_METHOD_MISSING 0x2110
-#define IDS_EE_INTEROP_STUB_CA_NO_ACCESS_TO_STUB_METHOD 0x2111
-#endif
-
-#define IDS_EE_INTEROP_CODE_SIZE_COMMENT 0x2112
-
-#define BFA_REFERENCE_ASSEMBLY 0x2113
-
-#define IDS_E_FIELDACCESS 0x2114
-#define IDS_E_METHODACCESS 0x2115
-#define IDS_E_TYPEACCESS 0x2116
-
-// Profiler error messages for event log
-#define IDS_E_PROF_NO_CLSID 0x2500
-#define IDS_E_PROF_INTERNAL_INIT 0x2501
-#define IDS_E_PROF_BAD_CLSID 0x2502
-#define IDS_E_PROF_NO_CALLBACK_IFACE 0x2503
-#define IDS_E_PROF_CCI_FAILED 0x2504
-#define IDS_E_PROF_INIT_CALLBACK_FAILED 0x2505
-#define IDS_PROF_SUPPLEMENTARY_INFO 0x2506
-#define IDS_PROF_LOAD_COMPLETE 0x2507
-#define IDS_E_PROF_BAD_PATH 0x2508
-#define IDS_E_PROF_NOTIFICATION_DISABLED 0x2509
-#define IDS_PROF_ALREADY_LOADED 0x250A
-#define IDS_E_PROF_NOTIFICATION_LIMIT_EXCEEDED 0x250B
-#define IDS_E_PROF_NOT_ATTACHABLE 0x250E
-#define IDS_E_PROF_UNHANDLED_EXCEPTION_ON_LOAD 0x250F
-#define IDS_PROF_ATTACH_REQUEST_RECEIVED 0x2512
-#define IDS_PROF_DETACH_INITIATED 0x2513
-#define IDS_PROF_DETACH_COMPLETE 0x2514
-#define IDS_PROF_DETACH_THREAD_ERROR 0x2515
-#define IDS_PROF_CANCEL_ACTIVATION 0x2516
-#define IDS_PROF_V2PROFILER_DISABLED 0x2517
-#define IDS_PROF_V2PROFILER_ENABLED 0x2518
-#define IDS_PROF_PROFILER_DISABLED 0x251A
-
-#define IDS_ER_CODECONTRACT_FAILED 0x251B
-#define IDS_ER_CODECONTRACT_DETAILMSG 0x251C
-
-#define IDS_E_PROF_TIMEOUT_WAITING_FOR_CONCURRENT_GC 0x251D
-
-#define IDS_EE_CANNOTCAST_NOMARSHAL 0x2629
-#if defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS)
-#define IDS_EE_NATIVE_COM_WEAKREF_BAD_TYPE 0x262e
-#endif // FEATURE_COMINTEROP || FEATURE_COMWRAPPERS
-
-#define IDS_HOST_ASSEMBLY_RESOLVER_ASSEMBLY_ALREADY_LOADED_IN_CONTEXT 0x2636
-#define IDS_HOST_ASSEMBLY_RESOLVER_DYNAMICALLY_EMITTED_ASSEMBLIES_UNSUPPORTED 0x2637
-#define IDS_HOST_ASSEMBLY_RESOLVER_INCOMPATIBLE_BINDING_CONTEXT 0x2638
-
-#define IDS_NATIVE_IMAGE_CANNOT_BE_LOADED_MULTIPLE_TIMES 0x263a
-
-#define IDS_CLASSLOAD_BYREFLIKE_STATICFIELD 0x263b
-#define IDS_CLASSLOAD_BYREFLIKE_INSTANCEFIELD 0x263c
-#define IDS_EE_NDIRECT_LOADLIB_LINUX 0x263e
-#define IDS_EE_NDIRECT_LOADLIB_MAC 0x263f
-#define IDS_EE_NDIRECT_GETPROCADDRESS_UNIX 0x2640
-#define IDS_EE_ERROR_COM 0x2641
-
-#define IDS_EE_CANNOT_SET_INITONLY_STATIC_FIELD 0x2643
-
-#define IDS_EE_NDIRECT_GETPROCADDR_WIN_DLL 0x2644
-#define IDS_EE_NDIRECT_GETPROCADDR_UNIX_SO 0x2645
-#define IDS_EE_BADMARSHAL_STRING_OUT 0x2646
-#define IDS_EE_BADMARSHAL_COPYCTORRESTRICTION 0x2647
-#define IDS_EE_BADMARSHAL_DELEGATE_TLB_INTERFACE 0x2649
-#define IDS_EE_THREAD_APARTMENT_NOT_SUPPORTED 0x264A
-#define IDS_EE_NO_IINSPECTABLE 0x264B
-#define IDS_EE_BADMARSHAL_MARSHAL_DISABLED 0x264C
-#define IDS_EE_NDIRECT_DISABLEDMARSHAL_SETLASTERROR 0x264D
-#define IDS_EE_NDIRECT_DISABLEDMARSHAL_LCID 0x264E
-#define IDS_EE_NDIRECT_DISABLEDMARSHAL_PRESERVESIG 0x264F
-#define IDS_EE_NDIRECT_DISABLEDMARSHAL_VARARGS 0x2650
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#pragma once
-
-// The first byte of the index is the count of bytes
-typedef unsigned char SYMBOL_INDEX;
-#define RUNTIME_INFO_SIGNATURE "DotNetRuntimeInfo"
-
-// Make sure that if you update this structure
-// - You do so in a in a way that it is backwards compatible. For example, only tail append to this.
-// - Rev the version.
-// - Update the logic in ClrDataAccess::EnumMemCLRMainModuleInfo to ensure all needed state is in the dump.
-typedef struct _RuntimeInfo
-{
- char Signature[18];
- int Version;
- SYMBOL_INDEX RuntimeModuleIndex[24];
- SYMBOL_INDEX DacModuleIndex[24];
- SYMBOL_INDEX DbiModuleIndex[24];
-} RuntimeInfo;
-
-extern RuntimeInfo DotNetRuntimeInfo;
#include "static_assert.h"
-#ifdef PAL_STDCPP_COMPAT
#include <type_traits>
-#else
-#include "clr_std/type_traits"
-#endif
+
+#ifdef FEATURE_PAL
+#include "pal_mstypes.h"
+#endif // FEATURE_PAL
//==================================================================
// Semantics: if val can be represented as the exact same value
// Modified to track an overflow bit instead of throwing exceptions. In most
// cases the Visual C++ optimizer (Whidbey beta1 - v14.00.40607) is able to
// optimize the bool away completely.
-// Note that using a sentinal value (IntMax for example) to represent overflow
+// Note that using a sentinel value (IntMax for example) to represent overflow
// actually results in poorer code-gen.
//
// This has also been simplified significantly to remove functionality we
{
if(Is64Bit())
{
- //fast track this one - and avoid DIV_0 below
- if(lhs == 0 || rhs == 0)
- {
- result = 0;
- return true;
- }
-
//we're 64 bit - slow, but the only way to do it
if(IsSigned())
{
- if(!IsMixedSign(lhs, rhs))
- {
- //both positive or both negative
- //result will be positive, check for lhs * rhs > MaxInt
- if(lhs > 0)
- {
- //both positive
- if(MaxInt()/lhs < rhs)
- {
- //overflow
- return false;
- }
- }
- else
- {
- //both negative
-
- //comparison gets tricky unless we force it to positive
- //EXCEPT that -MinInt is undefined - can't be done
- //And MinInt always has a greater magnitude than MaxInt
- if(lhs == MinInt() || rhs == MinInt())
- {
- //overflow
- return false;
- }
-
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning( disable : 4146 ) // unary minus applied to unsigned is still unsigned
-#endif
- if(MaxInt()/(-lhs) < (-rhs) )
- {
- //overflow
- return false;
- }
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
- }
- }
- else
- {
- //mixed sign - this case is difficult
- //test case is lhs * rhs < MinInt => overflow
- //if lhs < 0 (implies rhs > 0),
- //lhs < MinInt/rhs is the correct test
- //else if lhs > 0
- //rhs < MinInt/lhs is the correct test
- //avoid dividing MinInt by a negative number,
- //because MinInt/-1 is a corner case
-
- if(lhs < 0)
- {
- if(lhs < MinInt()/rhs)
- {
- //overflow
- return false;
- }
- }
- else
- {
- if(rhs < MinInt()/lhs)
- {
- //overflow
- return false;
- }
- }
- }
-
- //ok
- result = lhs * rhs;
- return true;
+ return ClrSafeInt<int64_t>::multiply((int64_t)lhs, (int64_t)rhs, (int64_t&)result);
}
else
{
- //unsigned, easy case
- if(MaxInt()/lhs < rhs)
- {
- //overflow
- return false;
- }
- //ok
- result = lhs * rhs;
- return true;
+ return ClrSafeInt<uint64_t>::multiply((uint64_t)lhs, (uint64_t)rhs, (uint64_t&)result);
}
}
else if(Is32Bit())
//we're 32-bit
if(IsSigned())
{
- INT64 tmp = (INT64)lhs * (INT64)rhs;
-
- //upper 33 bits must be the same
- //most common case is likely that both are positive - test first
- if( (tmp & 0xffffffff80000000LL) == 0 ||
- (tmp & 0xffffffff80000000LL) == 0xffffffff80000000LL)
- {
- //this is OK
- result = (T)tmp;
- return true;
- }
-
- //overflow
- return false;
-
+ return ClrSafeInt<int32_t>::multiply((int32_t)lhs, (int32_t)rhs, (int32_t&)result);
}
else
{
- UINT64 tmp = (UINT64)lhs * (UINT64)rhs;
- if (tmp & 0xffffffff00000000ULL) //overflow
- {
- //overflow
- return false;
- }
- result = (T)tmp;
- return true;
+ return ClrSafeInt<uint32_t>::multiply((uint32_t)lhs, (uint32_t)rhs, (uint32_t&)result);
}
}
else if(Is16Bit())
//16-bit
if(IsSigned())
{
- INT32 tmp = (INT32)lhs * (INT32)rhs;
- //upper 17 bits must be the same
- //most common case is likely that both are positive - test first
- if( (tmp & 0xffff8000) == 0 || (tmp & 0xffff8000) == 0xffff8000)
- {
- //this is OK
- result = (T)tmp;
- return true;
- }
-
- //overflow
- return false;
+ return ClrSafeInt<int16_t>::multiply((int16_t)lhs, (int16_t)rhs, (int16_t&)result);
}
else
{
- UINT32 tmp = (UINT32)lhs * (UINT32)rhs;
- if (tmp & 0xffff0000) //overflow
- {
- return false;
- }
- result = (T)tmp;
- return true;
+ return ClrSafeInt<uint16_t>::multiply((uint16_t)lhs, (uint16_t)rhs, (uint16_t&)result);
}
}
else //8-bit
{
_ASSERTE_SAFEMATH(Is8Bit());
-
if(IsSigned())
{
- INT16 tmp = (INT16)lhs * (INT16)rhs;
- //upper 9 bits must be the same
- //most common case is likely that both are positive - test first
- if( (tmp & 0xff80) == 0 || (tmp & 0xff80) == 0xff80)
- {
- //this is OK
- result = (T)tmp;
- return true;
- }
-
- //overflow
- return false;
+ return ClrSafeInt<int8_t>::multiply((int8_t)lhs, (int8_t)rhs, (int8_t&)result);
}
else
{
- UINT16 tmp = ((UINT16)lhs) * ((UINT16)rhs);
-
- if (tmp & 0xff00) //overflow
- {
- return false;
- }
- result = (T)tmp;
- return true;
+ return ClrSafeInt<uint8_t>::multiply((uint8_t)lhs, (uint8_t)rhs, (uint8_t&)result);
}
}
}
INDEBUG( mutable bool m_checkedOverflow; )
};
+template <>
+inline bool ClrSafeInt<int64_t>::multiply(int64_t lhs, int64_t rhs, int64_t &result)
+{
+ //fast track this one - and avoid DIV_0 below
+ if(lhs == 0 || rhs == 0)
+ {
+ result = 0;
+ return true;
+ }
+ if(!IsMixedSign(lhs, rhs))
+ {
+ //both positive or both negative
+ //result will be positive, check for lhs * rhs > MaxInt
+ if(lhs > 0)
+ {
+ //both positive
+ if(MaxInt()/lhs < rhs)
+ {
+ //overflow
+ return false;
+ }
+ }
+ else
+ {
+ //both negative
+
+ //comparison gets tricky unless we force it to positive
+ //EXCEPT that -MinInt is undefined - can't be done
+ //And MinInt always has a greater magnitude than MaxInt
+ if(lhs == MinInt() || rhs == MinInt())
+ {
+ //overflow
+ return false;
+ }
+ if(MaxInt()/(-lhs) < (-rhs) )
+ {
+ //overflow
+ return false;
+ }
+ }
+ }
+ else
+ {
+ //mixed sign - this case is difficult
+ //test case is lhs * rhs < MinInt => overflow
+ //if lhs < 0 (implies rhs > 0),
+ //lhs < MinInt/rhs is the correct test
+ //else if lhs > 0
+ //rhs < MinInt/lhs is the correct test
+ //avoid dividing MinInt by a negative number,
+ //because MinInt/-1 is a corner case
+
+ if(lhs < 0)
+ {
+ if(lhs < MinInt()/rhs)
+ {
+ //overflow
+ return false;
+ }
+ }
+ else
+ {
+ if(rhs < MinInt()/lhs)
+ {
+ //overflow
+ return false;
+ }
+ }
+ }
+
+ //ok
+ result = lhs * rhs;
+ return true;
+}
+
+template <>
+inline bool ClrSafeInt<uint64_t>::multiply(uint64_t lhs, uint64_t rhs, uint64_t &result)
+{
+ //fast track this one - and avoid DIV_0 below
+ if(lhs == 0 || rhs == 0)
+ {
+ result = 0;
+ return true;
+ }
+ //unsigned, easy case
+ if(MaxInt()/lhs < rhs)
+ {
+ //overflow
+ return false;
+ }
+ //ok
+ result = lhs * rhs;
+ return true;
+}
+
+template <>
+inline bool ClrSafeInt<int32_t>::multiply(int32_t lhs, int32_t rhs, int32_t &result)
+{
+ INT64 tmp = (INT64)lhs * (INT64)rhs;
+
+ //upper 33 bits must be the same
+ //most common case is likely that both are positive - test first
+ if( (tmp & 0xffffffff80000000LL) == 0 ||
+ (tmp & 0xffffffff80000000LL) == 0xffffffff80000000LL)
+ {
+ //this is OK
+ result = (int32_t)tmp;
+ return true;
+ }
+
+ //overflow
+ return false;
+}
+
+template <>
+inline bool ClrSafeInt<uint32_t>::multiply(uint32_t lhs, uint32_t rhs, uint32_t &result)
+{
+ UINT64 tmp = (UINT64)lhs * (UINT64)rhs;
+ if (tmp & 0xffffffff00000000ULL) //overflow
+ {
+ //overflow
+ return false;
+ }
+ result = (uint32_t)tmp;
+ return true;
+}
+
+template <>
+inline bool ClrSafeInt<int16_t>::multiply(int16_t lhs, int16_t rhs, int16_t &result)
+{
+ INT32 tmp = (INT32)lhs * (INT32)rhs;
+ //upper 17 bits must be the same
+ //most common case is likely that both are positive - test first
+ if( (tmp & 0xffff8000) == 0 || (tmp & 0xffff8000) == 0xffff8000)
+ {
+ //this is OK
+ result = (int16_t)tmp;
+ return true;
+ }
+
+ //overflow
+ return false;
+}
+
+template <>
+inline bool ClrSafeInt<uint16_t>::multiply(uint16_t lhs, uint16_t rhs, uint16_t &result)
+{
+ UINT32 tmp = (UINT32)lhs * (UINT32)rhs;
+ if (tmp & 0xffff0000) //overflow
+ {
+ return false;
+ }
+ result = (uint16_t)tmp;
+ return true;
+}
+
+template <>
+inline bool ClrSafeInt<int8_t>::multiply(int8_t lhs, int8_t rhs, int8_t &result)
+{
+ INT16 tmp = (INT16)lhs * (INT16)rhs;
+ //upper 9 bits must be the same
+ //most common case is likely that both are positive - test first
+ if( (tmp & 0xff80) == 0 || (tmp & 0xff80) == 0xff80)
+ {
+ //this is OK
+ result = (int8_t)tmp;
+ return true;
+ }
+
+ //overflow
+ return false;
+}
+
+template <>
+inline bool ClrSafeInt<uint8_t>::multiply(uint8_t lhs, uint8_t rhs, uint8_t &result)
+{
+ UINT16 tmp = ((UINT16)lhs) * ((UINT16)rhs);
+
+ if (tmp & 0xff00) //overflow
+ {
+ return false;
+ }
+ result = (uint8_t)tmp;
+ return true;
+}
+
// Allows creation of a ClrSafeInt corresponding to the type of the argument.
template <typename T>
ClrSafeInt<T> AsClrSafeInt(T t)
Return non-oom failure codes because callees actually freqeuntly expect an API to fail.
For example, the callee will have special handling for file-not-found.
- For convenience, you could add a no-throwing wrapper version of the API:
- ClrGetEnvironmentVariable <-- default throws on oom.
- ClrGetEnvironmentVariableNoThrow <-- never throws.
+ For convenience, you could add a no-throwing wrapper version of the API.
- NAMING: Prefix the name with 'Clr', just like we do for win32 APIs going through hosting.
- DON'T FORGET CONTRACTS: Most of these APIs will likely be Throws/GC_Notrigger.
Also use PRECONDITIONs + POSTCONDITIONS when possible.
-- SIGNATURES: Keep the method signture as close the the original win32 API as possible.
+- SIGNATURES: Keep the method signture as close the original win32 API as possible.
- Preserve the return type + value. (except allow it to throw on oom). If the return value
should be a holder, then use that as an out-parameter at the end of the argument list.
We don't want to return holders because that will cause the dtors to be called.
#include "holder.h"
-class SString;
-bool ClrGetEnvironmentVariable(LPCSTR szEnvVarName, SString & value);
-bool ClrGetEnvironmentVariableNoThrow(LPCSTR szEnvVarName, SString & value);
-void ClrGetModuleFileName(HMODULE hModule, SString & value);
-
-void ClrGetCurrentDirectory(SString & value);
-
-
-/* --------------------------------------------------------------------------- *
- * Simple wrapper around WszFindFirstFile/WszFindNextFile
- * --------------------------------------------------------------------------- */
-class ClrDirectoryEnumerator
-{
- WIN32_FIND_DATAW data;
- FindHandleHolder dirHandle;
- BOOL fFindNext; // Skip FindNextFile first time around
-
-public:
- ClrDirectoryEnumerator(LPCWSTR pBaseDirectory, LPCWSTR pMask = W("*"));
- bool Next();
-
- LPCWSTR GetFileName()
- {
- return data.cFileName;
- }
-
- DWORD GetFileAttributes()
- {
- return data.dwFileAttributes;
- }
-
- void Close()
- {
- dirHandle.Clear();
- }
-};
-
-// Read a REG_SZ (null-terminated string) value from the registry. Throws.
-void ClrRegReadString(HKEY hKey, const SString & szValueName, SString & value);
-
/* --------------------------------------------------------------------------- *
* Simple wrapper around RegisterEventSource/ReportEvent/DeregisterEventSource
* --------------------------------------------------------------------------- */
SBuffer(COUNT_T size);
SBuffer(const BYTE *buffer, COUNT_T size);
explicit SBuffer(const SBuffer &buffer);
+ SBuffer(SBuffer &&buffer);
// Immutable constructor should ONLY be used if buffer will
// NEVER BE FREED OR MODIFIED. PERIOD. .
~SBuffer();
+ private:
+ void InitializeInstance();
+
+ public:
void Clear();
void Set(const SBuffer &buffer);
// Preallocate some memory you expect to use. This can prevent
// multiple reallocations. Note this does not change the visible
// size of the buffer.
- void Preallocate(COUNT_T allocation) const;
+ void Preallocate(COUNT_T allocation);
// Shrink memory usage of buffer to minimal amount. Note that
// this does not change the visible size of the buffer.
- void Trim() const;
+ void Trim();
//--------------------------------------------------------------------
// Content manipulation routines
#define GARBAGE_FILL_DWORD 0x24242424 // $$$$
#define GARBAGE_FILL_BUFFER_ITEMS 16
#define GARBAGE_FILL_BUFFER_SIZE GARBAGE_FILL_BUFFER_ITEMS*sizeof(DWORD)
-// ================================================================================
-// StackSBuffer : SBuffer with relatively large preallocated buffer for stack use
-// ================================================================================
-
-#define STACK_ALLOC 256
-
-typedef InlineSBuffer<STACK_ALLOC> StackSBuffer;
// ================================================================================
// Inline definitions
inline SBuffer::SBuffer(PreallocFlag flag, void *buffer, COUNT_T size)
: m_size(0),
- m_allocation(NULL),
+ m_allocation(0),
m_flags(0),
m_buffer(NULL)
{
RETURN;
}
+inline SBuffer::SBuffer(SBuffer &&buffer)
+{
+ CONTRACT_VOID
+ {
+ CONSTRUCTOR_CHECK;
+ PRECONDITION(buffer.Check());
+ POSTCONDITION(Check());
+ THROWS;
+ GC_NOTRIGGER;
+ }
+ CONTRACT_END;
+
+ m_size = buffer.m_size;
+ m_allocation = buffer.m_allocation;
+ m_flags = buffer.m_flags;
+ m_buffer = buffer.m_buffer;
+
+#ifdef _DEBUG
+ m_revision = buffer.m_revision;
+#endif
+
+ buffer.InitializeInstance();
+
+ RETURN;
+}
+
inline SBuffer::SBuffer(const BYTE *buffer, COUNT_T size)
: m_size(0),
m_allocation(0),
RETURN;
}
+inline void SBuffer::InitializeInstance()
+{
+ m_size = 0;
+ m_allocation = 0;
+ m_flags = 0;
+ m_buffer = NULL;
+
+#ifdef _DEBUG
+ m_revision = 0;
+#endif
+}
+
inline void SBuffer::Set(const SBuffer &buffer)
{
CONTRACT_VOID
// From the code for Resize, this is clearly impossible.
PREFIX_ASSUME( (this->m_buffer != NULL) || (size == 0) );
- MoveMemory(m_buffer, buffer, size);
+ if (size != 0)
+ MoveMemory(m_buffer, buffer, size);
RETURN;
}
RETURN m_allocation;
}
-inline void SBuffer::Preallocate(COUNT_T allocation) const
+inline void SBuffer::Preallocate(COUNT_T allocation)
{
CONTRACT_VOID
{
CONTRACT_END;
if (allocation > m_allocation)
- const_cast<SBuffer *>(this)->ReallocateBuffer(allocation, PRESERVE);
+ ReallocateBuffer(allocation, PRESERVE);
RETURN;
}
-inline void SBuffer::Trim() const
+inline void SBuffer::Trim()
{
CONTRACT_VOID
{
CONTRACT_END;
if (!IsImmutable())
- const_cast<SBuffer *>(this)->ReallocateBuffer(m_size, PRESERVE);
+ ReallocateBuffer(m_size, PRESERVE);
RETURN;
}
#ifdef ALIGN_ACCESS
static const int SBUFFER_ALIGNMENT = ALIGN_ACCESS;
#else
-// This is only 4 bytes on win98 and below
static const int SBUFFER_ALIGNMENT = 4;
#endif
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-
-#ifndef SECURITYUTIL_H
-#define SECURITYUTIL_H
-
-#include "winnt.h"
-
-// Security utility class. This is currently used by the debugger right-side and dbgshim to figure out the
-// SECURITY_ATTRIBUTES to use on various IPC objects (named events, etc.).
-// This is pretty debugger specific, and so perhaps doesn't actually belong in utilcode (that's just the most
-// convenient way to share it between mscordbi and dbgshim.dll). This is also a pretty big mess. All of
-// this ACL craziness is already gone in Arrowhead, so it's not a high priority to clean this up.
-class SecurityUtil
-{
-public:
-
- //
- // This will generate ACL containing the current process and
- // an allowed ACE on the target process of the given pid.
- //
- // Host should free returned *ppACL by calling FreeACL
- //
- static HRESULT GetACLOfPid(DWORD pid, PACL *ppACL);
-
- static void FreeACL(PACL pACL);
-
- static HRESULT GetMandatoryLabelFromProcess(HANDLE hProcess, LPBYTE * ppbLabel);
- static DWORD * GetIntegrityLevelFromMandatorySID(PSID psidIntegrityLevelLabel);
-
- // instance functions. SecurityUtil is used to minimized memory allocation when converting
- // pACL to SECURITY_ATTRIBUTES
- // The needed memory to hold SECURITY_ATTRIBUTES and SECURITY_DESCRIPTOR are embedded
- // in the SecurityUtil instance.
- //
- SecurityUtil(PACL pACL);
- ~SecurityUtil();
- HRESULT Init();
- HRESULT Init(HANDLE pid);
- HRESULT GetSA(SECURITY_ATTRIBUTES **PPSA);
-private:
- HRESULT SetSecurityDescriptorMandatoryLabel(PSID psidIntegrityLevelLabel);
- SECURITY_ATTRIBUTES m_SA;
- SECURITY_DESCRIPTOR m_SD;
- PACL m_pACL;
- // Saved by SetSecurityDescriptorMandatoryLabel so that the memory can be deleted properly
- PACL m_pSacl;
- bool m_fInitialized;
-};
-
-#endif // !SECURITYUTIL_H
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//*****************************************************************************
-// File: SecurityWrapper.h
-//
-// Wrapper around Win32 Security functions
-//
-//*****************************************************************************
-
-
-#ifndef _SECURITY_WRAPPER_H
-#define _SECURITY_WRAPPER_H
-
-#ifdef TARGET_UNIX
-#error This file should not be included on non-Windows platforms.
-#endif
-
-//-----------------------------------------------------------------------------
-// Wrapper around a PSID.
-// This class does not own the memory.
-//-----------------------------------------------------------------------------
-class Sid
-{
-public:
- // Initial the Sid wrapper around an existing SID.
- Sid(PSID pSid);
- static bool Equals(const Sid & a, const Sid & b) { return Equals(a.m_pSid, b.m_pSid); }
- static bool Equals(const Sid & a, PSID b) { return Equals(a.m_pSid, b); }
- static bool Equals(PSID a, const Sid & b) { return Equals(a, b.m_pSid); }
- static bool Equals(PSID a, PSID b);
-
- PSID RawSid() { return m_pSid; }
-protected:
- // Pointer to Sid buffer. We don't owner the data.
- PSID m_pSid;
-};
-
-//-----------------------------------------------------------------------------
-// Wrapper around a PSID with buffer.
-//-----------------------------------------------------------------------------
-class SidBuffer
-{
-public:
- SidBuffer();
- ~SidBuffer();
-
- // Get the underlying sid
- Sid GetSid();
-
- // Do we not have a sid? This will be true if init fails.
- bool IsNull() { return m_pBuffer == NULL; }
-
- // Go to definitions to see detailed comments
- HRESULT InitFromProcessNoThrow(DWORD pid);
- void InitFromProcess(DWORD pid); // throws
- HRESULT InitFromProcessUserNoThrow(DWORD pid);
- void InitFromProcessUser(DWORD pid); // throws
- HRESULT InitFromProcessAppContainerSidNoThrow(DWORD pid);
-
-protected:
- BYTE * m_pBuffer;
-};
-
-//-----------------------------------------------------------------------------
-// Access Control List.
-//-----------------------------------------------------------------------------
-class Dacl
-{
-public:
- Dacl(PACL pAcl);
-
- SIZE_T GetAceCount();
- ACE_HEADER * GetAce(SIZE_T dwAceIndex);
-protected:
- PACL m_acl;
-};
-
-//-----------------------------------------------------------------------------
-// Represent a win32 SECURITY_DESCRIPTOR object.
-// (Note there's a "SecurityDescriptor" class in the VM for managed goo,
-// so we prefix this with "Win32" to avoid a naming collision.)
-//-----------------------------------------------------------------------------
-class Win32SecurityDescriptor
-{
-public:
- Win32SecurityDescriptor();
- ~Win32SecurityDescriptor();
-
- HRESULT InitFromHandleNoThrow(HANDLE h);
- void InitFromHandle(HANDLE h); // throws
-
- // Gets the owner SID from this SecurityDescriptor.
- HRESULT GetOwnerNoThrow( PSID* ppSid );
- Sid GetOwner(); // throws
- Dacl GetDacl(); // throws
-
-protected:
- PSECURITY_DESCRIPTOR m_pDesc;
-};
-
-
-#endif // _SECURITY_WRAPPER_H
// The .NET Foundation licenses this file to you under the MIT license.
//
// sigparser.h
-//
-
-//
#ifndef _H_SIGPARSER
#define _H_SIGPARSER
-#ifndef LIMITED_METHOD_DAC_CONTRACT
-#define LIMITED_METHOD_DAC_CONTRACT ((void)0)
-#endif
-#ifndef LIMITED_METHOD_CONTRACT
-#define LIMITED_METHOD_CONTRACT ((void)0)
-#endif
-#ifndef WRAPPER_NO_CONTRACT
-#define WRAPPER_NO_CONTRACT ((void)0)
-#endif
-#ifndef SUPPORTS_DAC
-#define SUPPORTS_DAC ((void)0)
-#endif
-#ifndef _ASSERT
-#define _ASSERT _ASSERTE
-#endif
-
+//#include "utilcode.h"
#include "corhdr.h"
-
+//#include "corinfo.h"
+//#include "corpriv.h"
#include <minipal/utils.h>
//---------------------------------------------------------------------------------------
#define STACK_GROWS_UP_ON_ARGS_WALK
#endif
-//////////////////////////////////////////////////////////////////////////////
-// enum CorElementTypeZapSig defines some additional internal ELEMENT_TYPE's
-// values that are only used by ZapSig signatures.
-//////////////////////////////////////////////////////////////////////////////
-typedef enum CorElementTypeZapSig
-{
- // ZapSig encoding for ELEMENT_TYPE_VAR and ELEMENT_TYPE_MVAR. It is always followed
- // by the RID of a GenericParam token, encoded as a compressed integer.
- ELEMENT_TYPE_VAR_ZAPSIG = 0x3b,
-
- // UNUSED = 0x3c,
-
- // ZapSig encoding for native value types in IL stubs. IL stub signatures may contain
- // ELEMENT_TYPE_INTERNAL followed by ParamTypeDesc with ELEMENT_TYPE_VALUETYPE element
- // type. It acts like a modifier to the underlying structure making it look like its
- // unmanaged view (size determined by unmanaged layout, blittable, no GC pointers).
- //
- // ELEMENT_TYPE_NATIVE_VALUETYPE_ZAPSIG is used when encoding such types to NGEN images.
- // The signature looks like this: ET_NATIVE_VALUETYPE_ZAPSIG ET_VALUETYPE <token>.
- // See code:ZapSig.GetSignatureForTypeHandle and code:SigPointer.GetTypeHandleThrowing
- // where the encoding/decoding takes place.
- ELEMENT_TYPE_NATIVE_VALUETYPE_ZAPSIG = 0x3d,
-
- ELEMENT_TYPE_CANON_ZAPSIG = 0x3e, // zapsig encoding for System.__Canon
- ELEMENT_TYPE_MODULE_ZAPSIG = 0x3f, // zapsig encoding for external module id#
-
-} CorElementTypeZapSig;
-
//------------------------------------------------------------------------
// Encapsulates how compressed integers and typeref tokens are encoded into
// a bytestream.
}
//------------------------------------------------------------------------
- // Is this at the Sentinal (the ... in a varargs signature) that marks
+ // Is this at the Sentinel (the ... in a varargs signature) that marks
// the beginning of varguments that are not decared at the target
bool AtSentinel() const
// the arguments.
//------------------------------------------------------------------------
__checkReturn
- HRESULT SkipMethodHeaderSignature(uint32_t *pcArgs);
+ HRESULT SkipMethodHeaderSignature(uint32_t *pcArgs, bool skipReturnType = true);
//------------------------------------------------------------------------
// Skip a sub signature (as immediately follows an ELEMENT_TYPE_FNPTR).
REPRESENTATION_UNICODE = 0x04, // 100
REPRESENTATION_ASCII = 0x01, // 001
REPRESENTATION_UTF8 = 0x03, // 011
- REPRESENTATION_ANSI = 0x07, // 111
REPRESENTATION_VARIABLE_MASK = 0x02,
REPRESENTATION_SINGLE_MASK = 0x01,
protected:
class Index;
- class UIndex;
friend class Index;
- friend class UIndex;
public:
- // UIterator is character-level assignable.
- class UIterator;
-
// CIterators/Iterator'string must be modified by SString APIs.
class CIterator;
class Iterator;
enum tagUTF8Literal { Utf8Literal };
enum tagLiteral { Literal };
enum tagUTF8 { Utf8 };
- enum tagANSI { Ansi };
- enum tagASCII {Ascii };
+ enum tagASCII { Ascii };
static void Startup();
static CHECK CheckStartup();
SString();
explicit SString(const SString &s);
+ SString(SString&& string) = default;
SString(const SString &s1, const SString &s2);
SString(const SString &s1, const SString &s2, const SString &s3);
SString(const SString &s1, const SString &s2, const SString &s3, const SString &s4);
SString(const SString &s, const CIterator &i, COUNT_T length);
SString(const SString &s, const CIterator &start, const CIterator &end);
- SString(const WCHAR *string);
+ explicit SString(const WCHAR *string);
SString(const WCHAR *string, COUNT_T count);
SString(enum tagASCII dummyTag, const ASCII *string);
SString(enum tagASCII dummyTag, const ASCII *string, COUNT_T count);
SString(enum tagUTF8 dummytag, const UTF8 *string);
SString(enum tagUTF8 dummytag, const UTF8 *string, COUNT_T count);
- SString(enum tagANSI dummytag, const ANSI *string);
- SString(enum tagANSI dummytag, const ANSI *string, COUNT_T count);
- SString(WCHAR character);
+ explicit SString(WCHAR character);
// NOTE: Literals MUST be read-only never-freed strings.
SString(enum tagLiteral dummytag, const CHAR *literal);
void Set(const WCHAR *string);
void SetASCII(const ASCII *string);
void SetUTF8(const UTF8 *string);
- void SetANSI(const ANSI *string);
+ void SetAndConvertToUTF8(const WCHAR* string);
// Set this string to a copy of the first count chars of the given string
void Set(const WCHAR *string, COUNT_T count);
// Set this string to a prellocated copy of a given string.
- // The caller is the owner of the bufffer and has to coordinate its lifetime.
+ // The caller is the owner of the buffer and has to coordinate its lifetime.
void SetPreallocated(const WCHAR *string, COUNT_T count);
void SetASCII(const ASCII *string, COUNT_T count);
void SetUTF8(const UTF8 *string, COUNT_T count);
- void SetANSI(const ANSI *string, COUNT_T count);
// Set this string to the unicode character
void Set(WCHAR character);
// Set this string to the UTF8 character
void SetUTF8(CHAR character);
- // This this string to the given literal. We share the mem and don't make a copy.
+ // Set this string to the given literal. We share the mem and don't make a copy.
void SetLiteral(const CHAR *literal);
void SetLiteral(const WCHAR *literal);
// Normalizes the string representation to unicode. This can be used to
// make basic read-only operations non-failing.
- void Normalize() const;
+ void Normalize();
// Return the number of characters in the string (excluding the terminating NULL).
COUNT_T GetCount() const;
void Replace(const Iterator &i, COUNT_T length, const SString &s);
// Make sure that string buffer has room to grow
- void Preallocate(COUNT_T characters) const;
+ void Preallocate(COUNT_T characters);
// Shrink buffer size as much as possible (reallocate if necessary.)
- void Trim() const;
+ void Trim();
// ------------------------------------------------------------------
// Iterators:
// CIterator and Iterator are cheap to create, but allow only read-only
// access to the string.
//
- // UIterator forces a unicode conversion, but allows
- // assignment to individual string characters. They are also a bit more
- // efficient once created.
-
- // ------------------------------------------------------------------
- // UIterator:
- // ------------------------------------------------------------------
-
- protected:
-
- class EMPTY_BASES_DECL UIndex : public SBuffer::Index
- {
- friend class SString;
- friend class Indexer<WCHAR, UIterator>;
-
- protected:
-
- UIndex();
- UIndex(SString *string, SCOUNT_T index);
- WCHAR &GetAt(SCOUNT_T delta) const;
- void Skip(SCOUNT_T delta);
- SCOUNT_T Subtract(const UIndex &i) const;
- CHECK DoCheck(SCOUNT_T delta) const;
-
- WCHAR *GetUnicode() const;
- };
-
- public:
-
- class EMPTY_BASES_DECL UIterator : public UIndex, public Indexer<WCHAR, UIterator>
- {
- friend class SString;
-
- public:
- UIterator()
- {
- }
-
- UIterator(SString *string, int index)
- : UIndex(string, index)
- {
- }
- };
-
- UIterator BeginUnicode();
- UIterator EndUnicode();
-
// For CIterator & Iterator, we try our best to iterate the string without
// modifying it. (Currently, we do require an ASCII or Unicode string
- // for simple WCHAR retrival, but you could imagine being more flexible
+ // for simple WCHAR retrieval, but you could imagine being more flexible
// going forward - perhaps even supporting iterating multibyte encodings
// directly.)
//
const CHAR *GetASCII() const;
public:
- // Note these should supercede the Indexer versions
- // since this class comes first in the inheritence list
+ // Note these should supersede the Indexer versions
+ // since this class comes first in the inheritance list
WCHAR operator*() const;
void operator->() const;
WCHAR operator[](int index) const;
// Helper function to convert string in-place to lower-case (no allocation overhead for SString instance)
static void LowerCase(__inout_z LPWSTR wszString);
- // These routines will use the given scratch string if necessary
- // to perform a conversion to the desired representation
-
- // Use a local declaration of InlineScratchBuffer or StackScratchBuffer for parameters of
- // AbstractScratchBuffer.
- class AbstractScratchBuffer;
-
- // These routines will use the given scratch buffer if necessary
- // to perform a conversion to the desired representation. Note that
- // the lifetime of the pointer return is limited by BOTH the
- // scratch string and the source (this) string.
- //
- // Typical usage:
- //
- // SString *s = ...;
- // {
- // StackScratchBuffer buffer;
- // const UTF8 *utf8 = s->GetUTF8(buffer);
- // CallFoo(utf8);
- // }
- // // No more pointers to returned buffer allowed.
-
- const UTF8 *GetUTF8(AbstractScratchBuffer &scratch) const;
- const UTF8 *GetUTF8(AbstractScratchBuffer &scratch, COUNT_T *pcbUtf8) const;
- const ANSI *GetANSI(AbstractScratchBuffer &scratch) const;
-
- // Used when the representation is known, throws if the representation doesn't match
- const UTF8 *GetUTF8NoConvert() const;
+ // You can always get a UTF8 string. This will force a conversion
+ // if necessary.
+ const UTF8 *GetUTF8() const;
// Converts/copies into the given output string
void ConvertToUnicode(SString &dest) const;
- void ConvertToANSI(SString &dest) const;
COUNT_T ConvertToUTF8(SString &dest) const;
//-------------------------------------------------------------------
// example usage:
// void GetName(SString & str) {
- // char * p = str.OpenANSIBuffer(3);
+ // char * p = str.OpenUTF8Buffer(3);
// strcpy(p, "Cat");
// str.CloseBuffer();
// }
// Open the raw buffer for writing countChars characters (not including the null).
WCHAR *OpenUnicodeBuffer(COUNT_T maxCharCount);
UTF8 *OpenUTF8Buffer(COUNT_T maxSingleCharCount);
- ANSI *OpenANSIBuffer(COUNT_T maxSingleCharCount);
- //Returns the unicode string, the caller is reponsible for lifetime of the string
+ //Returns the unicode string, the caller is responsible for lifetime of the string
WCHAR *GetCopyOfUnicodeString();
+ //Returns the UTF8 string, the caller is responsible for the lifetime of the string
+ UTF8 *GetCopyOfUTF8String();
+
// Get the max size that can be passed to OpenUnicodeBuffer without causing allocations.
COUNT_T GetUnicodeAllocation();
// Utilities
//---------------------------------------------------------------------
- // WARNING: The MBCS version of printf function are factory for globalization
- // issues when used to format Unicode strings (%S). The Unicode versions are
- // preferred in this case.
void Printf(const CHAR *format, ...);
void VPrintf(const CHAR *format, va_list args);
-
- void Printf(const WCHAR *format, ...);
- void PPrintf(const WCHAR *format, ...);
- void VPrintf(const WCHAR *format, va_list args);
-
- void PVPrintf(const WCHAR *format, va_list args);
-
void AppendPrintf(const CHAR *format, ...);
void AppendVPrintf(const CHAR *format, va_list args);
- void AppendPrintf(const WCHAR *format, ...);
- void AppendVPrintf(const WCHAR *format, va_list args);
-
+public:
BOOL LoadResource(CCompRC::ResourceCategory eCategory, int resourceID);
HRESULT LoadResourceAndReturnHR(CCompRC::ResourceCategory eCategory, int resourceID);
- HRESULT LoadResourceAndReturnHR(CCompRC* pResourceDLL, CCompRC::ResourceCategory eCategory, int resourceID);
BOOL FormatMessage(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId,
const SString &arg1 = Empty(), const SString &arg2 = Empty(),
const SString &arg3 = Empty(), const SString &arg4 = Empty(),
operator const WCHAR * () const { WRAPPER_NO_CONTRACT; return GetUnicode(); }
- WCHAR operator[](int index) { WRAPPER_NO_CONTRACT; return Begin()[index]; }
WCHAR operator[](int index) const { WRAPPER_NO_CONTRACT; return Begin()[index]; }
SString &operator= (const SString &s) { WRAPPER_NO_CONTRACT; Set(s); return *this; }
- SString &operator+= (const SString &s) { WRAPPER_NO_CONTRACT; Append(s); return *this; }
// -------------------------------------------------------------------
// Check functions
#endif // CHECK_INVARIANTS
// Helpers for CRT function equivalance.
- static int __cdecl _stricmp(const CHAR *buffer1, const CHAR *buffer2);
- static int __cdecl _strnicmp(const CHAR *buffer1, const CHAR *buffer2, COUNT_T count);
+ static int _stricmp(const CHAR *buffer1, const CHAR *buffer2);
+ static int _strnicmp(const CHAR *buffer1, const CHAR *buffer2, COUNT_T count);
- static int __cdecl _wcsicmp(const WCHAR *buffer1, const WCHAR *buffer2);
- static int __cdecl _wcsnicmp(const WCHAR *buffer1, const WCHAR *buffer2, COUNT_T count);
+ static int _wcsicmp(const WCHAR *buffer1, const WCHAR *buffer2);
+ static int _wcsnicmp(const WCHAR *buffer1, const WCHAR *buffer2, COUNT_T count);
// C++ convenience overloads
static int _tstricmp(const CHAR *buffer1, const CHAR *buffer2);
BOOL IsASCIIScanned() const;
void SetASCIIScanned() const;
void SetNormalized() const;
+public:
BOOL IsNormalized() const;
+private:
void ClearNormalized() const;
void EnsureWritable() const;
void ConvertASCIIToUnicode(SString &dest) const;
void ConvertToUnicode() const;
void ConvertToUnicode(const CIterator &i) const;
+ void ConvertToUTF8() const;
const SString &GetCompatibleString(const SString &s, SString &scratch) const;
const SString &GetCompatibleString(const SString &s, SString &scratch, const CIterator &i) const;
Set(string, count);
}
+ FORCEINLINE InlineSString(enum tagLiteral, const WCHAR *string)
+ : SString(m_inline, SBUFFER_PADDED_SIZE(MEMSIZE))
+ {
+ WRAPPER_NO_CONTRACT;
+ Set(string);
+ }
+
FORCEINLINE InlineSString(enum tagASCII, const CHAR *string)
: SString(m_inline, SBUFFER_PADDED_SIZE(MEMSIZE))
{
SetUTF8(string, count);
}
- FORCEINLINE InlineSString(enum tagANSI dummytag, const ANSI *string)
- : SString(m_inline, SBUFFER_PADDED_SIZE(MEMSIZE))
- {
- WRAPPER_NO_CONTRACT;
- SetANSI(string);
- }
-
- FORCEINLINE InlineSString(enum tagANSI dummytag, const ANSI *string, COUNT_T count)
- : SString(m_inline, SBUFFER_PADDED_SIZE(MEMSIZE))
- {
- WRAPPER_NO_CONTRACT;
- SetANSI(string, count);
- }
-
FORCEINLINE InlineSString(WCHAR character)
: SString(m_inline, SBUFFER_PADDED_SIZE(MEMSIZE))
{
// s = SL("My literal String");
// ================================================================================
-#define SL(_literal) SString(SString::Literal, _literal)
-
-// ================================================================================
-// ScratchBuffer classes are used by the GetXXX() routines to allocate scratch space in.
-// ================================================================================
-
-class EMPTY_BASES_DECL SString::AbstractScratchBuffer : private SString
-{
- protected:
- // Do not use this class directly - use
- // ScratchBuffer or StackScratchBuffer.
- AbstractScratchBuffer(void *buffer, COUNT_T size);
-};
-
-template <COUNT_T MEMSIZE>
-class EMPTY_BASES_DECL ScratchBuffer : public SString::AbstractScratchBuffer
-{
- private:
- DAC_ALIGNAS(::SString::AbstractScratchBuffer)
- BYTE m_inline[MEMSIZE];
-
- public:
- ScratchBuffer()
- : AbstractScratchBuffer((void *)m_inline, MEMSIZE)
- {
- WRAPPER_NO_CONTRACT;
- }
-};
-
-typedef ScratchBuffer<256> StackScratchBuffer;
+#define SL(_literal) SString{ SString::Literal, _literal }
// ================================================================================
// Special contract definition - THROWS_UNLESS_NORMALIZED
Set(string);
+ _ASSERTE(IsRepresentation(REPRESENTATION_UNICODE));
+ SetNormalized();
+
SS_RETURN;
}
Set(string, count);
+ _ASSERTE(IsRepresentation(REPRESENTATION_UNICODE));
+ SetNormalized();
+
SS_RETURN;
}
SS_RETURN;
}
-inline SString::SString(tagANSI dummytag, const ANSI *string)
- : SBuffer(Immutable, s_EmptyBuffer, sizeof(s_EmptyBuffer))
-{
- SS_CONTRACT_VOID
- {
- SS_CONSTRUCTOR_CHECK;
- PRECONDITION(CheckPointer(string, NULL_OK));
- THROWS;
- GC_NOTRIGGER;
- }
- SS_CONTRACT_END;
-
- SetANSI(string);
-
- SS_RETURN;
-}
-
-inline SString::SString(tagANSI dummytag, const ANSI *string, COUNT_T count)
- : SBuffer(Immutable, s_EmptyBuffer, sizeof(s_EmptyBuffer))
-{
- SS_CONTRACT_VOID
- {
- SS_CONSTRUCTOR_CHECK;
- PRECONDITION(CheckPointer(string, NULL_OK));
- PRECONDITION(CheckCount(count));
- THROWS;
- GC_NOTRIGGER;
- }
- SS_CONTRACT_END;
-
- SetANSI(string, count);
-
- SS_RETURN;
-}
-
inline SString::SString(WCHAR character)
: SBuffer(Immutable, s_EmptyBuffer, sizeof(s_EmptyBuffer))
{
}
inline SString::SString(tagLiteral dummytag, const WCHAR *literal)
- : SBuffer(Immutable, (const BYTE *) literal, (COUNT_T) (wcslen(literal)+1)*sizeof(WCHAR))
+ : SBuffer(Immutable, (const BYTE *) literal, (COUNT_T) (u16_strlen(literal)+1)*sizeof(WCHAR))
{
SS_CONTRACT_VOID
{
SS_RETURN GetRawUnicode();
}
+// Get a const pointer to the internal buffer as a UTF8 string.
+inline const UTF8 *SString::GetUTF8() const
+{
+ SS_CONTRACT(const UTF8 *)
+ {
+ GC_NOTRIGGER;
+ PRECONDITION(CheckPointer(this));
+ SS_POSTCONDITION(CheckPointer(RETVAL));
+ if (IsRepresentation(REPRESENTATION_UTF8)) NOTHROW; else THROWS;
+ GC_NOTRIGGER;
+ SUPPORTS_DAC;
+ }
+ SS_CONTRACT_END;
+
+ ConvertToUTF8();
+
+ SS_RETURN GetRawUTF8();
+}
+
// Normalize the string to unicode. This will make many operations nonfailing.
-inline void SString::Normalize() const
+inline void SString::Normalize()
{
SS_CONTRACT_VOID
{
// Helpers for CRT function equivalance.
/* static */
-inline int __cdecl SString::_stricmp(const CHAR *buffer1, const CHAR *buffer2) {
+inline int SString::_stricmp(const CHAR *buffer1, const CHAR *buffer2) {
WRAPPER_NO_CONTRACT;
int returnValue = CaseCompareHelperA(buffer1, buffer2, 0, TRUE, FALSE);
#ifdef VERIFY_CRT_EQUIVALNCE
}
/* static */
-inline int __cdecl SString::_strnicmp(const CHAR *buffer1, const CHAR *buffer2, COUNT_T count) {
+inline int SString::_strnicmp(const CHAR *buffer1, const CHAR *buffer2, COUNT_T count) {
WRAPPER_NO_CONTRACT;
int returnValue = CaseCompareHelperA(buffer1, buffer2, count, TRUE, TRUE);
#ifdef VERIFY_CRT_EQUIVALNCE
}
/* static */
-inline int __cdecl SString::_wcsicmp(const WCHAR *buffer1, const WCHAR *buffer2) {
+inline int SString::_wcsicmp(const WCHAR *buffer1, const WCHAR *buffer2) {
WRAPPER_NO_CONTRACT;
int returnValue = CaseCompareHelper(buffer1, buffer2, 0, TRUE, FALSE);
#ifdef VERIFY_CRT_EQUIVALNCE
}
/* static */
-inline int __cdecl SString::_wcsnicmp(const WCHAR *buffer1, const WCHAR *buffer2, COUNT_T count) {
+inline int SString::_wcsnicmp(const WCHAR *buffer1, const WCHAR *buffer2, COUNT_T count) {
WRAPPER_NO_CONTRACT;
int returnValue = CaseCompareHelper(buffer1, buffer2, count, TRUE, TRUE);
#ifdef VERIFY_CRT_EQUIVALNCE
}
// Preallocate some space for the string buffer
-inline void SString::Preallocate(COUNT_T characters) const
+inline void SString::Preallocate(COUNT_T characters)
{
WRAPPER_NO_CONTRACT;
}
// Trim unused space from the buffer
-inline void SString::Trim() const
+inline void SString::Trim()
{
WRAPPER_NO_CONTRACT;
if (GetRawCount() == 0)
{
// Share the global empty string buffer.
- const_cast<SString *>(this)->SBuffer::SetImmutable(s_EmptyBuffer, sizeof(s_EmptyBuffer));
+ SBuffer::SetImmutable(s_EmptyBuffer, sizeof(s_EmptyBuffer));
}
else
{
//----------------------------------------------------------------------------
// Assert helper
-// Asser that the iterator is within the given string.
+// Assert that the iterator is within the given string.
//----------------------------------------------------------------------------
inline CHECK SString::CheckIteratorRange(const CIterator &i) const
{
//----------------------------------------------------------------------------
// Assert helper
-// Asser that the iterator is within the given string.
+// Assert that the iterator is within the given string.
//----------------------------------------------------------------------------
inline CHECK SString::CheckIteratorRange(const CIterator &i, COUNT_T length) const
{
CHECK(representation == REPRESENTATION_EMPTY
|| representation == REPRESENTATION_UNICODE
|| representation == REPRESENTATION_ASCII
- || representation == REPRESENTATION_UTF8
- || representation == REPRESENTATION_ANSI);
+ || representation == REPRESENTATION_UTF8);
CHECK((representation & REPRESENTATION_MASK) == representation);
CHECK_OK;
}
//----------------------------------------------------------------------------
-// Return a writeable buffer that can store 'countChars'+1 ansi characters.
-// Call CloseBuffer when done.
+// Return a copy of the underlying buffer, the caller is responsible for managing
+// the returned memory
//----------------------------------------------------------------------------
-inline ANSI *SString::OpenANSIBuffer(COUNT_T countChars)
+inline UTF8 *SString::GetCopyOfUTF8String()
{
- SS_CONTRACT(ANSI*)
+ SS_CONTRACT(UTF8*)
{
GC_NOTRIGGER;
PRECONDITION(CheckPointer(this));
- PRECONDITION(CheckCount(countChars));
-#if _DEBUG
- SS_POSTCONDITION(IsBufferOpen());
-#endif
- SS_POSTCONDITION(GetRawCount() == countChars);
- SS_POSTCONDITION(GetRepresentation() == REPRESENTATION_ANSI || countChars == 0);
- SS_POSTCONDITION(CheckPointer(RETVAL));
+ SS_POSTCONDITION(CheckPointer(buffer));
THROWS;
}
SS_CONTRACT_END;
+ NewArrayHolder<UTF8> buffer = NULL;
+
+ buffer = new UTF8[GetSize()];
+ strncpy(buffer, GetUTF8(), GetSize());
- OpenBuffer(REPRESENTATION_ANSI, countChars);
- SS_RETURN GetRawANSI();
+ SS_RETURN buffer.Extract();
}
//----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Convert the internal representation to be an iteratable one (current
-// requirements here are that it be trivially convertable to unicode chars.)
+// requirements here are that it be trivially convertible to unicode chars.)
//-----------------------------------------------------------------------------
inline void SString::ConvertToIteratable() const
{
SS_RETURN;
}
-//-----------------------------------------------------------------------------
-// Create iterators on the string.
-//-----------------------------------------------------------------------------
-
-inline SString::UIterator SString::BeginUnicode()
-{
- SS_CONTRACT(SString::UIterator)
- {
- GC_NOTRIGGER;
- PRECONDITION(CheckPointer(this));
- SS_POSTCONDITION(CheckValue(RETVAL));
- THROWS;
- }
- SS_CONTRACT_END;
-
- ConvertToUnicode();
- EnsureWritable();
-
- SS_RETURN UIterator(this, 0);
-}
-
-inline SString::UIterator SString::EndUnicode()
-{
- SS_CONTRACT(SString::UIterator)
- {
- GC_NOTRIGGER;
- PRECONDITION(CheckPointer(this));
- SS_POSTCONDITION(CheckValue(RETVAL));
- THROWS;
- }
- SS_CONTRACT_END;
-
- ConvertToUnicode();
- EnsureWritable();
-
- SS_RETURN UIterator(this, GetCount());
-}
-
//-----------------------------------------------------------------------------
// Create CIterators on the string.
//-----------------------------------------------------------------------------
}
SS_CONTRACT_END;
+ ConvertToIteratable();
ConvertToIteratable();
SS_RETURN CIterator(this, GetCount());
return *(WCHAR*)&GetAt(index);
}
-//-----------------------------------------------------------------------------
-// Iterator support routines
-//-----------------------------------------------------------------------------
-
-inline SString::UIndex::UIndex()
-{
- LIMITED_METHOD_CONTRACT;
-}
-
-inline SString::UIndex::UIndex(SString *string, SCOUNT_T index)
- : SBuffer::Index(string, index*sizeof(WCHAR))
-{
- SS_CONTRACT_VOID
- {
- GC_NOTRIGGER;
- PRECONDITION(CheckPointer(string));
- PRECONDITION(string->IsRepresentation(REPRESENTATION_UNICODE));
- PRECONDITION(DoCheck(0));
- SS_POSTCONDITION(CheckPointer(this));
- NOTHROW;
- CANNOT_TAKE_LOCK;
- }
- SS_CONTRACT_END;
-
- SS_RETURN;
-}
-
-inline WCHAR &SString::UIndex::GetAt(SCOUNT_T delta) const
-{
- LIMITED_METHOD_CONTRACT;
-
- return ((WCHAR*)m_ptr)[delta];
-}
-
-inline void SString::UIndex::Skip(SCOUNT_T delta)
-{
- LIMITED_METHOD_CONTRACT;
-
- m_ptr += delta * sizeof(WCHAR);
-}
-
-inline SCOUNT_T SString::UIndex::Subtract(const UIndex &i) const
-{
- WRAPPER_NO_CONTRACT;
-
- return (SCOUNT_T) (GetUnicode() - i.GetUnicode());
-}
-
-inline CHECK SString::UIndex::DoCheck(SCOUNT_T delta) const
-{
- CANNOT_HAVE_CONTRACT;
-#if _DEBUG
- const SString *string = (const SString *) GetContainerDebug();
-
- CHECK(GetUnicode() + delta >= string->GetRawUnicode());
- CHECK(GetUnicode() + delta <= string->GetRawUnicode() + string->GetCount());
-#endif
-
- CHECK_OK;
-}
-
-inline WCHAR *SString::UIndex::GetUnicode() const
-{
- LIMITED_METHOD_CONTRACT;
-
- return (WCHAR*) m_ptr;
-}
-
-//-----------------------------------------------------------------------------
-// Opaque scratch buffer class routines
-//-----------------------------------------------------------------------------
-inline SString::AbstractScratchBuffer::AbstractScratchBuffer(void *buffer, COUNT_T size)
- : SString(buffer, size)
-{
- SS_CONTRACT_VOID
- {
- GC_NOTRIGGER;
- PRECONDITION(CheckPointer(buffer));
- PRECONDITION(CheckCount(size));
- NOTHROW;
- }
- SS_CONTRACT_END;
-
- SS_RETURN;
-}
-
#ifdef _MSC_VER
#pragma warning(pop)
#endif // _MSC_VER
#ifndef __STATIC_ASSERT_H__
#define __STATIC_ASSERT_H__
-// static_assert( cond, msg ) is now a compiler-supported intrinsic in Dev10 C++ compiler.
-// Replaces previous uses of STATIC_ASSERT_MSG and COMPILE_TIME_ASSERT_MSG.
-
-// Replaces previous uses of CPP_ASSERT
-#define static_assert_n( n, cond ) static_assert( cond, #cond )
-
// Replaces previous uses of C_ASSERT and COMPILE_TIME_ASSERT
#define static_assert_no_msg( cond ) static_assert( cond, #cond )
#endif
//
-// PDB annotations for the static contract analysis tool. These are seperated
+// PDB annotations for the static contract analysis tool. These are separated
// from Contract.h to allow their inclusion in any part of the system.
//
#define ANNOTATION_FN_MODE_COOPERATIVE __annotation(W("MODE_COOPERATIVE ") SCAN_WIDEN(__FUNCTION__))
#define ANNOTATION_FN_MODE_PREEMPTIVE __annotation(W("MODE_PREEMPTIVE ") SCAN_WIDEN(__FUNCTION__))
#define ANNOTATION_FN_MODE_ANY __annotation(W("MODE_ANY ") SCAN_WIDEN(__FUNCTION__))
-#define ANNOTATION_FN_HOST_NOCALLS __annotation(W("HOST_NOCALLS ") SCAN_WIDEN(__FUNCTION__))
-#define ANNOTATION_FN_HOST_CALLS __annotation(W("HOST_CALLS ") SCAN_WIDEN(__FUNCTION__))
#define ANNOTATION_ENTRY_POINT __annotation(W("SO_EP ") SCAN_WIDEN(__FUNCTION__))
#define ANNOTATION_TRY_MARKER { }
#define ANNOTATION_CATCH_MARKER { }
-#define ANNOTATION_FN_HOST_NOCALLS { }
-#define ANNOTATION_FN_HOST_CALLS { }
-
#define ANNOTATION_FN_SPECIAL_HOLDER_BEGIN { }
#define ANNOTATION_SPECIAL_HOLDER_END { }
#define ANNOTATION_SPECIAL_HOLDER_CALLER_NEEDS_DYNAMIC_CONTRACT { }
#define ANNOTATION_FN_MODE_COOPERATIVE { }
#define ANNOTATION_FN_MODE_PREEMPTIVE { }
#define ANNOTATION_FN_MODE_ANY { }
-#define ANNOTATION_FN_HOST_NOCALLS { }
-#define ANNOTATION_FN_HOST_CALLS { }
#define ANNOTATION_SUPPORTS_DAC { }
#define ANNOTATION_SUPPORTS_DAC_HOST_ONLY { }
#define STATIC_CONTRACT_FORBID_FAULT ANNOTATION_FN_FORBID_FAULT
#define STATIC_CONTRACT_GC_TRIGGERS ANNOTATION_FN_GC_TRIGGERS
#define STATIC_CONTRACT_GC_NOTRIGGER ANNOTATION_FN_GC_NOTRIGGER
-#define STATIC_CONTRACT_HOST_NOCALLS ANNOTATION_FN_HOST_NOCALLS
-#define STATIC_CONTRACT_HOST_CALLS ANNOTATION_FN_HOST_CALLS
#define STATIC_CONTRACT_SUPPORTS_DAC ANNOTATION_SUPPORTS_DAC
#define STATIC_CONTRACT_SUPPORTS_DAC_HOST_ONLY ANNOTATION_SUPPORTS_DAC_HOST_ONLY
#define NOT_ARM64_ARG(x) , x
#endif
+#ifdef TARGET_LOONGARCH64
+#define LOONGARCH64_FIRST_ARG(x) x ,
+#define LOONGARCH64_ARG(x) , x
+#define LOONGARCH64_ONLY(x) x
+#define NOT_LOONGARCH64(x)
+#define NOT_LOONGARCH64_ARG(x)
+#else
+#define LOONGARCH64_FIRST_ARG(x)
+#define LOONGARCH64_ARG(x)
+#define LOONGARCH64_ONLY(x)
+#define NOT_LOONGARCH64(x) x
+#define NOT_LOONGARCH64_ARG(x) , x
+#endif
+
+#ifdef TARGET_RISCV64
+#define RISCV64_FIRST_ARG(x) x ,
+#define RISCV64_ARG(x) , x
+#define RISCV64_ONLY(x) x
+#define NOT_RISCV64(x)
+#define NOT_RISCV64_ARG(x)
+#else
+#define RISCV64_FIRST_ARG(x)
+#define RISCV64_ARG(x)
+#define RISCV64_ONLY(x)
+#define NOT_RISCV64(x) x
+#define NOT_RISCV64_ARG(x) , x
+#endif
+
#ifdef TARGET_64BIT
#define LOG2_PTRSIZE 3
#else
#define DBG_ADDR(ptr) (DWORD)((UINT_PTR)(ptr))
#endif // HOST_64BIT
-#ifdef TARGET_ARM
+#if defined(HOST_ARM) || defined(HOST_RISCV64)
#define ALIGN_ACCESS ((1<<LOG2_PTRSIZE)-1)
-#endif
+#endif // HOST_ARM || HOST_RISCV64
#ifndef ALLOC_ALIGN_CONSTANT
however thread safe */
/* The log has a very simple structure, and it meant to be dumped from a NTSD
- extention (eg. strike). There is no memory allocation system calls etc to purtub things */
+ extension (eg. strike). There is no memory allocation system calls etc to purtub things */
// ******************************************************************************
-// WARNING!!!: This header is also used by the runtime repo.
-// See: https://github.com/dotnet/runtime/blob/main/src/coreclr/inc/stresslog.h
+// WARNING!!!: These classes are used by the runtime and SOS in the diagnostics
+// repo. Values should added or removed in a backwards and forwards compatible way.
+// See: https://github.com/dotnet/diagnostics/blob/main/src/shared/inc/stresslog.h
+// https://github.com/dotnet/runtime/blob/main/src/coreclr/inc/stresslog.h
// Parser: https://github.com/dotnet/diagnostics/blob/main/src/SOS/Strike/stressLogDump.cpp
// ******************************************************************************
#include "log.h"
#if defined(STRESS_LOG) && !defined(FEATURE_NO_STRESSLOG)
+#ifndef STRESS_LOG_ANALYZER
+#include "holder.h"
#include "staticcontract.h"
#include "mscoree.h"
#include "clrinternal.h"
-#include "volatile.h"
-#ifndef STRESS_LOG_ANALYZER
-#include "holder.h"
#ifdef STRESS_LOG_READONLY
#include <stddef.h> // offsetof
#else //STRESS_LOG_READONLY
%pK // The pointer is a code address (used for stack track)
*/
-/* STRESS_LOG_VA was added to allow sendign GC trace output to the stress log. msg must be enclosed
- in ()'s and contain a format string followed by 0 - 4 arguments. The arguments must be numbers or
- string literals. LogMsgOL is overloaded so that all of the possible sets of parameters are covered.
- This was done becasue GC Trace uses dprintf which dosen't contain info on how many arguments are
- getting passed in and using va_args would require parsing the format string during the GC
+/* STRESS_LOG_VA was added to allow sending GC trace output to the stress log. msg must be enclosed
+ in ()'s and contain a format string followed by 0 to 12 arguments. The arguments must be numbers
+ or string literals. This was done because GC Trace uses dprintf which doesn't contain info on
+ how many arguments are getting passed in and using va_args would require parsing the format
+ string during the GC
*/
#define STRESS_LOG_VA(dprintfLevel,msg) do { \
if (StressLog::LogOn(LF_GC, LL_ALWAYS)) \
LOGALWAYS(msg); \
} while(0)
-#define STRESS_LOG0(facility, level, msg) do { \
- if (StressLog::LogOn(facility, level)) \
- StressLog::LogMsg(level, facility, 0, msg); \
- LOG((facility, level, msg)); \
- } while(0)
-
-#define STRESS_LOG1(facility, level, msg, data1) do { \
- if (StressLog::LogOn(facility, level)) \
- StressLog::LogMsg(level, facility, 1, msg, (void*)(size_t)(data1));\
- LOG((facility, level, msg, data1)); \
- } while(0)
-
-#define STRESS_LOG2(facility, level, msg, data1, data2) do { \
- if (StressLog::LogOn(facility, level)) \
- StressLog::LogMsg(level, facility, 2, msg, \
- (void*)(size_t)(data1), (void*)(size_t)(data2)); \
- LOG((facility, level, msg, data1, data2)); \
- } while(0)
-
-#define STRESS_LOG2_CHECK_EE_STARTED(facility, level, msg, data1, data2) do { \
- if (g_fEEStarted) \
- STRESS_LOG2(facility, level, msg, data1, data2); \
- else \
- LOG((facility, level, msg, data1, data2)); \
- } while(0)
-
-#define STRESS_LOG3(facility, level, msg, data1, data2, data3) do { \
- if (StressLog::LogOn(facility, level)) \
- StressLog::LogMsg(level, facility, 3, msg, \
- (void*)(size_t)(data1),(void*)(size_t)(data2),(void*)(size_t)(data3)); \
- LOG((facility, level, msg, data1, data2, data3)); \
- } while(0)
-
-#define STRESS_LOG4(facility, level, msg, data1, data2, data3, data4) do { \
- if (StressLog::LogOn(facility, level)) \
- StressLog::LogMsg(level, facility, 4, msg, (void*)(size_t)(data1), \
- (void*)(size_t)(data2),(void*)(size_t)(data3),(void*)(size_t)(data4)); \
- LOG((facility, level, msg, data1, data2, data3, data4)); \
- } while(0)
-
-#define STRESS_LOG5(facility, level, msg, data1, data2, data3, data4, data5) do { \
- if (StressLog::LogOn(facility, level)) \
- StressLog::LogMsg(level, facility, 5, msg, (void*)(size_t)(data1), \
- (void*)(size_t)(data2),(void*)(size_t)(data3),(void*)(size_t)(data4), \
- (void*)(size_t)(data5)); \
- LOG((facility, level, msg, data1, data2, data3, data4, data5)); \
+#define STRESS_LOG_WRITE(facility, level, msg, ...) do { \
+ if (StressLog::StressLogOn(facility, level)) \
+ StressLog::LogMsgOL(facility, level, msg, __VA_ARGS__); \
} while(0)
-#define STRESS_LOG6(facility, level, msg, data1, data2, data3, data4, data5, data6) do { \
- if (StressLog::LogOn(facility, level)) \
- StressLog::LogMsg(level, facility, 6, msg, (void*)(size_t)(data1), \
- (void*)(size_t)(data2),(void*)(size_t)(data3),(void*)(size_t)(data4), \
- (void*)(size_t)(data5), (void*)(size_t)(data6)); \
- LOG((facility, level, msg, data1, data2, data3, data4, data5, data6)); \
+#define STRESS_LOG0(facility, level, msg) do { \
+ if (StressLog::StressLogOn(facility, level)) \
+ StressLog::LogMsg(facility, level, 0, msg); \
} while(0)
-#define STRESS_LOG7(facility, level, msg, data1, data2, data3, data4, data5, data6, data7) do { \
- if (StressLog::LogOn(facility, level)) \
- StressLog::LogMsg(level, facility, 7, msg, (void*)(size_t)(data1), \
- (void*)(size_t)(data2),(void*)(size_t)(data3),(void*)(size_t)(data4), \
- (void*)(size_t)(data5), (void*)(size_t)(data6), (void*)(size_t)(data7)); \
- LOG((facility, level, msg, data1, data2, data3, data4, data5, data6, data7)); \
- } while(0)
+#define STRESS_LOG1(facility, level, msg, data1) \
+ STRESS_LOG_WRITE(facility, level, msg, data1)
-#define STRESS_LOG_COND0(facility, level, cond, msg) do { \
- if (StressLog::LogOn(facility, level) && (cond)) \
- StressLog::LogMsg(level, facility, 0, msg); \
- LOG((facility, level, msg)); \
- } while(0)
+#define STRESS_LOG2(facility, level, msg, data1, data2) \
+ STRESS_LOG_WRITE(facility, level, msg, data1, data2)
-#define STRESS_LOG_COND1(facility, level, cond, msg, data1) do { \
- if (StressLog::LogOn(facility, level) && (cond)) \
- StressLog::LogMsg(level, facility, 1, msg, (void*)(size_t)(data1)); \
- LOG((facility, level, msg, data1)); \
- } while(0)
+#define STRESS_LOG3(facility, level, msg, data1, data2, data3) \
+ STRESS_LOG_WRITE(facility, level, msg, data1, data2, data3)
-#define STRESS_LOG_COND2(facility, level, cond, msg, data1, data2) do { \
- if (StressLog::LogOn(facility, level) && (cond)) \
- StressLog::LogMsg(level, facility, 2, msg, \
- (void*)(size_t)(data1), (void*)(size_t)(data2)); \
- LOG((facility, level, msg, data1, data2)); \
- } while(0)
+#define STRESS_LOG4(facility, level, msg, data1, data2, data3, data4) \
+ STRESS_LOG_WRITE(facility, level, msg, data1, data2, data3, data4)
-#define STRESS_LOG_COND3(facility, level, cond, msg, data1, data2, data3) do { \
- if (StressLog::LogOn(facility, level) && (cond)) \
- StressLog::LogMsg(level, facility, 3, msg, \
- (void*)(size_t)(data1),(void*)(size_t)(data2),(void*)(size_t)(data3)); \
- LOG((facility, level, msg, data1, data2, data3)); \
- } while(0)
+#define STRESS_LOG5(facility, level, msg, data1, data2, data3, data4, data5) \
+ STRESS_LOG_WRITE(facility, level, msg, data1, data2, data3, data4, data5)
-#define STRESS_LOG_COND4(facility, level, cond, msg, data1, data2, data3, data4) do { \
- if (StressLog::LogOn(facility, level) && (cond)) \
- StressLog::LogMsg(level, facility, 4, msg, (void*)(size_t)(data1), \
- (void*)(size_t)(data2),(void*)(size_t)(data3),(void*)(size_t)(data4)); \
- LOG((facility, level, msg, data1, data2, data3, data4)); \
- } while(0)
+#define STRESS_LOG6(facility, level, msg, data1, data2, data3, data4, data5, data6) \
+ STRESS_LOG_WRITE(facility, level, msg, data1, data2, data3, data4, data5, data6)
-#define STRESS_LOG_COND5(facility, level, cond, msg, data1, data2, data3, data4, data5) do { \
- if (StressLog::LogOn(facility, level) && (cond)) \
- StressLog::LogMsg(level, facility, 5, msg, (void*)(size_t)(data1), \
- (void*)(size_t)(data2),(void*)(size_t)(data3),(void*)(size_t)(data4), \
- (void*)(size_t)(data5)); \
- LOG((facility, level, msg, data1, data2, data3, data4, data5)); \
- } while(0)
-
-#define STRESS_LOG_COND6(facility, level, cond, msg, data1, data2, data3, data4, data5, data6) do { \
- if (StressLog::LogOn(facility, level) && (cond)) \
- StressLog::LogMsg(level, facility, 6, msg, (void*)(size_t)(data1), \
- (void*)(size_t)(data2),(void*)(size_t)(data3),(void*)(size_t)(data4), \
- (void*)(size_t)(data5), (void*)(size_t)(data6)); \
- LOG((facility, level, msg, data1, data2, data3, data4, data5, data6)); \
- } while(0)
-
-#define STRESS_LOG_COND7(facility, level, cond, msg, data1, data2, data3, data4, data5, data6, data7) do { \
- if (StressLog::LogOn(facility, level) && (cond)) \
- StressLog::LogMsg(level, facility, 7, msg, (void*)(size_t)(data1), \
- (void*)(size_t)(data2),(void*)(size_t)(data3),(void*)(size_t)(data4), \
- (void*)(size_t)(data5), (void*)(size_t)(data6), (void*)(size_t)(data7)); \
- LOG((facility, level, msg, data1, data2, data3, data4, data5, data6, data7)); \
- } while(0)
+#define STRESS_LOG7(facility, level, msg, data1, data2, data3, data4, data5, data6, data7) \
+ STRESS_LOG_WRITE(facility, level, msg, data1, data2, data3, data4, data5, data6, data7)
#define STRESS_LOG_RESERVE_MEM(numChunks) do { \
if (StressLog::StressLogOn(LF_ALL, LL_ALWAYS)) \
#define STRESS_LOG_GC_STACK
#endif //_DEBUG
+void ReplacePid(LPCWSTR original, LPWSTR replaced, size_t replacedLength);
+
class ThreadStressLog;
struct StressLogMsg;
unsigned padding; // Preserve the layout for SOS
Volatile<LONG> deadCount; // count of dead threads in the log
CRITSEC_COOKIE lock; // lock
- unsigned __int64 tickFrequency; // number of ticks per second
- unsigned __int64 startTimeStamp; // start time from when tick counter started
+ uint64_t tickFrequency; // number of ticks per second
+ uint64_t startTimeStamp; // start time from when tick counter started
FILETIME startTime; // time the application started
SIZE_T moduleOffset; // Used to compute format strings.
struct ModuleDesc
#ifdef MEMORY_MAPPED_STRESSLOG
+ //
+ // Intentionally avoid unmapping the file during destructor to avoid a race
+ // condition between additional logging in other thread and the destructor.
+ //
+ // The operating system will make sure the file get unmapped during process shutdown
+ //
+ LPVOID hMapView;
static void* AllocMemoryMapped(size_t n);
struct StressLogHeader
{
size_t headerSize; // size of this header including size field and moduleImage
uint32_t magic; // must be 'STRL'
- uint32_t version; // must be 0x00010001
+ uint32_t version; // must be >=0x00010001.
+ // 0x00010001 is the legacy short-offset format.
+ // 0x00010002 is the large-module-offset format introduced in .NET 8.
uint8_t* memoryBase; // base address of the memory mapped file
uint8_t* memoryCur; // highest address currently used
uint8_t* memoryLimit; // limit that can be used
Volatile<ThreadStressLog*> logs; // the list of logs for every thread.
uint64_t tickFrequency; // number of ticks per second
uint64_t startTimeStamp; // start time from when tick counter started
- uint64_t threadsWithNoLog; // threads that didn't get a log
- uint64_t reserved[15]; // for future expansion
+ uint32_t threadsWithNoLog; // threads that didn't get a log
+ uint32_t reserved1;
+ uint64_t reserved2[15]; // for future expansion
ModuleDesc modules[MAX_MODULES]; // descriptor of the modules images
uint8_t moduleImage[64*1024*1024];// copy of the module images described by modules field
};
static void AddModule(uint8_t* moduleBase);
+ template<typename T>
+ static void* ConvertArgument(T arg)
+ {
+ static_assert_no_msg(sizeof(T) <= sizeof(void*));
+ return (void*)(size_t)arg;
+ }
+
// Support functions for STRESS_LOG_VA
// We disable the warning "conversion from 'type' to 'type' of greater size" since everything will
// end up on the stack, and LogMsg will know the size of the variable based on the format string.
#pragma warning( push )
#pragma warning( disable : 4312 )
#endif
+
static void LogMsgOL(const char* format)
{ LogMsg(LL_ALWAYS, LF_GC, 0, format); }
- template < typename T1 >
- static void LogMsgOL(const char* format, T1 data1)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*));
- LogMsg(LL_ALWAYS, LF_GC, 1, format, (void*)(size_t)data1);
- }
-
- template < typename T1, typename T2 >
- static void LogMsgOL(const char* format, T1 data1, T2 data2)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*));
- LogMsg(LL_ALWAYS, LF_GC, 2, format, (void*)(size_t)data1, (void*)(size_t)data2);
- }
-
- template < typename T1, typename T2, typename T3 >
- static void LogMsgOL(const char* format, T1 data1, T2 data2, T3 data3)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*));
- LogMsg(LL_ALWAYS, LF_GC, 3, format, (void*)(size_t)data1, (void*)(size_t)data2, (void*)(size_t)data3);
- }
-
- template < typename T1, typename T2, typename T3, typename T4 >
- static void LogMsgOL(const char* format, T1 data1, T2 data2, T3 data3, T4 data4)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*));
- LogMsg(LL_ALWAYS, LF_GC, 4, format, (void*)(size_t)data1, (void*)(size_t)data2, (void*)(size_t)data3, (void*)(size_t)data4);
- }
-
- template < typename T1, typename T2, typename T3, typename T4, typename T5 >
- static void LogMsgOL(const char* format, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*) && sizeof(T5) <= sizeof(void*));
- LogMsg(LL_ALWAYS, LF_GC, 5, format, (void*)(size_t)data1, (void*)(size_t)data2, (void*)(size_t)data3, (void*)(size_t)data4, (void*)(size_t)data5);
- }
-
- template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6 >
- static void LogMsgOL(const char* format, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5, T6 data6)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*) && sizeof(T5) <= sizeof(void*) && sizeof(T6) <= sizeof(void*));
- LogMsg(LL_ALWAYS, LF_GC, 6, format, (void*)(size_t)data1, (void*)(size_t)data2, (void*)(size_t)data3, (void*)(size_t)data4, (void*)(size_t)data5, (void*)(size_t)data6);
- }
-
- template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7 >
- static void LogMsgOL(const char* format, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5, T6 data6, T7 data7)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*) && sizeof(T5) <= sizeof(void*) && sizeof(T6) <= sizeof(void*) && sizeof(T7) <= sizeof(void*));
- LogMsg(LL_ALWAYS, LF_GC, 7, format, (void*)(size_t)data1, (void*)(size_t)data2, (void*)(size_t)data3, (void*)(size_t)data4, (void*)(size_t)data5, (void*)(size_t)data6, (void*)(size_t)data7);
- }
-
- template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8 >
- static void LogMsgOL(const char* format, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5, T6 data6, T7 data7, T8 data8)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*) && sizeof(T5) <= sizeof(void*) && sizeof(T6) <= sizeof(void*) && sizeof(T7) <= sizeof(void*) && sizeof(T8) <= sizeof(void*));
- LogMsg(LL_ALWAYS, LF_GC, 8, format, (void*)(size_t)data1, (void*)(size_t)data2, (void*)(size_t)data3, (void*)(size_t)data4, (void*)(size_t)data5, (void*)(size_t)data6, (void*)(size_t)data7, (void*)(size_t)data8);
- }
-
- template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9 >
- static void LogMsgOL(const char* format, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5, T6 data6, T7 data7, T8 data8, T9 data9)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*) && sizeof(T5) <= sizeof(void*) && sizeof(T6) <= sizeof(void*) && sizeof(T7) <= sizeof(void*) && sizeof(T8) <= sizeof(void*) && sizeof(T9) <= sizeof(void*));
- LogMsg(LL_ALWAYS, LF_GC, 9, format, (void*)(size_t)data1, (void*)(size_t)data2, (void*)(size_t)data3, (void*)(size_t)data4, (void*)(size_t)data5, (void*)(size_t)data6, (void*)(size_t)data7, (void*)(size_t)data8, (void*)(size_t)data9);
- }
-
- template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10 >
- static void LogMsgOL(const char* format, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5, T6 data6, T7 data7, T8 data8, T9 data9, T10 data10)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*) && sizeof(T5) <= sizeof(void*) && sizeof(T6) <= sizeof(void*) && sizeof(T7) <= sizeof(void*) && sizeof(T8) <= sizeof(void*) && sizeof(T9) <= sizeof(void*) && sizeof(T10) <= sizeof(void*));
- LogMsg(LL_ALWAYS, LF_GC, 10, format, (void*)(size_t)data1, (void*)(size_t)data2, (void*)(size_t)data3, (void*)(size_t)data4, (void*)(size_t)data5, (void*)(size_t)data6, (void*)(size_t)data7, (void*)(size_t)data8, (void*)(size_t)data9, (void*)(size_t)data10);
- }
-
- template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11 >
- static void LogMsgOL(const char* format, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5, T6 data6, T7 data7, T8 data8, T9 data9, T10 data10, T11 data11)
+ template<typename... Ts>
+ static void LogMsgOL(const char* format, Ts... args)
{
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*) && sizeof(T5) <= sizeof(void*) && sizeof(T6) <= sizeof(void*) && sizeof(T7) <= sizeof(void*) && sizeof(T8) <= sizeof(void*) && sizeof(T9) <= sizeof(void*) && sizeof(T10) <= sizeof(void*) && sizeof(T11) <= sizeof(void*));
- LogMsg(LL_ALWAYS, LF_GC, 11, format, (void*)(size_t)data1, (void*)(size_t)data2, (void*)(size_t)data3, (void*)(size_t)data4, (void*)(size_t)data5, (void*)(size_t)data6, (void*)(size_t)data7, (void*)(size_t)data8, (void*)(size_t)data9, (void*)(size_t)data10, (void*)(size_t)data11);
+ LogMsg(LL_ALWAYS, LF_GC, sizeof...(args), format, ConvertArgument(args)...);
}
- template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12 >
- static void LogMsgOL(const char* format, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5, T6 data6, T7 data7, T8 data8, T9 data9, T10 data10, T11 data11, T12 data12)
+ template<typename... Ts>
+ static void LogMsgOL(unsigned facility, unsigned level, const char* format, Ts... args)
{
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*) && sizeof(T5) <= sizeof(void*) && sizeof(T6) <= sizeof(void*) && sizeof(T7) <= sizeof(void*) && sizeof(T8) <= sizeof(void*) && sizeof(T9) <= sizeof(void*) && sizeof(T10) <= sizeof(void*) && sizeof(T11) <= sizeof(void*) && sizeof(T12) <= sizeof(void*));
- LogMsg(LL_ALWAYS, LF_GC, 12, format, (void*)(size_t)data1, (void*)(size_t)data2, (void*)(size_t)data3, (void*)(size_t)data4, (void*)(size_t)data5, (void*)(size_t)data6, (void*)(size_t)data7, (void*)(size_t)data8, (void*)(size_t)data9, (void*)(size_t)data10, (void*)(size_t)data11, (void*)(size_t)data12);
+ LogMsg(level, facility, sizeof...(args), format, ConvertArgument(args)...);
}
#ifdef _MSC_VER
static StressLog theLog; // We only have one log, and this is it
};
+
+template<>
+void* StressLog::ConvertArgument(float arg) = delete;
+
+#if TARGET_64BIT
+template<>
+inline void* StressLog::ConvertArgument(double arg)
+{
+ return (void*)(size_t)(*((uint64_t*)&arg));
+}
+#else
+template<>
+void* StressLog::ConvertArgument(double arg) = delete;
+
+// COMPAT: Truncate 64-bit integer arguments to 32-bit
+template<>
+inline void* StressLog::ConvertArgument(uint64_t arg)
+{
+ return (void*)(size_t)arg;
+}
+
+template<>
+inline void* StressLog::ConvertArgument(int64_t arg)
+{
+ return (void*)(size_t)arg;
+}
+#endif
+
#ifndef STRESS_LOG_ANALYZER
-typedef Holder<CRITSEC_COOKIE, StressLog::Enter, StressLog::Leave, NULL, CompareDefault<CRITSEC_COOKIE>> StressLogLockHolder;
+typedef Holder<CRITSEC_COOKIE, StressLog::Enter, StressLog::Leave, 0, CompareDefault<CRITSEC_COOKIE>> StressLogLockHolder;
#endif //!STRESS_LOG_ANALYZER
#if defined(DACCESS_COMPILE)
#pragma warning(disable:4200 4201) // don't warn about 0 sized array below or unnamed structures
#endif
-// The order of fields is important. Keep the prefix length as the first field.
-// And make sure the timeStamp field is naturally alligned, so we don't waste
-// space on 32-bit platforms
+// The order of fields is important. Ensure that we minimize padding
+// to fit more messages in a chunk.
struct StressMsg
{
private:
};
static_assert(sizeof(StressMsg) == sizeof(uint64_t) * 2, "StressMsg bitfields aren't aligned correctly");
+
#ifdef HOST_64BIT
#define STRESSLOG_CHUNK_SIZE (32 * 1024)
#else //HOST_64BIT
void * operator new (size_t size) throw()
{
- if (IsInCantAllocStressLogRegion ())
- {
- return NULL;
- }
#ifdef MEMORY_MAPPED_STRESSLOG
if (s_memoryMapped)
return StressLog::AllocMemoryMapped(size);
#endif //MEMORY_MAPPED_STRESSLOG
+ if (IsInCantAllocStressLogRegion ())
+ {
+ return NULL;
+ }
#ifdef HOST_WINDOWS
_ASSERTE(s_LogChunkHeap);
return HeapAlloc(s_LogChunkHeap, 0, size);
#endif //!STRESS_LOG_READONLY && !STRESS_LOG_ANALYZER
#if defined(MEMORY_MAPPED_STRESSLOG) && !defined(STRESS_LOG_ANALYZER)
- void* __cdecl operator new(size_t n, const NoThrow&) NOEXCEPT;
+ void* __cdecl operator new(size_t n, const std::nothrow_t&) noexcept;
void __cdecl operator delete (void * chunk);
#endif
}
curReadChunk = curReadChunk->next;
void** p = (void**)curReadChunk->StartPtr();
- while (*p == NULL && (size_t)(p-(void**)curReadChunk->StartPtr ()) < (StressMsg::maxMsgSize()/sizeof(void*)))
+ while (*p == NULL && (size_t)(p-(void**)curReadChunk->StartPtr()) < (StressMsg::maxMsgSize() / sizeof(void*)))
{
++p;
}
{
}
- template < typename T1 >
- StressLogMsg(const char* format, T1 data1) : m_cArgs(1), m_format(format)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*));
- m_args[0] = (void*)(size_t)data1;
- }
-
- template < typename T1, typename T2 >
- StressLogMsg(const char* format, T1 data1, T2 data2) : m_cArgs(2), m_format(format)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*));
- m_args[0] = (void*)(size_t)data1;
- m_args[1] = (void*)(size_t)data2;
- }
-
- template < typename T1, typename T2, typename T3 >
- StressLogMsg(const char* format, T1 data1, T2 data2, T3 data3) : m_cArgs(3), m_format(format)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*));
- m_args[0] = (void*)(size_t)data1;
- m_args[1] = (void*)(size_t)data2;
- m_args[2] = (void*)(size_t)data3;
- }
-
- template < typename T1, typename T2, typename T3, typename T4 >
- StressLogMsg(const char* format, T1 data1, T2 data2, T3 data3, T4 data4) : m_cArgs(4), m_format(format)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*));
- m_args[0] = (void*)(size_t)data1;
- m_args[1] = (void*)(size_t)data2;
- m_args[2] = (void*)(size_t)data3;
- m_args[3] = (void*)(size_t)data4;
- }
-
- template < typename T1, typename T2, typename T3, typename T4, typename T5 >
- StressLogMsg(const char* format, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5) : m_cArgs(5), m_format(format)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*) && sizeof(T5) <= sizeof(void*));
- m_args[0] = (void*)(size_t)data1;
- m_args[1] = (void*)(size_t)data2;
- m_args[2] = (void*)(size_t)data3;
- m_args[3] = (void*)(size_t)data4;
- m_args[4] = (void*)(size_t)data5;
- }
-
- template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6 >
- StressLogMsg(const char* format, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5, T6 data6) : m_cArgs(6), m_format(format)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*) && sizeof(T5) <= sizeof(void*) && sizeof(T6) <= sizeof(void*));
- m_args[0] = (void*)(size_t)data1;
- m_args[1] = (void*)(size_t)data2;
- m_args[2] = (void*)(size_t)data3;
- m_args[3] = (void*)(size_t)data4;
- m_args[4] = (void*)(size_t)data5;
- m_args[5] = (void*)(size_t)data6;
- }
-
- template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7 >
- StressLogMsg(const char* format, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5, T6 data6, T7 data7) : m_cArgs(7), m_format(format)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*) && sizeof(T5) <= sizeof(void*) && sizeof(T6) <= sizeof(void*) && sizeof(T7) <= sizeof(void*));
- m_args[0] = (void*)(size_t)data1;
- m_args[1] = (void*)(size_t)data2;
- m_args[2] = (void*)(size_t)data3;
- m_args[3] = (void*)(size_t)data4;
- m_args[4] = (void*)(size_t)data5;
- m_args[5] = (void*)(size_t)data6;
- m_args[6] = (void*)(size_t)data7;
- }
-
- template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8 >
- StressLogMsg(const char* format, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5, T6 data6, T7 data7, T8 data8) : m_cArgs(8), m_format(format)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*) && sizeof(T5) <= sizeof(void*) && sizeof(T6) <= sizeof(void*) && sizeof(T7) <= sizeof(void*) && sizeof(T8) <= sizeof(void*));
- m_args[0] = (void*)(size_t)data1;
- m_args[1] = (void*)(size_t)data2;
- m_args[2] = (void*)(size_t)data3;
- m_args[3] = (void*)(size_t)data4;
- m_args[4] = (void*)(size_t)data5;
- m_args[5] = (void*)(size_t)data6;
- m_args[6] = (void*)(size_t)data7;
- m_args[7] = (void*)(size_t)data8;
- }
-
- template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9 >
- StressLogMsg(const char* format, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5, T6 data6, T7 data7, T8 data8, T9 data9) : m_cArgs(9), m_format(format)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*) && sizeof(T5) <= sizeof(void*) && sizeof(T6) <= sizeof(void*) && sizeof(T7) <= sizeof(void*) && sizeof(T8) <= sizeof(void*) && sizeof(T9) <= sizeof(void*));
- m_args[0] = (void*)(size_t)data1;
- m_args[1] = (void*)(size_t)data2;
- m_args[2] = (void*)(size_t)data3;
- m_args[3] = (void*)(size_t)data4;
- m_args[4] = (void*)(size_t)data5;
- m_args[5] = (void*)(size_t)data6;
- m_args[6] = (void*)(size_t)data7;
- m_args[7] = (void*)(size_t)data8;
- m_args[8] = (void*)(size_t)data9;
- }
-
- template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10 >
- StressLogMsg(const char* format, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5, T6 data6, T7 data7, T8 data8, T9 data9, T10 data10) : m_cArgs(10), m_format(format)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*) && sizeof(T5) <= sizeof(void*) && sizeof(T6) <= sizeof(void*) && sizeof(T7) <= sizeof(void*) && sizeof(T8) <= sizeof(void*) && sizeof(T9) <= sizeof(void*) && sizeof(T10) <= sizeof(void*));
- m_args[0] = (void*)(size_t)data1;
- m_args[1] = (void*)(size_t)data2;
- m_args[2] = (void*)(size_t)data3;
- m_args[3] = (void*)(size_t)data4;
- m_args[4] = (void*)(size_t)data5;
- m_args[5] = (void*)(size_t)data6;
- m_args[6] = (void*)(size_t)data7;
- m_args[7] = (void*)(size_t)data8;
- m_args[8] = (void*)(size_t)data9;
- m_args[9] = (void*)(size_t)data10;
- }
-
- template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11 >
- StressLogMsg(const char* format, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5, T6 data6, T7 data7, T8 data8, T9 data9, T10 data10, T11 data11) : m_cArgs(11), m_format(format)
- {
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*) && sizeof(T5) <= sizeof(void*) && sizeof(T6) <= sizeof(void*) && sizeof(T7) <= sizeof(void*) && sizeof(T8) <= sizeof(void*) && sizeof(T9) <= sizeof(void*) && sizeof(T10) <= sizeof(void*) && sizeof(T11) <= sizeof(void*));
- m_args[0] = (void*)(size_t)data1;
- m_args[1] = (void*)(size_t)data2;
- m_args[2] = (void*)(size_t)data3;
- m_args[3] = (void*)(size_t)data4;
- m_args[4] = (void*)(size_t)data5;
- m_args[5] = (void*)(size_t)data6;
- m_args[6] = (void*)(size_t)data7;
- m_args[7] = (void*)(size_t)data8;
- m_args[8] = (void*)(size_t)data9;
- m_args[9] = (void*)(size_t)data10;
- m_args[10] = (void*)(size_t)data11;
- }
-
- template < typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10, typename T11, typename T12 >
- StressLogMsg(const char* format, T1 data1, T2 data2, T3 data3, T4 data4, T5 data5, T6 data6, T7 data7, T8 data8, T9 data9, T10 data10, T11 data11, T12 data12) : m_cArgs(12), m_format(format)
+ template<typename... Ts>
+ StressLogMsg(const char* format, Ts... args)
+ : m_cArgs(sizeof...(args))
+ , m_format(format)
+ , m_args{ StressLog::ConvertArgument(args)... }
{
- static_assert_no_msg(sizeof(T1) <= sizeof(void*) && sizeof(T2) <= sizeof(void*) && sizeof(T3) <= sizeof(void*) && sizeof(T4) <= sizeof(void*) && sizeof(T5) <= sizeof(void*) && sizeof(T6) <= sizeof(void*) && sizeof(T7) <= sizeof(void*) && sizeof(T8) <= sizeof(void*) && sizeof(T9) <= sizeof(void*) && sizeof(T10) <= sizeof(void*) && sizeof(T11) <= sizeof(void*) && sizeof(T12) <= sizeof(void*));
- m_args[0] = (void*)(size_t)data1;
- m_args[1] = (void*)(size_t)data2;
- m_args[2] = (void*)(size_t)data3;
- m_args[3] = (void*)(size_t)data4;
- m_args[4] = (void*)(size_t)data5;
- m_args[5] = (void*)(size_t)data6;
- m_args[6] = (void*)(size_t)data7;
- m_args[7] = (void*)(size_t)data8;
- m_args[8] = (void*)(size_t)data9;
- m_args[9] = (void*)(size_t)data10;
- m_args[10] = (void*)(size_t)data11;
- m_args[11] = (void*)(size_t)data12;
+ static_assert_no_msg(sizeof...(args) <= ARRAY_SIZE(m_args));
}
};
#define STRESS_LOG0(facility, level, msg) do { } while(0)
#define STRESS_LOG1(facility, level, msg, data1) do { } while(0)
#define STRESS_LOG2(facility, level, msg, data1, data2) do { } while(0)
-#define STRESS_LOG2_CHECK_EE_STARTED(facility, level, msg, data1, data2)do { } while(0)
#define STRESS_LOG3(facility, level, msg, data1, data2, data3) do { } while(0)
#define STRESS_LOG4(facility, level, msg, data1, data2, data3, data4) do { } while(0)
#define STRESS_LOG5(facility, level, msg, data1, data2, data3, data4, data5) do { } while(0)
#define USE_CHECKED_OBJECTREFS
#endif
+#ifndef TARGET_64BIT
#define FAT_DISPATCH_TOKENS
+#endif
#define FEATURE_SHARE_GENERIC_CODE
#if defined(TARGET_X86) || defined(TARGET_ARM)
#define USE_LAZY_PREFERRED_RANGE 0
-#elif defined(TARGET_AMD64) || defined(TARGET_ARM64) || defined(TARGET_S390X) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
+#elif defined(TARGET_AMD64) || defined(TARGET_ARM64) || defined(TARGET_S390X) || defined(TARGET_LOONGARCH64) || defined(TARGET_POWERPC64) || defined(TARGET_RISCV64)
#if defined(HOST_UNIX)
// In PAL we have a smechanism that reserves memory on start up that is
#endif
// ALLOW_SXS_JIT enables AltJit support for JIT-ing, via DOTNET_AltJit / DOTNET_AltJitName.
-// ALLOW_SXS_JIT_NGEN enables AltJit support for NGEN, via DOTNET_AltJitNgen / DOTNET_AltJitName.
-// Note that if ALLOW_SXS_JIT_NGEN is defined, then ALLOW_SXS_JIT must be defined.
#define ALLOW_SXS_JIT
-#define ALLOW_SXS_JIT_NGEN
#if !defined(TARGET_UNIX)
// PLATFORM_SUPPORTS_THREADSUSPEND is defined for platforms where it is safe to call
#endif
#define FEATURE_MINIMETADATA_IN_TRIAGEDUMPS
-
-// If defined, support interpretation.
-
-#if !defined(TARGET_UNIX)
-#define FEATURE_STACK_SAMPLING
-#endif // defined (ALLOW_SXS_JIT)
#define __UNREACHABLE_H__
#if defined(_MSC_VER) || defined(_PREFIX_)
-#if defined(TARGET_AMD64)
-// Empty methods that consist of UNREACHABLE() result in a zero-sized declspec(noreturn) method
-// which causes the pdb file to make the next method declspec(noreturn) as well, thus breaking BBT
-// Remove when we get a VC compiler that fixes VSW 449170
-# define __UNREACHABLE() do { DebugBreak(); __assume(0); } while (0)
-#else
-# define __UNREACHABLE() __assume(0)
-#endif
+#define __UNREACHABLE() __assume(0)
#else
#define __UNREACHABLE() __builtin_unreachable()
#endif
#ifndef __UtilCode_h__
#define __UtilCode_h__
+#include <type_traits>
+#include <algorithm>
+#include <stdio.h>
+#include <limits.h>
+#include <new>
+
+using std::nothrow;
+
#include "crtwrap.h"
#include "winwrap.h"
#include <wchar.h>
-#include <stdio.h>
-#include <malloc.h>
#include <ole2.h>
#include <oleauto.h>
-#include <limits.h>
#include "clrtypes.h"
#include "safewrap.h"
#include "volatile.h"
#include "clrhost.h"
#include "debugmacros.h"
#include "corhlprpriv.h"
-#include "winnls.h"
#include "check.h"
#include "safemath.h"
-#include "new.hpp"
-
-#ifdef PAL_STDCPP_COMPAT
-#include <type_traits>
-#else
-#include "clr_std/type_traits"
-#endif
#include "contract.h"
-#include "entrypoints.h"
-#include<minipal/utils.h>
+#include <minipal/utils.h>
+#include <dn-u16.h>
#include "clrnt.h"
#define CoreLibNameLen 22
#define CoreLibSatelliteName_A "System.Private.CoreLib.resources"
#define CoreLibSatelliteNameLen 32
-#define LegacyCoreLibName_A "mscorlib"
+
+bool ValidateModuleName(LPCWSTR pwzModuleName);
class StringArrayList;
#define DIGIT_TO_INT(ch) ((ch) - W('0'))
#define INT_TO_DIGIT(i) ((WCHAR)(W('0') + (i)))
-#define IS_HEXDIGIT(ch) ((((ch) >= W('a')) && ((ch) <= W('f'))) || \
- (((ch) >= W('A')) && ((ch) <= W('F'))))
-#define HEXDIGIT_TO_INT(ch) ((towlower(ch) - W('a')) + 10)
-#define INT_TO_HEXDIGIT(i) ((WCHAR)(W('a') + ((i) - 10)))
-
// Helper will 4 byte align a value, rounding up.
#define ALIGN4BYTE(val) (((val) + 3) & ~0x3)
#define DEBUGARG(x)
#endif
+#if defined(FEATURE_READYTORUN)
+#define R2RARG(x) , x
+#else
+#define R2RARG(x)
+#endif
+
#ifndef sizeofmember
// Returns the size of a class or struct member.
#define sizeofmember(c,m) (sizeof(((c*)0)->m))
// given and ANSI String, copy it into a wide buffer.
// be careful about scoping when using this macro!
//
-// how to use the below two macros:
-//
-// ...
-// LPSTR pszA;
-// pszA = MyGetAnsiStringRoutine();
-// MAKE_WIDEPTR_FROMANSI(pwsz, pszA);
-// MyUseWideStringRoutine(pwsz);
-// ...
-//
// similarily for MAKE_ANSIPTR_FROMWIDE. note that the first param does not
// have to be declared, and no clean up must be done.
//
#define MAKE_TRANSLATIONFAILED ThrowWin32(ERROR_NO_UNICODE_TRANSLATION)
#endif
-// This version throws on conversion errors (ie, no best fit character
-// mapping to characters that look similar, and no use of the default char
-// ('?') when printing out unrepresentable characters. Use this method for
-// most development in the EE, especially anything like metadata or class
-// names. See the BESTFIT version if you're printing out info to the console.
-#define MAKE_MULTIBYTE_FROMWIDE(ptrname, widestr, codepage) \
- int __l##ptrname = (int)wcslen(widestr); \
- if (__l##ptrname > MAKE_MAX_LENGTH) \
- MAKE_TOOLONGACTION; \
- __l##ptrname = (int)((__l##ptrname + 1) * 2 * sizeof(char)); \
- CQuickBytes __CQuickBytes##ptrname; \
- __CQuickBytes##ptrname.AllocThrows(__l##ptrname); \
- BOOL __b##ptrname; \
- DWORD __cBytes##ptrname = WszWideCharToMultiByte(codepage, WC_NO_BEST_FIT_CHARS, widestr, -1, (LPSTR)__CQuickBytes##ptrname.Ptr(), __l##ptrname, NULL, &__b##ptrname); \
- if (__b##ptrname || (__cBytes##ptrname == 0 && (widestr[0] != W('\0')))) { \
- MAKE_TRANSLATIONFAILED; \
- } \
- LPSTR ptrname = (LPSTR)__CQuickBytes##ptrname.Ptr()
-
// This version does best fit character mapping and also allows the use
// of the default char ('?') for any Unicode character that isn't
// representable. This is reasonable for writing to the console, but
// shouldn't be used for most string conversions.
#define MAKE_MULTIBYTE_FROMWIDE_BESTFIT(ptrname, widestr, codepage) \
- int __l##ptrname = (int)wcslen(widestr); \
+ int __l##ptrname = (int)u16_strlen(widestr); \
if (__l##ptrname > MAKE_MAX_LENGTH) \
MAKE_TOOLONGACTION; \
__l##ptrname = (int)((__l##ptrname + 1) * 2 * sizeof(char)); \
CQuickBytes __CQuickBytes##ptrname; \
__CQuickBytes##ptrname.AllocThrows(__l##ptrname); \
- DWORD __cBytes##ptrname = WszWideCharToMultiByte(codepage, 0, widestr, -1, (LPSTR)__CQuickBytes##ptrname.Ptr(), __l##ptrname, NULL, NULL); \
+ DWORD __cBytes##ptrname = WideCharToMultiByte(codepage, 0, widestr, -1, (LPSTR)__CQuickBytes##ptrname.Ptr(), __l##ptrname, NULL, NULL); \
if (__cBytes##ptrname == 0 && __l##ptrname != 0) { \
MAKE_TRANSLATIONFAILED; \
} \
LPSTR ptrname = (LPSTR)__CQuickBytes##ptrname.Ptr()
-// Use for anything critical other than output to console, where weird
-// character mappings are unacceptable.
-#define MAKE_ANSIPTR_FROMWIDE(ptrname, widestr) MAKE_MULTIBYTE_FROMWIDE(ptrname, widestr, CP_ACP)
-
-// Use for output to the console.
-#define MAKE_ANSIPTR_FROMWIDE_BESTFIT(ptrname, widestr) MAKE_MULTIBYTE_FROMWIDE_BESTFIT(ptrname, widestr, CP_ACP)
-
-#define MAKE_WIDEPTR_FROMANSI(ptrname, ansistr) \
- CQuickBytes __qb##ptrname; \
- int __l##ptrname; \
- __l##ptrname = WszMultiByteToWideChar(CP_ACP, 0, ansistr, -1, 0, 0); \
- if (__l##ptrname > MAKE_MAX_LENGTH) \
- MAKE_TOOLONGACTION; \
- LPWSTR ptrname = (LPWSTR) __qb##ptrname.AllocThrows((__l##ptrname+1)*sizeof(WCHAR)); \
- if (WszMultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS, ansistr, -1, ptrname, __l##ptrname) == 0) { \
- MAKE_TRANSLATIONFAILED; \
- }
-
-#define MAKE_WIDEPTR_FROMANSI_NOTHROW(ptrname, ansistr) \
- CQuickBytes __qb##ptrname; \
- LPWSTR ptrname = 0; \
- int __l##ptrname; \
- __l##ptrname = WszMultiByteToWideChar(CP_ACP, 0, ansistr, -1, 0, 0); \
- if (__l##ptrname <= MAKE_MAX_LENGTH) { \
- ptrname = (LPWSTR) __qb##ptrname.AllocNoThrow((__l##ptrname+1)*sizeof(WCHAR)); \
- if (ptrname) { \
- if (WszMultiByteToWideChar(CP_ACP, MB_ERR_INVALID_CHARS, ansistr, -1, ptrname, __l##ptrname) != 0) { \
- ptrname[__l##ptrname] = 0; \
- } else { \
- ptrname = 0; \
- } \
- } \
- }
-
#define MAKE_UTF8PTR_FROMWIDE(ptrname, widestr) CQuickBytes _##ptrname; _##ptrname.ConvertUnicode_Utf8(widestr); LPSTR ptrname = (LPSTR) _##ptrname.Ptr();
#define MAKE_UTF8PTR_FROMWIDE_NOTHROW(ptrname, widestr) \
CQuickBytes __qb##ptrname; \
- int __l##ptrname = (int)wcslen(widestr); \
- LPUTF8 ptrname = 0; \
+ int __l##ptrname = (int)u16_strlen(widestr); \
+ LPUTF8 ptrname = NULL; \
if (__l##ptrname <= MAKE_MAX_LENGTH) { \
__l##ptrname = (int)((__l##ptrname + 1) * 2 * sizeof(char)); \
ptrname = (LPUTF8) __qb##ptrname.AllocNoThrow(__l##ptrname); \
} \
if (ptrname) { \
- INT32 __lresult##ptrname=WszWideCharToMultiByte(CP_UTF8, 0, widestr, -1, ptrname, __l##ptrname-1, NULL, NULL); \
+ INT32 __lresult##ptrname=WideCharToMultiByte(CP_UTF8, 0, widestr, -1, ptrname, __l##ptrname-1, NULL, NULL); \
DWORD __dwCaptureLastError##ptrname = ::GetLastError(); \
if ((__lresult##ptrname==0) && (((LPCWSTR)widestr)[0] != W('\0'))) { \
if (__dwCaptureLastError##ptrname==ERROR_INSUFFICIENT_BUFFER) { \
- INT32 __lsize##ptrname=WszWideCharToMultiByte(CP_UTF8, 0, widestr, -1, NULL, 0, NULL, NULL); \
+ INT32 __lsize##ptrname=WideCharToMultiByte(CP_UTF8, 0, widestr, -1, NULL, 0, NULL, NULL); \
ptrname = (LPSTR) __qb##ptrname .AllocNoThrow(__lsize##ptrname); \
if (ptrname) { \
- if (WszWideCharToMultiByte(CP_UTF8, 0, widestr, -1, ptrname, __lsize##ptrname, NULL, NULL) != 0) { \
+ if (WideCharToMultiByte(CP_UTF8, 0, widestr, -1, ptrname, __lsize##ptrname, NULL, NULL) != 0) { \
ptrname[__l##ptrname] = 0; \
} else { \
- ptrname = 0; \
+ ptrname = NULL; \
} \
} \
} \
else { \
- ptrname = 0; \
+ ptrname = NULL; \
} \
} \
} \
-#define MAKE_WIDEPTR_FROMUTF8N(ptrname, utf8str, n8chrs) \
- CQuickBytes __qb##ptrname; \
- int __l##ptrname; \
- __l##ptrname = WszMultiByteToWideChar(CP_UTF8, 0, utf8str, n8chrs, 0, 0); \
- if (__l##ptrname > MAKE_MAX_LENGTH) \
- MAKE_TOOLONGACTION; \
- LPWSTR ptrname = (LPWSTR) __qb##ptrname .AllocThrows((__l##ptrname+1)*sizeof(WCHAR)); \
- if (0==WszMultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, utf8str, n8chrs, ptrname, __l##ptrname)) { \
- MAKE_TRANSLATIONFAILED; \
- } \
- ptrname[__l##ptrname] = 0;
-
-
#define MAKE_WIDEPTR_FROMUTF8(ptrname, utf8str) CQuickBytes _##ptrname; _##ptrname.ConvertUtf8_Unicode(utf8str); LPCWSTR ptrname = (LPCWSTR) _##ptrname.Ptr();
-
#define MAKE_WIDEPTR_FROMUTF8N_NOTHROW(ptrname, utf8str, n8chrs) \
CQuickBytes __qb##ptrname; \
int __l##ptrname; \
- LPWSTR ptrname = 0; \
- __l##ptrname = WszMultiByteToWideChar(CP_UTF8, 0, utf8str, n8chrs, 0, 0); \
+ LPWSTR ptrname = NULL; \
+ __l##ptrname = MultiByteToWideChar(CP_UTF8, 0, utf8str, n8chrs, 0, 0); \
if (__l##ptrname <= MAKE_MAX_LENGTH) { \
ptrname = (LPWSTR) __qb##ptrname.AllocNoThrow((__l##ptrname+1)*sizeof(WCHAR)); \
if (ptrname) { \
- if (WszMultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, utf8str, n8chrs, ptrname, __l##ptrname) != 0) { \
+ if (MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, utf8str, n8chrs, ptrname, __l##ptrname) != 0) { \
ptrname[__l##ptrname] = 0; \
} else { \
- ptrname = 0; \
+ ptrname = NULL; \
} \
} \
}
#define MAKE_WIDEPTR_FROMUTF8_NOTHROW(ptrname, utf8str) MAKE_WIDEPTR_FROMUTF8N_NOTHROW(ptrname, utf8str, -1)
-// This method takes the number of characters
-#define MAKE_MULTIBYTE_FROMWIDEN(ptrname, widestr, _nCharacters, _pCnt, codepage) \
- CQuickBytes __qb##ptrname; \
- int __l##ptrname; \
- __l##ptrname = WszWideCharToMultiByte(codepage, WC_NO_BEST_FIT_CHARS, widestr, _nCharacters, NULL, 0, NULL, NULL); \
- if (__l##ptrname > MAKE_MAX_LENGTH) \
- MAKE_TOOLONGACTION; \
- ptrname = (LPUTF8) __qb##ptrname .AllocThrows(__l##ptrname+1); \
- BOOL __b##ptrname; \
- DWORD _pCnt = WszWideCharToMultiByte(codepage, WC_NO_BEST_FIT_CHARS, widestr, _nCharacters, ptrname, __l##ptrname, NULL, &__b##ptrname); \
- if (__b##ptrname || (_pCnt == 0 && _nCharacters > 0)) { \
- MAKE_TRANSLATIONFAILED; \
- } \
- ptrname[__l##ptrname] = 0;
-
-#define MAKE_MULTIBYTE_FROMWIDEN_BESTFIT(ptrname, widestr, _nCharacters, _pCnt, codepage) \
- CQuickBytes __qb##ptrname; \
- int __l##ptrname; \
- __l##ptrname = WszWideCharToMultiByte(codepage, 0, widestr, _nCharacters, NULL, 0, NULL, NULL); \
- if (__l##ptrname > MAKE_MAX_LENGTH) \
- MAKE_TOOLONGACTION; \
- ptrname = (LPUTF8) __qb##ptrname .AllocThrows(__l##ptrname+1); \
- DWORD _pCnt = WszWideCharToMultiByte(codepage, 0, widestr, _nCharacters, ptrname, __l##ptrname, NULL, NULL); \
- if (_pCnt == 0 && _nCharacters > 0) { \
- MAKE_TRANSLATIONFAILED; \
- } \
- ptrname[__l##ptrname] = 0;
-
-#define MAKE_ANSIPTR_FROMWIDEN(ptrname, widestr, _nCharacters, _pCnt) \
- MAKE_MULTIBYTE_FROMWIDEN(ptrname, widestr, _nCharacters, _pCnt, CP_ACP)
+const SIZE_T MaxSigned32BitDecString = ARRAY_SIZE("-2147483648") - 1;
+const SIZE_T MaxUnsigned32BitDecString = ARRAY_SIZE("4294967295") - 1;
+const SIZE_T MaxIntegerDecHexString = ARRAY_SIZE("-9223372036854775808") - 1;
+const SIZE_T Max32BitHexString = ARRAY_SIZE("12345678") - 1;
+const SIZE_T Max64BitHexString = ARRAY_SIZE("1234567812345678") - 1;
-inline
-LPWSTR DuplicateString(
- LPCWSTR wszString,
- size_t cchString)
+template <typename I>
+inline WCHAR* FormatInteger(WCHAR* str, size_t strCount, const char* fmt, I v)
{
- STATIC_CONTRACT_NOTHROW;
-
- LPWSTR wszDup = NULL;
- if (wszString != NULL)
- {
- wszDup = new (nothrow) WCHAR[cchString + 1];
- if (wszDup != NULL)
- {
- wcscpy_s(wszDup, cchString + 1, wszString);
- }
- }
- return wszDup;
-}
+ static_assert(std::is_integral<I>::value, "Integral type required.");
+ assert(str != NULL && fmt != NULL);
-inline
-LPWSTR DuplicateString(
- LPCWSTR wszString)
-{
- STATIC_CONTRACT_NOTHROW;
+ // Represents the most amount of space needed to format
+ // an integral type (i.e., %d or %llx).
+ char tmp[MaxIntegerDecHexString + 1];
+ int cnt = sprintf_s(tmp, ARRAY_SIZE(tmp), fmt, v);
+ assert(0 <= cnt);
- if (wszString != NULL)
+ WCHAR* end = str + strCount;
+ for (int i = 0; i < cnt; ++i)
{
- return DuplicateString(wszString, wcslen(wszString));
- }
- else
- {
- return NULL;
- }
-}
-
-void DECLSPEC_NORETURN ThrowOutOfMemory();
-
-inline
-LPWSTR DuplicateStringThrowing(
- LPCWSTR wszString,
- size_t cchString)
-{
- STATIC_CONTRACT_THROWS;
-
- if (wszString == NULL)
- return NULL;
-
- LPWSTR wszDup = DuplicateString(wszString, cchString);
- if (wszDup == NULL)
- ThrowOutOfMemory();
-
- return wszDup;
-}
+ if (str == end)
+ return NULL;
-inline
-LPWSTR DuplicateStringThrowing(
- LPCWSTR wszString)
-{
- STATIC_CONTRACT_THROWS;
-
- if (wszString == NULL)
- return NULL;
-
- LPWSTR wszDup = DuplicateString(wszString);
- if (wszDup == NULL)
- ThrowOutOfMemory();
-
- return wszDup;
-}
-
-
-//*****************************************************************************
-// Placement new is used to new and object at an exact location. The pointer
-// is simply returned to the caller without actually using the heap. The
-// advantage here is that you cause the ctor() code for the object to be run.
-// This is ideal for heaps of C++ objects that need to get init'd multiple times.
-// Example:
-// void *pMem = GetMemFromSomePlace();
-// Foo *p = new (pMem) Foo;
-// DoSomething(p);
-// p->~Foo();
-//*****************************************************************************
-#ifndef __PLACEMENT_NEW_INLINE
-#define __PLACEMENT_NEW_INLINE
-inline void *__cdecl operator new(size_t, void *_P)
-{
- LIMITED_METHOD_DAC_CONTRACT;
+ *str++ = (WCHAR)tmp[i];
+ }
- return (_P);
+ *str = W('\0');
+ return str;
}
-#endif // __PLACEMENT_NEW_INLINE
-
/********************************************************************************/
/* portability helpers */
operator new[](size_t n);
void __cdecl
-operator delete(void *p) NOEXCEPT;
+operator delete(void *p) noexcept;
void __cdecl
-operator delete[](void *p) NOEXCEPT;
+operator delete[](void *p) noexcept;
#ifdef _DEBUG_IMPL
HRESULT _OutOfMemory(LPCSTR szFile, int iLine);
BOOL CLRFreeLibrary(HMODULE hModule);
// Load a string using the resources for the current module.
-STDAPI UtilLoadStringRC(UINT iResouceID, _Out_writes_ (iMax) LPWSTR szBuffer, int iMax, int bQuiet=FALSE);
+STDAPI UtilLoadStringRC(UINT iResourceID, _Out_writes_ (iMax) LPWSTR szBuffer, int iMax, int bQuiet=FALSE);
// Specify callbacks so that UtilLoadStringRC can find out which language we're in.
// If no callbacks specified (or both parameters are NULL), we default to the
if (id == UICULTUREID_DONTCARE)
return FALSE;
- return wcscmp(id, m_LangId) == 0;
+ return u16_strcmp(id, m_LangId) == 0;
}
HRESOURCEDLL GetLibraryHandle()
}
private:
-// String resouces packaged as PE files only exist on Windows
+// String resources packaged as PE files only exist on Windows
#ifdef HOST_WINDOWS
HRESULT GetLibrary(LocaleID langId, HRESOURCEDLL* phInst);
#ifndef DACCESS_COMPILE
FPGETTHREADUICULTURENAMES m_fpGetThreadUICultureNames;
};
-HRESULT UtilLoadResourceString(CCompRC::ResourceCategory eCategory, UINT iResouceID, _Out_writes_ (iMax) LPWSTR szBuffer, int iMax);
-
-
-int UtilMessageBox(
- HWND hWnd, // Handle to Owner Window
- UINT uText, // Resource Identifier for Text message
- UINT uCaption, // Resource Identifier for Caption
- UINT uType, // Style of MessageBox
- BOOL displayForNonInteractive, // Display even if the process is running non interactive
- BOOL ShowFileNameInTitle, // Flag to show FileName in Caption
- ...); // Additional Arguments
-
-int UtilMessageBoxNonLocalized(
- HWND hWnd, // Handle to Owner Window
- LPCWSTR lpText, // Resource Identifier for Text message
- LPCWSTR lpTitle, // Resource Identifier for Caption
- UINT uType, // Style of MessageBox
- BOOL displayForNonInteractive, // Display even if the process is running non interactive
- BOOL ShowFileNameInTitle, // Flag to show FileName in Caption
- ...); // Additional Arguments
-
-int UtilMessageBoxVA(
- HWND hWnd, // Handle to Owner Window
- UINT uText, // Resource Identifier for Text message
- UINT uCaption, // Resource Identifier for Caption
- UINT uType, // Style of MessageBox
- BOOL displayForNonInteractive, // Display even if the process is running non interactive
- BOOL ShowFileNameInTitle, // Flag to show FileName in Caption
- va_list args); // Additional Arguments
-
-int UtilMessageBoxNonLocalizedVA(
- HWND hWnd, // Handle to Owner Window
- LPCWSTR lpText, // Text message
- LPCWSTR lpCaption, // Caption
- UINT uType, // Style of MessageBox
- BOOL displayForNonInteractive, // Display even if the process is running non interactive
- BOOL ShowFileNameInTitle, // Flag to show FileName in Caption
- BOOL * pInputFromUser, // To distinguish between user pressing abort vs. assuming abort.
- va_list args); // Additional Arguments
-
-int UtilMessageBoxNonLocalizedVA(
- HWND hWnd, // Handle to Owner Window
- LPCWSTR lpText, // Text message
- LPCWSTR lpCaption, // Caption
- LPCWSTR lpDetails, // Details that may be shown in a collapsed extended area of the dialog (Vista or higher).
- UINT uType, // Style of MessageBox
- BOOL displayForNonInteractive, // Display even if the process is running non interactive
- BOOL ShowFileNameInTitle, // Flag to show FileName in Caption
- BOOL * pInputFromUser, // To distinguish between user pressing abort vs. assuming abort.
- va_list args); // Additional Arguments
-
-int UtilMessageBoxCatastrophic(
- UINT uText, // Text for MessageBox
- UINT uTitle, // Title for MessageBox
- UINT uType, // Style of MessageBox
- BOOL ShowFileNameInTitle, // Flag to show FileName in Caption
- ...);
-
-int UtilMessageBoxCatastrophicNonLocalized(
- LPCWSTR lpText, // Text for MessageBox
- LPCWSTR lpTitle, // Title for MessageBox
- UINT uType, // Style of MessageBox
- BOOL ShowFileNameInTitle, // Flag to show FileName in Caption
- ...);
-
-int UtilMessageBoxCatastrophicVA(
- UINT uText, // Text for MessageBox
- UINT uTitle, // Title for MessageBox
- UINT uType, // Style of MessageBox
- BOOL ShowFileNameInTitle, // Flag to show FileName in Caption
- va_list args); // Additional Arguments
-
-int UtilMessageBoxCatastrophicNonLocalizedVA(
- LPCWSTR lpText, // Text for MessageBox
- LPCWSTR lpTitle, // Title for MessageBox
- UINT uType, // Style of MessageBox
- BOOL ShowFileNameInTitle, // Flag to show FileName in Caption
- va_list args); // Additional Arguments
-
+HRESULT UtilLoadResourceString(CCompRC::ResourceCategory eCategory, UINT iResourceID, _Out_writes_ (iMax) LPWSTR szBuffer, int iMax);
// The HRESULT_FROM_WIN32 macro evaluates its arguments three times.
// <TODO>TODO: All HRESULT_FROM_WIN32(GetLastError()) should be replaced by calls to
return (iBits);
}
+// Convert the currency to a decimal and canonicalize.
+inline void VarDecFromCyCanonicalize(CY cyIn, DECIMAL* dec)
+{
+ WRAPPER_NO_CONTRACT;
+
+ (*(ULONG*)dec) = 0;
+ DECIMAL_HI32(*dec) = 0;
+ if (cyIn.int64 == 0) // For compatibility, a currency of 0 emits the Decimal "0.0000" (scale set to 4).
+ {
+ DECIMAL_SCALE(*dec) = 4;
+ DECIMAL_LO32(*dec) = 0;
+ DECIMAL_MID32(*dec) = 0;
+ return;
+ }
+
+ if (cyIn.int64 < 0) {
+ DECIMAL_SIGN(*dec) = DECIMAL_NEG;
+ cyIn.int64 = -cyIn.int64;
+ }
+
+ BYTE scale = 4;
+ ULONGLONG absoluteCy = (ULONGLONG)cyIn.int64;
+ while (scale != 0 && ((absoluteCy % 10) == 0))
+ {
+ scale--;
+ absoluteCy /= 10;
+ }
+ DECIMAL_SCALE(*dec) = scale;
+ DECIMAL_LO32(*dec) = (ULONG)absoluteCy;
+ DECIMAL_MID32(*dec) = (ULONG)(absoluteCy >> 32);
+}
+
//*****************************************************************************
//
// Paths functions. Use these instead of the CRT.
//
//*****************************************************************************
-// secure version! Specify the size of the each buffer in count of elements
-void SplitPath(const WCHAR *path,
- __inout_z __inout_ecount_opt(driveSizeInWords) WCHAR *drive, int driveSizeInWords,
- __inout_z __inout_ecount_opt(dirSizeInWords) WCHAR *dir, int dirSizeInWords,
- __inout_z __inout_ecount_opt(fnameSizeInWords) WCHAR *fname, size_t fnameSizeInWords,
- __inout_z __inout_ecount_opt(extSizeInWords) WCHAR *ext, size_t extSizeInWords);
//*******************************************************************************
-// A much more sensible version that just points to each section of the string.
+// Split a path into individual components - points to each section of the string
//*******************************************************************************
void SplitPathInterior(
_In_ LPCWSTR wszPath,
_Out_opt_ LPCWSTR *pwszExt, _Out_opt_ size_t *pcchExt);
-void MakePath(_Out_ CQuickWSTR &path,
- _In_ LPCWSTR drive,
- _In_ LPCWSTR dir,
- _In_ LPCWSTR fname,
- _In_ LPCWSTR ext);
-
-WCHAR * FullPath(_Out_writes_ (maxlen) WCHAR *UserBuf, const WCHAR *path, size_t maxlen);
-
-//*****************************************************************************
-//
-// SString version of the path functions.
-//
-//*****************************************************************************
-void SplitPath(_In_ SString const &path,
- __inout_opt SString *drive,
- __inout_opt SString *dir,
- __inout_opt SString *fname,
- __inout_opt SString *ext);
-
#include "ostype.h"
#define CLRGetTickCount64() GetTickCount64()
//
LPVOID ClrVirtualAllocAligned(LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect, SIZE_T alignment);
-class NumaNodeInfo
-{
-private:
- static BOOL m_enableGCNumaAware;
- static uint16_t m_nNodes;
- static BOOL InitNumaNodeInfoAPI();
-
-public:
- static BOOL CanEnableGCNumaAware();
- static void InitNumaNodeInfo();
-
-#if !defined(FEATURE_REDHAWK)
-public: // functions
-
- static LPVOID VirtualAllocExNuma(HANDLE hProc, LPVOID lpAddr, SIZE_T size,
- DWORD allocType, DWORD prot, DWORD node);
-#ifdef HOST_WINDOWS
- static BOOL GetNumaProcessorNodeEx(PPROCESSOR_NUMBER proc_no, PUSHORT node_no);
- static bool GetNumaInfo(PUSHORT total_nodes, DWORD* max_procs_per_node);
-#else // HOST_WINDOWS
- static BOOL GetNumaProcessorNodeEx(USHORT proc_no, PUSHORT node_no);
-#endif // HOST_WINDOWS
-#endif
-};
-
#ifdef HOST_WINDOWS
struct CPU_Group_Info
{
- WORD nr_active; // at most 64
- WORD reserved[1];
- WORD begin;
- WORD end;
- DWORD_PTR active_mask;
- DWORD groupWeight;
- DWORD activeThreadWeight;
+ DWORD_PTR active_mask;
+ WORD nr_active; // at most 64
+ WORD begin;
+ DWORD groupWeight;
+ DWORD activeThreadWeight;
};
class CPUGroupInfo
static CPU_Group_Info *m_CPUGroupInfoArray;
static BOOL InitCPUGroupInfoArray();
- static BOOL InitCPUGroupInfoRange();
static void InitCPUGroupInfo();
static BOOL IsInitialized();
static bool GetCPUGroupInfo(PUSHORT total_groups, DWORD* max_procs_per_group);
//static void PopulateCPUUsageArray(void * infoBuffer, ULONG infoSize);
-#if !defined(FEATURE_REDHAWK)
public:
static BOOL GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP relationship,
SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX *slpiex, PDWORD count);
static void ChooseCPUGroupAffinity(GROUP_AFFINITY *gf);
static void ClearCPUGroupAffinity(GROUP_AFFINITY *gf);
static BOOL GetCPUGroupRange(WORD group_number, WORD* group_begin, WORD* group_size);
-#endif
};
DWORD_PTR GetCurrentProcessCpuMask();
class SimpleListNode
{
public:
- SimpleListNode<T>(const T& _t)
+ SimpleListNode(const T& _t)
{
data = _t;
next = 0;
public:
typedef SimpleListNode<T> NodeType;
- SimpleList<T>()
+ SimpleList()
{
head = NULL;
}
};
-template < typename T, typename U >
-struct Pair
-{
-public:
- typedef Pair< T, U > this_type;
- typedef T first_type;
- typedef U second_type;
-
- Pair()
- {}
-
- Pair( T const & t, U const & u )
- : m_first( t )
- , m_second( u )
- { SUPPORTS_DAC; }
-
- Pair( this_type const & obj )
- : m_first( obj.m_first )
- , m_second( obj.m_second )
- {}
-
- this_type & operator=( this_type const & obj )
- {
- m_first = obj.m_first;
- m_second = obj.m_second;
- return *this;
- }
-
- T & First()
- {
- return m_first;
- }
-
- T const & First() const
- {
- return m_first;
- }
-
- U & Second()
- {
- return m_second;
- }
-
- U const & Second() const
- {
- return m_second;
- }
-
- bool operator==(const Pair& rhs) const
- {
- return ((this->First() == rhs.First()) &&
- (this->Second() == rhs.Second()));
- }
-
- bool operator!=(const Pair& rhs) const
- {
- return !(*this == rhs);
- }
-
-private:
- first_type m_first;
- second_type m_second;
-};
-
-
-template < typename T, typename U >
-Pair< T, U > MakePair( T const & t, U const & u )
-{
- SUPPORTS_DAC;
- return Pair< T, U >( t, u );
-}
-
-
//*****************************************************************************
// This class implements a dynamic array of structures for which the order of
// the elements is unimportant. This means that any item placed in the list
// try to allocate memory for reallocation.
pTemp = ALLOCATOR::AllocThrowing(this, m_iSize+iGrowInc);
- memcpy (pTemp, m_pTable, m_iSize*sizeof(T));
+ if (m_iSize > 0)
+ memcpy (pTemp, m_pTable, m_iSize*sizeof(T));
ALLOCATOR::Free(this, m_pTable);
m_pTable = pTemp;
m_iSize += iGrowInc;
typedef CDynArray<BYTE> BYTEARRAY;
typedef CDynArray<mdToken> TOKENARRAY;
-template <class T> class CStackArray : public CStructArray
-{
-public:
- CStackArray(short iGrowInc=4) :
- CStructArray(sizeof(T), iGrowInc),
- m_curPos(0)
- {
- LIMITED_METHOD_CONTRACT;
- }
-
- void Push(T p)
- {
- WRAPPER_NO_CONTRACT;
- // We should only inc m_curPos after we grow the array.
- T *pT = (T *)CStructArray::InsertThrowing(m_curPos);
- m_curPos ++;
- *pT = p;
- }
-
- T * Pop()
- {
- WRAPPER_NO_CONTRACT;
- T * retPtr;
-
- _ASSERTE(m_curPos > 0);
-
- retPtr = (T *)CStructArray::Get(m_curPos-1);
- CStructArray::Delete(m_curPos--);
-
- return (retPtr);
- }
-
- int Count()
- {
- LIMITED_METHOD_CONTRACT;
- return(m_curPos);
- }
-
-private:
- int m_curPos;
-};
-
-
-//*****************************************************************************
-// This template manages a list of free entries by their 0 based offset. By
-// making it a template, you can use whatever size free chain will match your
-// maximum count of items. -1 is reserved.
-//*****************************************************************************
-template <class T> class TFreeList
-{
-public:
- void Init(
- T *rgList,
- int iCount)
- {
- LIMITED_METHOD_CONTRACT;
- // Save off values.
- m_rgList = rgList;
- m_iCount = iCount;
- m_iNext = 0;
-
- // Init free list.
- int i;
- for (i=0; i<iCount - 1; i++)
- m_rgList[i] = i + 1;
- m_rgList[i] = (T) -1;
- }
-
- T GetFreeEntry() // Index of free item, or -1.
- {
- LIMITED_METHOD_CONTRACT;
- T iNext;
-
- if (m_iNext == (T) -1)
- return (-1);
-
- iNext = m_iNext;
- m_iNext = m_rgList[m_iNext];
- return (iNext);
- }
-
- void DelFreeEntry(T iEntry)
- {
- LIMITED_METHOD_CONTRACT;
- _ASSERTE(iEntry < m_iCount);
- m_rgList[iEntry] = m_iNext;
- m_iNext = iEntry;
- }
-
- // This function can only be used when it is guaranteed that the free
- // array is contigous, for example, right after creation to quickly
- // get a range of items from the heap.
- void ReserveRange(int iCount)
- {
- LIMITED_METHOD_CONTRACT;
- _ASSERTE(iCount < m_iCount);
- _ASSERTE(m_iNext == 0);
- m_iNext = iCount;
- }
-
-private:
- T *m_rgList; // List of free info.
- int m_iCount; // How many entries to manage.
- T m_iNext; // Next item to get.
-};
-
//*****************************************************************************
//*****************************************************************************
if (iLeft >= iRight)
return;
- // ASSERT that we now have valid indicies. This is statically provable
- // since this private function is only called with valid indicies,
+ // ASSERT that we now have valid indices. This is statically provable
+ // since this private function is only called with valid indices,
// and iLeft and iRight only converge towards eachother. However,
// PreFast can't detect this because it doesn't know about our callers.
COMPILER_ASSUME(iLeft >= 0 && iLeft < m_iCount);
//*****************************************************************************
// Returns the first entry in the first hash bucket and inits the search
// struct. Use the FindNextEntry function to continue walking the list. The
-// return order is not gauranteed.
+// return order is not guaranteed.
//*****************************************************************************
BYTE *FindFirstEntry( // First entry found, or 0.
HASHFIND *psSrch) // Search object.
{
WRAPPER_NO_CONTRACT;
- if (m_piBuckets == 0)
+ if (m_piBuckets == nullptr)
return (0);
psSrch->iBucket = 1;
psSrch->iNext = m_piBuckets[0];
~CHashTableAndData()
{
WRAPPER_NO_CONTRACT;
- if (m_pcEntries != NULL)
+ if (m_pcEntries != (TADDR)NULL)
MemMgr::Free((BYTE*)m_pcEntries, MemMgr::RoundSize(m_iEntries * m_iEntrySize));
}
// accessors here. So if you're not using these functions, don't start.
// We can hopefully remove them.
// Note that we can't just make RCThread a friend of this class (we tried
- // originally) because the inheritence chain has a private modifier,
+ // originally) because the inheritance chain has a private modifier,
// so DebuggerPatchTable::m_pcEntries is illegal.
static SIZE_T helper_GetOffsetOfEntries()
{
int iCurSize; // Current size in bytes.
int iEntries; // New # of entries.
- _ASSERTE(m_pcEntries != NULL);
+ _ASSERTE(m_pcEntries != (TADDR)NULL);
_ASSERTE(m_iFree == UINT32_MAX);
// Compute the current size and new # of entries.
return HashCOUNT_T(currentHash, COUNT_T(SIZE_T(dac_cast<TADDR>(ptr))));
}
-inline DWORD HashThreeToOne(DWORD a, DWORD b, DWORD c)
-{
- LIMITED_METHOD_DAC_CONTRACT;
-
- /*
- lookup3.c, by Bob Jenkins, May 2006, Public Domain.
-
- These are functions for producing 32-bit hashes for hash table lookup.
- hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final()
- are externally useful functions. Routines to test the hash are included
- if SELF_TEST is defined. You can use this free for any purpose. It's in
- the public domain. It has no warranty.
- */
-
- #define rot32(x,k) (((x)<<(k)) | ((x)>>(32-(k))))
- c ^= b; c -= rot32(b,14);
- a ^= c; a -= rot32(c,11);
- b ^= a; b -= rot32(a,25);
- c ^= b; c -= rot32(b,16);
- a ^= c; a -= rot32(c,4);
- b ^= a; b -= rot32(a,14);
- c ^= b; c -= rot32(b,24);
-
- return c;
-}
-
inline ULONG HashBytes(BYTE const *pbData, size_t iSize)
{
LIMITED_METHOD_CONTRACT;
ULONG *ptr = (ULONG *)szStr;
// we assume that szStr is null-terminated
- _ASSERTE(cchStr <= wcslen(szStr));
+ _ASSERTE(cchStr <= u16_strlen(szStr));
SIZE_T cDwordCount = (cchStr + 1) / 2;
for (SIZE_T i = 0; i < cDwordCount; i++)
BYTE *m_rgData; // Data element list.
};
-//*****************************************************************************
-// IMPORTANT: This data structure is deprecated, please do not add any new uses.
-// The hashtable implementation that should be used instead is code:SHash.
-// If code:SHash does not work for you, talk to mailto:clrdeag.
-//*****************************************************************************
-template <class T> class CClosedHash : public CClosedHashBase
-{
-public:
- CClosedHash(
- int iBuckets, // How many buckets should we start with.
- bool bPerfect=false) : // true if bucket size will hash with no collisions.
- CClosedHashBase(iBuckets, sizeof(T), bPerfect)
- {
- WRAPPER_NO_CONTRACT;
- }
-
- T &operator[](int iIndex)
- {
- WRAPPER_NO_CONTRACT;
- return ((T &) *(Data() + (iIndex * sizeof(T))));
- }
-
-
-//*****************************************************************************
-// Add a new item to hash table given the key value. If this new entry
-// exceeds maximum size, then the table will grow and be re-hashed, which
-// may cause a memory error.
-//*****************************************************************************
- T *Add( // New item to fill out on success.
- void *pData) // The value to hash on.
- {
- WRAPPER_NO_CONTRACT;
- return ((T *) CClosedHashBase::Add(pData));
- }
-
-//*****************************************************************************
-// Lookup a key value and return a pointer to the element if found.
-//*****************************************************************************
- T *Find( // The item if found, 0 if not.
- void *pData) // The key to lookup.
- {
- WRAPPER_NO_CONTRACT;
- return ((T *) CClosedHashBase::Find(pData));
- }
-
-//*****************************************************************************
-// Look for an item in the table. If it isn't found, then create a new one and
-// return that.
-//*****************************************************************************
- T *FindOrAdd( // The item if found, 0 if not.
- void *pData, // The key to lookup.
- bool &bNew) // true if created.
- {
- WRAPPER_NO_CONTRACT;
- return ((T *) CClosedHashBase::FindOrAdd(pData, bNew));
- }
-
-
-//*****************************************************************************
-// The following functions are used to traverse each used entry. This code
-// will skip over deleted and free entries freeing the caller up from such
-// logic.
-//*****************************************************************************
- T *GetFirst() // The first entry, 0 if none.
- {
- WRAPPER_NO_CONTRACT;
- return ((T *) CClosedHashBase::GetFirst());
- }
-
- T *GetNext(T *Prev) // The next entry, 0 if done.
- {
- WRAPPER_NO_CONTRACT;
- return ((T *) CClosedHashBase::GetNext((BYTE *) Prev));
- }
-};
-
-
-//*****************************************************************************
-// IMPORTANT: This data structure is deprecated, please do not add any new uses.
-// The hashtable implementation that should be used instead is code:SHash.
-// If code:SHash does not work for you, talk to mailto:clrdeag.
-//*****************************************************************************
-// Closed hash with typed parameters. The derived class is the second
-// parameter to the template. The derived class must implement:
-// unsigned long Hash(const T *pData);
-// unsigned long Compare(const T *p1, T *p2);
-// ELEMENTSTATUS Status(T *pEntry);
-// void SetStatus(T *pEntry, ELEMENTSTATUS s);
-// void* GetKey(T *pEntry);
-//*****************************************************************************
-template<class T, class H>class CClosedHashEx : public CClosedHash<T>
-{
-public:
- CClosedHashEx(
- int iBuckets, // How many buckets should we start with.
- bool bPerfect=false) : // true if bucket size will hash with no collisions.
- CClosedHash<T> (iBuckets, bPerfect)
- {
- WRAPPER_NO_CONTRACT;
- }
-
- unsigned int Hash(const void *pData)
- {
- WRAPPER_NO_CONTRACT;
- return static_cast<H*>(this)->Hash((const T*)pData);
- }
-
- unsigned int Compare(const void *p1, BYTE *p2)
- {
- WRAPPER_NO_CONTRACT;
- return static_cast<H*>(this)->Compare((const T*)p1, (T*)p2);
- }
-
- typename CClosedHash<T>::ELEMENTSTATUS Status(BYTE *p)
- {
- WRAPPER_NO_CONTRACT;
- return static_cast<H*>(this)->Status((T*)p);
- }
-
- void SetStatus(BYTE *p, typename CClosedHash<T>::ELEMENTSTATUS s)
- {
- WRAPPER_NO_CONTRACT;
- static_cast<H*>(this)->SetStatus((T*)p, s);
- }
-
- void* GetKey(BYTE *p)
- {
- WRAPPER_NO_CONTRACT;
- return static_cast<H*>(this)->GetKey((T*)p);
- }
-};
-
-
//*****************************************************************************
// IMPORTANT: This data structure is deprecated, please do not add any new uses.
// The hashtable implementation that should be used instead is code:SHash.
}
};
+
+// 38 characters + 1 null terminating.
+#define GUID_STR_BUFFER_LEN (ARRAY_SIZE("{12345678-1234-1234-1234-123456789abc}"))
+
+//*****************************************************************************
+// Convert a GUID into a pointer to a string
+//*****************************************************************************
+int GuidToLPSTR(
+ REFGUID guid, // [IN] The GUID to convert.
+ LPSTR szGuid, // [OUT] String into which the GUID is stored
+ DWORD cchGuid); // [IN] Size in chars of szGuid
+
+template<DWORD N>
+int GuidToLPSTR(REFGUID guid, CHAR (&s)[N])
+{
+ return GuidToLPSTR(guid, s, N);
+}
+
//*****************************************************************************
// Convert a pointer to a string into a GUID.
//*****************************************************************************
-HRESULT LPCSTRToGuid( // Return status.
- LPCSTR szGuid, // String to convert.
- GUID *psGuid); // Buffer for converted GUID.
+BOOL LPCSTRToGuid(
+ LPCSTR szGuid, // [IN] String to convert.
+ GUID* pGuid); // [OUT] Buffer for converted GUID.
//*****************************************************************************
// Convert a GUID into a pointer to a string
//*****************************************************************************
-int GuidToLPWSTR( // Return status.
- GUID Guid, // [IN] The GUID to convert.
- _Out_writes_ (cchGuid) LPWSTR szGuid, // [OUT] String into which the GUID is stored
- DWORD cchGuid); // [IN] Size in wide chars of szGuid
+int GuidToLPWSTR(
+ REFGUID guid, // [IN] The GUID to convert.
+ LPWSTR szGuid, // [OUT] String into which the GUID is stored
+ DWORD cchGuid); // [IN] Size in wide chars of szGuid
+
+template<DWORD N>
+int GuidToLPWSTR(REFGUID guid, WCHAR (&s)[N])
+{
+ return GuidToLPWSTR(guid, s, N);
+}
//*****************************************************************************
// Parse a Wide char string into a GUID
//*****************************************************************************
-BOOL LPWSTRToGuid(
- GUID * Guid, // [OUT] The GUID to fill in
- _In_reads_(cchGuid) LPCWSTR szGuid, // [IN] String to parse
- DWORD cchGuid); // [IN] Count in wchars in string
+BOOL LPCWSTRToGuid(
+ LPCWSTR szGuid, // [IN] String to convert.
+ GUID* pGuid); // [OUT] Buffer for converted GUID.
typedef VPTR(class RangeList) PTR_RangeList;
long *pValue, // Put value here, if found.
BOOL fReadNonVirtualizedKey); // Whether to read 64-bit hive on WOW64
-HRESULT GetCurrentModuleFileName(SString& pBuffer);
+HRESULT GetCurrentExecutableFileName(SString& pBuffer);
//*****************************************************************************
// Retrieve information regarding what registered default debugger
void TrimWhiteSpace(__inout_ecount(*pcch) LPCWSTR *pwsz, __inout LPDWORD pcch);
+void OutputDebugStringUtf8(LPCUTF8 utf8str);
//*****************************************************************************
// Convert a UTF8 string to Unicode, into a CQuickArray<WCHAR>.
CQuickArray<WCHAR> &rStr, // The QuickArray<WCHAR> to convert it into.
int iCurLen = 0); // Initial characters in the array to leave (default 0).
-//*****************************************************************************
-// Extract the movl 64-bit unsigned immediate from an IA64 bundle
-// (Format X2)
-//*****************************************************************************
-UINT64 GetIA64Imm64(UINT64 * pBundle);
-UINT64 GetIA64Imm64(UINT64 qword0, UINT64 qword1);
-
-//*****************************************************************************
-// Deposit the movl 64-bit unsigned immediate into an IA64 bundle
-// (Format X2)
-//*****************************************************************************
-void PutIA64Imm64(UINT64 * pBundle, UINT64 imm64);
-
-//*****************************************************************************
-// Extract the IP-Relative signed 25-bit immediate from an IA64 bundle
-// (Formats B1, B2 or B3)
-// Note that due to branch target alignment requirements
-// the lowest four bits in the result will always be zero.
-//*****************************************************************************
-INT32 GetIA64Rel25(UINT64 * pBundle, UINT32 slot);
-INT32 GetIA64Rel25(UINT64 qword0, UINT64 qword1, UINT32 slot);
-
-//*****************************************************************************
-// Deposit the IP-Relative signed 25-bit immediate into an IA64 bundle
-// (Formats B1, B2 or B3)
-// Note that due to branch target alignment requirements
-// the lowest four bits are required to be zero.
-//*****************************************************************************
-void PutIA64Rel25(UINT64 * pBundle, UINT32 slot, INT32 imm25);
-
-//*****************************************************************************
-// Extract the IP-Relative signed 64-bit immediate from an IA64 bundle
-// (Formats X3 or X4)
-//*****************************************************************************
-INT64 GetIA64Rel64(UINT64 * pBundle);
-INT64 GetIA64Rel64(UINT64 qword0, UINT64 qword1);
-
-//*****************************************************************************
-// Deposit the IP-Relative signed 64-bit immediate into a IA64 bundle
-// (Formats X3 or X4)
-//*****************************************************************************
-void PutIA64Rel64(UINT64 * pBundle, INT64 imm64);
-
//*****************************************************************************
// Extract the 32-bit immediate from movw/movt Thumb2 sequence
//*****************************************************************************
//*****************************************************************************
void PutArm64Rel12(UINT32 * pCode, INT32 imm12);
+//*****************************************************************************
+// Extract the PC-Relative page address and page offset from pcalau12i+add/ld
+//*****************************************************************************
+INT64 GetLoongArch64PC12(UINT32 * pCode);
+
+//*****************************************************************************
+// Extract the jump offset into pcaddu18i+jirl instructions
+//*****************************************************************************
+INT64 GetLoongArch64JIR(UINT32 * pCode);
+
+//*****************************************************************************
+// Deposit the PC-Relative page address and page offset into pcalau12i+add/ld
+//*****************************************************************************
+void PutLoongArch64PC12(UINT32 * pCode, INT64 imm);
+
+//*****************************************************************************
+// Deposit the jump offset into pcaddu18i+jirl instructions
+//*****************************************************************************
+void PutLoongArch64JIR(UINT32 * pCode, INT64 imm);
+
//*****************************************************************************
// Returns whether the offset fits into bl instruction
//*****************************************************************************
return !!(t_ThreadType & ThreadType_GC);
}
-// check if current thread is a Gate thread
-inline BOOL IsGateSpecialThread ()
-{
- STATIC_CONTRACT_NOTHROW;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_MODE_ANY;
-
- return !!(t_ThreadType & ThreadType_Gate);
-}
-
-// check if current thread is a Timer thread
-inline BOOL IsTimerSpecialThread ()
-{
- STATIC_CONTRACT_NOTHROW;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_MODE_ANY;
-
- return !!(t_ThreadType & ThreadType_Timer);
-}
-
// check if current thread is a debugger helper thread
inline BOOL IsDbgHelperSpecialThread ()
{
return !!(t_ThreadType & ThreadType_Shutdown);
}
-inline BOOL IsThreadPoolIOCompletionSpecialThread ()
-{
- STATIC_CONTRACT_NOTHROW;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_MODE_ANY;
-
- return !!(t_ThreadType & ThreadType_Threadpool_IOCompletion);
-}
-
-inline BOOL IsThreadPoolWorkerSpecialThread ()
-{
- STATIC_CONTRACT_NOTHROW;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_MODE_ANY;
-
- return !!(t_ThreadType & ThreadType_Threadpool_Worker);
-}
-
-inline BOOL IsWaitSpecialThread ()
-{
- STATIC_CONTRACT_NOTHROW;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_MODE_ANY;
-
- return !!(t_ThreadType & ThreadType_Wait);
-}
-
// check if current thread is a thread which is performing shutdown
inline BOOL IsSuspendEEThread ()
{
return !!(t_ThreadType & ThreadType_Finalizer);
}
-inline BOOL IsShutdownHelperThread ()
-{
- STATIC_CONTRACT_NOTHROW;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_MODE_ANY;
-
- return !!(t_ThreadType & ThreadType_ShutdownHelper);
-}
-
inline BOOL IsProfilerAttachThread ()
{
STATIC_CONTRACT_NOTHROW;
}
}
+INDEBUG(BOOL DbgIsExecutable(LPVOID lpMem, SIZE_T length);)
-/* ------------------------------------------------------------------------ *
- * Overloaded operators for the executable heap
- * ------------------------------------------------------------------------ */
-
-#ifdef HOST_WINDOWS
-
-struct CExecutable { int x; };
-extern const CExecutable executable;
-
-void * __cdecl operator new(size_t n, const CExecutable&);
-void * __cdecl operator new[](size_t n, const CExecutable&);
-void * __cdecl operator new(size_t n, const CExecutable&, const NoThrow&);
-void * __cdecl operator new[](size_t n, const CExecutable&, const NoThrow&);
-
-
-//
-// Executable heap delete to match the executable heap new above.
-//
-template<class T> void DeleteExecutable(T *p)
-{
- if (p != NULL)
- {
- p->T::~T();
-
- HeapFree(ClrGetProcessExecutableHeap(), 0, p);
- }
-}
-
-#endif // HOST_WINDOWS
-
-BOOL NoGuiOnAssert();
-#ifdef _DEBUG
-VOID TerminateOnAssert();
-#endif // _DEBUG
-
-
-BOOL ThreadWillCreateGuardPage(SIZE_T sizeReservedStack, SIZE_T sizeCommitedStack);
-
+#ifdef FEATURE_COMINTEROP
FORCEINLINE void HolderSysFreeString(BSTR str) { CONTRACT_VIOLATION(ThrowsViolation); SysFreeString(str); }
typedef Wrapper<BSTR, DoNothing, HolderSysFreeString> BSTRHolder;
+#endif
BOOL IsIPInModule(PTR_VOID pModuleBaseAddress, PCODE ip);
return InterlockedCompareExchangeT(destination, exchange, static_cast<T*>(comparand));
}
-// NULL pointer variants of the above to avoid having to cast NULL
-// to the appropriate pointer type.
-template <typename T>
-inline T* InterlockedExchangeT(
- T* volatile * target,
- int value) // When NULL is provided as argument.
-{
- //STATIC_ASSERT(value == 0);
- return InterlockedExchangeT(target, nullptr);
-}
-
-template <typename T>
-inline T* InterlockedCompareExchangeT(
- T* volatile * destination,
- int exchange, // When NULL is provided as argument.
- T* comparand)
-{
- //STATIC_ASSERT(exchange == 0);
- return InterlockedCompareExchangeT(destination, nullptr, comparand);
-}
-
-template <typename T>
-inline T* InterlockedCompareExchangeT(
- T* volatile * destination,
- T* exchange,
- int comparand) // When NULL is provided as argument.
-{
- //STATIC_ASSERT(comparand == 0);
- return InterlockedCompareExchangeT(destination, exchange, nullptr);
-}
-
#undef InterlockedExchangePointer
#define InterlockedExchangePointer Use_InterlockedExchangeT
#undef InterlockedCompareExchangePointer
// Returns the directory for clr module. So, if path was for "C:\Dir1\Dir2\Filename.DLL",
// then this would return "C:\Dir1\Dir2\" (note the trailing backslash).
HRESULT GetClrModuleDirectory(SString& wszPath);
-HRESULT CopySystemDirectory(const SString& pPathString, SString& pbuffer);
-
-HMODULE LoadLocalizedResourceDLLForSDK(_In_z_ LPCWSTR wzResourceDllName, _In_opt_z_ LPCWSTR modulePath=NULL, bool trySelf=true);
-// This is a slight variation that can be used for anything else
-typedef void* (__cdecl *LocalizedFileHandler)(LPCWSTR);
-void* FindLocalizedFile(_In_z_ LPCWSTR wzResourceDllName, LocalizedFileHandler lfh, _In_opt_z_ LPCWSTR modulePath=NULL);
-
+void* GetCurrentModuleBase();
namespace Clr { namespace Util
{
#error The Volatile type is currently only defined for Visual C++ and GNU C++
#endif
-#if defined(__GNUC__) && !defined(HOST_X86) && !defined(HOST_AMD64) && !defined(HOST_ARM) && !defined(HOST_ARM64) && !defined(HOST_LOONGARCH64) && !defined(HOST_RISCV64) && !defined(HOST_S390X)
-#error The Volatile type is currently only defined for GCC when targeting x86, AMD64, ARM, ARM64, LOONGARCH64, RISCV64, or S390X CPUs
+#if defined(__GNUC__) && !defined(HOST_X86) && !defined(HOST_AMD64) && !defined(HOST_ARM) && !defined(HOST_ARM64) && !defined(HOST_LOONGARCH64) && !defined(HOST_RISCV64) && !defined(HOST_S390X) && !defined(HOST_POWERPC64)
+#error The Volatile type is currently only defined for GCC when targeting x86, AMD64, ARM, ARM64, LOONGARCH64, RISCV64, PPC64LE, or S390X CPUs
#endif
#if defined(__GNUC__)
#define VOLATILE_MEMORY_BARRIER() asm volatile ("dmb ish" : : : "memory")
#elif defined(HOST_LOONGARCH64)
#define VOLATILE_MEMORY_BARRIER() asm volatile ("dbar 0 " : : : "memory")
+#elif defined(HOST_RISCV64)
+#define VOLATILE_MEMORY_BARRIER() asm volatile ("fence rw,rw" : : : "memory")
#else
//
// For GCC, we prevent reordering by the compiler by inserting the following after a volatile
// currently don't have a cheap way to determine the number of CPUs from this header file. Revisit this if it
// turns out to be a performance issue for the uni-proc case.
#define VOLATILE_MEMORY_BARRIER() MemoryBarrier()
-#elif defined(HOST_RISCV64)
-#define VOLATILE_MEMORY_BARRIER() asm volatile ("fence rw,rw" : : : "memory")
#else
//
// On VC++, reorderings at the compiler and machine level are prevented by the use of the
#elif defined(HOST_ARM64) && defined(_MSC_VER)
// silence warnings on casts in branches that are not taken.
#pragma warning(push)
-#pragma warning(disable : 4302)
#pragma warning(disable : 4311)
#pragma warning(disable : 4312)
T val;
switch (sizeof(T))
{
case 1:
- *(unsigned __int8* )pv = __ldar8 ((unsigned __int8 volatile*)pt);
+ *(uint8_t* )pv = __ldar8 ((uint8_t volatile*)pt);
break;
case 2:
- *(unsigned __int16*)pv = __ldar16((unsigned __int16 volatile*)pt);
+ *(uint16_t*)pv = __ldar16((uint16_t volatile*)pt);
break;
case 4:
- *(unsigned __int32*)pv = __ldar32((unsigned __int32 volatile*)pt);
+ *(uint32_t*)pv = __ldar32((uint32_t volatile*)pt);
break;
case 8:
- *(unsigned __int64*)pv = __ldar64((unsigned __int64 volatile*)pt);
+ *(uint64_t*)pv = __ldar64((uint64_t volatile*)pt);
break;
default:
val = *(T volatile const*)pt;
}
//
-// VolatileStore stores a T into the target of a pointer to T. Is is guaranteed that this store will
+// VolatileStore stores a T into the target of a pointer to T. It is guaranteed that this store will
// not be optimized away by the compiler, and that any operation that occurs before this store, in program
// order, will not be moved after this store. In general, it is not guaranteed that the store will be
// atomic, though this is the case for most aligned scalar data types. If you need atomic loads or stores,
#elif defined(HOST_ARM64) && defined(_MSC_VER)
// silence warnings on casts in branches that are not taken.
#pragma warning(push)
-#pragma warning(disable : 4302)
#pragma warning(disable : 4311)
#pragma warning(disable : 4312)
T* pv = &val;
switch (sizeof(T))
{
case 1:
- __stlr8 ((unsigned __int8 volatile*)pt, *(unsigned __int8* )pv);
+ __stlr8 ((uint8_t volatile*)pt, *(uint8_t* )pv);
break;
case 2:
- __stlr16((unsigned __int16 volatile*)pt, *(unsigned __int16*)pv);
+ __stlr16((uint16_t volatile*)pt, *(uint16_t*)pv);
break;
case 4:
- __stlr32((unsigned __int32 volatile*)pt, *(unsigned __int32*)pv);
+ __stlr32((uint32_t volatile*)pt, *(uint32_t*)pv);
break;
case 8:
- __stlr64((unsigned __int64 volatile*)pt, *(unsigned __int64*)pv);
+ __stlr64((uint64_t volatile*)pt, *(uint64_t*)pv);
break;
default:
__dmb(_ARM64_BARRIER_ISH);
__dmb(_ARM64_BARRIER_ISHLD);
#else
VOLATILE_MEMORY_BARRIER();
-#endif
+#endif
}
//
template <typename T>
class Volatile
{
+ // To enable the DAC table to correctly handle volatile DAC-ized statics while also being computed at compile time, we need to
+ // give the dac table type access to the internal field directly to take the address of it.
+ friend struct _DacGlobals;
private:
//
// The data which we are treating as volatile
public:
//
- // Default constructor. Results in an unitialized value!
+ // Default constructor.
//
- inline Volatile()
- {
- STATIC_CONTRACT_SUPPORTS_DAC;
- }
+ inline Volatile() = default;
//
// Allow initialization of Volatile<T> from a T
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-// warningcontrol.h
-//
-// Header file to globally control the warning settings for the entire Viper build.
-// You do not need to explicitly include this file; rather, it gets included
-// on the command line with a /FI (force include) directive. This is controlled
-// in sources.vip.
-//
-// KEEP THIS LIST SORTED!
-//
-
-#if defined(_MSC_VER)
-#pragma warning(error :4007) // 'main' : must be __cdecl
-#pragma warning(error :4013) // 'function' undefined - assuming extern returning int
-#pragma warning(3 :4092) // sizeof returns 'unsigned long'
-#pragma warning(error :4102) // "'%$S' : unreferenced label"
-#pragma warning(3 :4121) // structure is sensitive to alignment
-#pragma warning(3 :4125) // decimal digit in octal sequence
-#pragma warning(3 :4130) // logical operation on address of string constant
-#pragma warning(3 :4132) // const object should be initialized
-#pragma warning(4 :4177) // pragma data_seg s/b at global scope
-#pragma warning(3 :4212) // function declaration used ellipsis
-#pragma warning(disable :4291) // delete not defined for new, c++ exception may cause leak
-#pragma warning(disable :4311) // pointer truncation from '%$S' to '%$S'
-#pragma warning(disable :4312) // '<function-style-cast>' : conversion from '%$S' to '%$S' of greater size
-#pragma warning(disable :4477) // format string '%$S' requires an argument of type '%$S', but variadic argument %d has type '%$S'
-#pragma warning(3 :4530) // C++ exception handler used, but unwind semantics are not enabled. Specify -GX
-#pragma warning(error :4551) // Function call missing argument list
-
-#pragma warning(error :4806) // unsafe operation involving type 'bool'
-
-#if defined(_DEBUG) && (!defined(_MSC_FULL_VER) || (_MSC_FULL_VER <= 181040116))
-// The CLR header file check.h, macro CHECK_MSG_EX, can create unreachable code if the LEAVE_DEBUG_ONLY_CODE
-// macro is not empty (such as it is defined in contract.h) and the _RESULT macro expands to "return".
-// Checked-in compilers used by the TFS-based desktop build (e.g., version 18.10.40116.8) started reporting
-// unreachable code warnings when debugholder.h was changed to no longer #define "return" to something relatively
-// complex. However, newer compilers, such as Visual Studio 2015, used to build the CLR from the open source
-// GitHub repo, still do not report this warning. We don't want to disable this warning for open source build,
-// which will use a newer compiler. Hence, only disable it for older compilers.
-#pragma warning(disable :4702) // unreachable code
-#endif
-
-#endif // defined(_MSC_VER)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+
//*****************************************************************************
// WinWrap.h
//
-// This file contains wrapper functions for Win32 API's that take strings.
-//
-// The Common Language Runtime internally uses UNICODE as the internal state
-// and string format. This file will undef the mapping macros so that one
-// cannot mistakingly call a method that isn't going to work. Instead, you
-// have to call the correct wrapper API.
+// This file contains wrapper functions for Win32 API's.
//
//*****************************************************************************
#ifndef __WIN_WRAP_H__
#define __WIN_WRAP_H__
-//********** Macros. **********************************************************
-#if !defined(WIN32_LEAN_AND_MEAN)
-#define WIN32_LEAN_AND_MEAN
-#endif
-
-//
-// WinCE uniformly uses cdecl calling convention on x86. __stdcall is defined as __cdecl in SDK.
-// STDCALL macro is meant to be used where we have hard dependency on __stdcall calling convention
-// - the unification with __cdecl does not apply to STDCALL.
-//
+// STDCALL macro is meant to be used where we have hard dependency on __stdcall calling convention on x86.
#define STDCALL _stdcall
//********** Includes. ********************************************************
#include <wincrypt.h>
#include <specstrings.h>
-#include "registrywrapper.h"
#include "longfilepathwrappers.h"
-#if defined(_PREFAST_) || defined(SOURCE_FORMATTING)
-//
-// For PREFAST we don't want the C_ASSERT to be expanded since it always
-// involves the comparison of two constants which causes PREfast warning 326
-//
-#undef C_ASSERT
-#define C_ASSERT(expr)
-#endif
-
#include "palclr.h"
-#if !defined(__TODO_PORT_TO_WRAPPERS__)
-//*****************************************************************************
-// Undefine all of the windows wrappers so you can't use them.
-//*****************************************************************************
-
-// winbase.h
-#undef GetBinaryType
-#undef GetShortPathName
-#undef GetEnvironmentStrings
-#undef FreeEnvironmentStrings
-#undef FormatMessage
-#undef lstrcmp
-#undef lstrcmpi
-#undef lstrcpyn
-#undef lstrlen
-#undef CreateMutex
-#undef OpenMutex
-#undef CreateEvent
-#undef OpenEvent
#undef CreateSemaphore
-#undef OpenSemaphore
-#undef CreateWaitableTimer
-#undef CreateFileMapping
-#undef OpenFileMapping
-#undef LoadLibrary
-#undef LoadLibraryEx
-#undef GetModuleFileName
-#undef GetModuleHandle
-#undef GetModuleHandleEx
-#undef CreateProcess
-#undef GetCommandLine
-#undef GetEnvironmentVariable
-#undef SetEnvironmentVariable
-#undef ExpandEnvironmentStrings
-#undef OutputDebugString
-#undef FindResource
-#undef FindResourceEx
-#undef BeginUpdateResource
-#undef UpdateResource
-#undef EndUpdateResource
-#undef GetPrivateProfileInt
-#undef GetSystemDirectory
-#undef GetTempPath
-#undef GetTempFileName
-#undef GetCurrentDirectory
-#undef GetFullPathName
-#undef CreateFile
-#undef GetFileAttributes
-#undef GetFileAttributesEx
-#undef DeleteFile
-#undef FindFirstFileEx
-#undef FindFirstFile
-#undef FindNextFile
-#undef CopyFile
-#undef CopyFileEx
-#undef MoveFile
-#undef MoveFileEx
-#undef CreateHardLink
-#undef CreateNamedPipe
-#undef WaitNamedPipe
-#undef LookupPrivilegeValue
-#undef GetVersionEx
-
-// winuser.h
-#undef MAKEINTRESOURCE
-#undef GetUserObjectInformation
-#undef GetMessage
-
-#undef SendMessage
-#undef CharLower
-#undef MessageBox
-#undef GetClassName
-#undef LoadString
-#undef GetCalendarInfo
-#undef GetDateFormat
-#undef GetTimeFormat
-#undef LCMapString
-
-#endif // !defined(__TODO_PORT_TO_WRAPPERS__)
-
-//
-// NT supports the wide entry points. So we redefine the wrappers right back
-// to the *W entry points as macros. This way no client code needs a wrapper on NT.
-//
-
-// winbase.h
-#define WszFormatMessage FormatMessageW
-#define Wszlstrcmp lstrcmpW
-#define Wszlstrcmpi lstrcmpiW
-#define WszCreateMutex CreateMutexW
-#define WszOpenMutex OpenMutexW
#define WszCreateEvent CreateEventW
#define WszOpenEvent OpenEventW
-#define WszCreateWaitableTimer CreateWaitableTimerW
#define WszCreateFileMapping CreateFileMappingW
-#define WszOpenFileMapping OpenFileMappingW
-#define WszGetModuleHandle GetModuleHandleW
-#define WszGetModuleHandleEx GetModuleHandleExW
-#define WszGetCommandLine GetCommandLineW
-#define WszSetEnvironmentVariable SetEnvironmentVariableW
-#define WszExpandEnvironmentStrings ExpandEnvironmentStringsW
-#define WszOutputDebugString OutputDebugStringW
-#define WszFindResource FindResourceW
-#define WszFindResourceEx FindResourceExW
-#define WszBeginUpdateResource BeginUpdateResourceW
-#define WszUpdateResource UpdateResourceW
-#define WszEndUpdateResource EndUpdateResourceW
-#define WszGetPrivateProfileInt GetPrivateProfileIntW
-#define WszGetSystemDirectory GetSystemDirectoryW
-#define WszCreateNamedPipe CreateNamedPipeW
-#define WszWaitNamedPipe WaitNamedPipeW
-#define WszLookupPrivilegeValue LookupPrivilegeValueW
-
-// winuser.h
-#define WszMAKEINTRESOURCE MAKEINTRESOURCEW
-#define WszGetUserObjectInformation GetUserObjectInformationW
-#define WszGetMessage GetMessageW
-#define WszSendMessage SendMessageW
-#define WszCharLower CharLowerW
-#define WszMessageBox LateboundMessageBoxW
-#define WszGetClassName GetClassNameW
-#define WszLoadString LoadStringW
-#define WszRegOpenKeyEx ClrRegOpenKeyEx
-#define WszRegOpenKey(hKey, wszSubKey, phkRes) ClrRegOpenKeyEx(hKey, wszSubKey, 0, KEY_ALL_ACCESS, phkRes)
-#define WszRegQueryValue RegQueryValueW
-#define WszRegQueryValueEx RegQueryValueExW
-#define WszRegQueryValueExTrue RegQueryValueExW
-#define WszRegQueryStringValueEx RegQueryValueExW
-
-#define WszRegQueryInfoKey RegQueryInfoKeyW
-#define WszRegEnumValue RegEnumValueW
-#define WszRegEnumKeyEx RegEnumKeyExW
-#define WszGetCalendarInfo GetCalendarInfoW
-#define WszGetDateFormat GetDateFormatW
-#define WszGetTimeFormat GetTimeFormatW
-#define WszLCMapString LCMapStringW
-#define WszMultiByteToWideChar MultiByteToWideChar
-#define WszWideCharToMultiByte WideCharToMultiByte
-#define WszCreateSemaphore(_secattr, _count, _maxcount, _name) CreateSemaphoreExW((_secattr), (_count), (_maxcount), (_name), 0, MAXIMUM_ALLOWED | SYNCHRONIZE | SEMAPHORE_MODIFY_STATE)
+#define CreateSemaphore(_secattr, _count, _maxcount, _name) CreateSemaphoreExW((_secattr), (_count), (_maxcount), (_name), 0, MAXIMUM_ALLOWED | SYNCHRONIZE | SEMAPHORE_MODIFY_STATE)
#undef GetFileVersionInfo
#define GetFileVersionInfo(_filename, _handle, _len, _data) GetFileVersionInfoEx(0, (_filename), (_handle), (_len), (_data))
//File and Directory Functions which need special handling for LongFile Names
//Note only the functions which are currently used are defined
+#ifdef HOST_WINDOWS
#define WszLoadLibrary LoadLibraryExWrapper
-#define WszLoadLibraryEx LoadLibraryExWrapper
#define WszCreateFile CreateFileWrapper
-#define WszGetFileAttributes GetFileAttributesWrapper
#define WszGetFileAttributesEx GetFileAttributesExWrapper
-#define WszDeleteFile DeleteFileWrapper
-#define WszFindFirstFileEx FindFirstFileExWrapper
-#define WszFindNextFile FindNextFileW
-#define WszMoveFileEx MoveFileExWrapper
-
-//Can not use extended syntax
-#define WszGetFullPathName GetFullPathNameW
-
-//Long Files will not work on these till redstone
-#define WszGetCurrentDirectory GetCurrentDirectoryWrapper
-#define WszGetTempFileName GetTempFileNameWrapper
-#define WszGetTempPath GetTempPathWrapper
+#else // HOST_WINDOWS
+#define WszLoadLibrary LoadLibraryExW
+#define WszCreateFile CreateFileW
+#define WszGetFileAttributesEx GetFileAttributesExW
+#endif // HOST_WINDOWS
//APIS which have a buffer as an out parameter
#define WszGetEnvironmentVariable GetEnvironmentVariableWrapper
#define WszSearchPath SearchPathWrapper
#define WszGetModuleFileName GetModuleFileNameWrapper
-//NOTE: IF the following API's are enabled ensure that they can work with LongFile Names
-//See the usage and implementation of above API's
-//
-//#define WszGetBinaryType GetBinaryTypeWrapper //Coresys does not seem to have this API
-
-#if HOST_UNIX
-#define WszFindFirstFile FindFirstFileW
+#ifdef HOST_WINDOWS
+DWORD GetMaxDBCSCharByteSize();
#else
-#define WszFindFirstFile(_lpFileName_, _lpFindData_) FindFirstFileExWrapper(_lpFileName_, FindExInfoStandard, _lpFindData_, FindExSearchNameMatch, NULL, 0)
-#endif // HOST_UNIX
-//*****************************************************************************
-// Prototypes for API's.
-//*****************************************************************************
-
-extern DWORD g_dwMaxDBCSCharByteSize;
-
-void EnsureCharSetInfoInitialized();
-
-inline DWORD GetMaxDBCSCharByteSize()
-{
- // contract.h not visible here
- __annotation(W("WRAPPER ") W("GetMaxDBCSCharByteSize"));
-#ifndef HOST_UNIX
- EnsureCharSetInfoInitialized();
-
- _ASSERTE(g_dwMaxDBCSCharByteSize != 0);
- return (g_dwMaxDBCSCharByteSize);
-#else // HOST_UNIX
- return 3;
-#endif // HOST_UNIX
-}
-
-#ifndef Wsz_mbstowcs
-#define Wsz_mbstowcs(szOut, szIn, iSize) WszMultiByteToWideChar(CP_ACP, 0, szIn, -1, szOut, iSize)
-#endif
-
-#ifndef Wsz_wcstombs
-#define Wsz_wcstombs(szOut, szIn, iSize) WszWideCharToMultiByte(CP_ACP, 0, szIn, -1, szOut, iSize, 0, 0)
+#define GetMaxDBCSCharByteSize() 3 // UTF8
#endif
-// For all platforms:
-
BOOL
WszCreateProcess(
LPCWSTR lpApplicationName,
LPPROCESS_INFORMATION lpProcessInformation
);
-#if defined(HOST_X86) && defined(_MSC_VER)
-
-//
-// Windows SDK does not use intrinsics on x86. Redefine the interlocked operations to use intrinsics.
-//
-
-#include "intrin.h"
-
-#define InterlockedIncrement _InterlockedIncrement
-#define InterlockedDecrement _InterlockedDecrement
-#define InterlockedExchange _InterlockedExchange
-#define InterlockedCompareExchange _InterlockedCompareExchange
-#define InterlockedExchangeAdd _InterlockedExchangeAdd
-#define InterlockedCompareExchange64 _InterlockedCompareExchange64
-#define InterlockedAnd _InterlockedAnd
-#define InterlockedOr _InterlockedOr
-
-//
-// There is no _InterlockedCompareExchangePointer intrinsic in VC++ for x86.
-// winbase.h #defines InterlockedCompareExchangePointer as __InlineInterlockedCompareExchangePointer,
-// which calls the Win32 InterlockedCompareExchange, not the intrinsic _InterlockedCompareExchange.
-// We want the intrinsic, so we #undef the Windows version of this API, and define our own.
-//
-#ifdef InterlockedCompareExchangePointer
-#undef InterlockedCompareExchangePointer
-#endif
-
-FORCEINLINE
-PVOID
-InterlockedCompareExchangePointer (
- __inout PVOID volatile *Destination,
- _In_opt_ PVOID ExChange,
- _In_opt_ PVOID Comperand
- )
-{
- return((PVOID)(LONG_PTR)_InterlockedCompareExchange((LONG volatile *)Destination, (LONG)(LONG_PTR)ExChange, (LONG)(LONG_PTR)Comperand));
-}
-
-#endif // HOST_X86 && _MSC_VER
-
-#if defined(HOST_X86) & !defined(InterlockedIncrement64)
-
-// Interlockedxxx64 that do not have intrinsics are only supported on Windows Server 2003
-// or higher for X86 so define our own portable implementation
-
-#undef InterlockedIncrement64
-#define InterlockedIncrement64 __InterlockedIncrement64
-#undef InterlockedDecrement64
-#define InterlockedDecrement64 __InterlockedDecrement64
-#undef InterlockedExchange64
-#define InterlockedExchange64 __InterlockedExchange64
-#undef InterlockedExchangeAdd64
-#define InterlockedExchangeAdd64 __InterlockedExchangeAdd64
-
-__forceinline LONGLONG __InterlockedIncrement64(LONGLONG volatile *Addend)
-{
- LONGLONG Old;
-
- do {
- Old = *Addend;
- } while (InterlockedCompareExchange64(Addend,
- Old + 1,
- Old) != Old);
-
- return Old + 1;
-}
-
-__forceinline LONGLONG __InterlockedDecrement64(LONGLONG volatile *Addend)
-{
- LONGLONG Old;
-
- do {
- Old = *Addend;
- } while (InterlockedCompareExchange64(Addend,
- Old - 1,
- Old) != Old);
-
- return Old - 1;
-}
-
-__forceinline LONGLONG __InterlockedExchange64(LONGLONG volatile * Target, LONGLONG Value)
-{
- LONGLONG Old;
-
- do {
- Old = *Target;
- } while (InterlockedCompareExchange64(Target,
- Value,
- Old) != Old);
-
- return Old;
-}
-
-__forceinline LONGLONG __InterlockedExchangeAdd64(LONGLONG volatile * Addend, LONGLONG Value)
-{
- LONGLONG Old;
-
- do {
- Old = *Addend;
- } while (InterlockedCompareExchange64(Addend,
- Old + Value,
- Old) != Old);
-
- return Old;
-}
-
-#endif // HOST_X86
-
-// Output printf-style formatted text to the debugger if it's present or stdout otherwise.
-inline void DbgWPrintf(const LPCWSTR wszFormat, ...)
-{
- WCHAR wszBuffer[4096];
-
- va_list args;
- va_start(args, wszFormat);
-
- _vsnwprintf_s(wszBuffer, sizeof(wszBuffer) / sizeof(WCHAR), _TRUNCATE, wszFormat, args);
-
- va_end(args);
-
- if (IsDebuggerPresent())
- {
- OutputDebugStringW(wszBuffer);
- }
- else
- {
- fwprintf(stdout, W("%s"), wszBuffer);
- fflush(stdout);
- }
-}
-
-typedef int (*MessageBoxWFnPtr)(HWND hWnd,
- LPCWSTR lpText,
- LPCWSTR lpCaption,
- UINT uType);
-
-inline int LateboundMessageBoxW(HWND hWnd,
- LPCWSTR lpText,
- LPCWSTR lpCaption,
- UINT uType)
-{
-#ifndef HOST_UNIX
- // User32 should exist on all systems where displaying a message box makes sense.
- HMODULE hGuiExtModule = WszLoadLibrary(W("user32"));
- if (hGuiExtModule)
- {
- int result = IDCANCEL;
- MessageBoxWFnPtr fnptr = (MessageBoxWFnPtr)GetProcAddress(hGuiExtModule, "MessageBoxW");
- if (fnptr)
- result = fnptr(hWnd, lpText, lpCaption, uType);
-
- FreeLibrary(hGuiExtModule);
- return result;
- }
-#endif // !HOST_UNIX
-
- // No luck. Output the caption and text to the debugger if present or stdout otherwise.
- if (lpText == NULL)
- lpText = W("<null>");
- if (lpCaption == NULL)
- lpCaption = W("<null>");
- DbgWPrintf(W("**** MessageBox invoked, title '%s' ****\n"), lpCaption);
- DbgWPrintf(W(" %s\n"), lpText);
- DbgWPrintf(W("********\n"));
- DbgWPrintf(W("\n"));
-
- // Indicate to the caller that message box was not actually displayed
- SetLastError(ERROR_NOT_SUPPORTED);
- return 0;
-}
-
-inline int LateboundMessageBoxA(HWND hWnd,
- LPCSTR lpText,
- LPCSTR lpCaption,
- UINT uType)
-{
- if (lpText == NULL)
- lpText = "<null>";
- if (lpCaption == NULL)
- lpCaption = "<null>";
-
- SIZE_T cchText = strlen(lpText) + 1;
- LPWSTR wszText = (LPWSTR)_alloca(cchText * sizeof(WCHAR));
- swprintf_s(wszText, cchText, W("%S"), lpText);
-
- SIZE_T cchCaption = strlen(lpCaption) + 1;
- LPWSTR wszCaption = (LPWSTR)_alloca(cchCaption * sizeof(WCHAR));
- swprintf_s(wszCaption, cchCaption, W("%S"), lpCaption);
-
- return LateboundMessageBoxW(hWnd, wszText, wszCaption, uType);
-}
-
-#define MessageBoxW LateboundMessageBoxW
-#define MessageBoxA LateboundMessageBoxA
-
#endif // __WIN_WRAP_H__
/*
* Return an argument by (0-based) index.
- * The name parameter is filled in if name information is availble.
+ * The name parameter is filled in if name information is available.
*/
HRESULT GetArgumentByIndex([in] ULONG32 index,
[out] IXCLRDataValue** arg,
/*
* Return a local variable by (0-based) index.
- * The name parameter is filled in if name information is availble.
+ * The name parameter is filled in if name information is available.
*/
HRESULT GetLocalVariableByIndex([in] ULONG32 index,
[out] IXCLRDataValue** localVariable,
} CLRDataExceptionSameFlag;
#pragma warning(push)
-#pragma warning(disable:28718) /* suppress warning 28718 for inteface IXCLRDataExceptionState */
+#pragma warning(disable:28718) /* suppress warning 28718 for interface IXCLRDataExceptionState */
[
object,
local,
#pragma once
-// Undefine YieldProcessor to encourage using the normalized versions below instead. System_YieldProcessor() can be used where
-// the intention is to use the system-default implementation of YieldProcessor().
-#define HAS_SYSTEM_YIELDPROCESSOR
+#ifdef FEATURE_NATIVEAOT
+FORCEINLINE void System_YieldProcessor() { PalYieldProcessor(); }
+#else
FORCEINLINE void System_YieldProcessor() { YieldProcessor(); }
-#ifdef YieldProcessor
-#undef YieldProcessor
#endif
-#define YieldProcessor Dont_Use_YieldProcessor
#define DISABLE_COPY(T) \
T(const T &) = delete; \
{
_ASSERTE(count != 0);
- if (sizeof(SIZE_T) <= sizeof(unsigned int))
+ if (sizeof(size_t) <= sizeof(unsigned int))
{
- // On platforms with a small SIZE_T, prevent overflow on the multiply below
+ // On platforms with a small size_t, prevent overflow on the multiply below
const unsigned int MaxCount = UINT_MAX / YieldProcessorNormalization::MaxYieldsPerNormalizedYield;
if (count > MaxCount)
{
}
}
- SIZE_T n = (SIZE_T)count * normalizationInfo.yieldsPerNormalizedYield;
+ size_t n = (size_t)count * normalizationInfo.yieldsPerNormalizedYield;
_ASSERTE(n != 0);
do
{
{
_ASSERTE(preSkylakeCount != 0);
- if (sizeof(SIZE_T) <= sizeof(unsigned int))
+ if (sizeof(size_t) <= sizeof(unsigned int))
{
- // On platforms with a small SIZE_T, prevent overflow on the multiply below
+ // On platforms with a small size_t, prevent overflow on the multiply below
const unsigned int MaxCount = UINT_MAX / YieldProcessorNormalization::MaxYieldsPerNormalizedYield;
if (preSkylakeCount > MaxCount)
{
}
const unsigned int PreSkylakeCountToSkylakeCountDivisor = 8;
- SIZE_T n = (SIZE_T)preSkylakeCount * normalizationInfo.yieldsPerNormalizedYield / PreSkylakeCountToSkylakeCountDivisor;
+ size_t n = (size_t)preSkylakeCount * normalizationInfo.yieldsPerNormalizedYield / PreSkylakeCountToSkylakeCountDivisor;
if (n == 0)
{
n = 1;
_ASSERTE(preSkylakeCount != 0);
- if (sizeof(SIZE_T) <= sizeof(unsigned int))
+ if (sizeof(size_t) <= sizeof(unsigned int))
{
- // On platforms with a small SIZE_T, prevent overflow on the multiply below
+ // On platforms with a small size_t, prevent overflow on the multiply below
const unsigned int MaxCount = UINT_MAX / YieldProcessorNormalization::MaxYieldsPerNormalizedYield;
if (preSkylakeCount > MaxCount)
{
}
const unsigned int PreSkylakeCountToSkylakeCountDivisor = 8;
- SIZE_T n =
- (SIZE_T)preSkylakeCount *
+ size_t n =
+ (size_t)preSkylakeCount *
YieldProcessorNormalization::s_yieldsPerNormalizedYield /
PreSkylakeCountToSkylakeCountDivisor;
if (n == 0)
unsigned int spinIteration)
{
// This shift value should be adjusted based on the asserted conditions below
- const UINT8 MaxShift = 3;
- static_assert_no_msg(
- ((unsigned int)1 << MaxShift) <= YieldProcessorNormalization::MaxOptimalMaxNormalizedYieldsPerSpinIteration);
- static_assert_no_msg(
- ((unsigned int)1 << (MaxShift + 1)) > YieldProcessorNormalization::MaxOptimalMaxNormalizedYieldsPerSpinIteration);
+ const uint8_t MaxShift = 3;
+ static_assert(
+ ((unsigned int)1 << MaxShift) <= YieldProcessorNormalization::MaxOptimalMaxNormalizedYieldsPerSpinIteration, "");
+ static_assert(
+ ((unsigned int)1 << (MaxShift + 1)) > YieldProcessorNormalization::MaxOptimalMaxNormalizedYieldsPerSpinIteration, "");
unsigned int n;
if (spinIteration <= MaxShift &&
--- /dev/null
+include_directories(.)
+include_directories(${CLR_SRC_NATIVE_DIR})
+if (CLR_CMAKE_HOST_UNIX)
+ add_subdirectory(Unix)
+else (CLR_CMAKE_HOST_UNIX)
+ add_subdirectory(Windows)
+endif (CLR_CMAKE_HOST_UNIX)
+
--- /dev/null
+set(SOURCES
+ dn-u16.cpp
+ ${CLR_SRC_NATIVE_DIR}/minipal/time.c
+)
+
+if(NOT CLR_CROSS_COMPONENTS_BUILD)
+ list(APPEND SOURCES
+ ${CLR_SRC_NATIVE_DIR}/minipal/cpufeatures.c
+ )
+endif()
+
+add_library(coreclrminipal
+ STATIC
+ ${SOURCES}
+)
+
+include(${CLR_SRC_NATIVE_DIR}/minipal/configure.cmake)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+typedef char16_t WCHAR;
+
+#include <dn-u16.h>
+#include <string.h>
+
+size_t u16_strlen(const WCHAR* str)
+{
+ size_t nChar = 0;
+ while (*str++)
+ nChar++;
+ return nChar;
+}
+
+int u16_strcmp(const WCHAR* str1, const WCHAR* str2)
+{
+ return u16_strncmp(str1, str2, 0x7fffffff);
+}
+
+int u16_strncmp(const WCHAR* str1, const WCHAR* str2, size_t count)
+{
+ int diff = 0;
+ for (size_t i = 0; i < count; i++)
+ {
+ diff = str1[i] - str2[i];
+ if (diff != 0)
+ break;
+
+ // stop if we reach the end of the string
+ if(str1[i] == (WCHAR)'\0')
+ break;
+ }
+ return diff;
+}
+
+WCHAR* u16_strcat_s(WCHAR* dst, size_t dstLen, const WCHAR* src)
+{
+ if (dst == nullptr || src == nullptr)
+ {
+ return nullptr;
+ }
+
+ WCHAR* start = dst;
+ WCHAR* end = dst + dstLen;
+
+ // find end of source string
+ while (*dst)
+ {
+ dst++;
+ if (dst >= end)
+ return nullptr;
+ }
+
+ // concatenate new string
+ size_t srcLength = u16_strlen(src);
+ size_t loopCount = 0;
+ while (*src && loopCount < srcLength)
+ {
+ *dst++ = *src++;
+ if (dst >= end)
+ return nullptr;
+ loopCount++;
+ }
+
+ // add terminating null
+ *dst = (WCHAR)'\0';
+ return start;
+}
+
+WCHAR* u16_strcpy_s(WCHAR* dst, size_t dstLen, const WCHAR* src)
+{
+ if (dst == nullptr || src == nullptr)
+ {
+ return nullptr;
+ }
+
+ WCHAR* start = dst;
+ WCHAR* end = dst + dstLen;
+
+ // copy source string to destination string
+ while (*src)
+ {
+ *dst++ = *src++;
+ if (dst >= end)
+ return nullptr;
+ }
+
+ // add terminating null
+ *dst = (WCHAR)'\0';
+ return start;
+}
+
+WCHAR* u16_strncpy_s(WCHAR* dst, size_t dstLen, const WCHAR* src, size_t count)
+{
+ ::memset(dst, 0, dstLen * sizeof(WCHAR));
+
+ size_t srcLength = u16_strlen(src);
+ size_t length = (count < srcLength) ? count : srcLength;
+ if (length > dstLen)
+ return nullptr;
+
+ ::memcpy(dst, src, length * sizeof(WCHAR));
+ return dst;
+}
+
+const WCHAR* u16_strstr(const WCHAR *str, const WCHAR *strCharSet)
+{
+ if (str == nullptr || strCharSet == nullptr)
+ {
+ return nullptr;
+ }
+
+ // No characters to examine
+ if (u16_strlen(strCharSet) == 0)
+ return str;
+
+ const WCHAR* ret = nullptr;
+ int i;
+ while (*str != (WCHAR)'\0')
+ {
+ i = 0;
+ while (true)
+ {
+ if (*(strCharSet + i) == (WCHAR)'\0')
+ {
+ ret = str;
+ goto LEAVE;
+ }
+ else if (*(str + i) == (WCHAR)'\0')
+ {
+ ret = nullptr;
+ goto LEAVE;
+ }
+ else if (*(str + i) != *(strCharSet + i))
+ {
+ break;
+ }
+ i++;
+ }
+ str++;
+ }
+ LEAVE:
+ return ret;
+}
+
+const WCHAR* u16_strchr(const WCHAR* str, WCHAR ch)
+{
+ while (*str)
+ {
+ if (*str == ch)
+ return str;
+ str++;
+ }
+
+ // Check if the comparand was \000
+ if (*str == ch)
+ return str;
+
+ return nullptr;
+}
+
+const WCHAR* u16_strrchr(const WCHAR* str, WCHAR ch)
+{
+ const WCHAR* last = nullptr;
+ while (*str)
+ {
+ if (*str == ch)
+ last = str;
+ str++;
+ }
+
+ return last;
+}
+
+// Forward declare PAL function
+extern "C" uint32_t PAL_wcstoul(const WCHAR* nptr, WCHAR** endptr, int base);
+extern "C" uint64_t PAL__wcstoui64(const WCHAR* nptr, WCHAR** endptr, int base);
+extern "C" double PAL_wcstod(const WCHAR* nptr, WCHAR** endptr);
+
+uint32_t u16_strtoul(const WCHAR* nptr, WCHAR** endptr, int base)
+{
+ return PAL_wcstoul(nptr, endptr, base);
+}
+
+uint64_t u16_strtoui64(const WCHAR* nptr, WCHAR** endptr, int base)
+{
+ return PAL__wcstoui64(nptr, endptr, base);
+}
+
+double u16_strtod(const WCHAR* nptr, WCHAR** endptr)
+{
+ return PAL_wcstod(nptr, endptr);
+}
\ No newline at end of file
--- /dev/null
+set(SOURCES
+ dn-u16.cpp
+ ${CLR_SRC_NATIVE_DIR}/minipal/utf8.c
+ ${CLR_SRC_NATIVE_DIR}/minipal/time.c
+)
+
+if(NOT CLR_CROSS_COMPONENTS_BUILD)
+ list(APPEND SOURCES
+ ${CLR_SRC_NATIVE_DIR}/minipal/cpufeatures.c
+ )
+endif()
+
+add_library(coreclrminipal
+ STATIC
+ ${SOURCES}
+)
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#include <Windows.h>
+#include <wchar.h>
+
+#include <dn-u16.h>
+
+size_t u16_strlen(const WCHAR* str)
+{
+ return ::wcslen(str);
+}
+
+int u16_strcmp(const WCHAR* str1, const WCHAR* str2)
+{
+ return ::wcscmp(str1, str2);
+}
+
+int u16_strncmp(const WCHAR* str1, const WCHAR* str2, size_t count)
+{
+ return ::wcsncmp(str1, str2, count);
+}
+
+WCHAR* u16_strcpy_s(WCHAR* dst, size_t dstLen, const WCHAR* src)
+{
+ if (0 != ::wcscpy_s(dst, dstLen, src))
+ return nullptr;
+ return dst;
+}
+
+WCHAR* u16_strcat_s(WCHAR* dst, size_t dstLen, const WCHAR* src)
+{
+ if (0 != ::wcscat_s(dst, dstLen, src))
+ return nullptr;
+ return dst;
+}
+
+WCHAR* u16_strncpy_s(WCHAR* dst, size_t dstLen, const WCHAR* src, size_t count)
+{
+ if (0 != ::wcsncpy_s(dst, dstLen, src, count))
+ return nullptr;
+ return dst;
+}
+
+const WCHAR* u16_strstr(const WCHAR *str, const WCHAR *strCharSet)
+{
+ return ::wcsstr(str, strCharSet);
+}
+
+const WCHAR* u16_strchr(const WCHAR* str, WCHAR ch)
+{
+ return ::wcschr(str, ch);
+}
+
+const WCHAR* u16_strrchr(const WCHAR* str, WCHAR ch)
+{
+ return ::wcsrchr(str, ch);
+}
+
+uint32_t u16_strtoul(const WCHAR* nptr, WCHAR** endptr, int base)
+{
+ return ::wcstoul(nptr, endptr, base);
+}
+
+uint64_t u16_strtoui64(const WCHAR* nptr, WCHAR** endptr, int base)
+{
+ return ::_wcstoui64(nptr, endptr, base);
+}
+
+double u16_strtod(const WCHAR* nptr, WCHAR** endptr)
+{
+ return ::wcstod(nptr, endptr);
+}
\ No newline at end of file
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#include <stddef.h>
+#include <stdint.h>
+
+//
+// Wide character (UTF-16) abstraction layer.
+//
+
+size_t u16_strlen(const WCHAR* str);
+int u16_strcmp(const WCHAR* str1, const WCHAR* str2);
+int u16_strncmp(const WCHAR* str1, const WCHAR* str2, size_t count);
+WCHAR* u16_strcat_s(WCHAR* dst, size_t dstLen, const WCHAR* src);
+WCHAR* u16_strcpy_s(WCHAR* dst, size_t dstLen, const WCHAR* src);
+WCHAR* u16_strncpy_s(WCHAR* dst, size_t dstLen, const WCHAR* src, size_t count);
+const WCHAR* u16_strstr(const WCHAR* str, const WCHAR* strCharSet);
+const WCHAR* u16_strchr(const WCHAR* str, WCHAR ch);
+const WCHAR* u16_strrchr(const WCHAR* str, WCHAR ch);
+uint32_t u16_strtoul(const WCHAR* nptr, WCHAR** endptr, int base);
+uint64_t u16_strtoui64(const WCHAR* nptr, WCHAR** endptr, int base);
+double u16_strtod(const WCHAR* nptr, WCHAR** endptr);
\ No newline at end of file
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#ifndef HAVE_MINIPAL_GETEXEPATH_H
-#define HAVE_MINIPAL_GETEXEPATH_H
-
-#include <errno.h>
-#include <limits.h>
-#include <stdlib.h>
-
-#if defined(__APPLE__)
-#include <mach-o/dyld.h>
-#elif defined(__FreeBSD__)
-#include <string.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/sysctl.h>
-#elif defined(_WIN32)
-#include <windows.h>
-#elif HAVE_GETAUXVAL
-#include <sys/auxv.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// Returns the full path to the executable for the current process, resolving symbolic links.
-// The caller is responsible for releasing the buffer. Returns null on error.
-static inline char* minipal_getexepath(void)
-{
-#if defined(__APPLE__)
- uint32_t path_length = 0;
- if (_NSGetExecutablePath(NULL, &path_length) != -1)
- {
- errno = EINVAL;
- return NULL;
- }
-
- char* path_buf = (char*)alloca(path_length);
- if (_NSGetExecutablePath(path_buf, &path_length) != 0)
- {
- errno = EINVAL;
- return NULL;
- }
-
- return realpath(path_buf, NULL);
-#elif defined(__FreeBSD__)
- static const int name[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
- char path[PATH_MAX];
- size_t len = sizeof(path);
- if (sysctl(name, 4, path, &len, NULL, 0) != 0)
- {
- return NULL;
- }
-
- return strdup(path);
-#elif defined(__sun)
- const char* path = getexecname();
- if (path == NULL)
- {
- return NULL;
- }
-
- return realpath(path, NULL);
-#elif defined(_WIN32)
- char path[MAX_PATH];
- if (GetModuleFileNameA(NULL, path, MAX_PATH) == 0)
- {
- return NULL;
- }
-
- return _strdup(path);
-#elif defined(TARGET_WASM)
- // This is a packaging convention that our tooling should enforce.
- return strdup("/managed");
-#else
-#if HAVE_GETAUXVAL && defined(AT_EXECFN)
- const char* path = (const char *)(getauxval(AT_EXECFN));
- if (path && !errno)
- {
- return realpath(path, NULL);
- }
-#endif // HAVE_GETAUXVAL && defined(AT_EXECFN)
-#ifdef __linux__
- const char* symlinkEntrypointExecutable = "/proc/self/exe";
-#else
- const char* symlinkEntrypointExecutable = "/proc/curproc/exe";
-#endif
-
- // Resolve the symlink to the executable from /proc
- return realpath(symlinkEntrypointExecutable, NULL);
-#endif // defined(__APPLE__)
-}
-
-#ifdef __cplusplus
-}
-#endif // extern "C"
-
-#endif // HAVE_MINIPAL_GETEXEPATH_H
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//
+#include <stddef.h>
+
+// Interface between the runtime and platform specific functionality
+class VMToOSInterface
+{
+private:
+ ~VMToOSInterface() {}
+public:
+ // Create double mapped memory mapper
+ // Parameters:
+ // pHandle - receives handle of the double mapped memory mapper
+ // pMaxExecutableCodeSize - receives the maximum executable memory size it can map
+ // Return:
+ // true if it succeeded, false if it failed
+ static bool CreateDoubleMemoryMapper(void **pHandle, size_t *pMaxExecutableCodeSize);
+
+ // Destroy the double mapped memory mapper represented by the passed in handle
+ // Parameters:
+ // mapperHandle - handle of the double mapped memory mapper to destroy
+ static void DestroyDoubleMemoryMapper(void *mapperHandle);
+
+ // Reserve a block of memory that can be double mapped.
+ // Parameters:
+ // mapperHandle - handle of the double mapped memory mapper to use
+ // offset - offset in the underlying shared memory
+ // size - size of the block to reserve
+ // rangeStart
+ // rangeEnd - Requests reserving virtual memory in the specified range.
+ // Setting both rangeStart and rangeEnd to 0 means that the
+ // requested range is not limited.
+ // When a specific range is requested, it is obligatory.
+ // Return:
+ // starting virtual address of the reserved memory or NULL if it failed
+ static void* ReserveDoubleMappedMemory(void *mapperHandle, size_t offset, size_t size, const void *rangeStart, const void* rangeEnd);
+
+ // Commit a block of memory in the range previously reserved by the ReserveDoubleMappedMemory
+ // Parameters:
+ // pStart - start address of the virtual address range to commit
+ // size - size of the memory block to commit
+ // isExecutable - true means that the mapping should be RX, false means RW
+ // Return:
+ // Committed range start
+ static void* CommitDoubleMappedMemory(void* pStart, size_t size, bool isExecutable);
+
+ // Release a block of virtual memory previously committed by the CommitDoubleMappedMemory
+ // Parameters:
+ // mapperHandle - handle of the double mapped memory mapper to use
+ // pStart - start address of the virtual address range to release. It must be one
+ // that was previously returned by the CommitDoubleMappedMemory
+ // offset - offset in the underlying shared memory
+ // size - size of the memory block to release
+ // Return:
+ // true if it succeeded, false if it failed
+ static bool ReleaseDoubleMappedMemory(void *mapperHandle, void* pStart, size_t offset, size_t size);
+
+ // Get a RW mapping for the RX block specified by the arguments
+ // Parameters:
+ // mapperHandle - handle of the double mapped memory mapper to use
+ // pStart - start address of the RX virtual address range.
+ // offset - offset in the underlying shared memory
+ // size - size of the memory block to map as RW
+ // Return:
+ // Starting virtual address of the RW mapping.
+ static void* GetRWMapping(void *mapperHandle, void* pStart, size_t offset, size_t size);
+
+ // Release RW mapping of the block specified by the arguments
+ // Parameters:
+ // pStart - Start address of the RW virtual address range. It must be an address
+ // previously returned by the GetRWMapping.
+ // size - Size of the memory block to release. It must be the size previously
+ // passed to the GetRWMapping that returned the pStart.
+ // Return:
+ // true if it succeeded, false if it failed
+ static bool ReleaseRWMapping(void* pStart, size_t size);
+};
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#ifndef HAVE_MINIPAL_UTILS_H
-#define HAVE_MINIPAL_UTILS_H
-
-#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))
-
-// Number of characters in a string literal. Excludes terminating NULL.
-#define STRING_LENGTH(str) (ARRAY_SIZE(str) - 1)
-
-#endif // HAVE_MINIPAL_UTILS_H
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+#include "utils.h"
+
+// Use a typedef here as __declspec + pointer return type causes a parse error in MSVC
+typedef const char* charptr_t;
+extern "C" charptr_t SANITIZER_CALLBACK_CALLCONV __asan_default_options() {
+ // symbolize=1 to get symbolized stack traces
+ // use_sigaltstack=0 as coreclr uses own alternate stack for signal handlers
+ // detect_leaks=0 as coreclr intentionally doesn't clean up all memory on exit
+ // handle_segv=0 as coreclr has it causes AddressSanitizer to crash the process even when in
+ // the middle of a block that is allowed to AV and can recover from AVs.
+ // (see the AVInRuntimeImplOkayHolder mechanism in CoreCLR for an example)
+ // allocator_may_return_null=1 as .NET handles this gracefully by throwing an OutOfMemoryException.
+ return "symbolize=1 use_sigaltstack=0 detect_leaks=0 handle_segv=0 allocator_may_return_null=1";
+}
+
+extern "C" void SANITIZER_CALLBACK_CALLCONV __asan_on_error() {
+}
--- /dev/null
+include(CheckFunctionExists)
+include(CheckIncludeFiles)
+include(CheckSymbolExists)
+
+check_include_files("sys/auxv.h;asm/hwcap.h" HAVE_AUXV_HWCAP_H)
+check_function_exists(sysctlbyname HAVE_SYSCTLBYNAME)
+
+check_symbol_exists(arc4random_buf "stdlib.h" HAVE_ARC4RANDOM_BUF)
+check_symbol_exists(O_CLOEXEC fcntl.h HAVE_O_CLOEXEC)
+
+check_symbol_exists(
+ clock_gettime_nsec_np
+ time.h
+ HAVE_CLOCK_GETTIME_NSEC_NP)
+
+configure_file(${CMAKE_CURRENT_LIST_DIR}/minipalconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/minipalconfig.h)
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#include <stdint.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include "cpufeatures.h"
+#include "cpuid.h"
+
+#if HOST_WINDOWS
+
+#include <Windows.h>
+
+#ifndef PF_ARM_SVE_INSTRUCTIONS_AVAILABLE
+#define PF_ARM_SVE_INSTRUCTIONS_AVAILABLE (46)
+#endif
+
+#else // HOST_WINDOWS
+
+#include "minipalconfig.h"
+
+#if HAVE_AUXV_HWCAP_H
+
+#include <sys/auxv.h>
+#include <asm/hwcap.h>
+
+// Light-up for hardware capabilities that are not present in older headers used by the portable build.
+#ifndef HWCAP_ASIMDRDM
+#define HWCAP_ASIMDRDM (1 << 12)
+#endif
+#ifndef HWCAP_LRCPC
+#define HWCAP_LRCPC (1 << 15)
+#endif
+#ifndef HWCAP_ILRCPC
+#define HWCAP_ILRCPC (1 << 26)
+#endif
+#ifndef HWCAP_ASIMDDP
+#define HWCAP_ASIMDDP (1 << 20)
+#endif
+#ifndef HWCAP_SVE
+#define HWCAP_SVE (1 << 22)
+#endif
+
+#endif
+
+#if HAVE_SYSCTLBYNAME
+#include <sys/sysctl.h>
+#endif
+
+#endif // !HOST_WINDOWS
+
+#if defined(HOST_UNIX)
+#if defined(HOST_X86) || defined(HOST_AMD64)
+
+static uint32_t xmmYmmStateSupport()
+{
+ uint32_t eax;
+ __asm(" xgetbv\n" \
+ : "=a"(eax) /*output in eax*/\
+ : "c"(0) /*inputs - 0 in ecx*/\
+ : "edx" /* registers that are clobbered*/
+ );
+ // check OS has enabled both XMM and YMM state support
+ return ((eax & 0x06) == 0x06) ? 1 : 0;
+}
+
+#ifndef XSTATE_MASK_AVX512
+#define XSTATE_MASK_AVX512 (0xE0) /* 0b1110_0000 */
+#endif // XSTATE_MASK_AVX512
+
+static uint32_t avx512StateSupport()
+{
+#if defined(HOST_APPLE)
+ // MacOS has specialized behavior where it reports AVX512 support but doesnt
+ // actually enable AVX512 until the first instruction is executed and does so
+ // on a per thread basis. It does this by catching the faulting instruction and
+ // checking for the EVEX encoding. The kmov instructions, despite being part
+ // of the AVX512 instruction set are VEX encoded and dont trigger the enablement
+ //
+ // See https://github.com/apple/darwin-xnu/blob/main/osfmk/i386/fpu.c#L174
+
+ // TODO-AVX512: Enabling this for OSX requires ensuring threads explicitly trigger
+ // the AVX-512 enablement so that arbitrary usage doesn't cause downstream problems
+
+ return false;
+#else
+ uint32_t eax;
+ __asm(" xgetbv\n" \
+ : "=a"(eax) /*output in eax*/\
+ : "c"(0) /*inputs - 0 in ecx*/\
+ : "edx" /* registers that are clobbered*/
+ );
+ // check OS has enabled XMM, YMM and ZMM state support
+ return ((eax & 0xE6) == 0x0E6) ? 1 : 0;
+#endif
+}
+
+static bool IsAvxEnabled()
+{
+ return true;
+}
+
+static bool IsAvx512Enabled()
+{
+ return true;
+}
+#endif // defined(HOST_X86) || defined(HOST_AMD64)
+#endif // HOST_UNIX
+
+#if defined(HOST_WINDOWS)
+#if defined(HOST_X86) || defined(HOST_AMD64)
+static uint32_t xmmYmmStateSupport()
+{
+ // check OS has enabled both XMM and YMM state support
+ return ((_xgetbv(0) & 0x06) == 0x06) ? 1 : 0;
+}
+
+static uint32_t avx512StateSupport()
+{
+ // check OS has enabled XMM, YMM and ZMM state support
+ return ((_xgetbv(0) & 0xE6) == 0x0E6) ? 1 : 0;
+}
+
+static bool IsAvxEnabled()
+{
+ DWORD64 FeatureMask = GetEnabledXStateFeatures();
+ return ((FeatureMask & XSTATE_MASK_AVX) != 0);
+}
+
+static bool IsAvx512Enabled()
+{
+ DWORD64 FeatureMask = GetEnabledXStateFeatures();
+ return ((FeatureMask & XSTATE_MASK_AVX512) != 0);
+}
+
+#endif // defined(HOST_X86) || defined(HOST_AMD64)
+#endif // HOST_WINDOWS
+
+int minipal_getcpufeatures(void)
+{
+ int result = 0;
+
+#if defined(HOST_X86) || defined(HOST_AMD64)
+
+ int cpuidInfo[4];
+
+ const int CPUID_EAX = 0;
+ const int CPUID_EBX = 1;
+ const int CPUID_ECX = 2;
+ const int CPUID_EDX = 3;
+
+ __cpuid(cpuidInfo, 0x00000000);
+ uint32_t maxCpuId = (uint32_t)cpuidInfo[CPUID_EAX];
+ assert(maxCpuId >= 1);
+
+ __cpuid(cpuidInfo, 0x00000001);
+
+ assert((cpuidInfo[CPUID_EDX] & (1 << 25)) != 0); // SSE
+ assert((cpuidInfo[CPUID_EDX] & (1 << 26)) != 0); // SSE2
+
+ if ((cpuidInfo[CPUID_ECX] & (1 << 25)) != 0) // AESNI
+ {
+ result |= XArchIntrinsicConstants_Aes;
+ }
+
+ if ((cpuidInfo[CPUID_ECX] & (1 << 1)) != 0) // PCLMULQDQ
+ {
+ result |= XArchIntrinsicConstants_Pclmulqdq;
+ }
+
+ if ((cpuidInfo[CPUID_ECX] & (1 << 0)) != 0) // SSE3
+ {
+ result |= XArchIntrinsicConstants_Sse3;
+
+ if ((cpuidInfo[CPUID_ECX] & (1 << 9)) != 0) // SSSE3
+ {
+ result |= XArchIntrinsicConstants_Ssse3;
+
+ if ((cpuidInfo[CPUID_ECX] & (1 << 19)) != 0) // SSE4.1
+ {
+ result |= XArchIntrinsicConstants_Sse41;
+
+ if ((cpuidInfo[CPUID_ECX] & (1 << 20)) != 0) // SSE4.2
+ {
+ result |= XArchIntrinsicConstants_Sse42;
+
+ if ((cpuidInfo[CPUID_ECX] & (1 << 22)) != 0) // MOVBE
+ {
+ result |= XArchIntrinsicConstants_Movbe;
+ }
+
+ if ((cpuidInfo[CPUID_ECX] & (1 << 23)) != 0) // POPCNT
+ {
+ result |= XArchIntrinsicConstants_Popcnt;
+ }
+
+ const int requiredAvxEcxFlags = (1 << 27) // OSXSAVE
+ | (1 << 28); // AVX
+
+ if ((cpuidInfo[CPUID_ECX] & requiredAvxEcxFlags) == requiredAvxEcxFlags)
+ {
+ if (IsAvxEnabled() && (xmmYmmStateSupport() == 1)) // XGETBV == 11
+ {
+ result |= XArchIntrinsicConstants_Avx;
+
+ if ((cpuidInfo[CPUID_ECX] & (1 << 12)) != 0) // FMA
+ {
+ result |= XArchIntrinsicConstants_Fma;
+ }
+
+ if (maxCpuId >= 0x07)
+ {
+ __cpuidex(cpuidInfo, 0x00000007, 0x00000000);
+
+ if ((cpuidInfo[CPUID_EBX] & (1 << 5)) != 0) // AVX2
+ {
+ result |= XArchIntrinsicConstants_Avx2;
+
+ if (IsAvx512Enabled() && (avx512StateSupport() == 1)) // XGETBV XRC0[7:5] == 111
+ {
+ if (((cpuidInfo[CPUID_EBX] & (1 << 16)) != 0) && // AVX512F
+ ((cpuidInfo[CPUID_EBX] & (1 << 30)) != 0) && // AVX512BW
+ ((cpuidInfo[CPUID_EBX] & (1 << 28)) != 0) && // AVX512CD
+ ((cpuidInfo[CPUID_EBX] & (1 << 17)) != 0) && // AVX512DQ
+ ((cpuidInfo[CPUID_EBX] & (1 << 31)) != 0)) // AVX512VL
+ {
+ // While the AVX-512 ISAs can be individually lit-up, they really
+ // need F, BW, CD, DQ, and VL to be fully functional without adding
+ // significant complexity into the JIT. Additionally, unlike AVX/AVX2
+ // there was never really any hardware that didn't provide all 5 at
+ // once, with the notable exception being Knight's Landing which
+ // provided a similar but not quite the same feature.
+
+ result |= XArchIntrinsicConstants_Evex;
+ result |= XArchIntrinsicConstants_Avx512;
+
+ if ((cpuidInfo[CPUID_ECX] & (1 << 1)) != 0) // AVX512VBMI
+ {
+ result |= XArchIntrinsicConstants_Avx512Vbmi;
+ }
+ }
+ }
+
+ __cpuidex(cpuidInfo, 0x00000007, 0x00000001);
+
+ if ((cpuidInfo[CPUID_EAX] & (1 << 4)) != 0) // AVX-VNNI
+ {
+ result |= XArchIntrinsicConstants_AvxVnni;
+ }
+
+ if ((cpuidInfo[CPUID_EDX] & (1 << 19)) != 0) // Avx10
+ {
+ __cpuidex(cpuidInfo, 0x00000024, 0x00000000);
+ uint8_t avx10Version = (uint8_t)(cpuidInfo[CPUID_EBX] & 0xFF);
+
+ if((avx10Version >= 1) &&
+ ((cpuidInfo[CPUID_EBX] & (1 << 16)) != 0) && // Avx10/V128
+ ((cpuidInfo[CPUID_EBX] & (1 << 17)) != 0)) // Avx10/V256
+ {
+ result |= XArchIntrinsicConstants_Evex;
+ result |= XArchIntrinsicConstants_Avx10v1;
+
+ // We assume that the Avx10/V512 support can be inferred from
+ // both Avx10v1 and Avx512 being present.
+ assert(((cpuidInfo[CPUID_EBX] & (1 << 18)) != 0) == // Avx10/V512
+ ((result & XArchIntrinsicConstants_Avx512) != 0));
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (maxCpuId >= 0x07)
+ {
+ __cpuidex(cpuidInfo, 0x00000007, 0x00000000);
+
+ if ((cpuidInfo[CPUID_EBX] & (1 << 3)) != 0) // BMI1
+ {
+ result |= XArchIntrinsicConstants_Bmi1;
+ }
+
+ if ((cpuidInfo[CPUID_EBX] & (1 << 8)) != 0) // BMI2
+ {
+ result |= XArchIntrinsicConstants_Bmi2;
+ }
+
+ if ((cpuidInfo[CPUID_EDX] & (1 << 14)) != 0)
+ {
+ result |= XArchIntrinsicConstants_Serialize; // SERIALIZE
+ }
+ }
+
+ __cpuid(cpuidInfo, 0x80000000);
+ uint32_t maxCpuIdEx = (uint32_t)cpuidInfo[CPUID_EAX];
+
+ if (maxCpuIdEx >= 0x80000001)
+ {
+ __cpuid(cpuidInfo, 0x80000001);
+
+ if ((cpuidInfo[CPUID_ECX] & (1 << 5)) != 0) // LZCNT
+ {
+ result |= XArchIntrinsicConstants_Lzcnt;
+ }
+
+ }
+#endif // HOST_X86 || HOST_AMD64
+
+#if defined(HOST_ARM64)
+#if defined(HOST_UNIX)
+
+#if HAVE_AUXV_HWCAP_H
+ unsigned long hwCap = getauxval(AT_HWCAP);
+
+ if (hwCap & HWCAP_AES)
+ result |= ARM64IntrinsicConstants_Aes;
+
+ if (hwCap & HWCAP_ATOMICS)
+ result |= ARM64IntrinsicConstants_Atomics;
+
+ if (hwCap & HWCAP_CRC32)
+ result |= ARM64IntrinsicConstants_Crc32;
+
+ if (hwCap & HWCAP_ASIMDDP)
+ result |= ARM64IntrinsicConstants_Dp;
+
+ if (hwCap & HWCAP_LRCPC)
+ result |= ARM64IntrinsicConstants_Rcpc;
+
+ if (hwCap & HWCAP_ILRCPC)
+ result |= ARM64IntrinsicConstants_Rcpc2;
+
+ if (hwCap & HWCAP_SHA1)
+ result |= ARM64IntrinsicConstants_Sha1;
+
+ if (hwCap & HWCAP_SHA2)
+ result |= ARM64IntrinsicConstants_Sha256;
+
+ if (hwCap & HWCAP_ASIMD)
+ result |= ARM64IntrinsicConstants_AdvSimd;
+
+ if (hwCap & HWCAP_ASIMDRDM)
+ result |= ARM64IntrinsicConstants_Rdm;
+
+ if (hwCap & HWCAP_SVE)
+ result |= ARM64IntrinsicConstants_Sve;
+
+#else // !HAVE_AUXV_HWCAP_H
+
+#if HAVE_SYSCTLBYNAME
+ int64_t valueFromSysctl = 0;
+ size_t sz = sizeof(valueFromSysctl);
+
+ if ((sysctlbyname("hw.optional.arm.FEAT_AES", &valueFromSysctl, &sz, NULL, 0) == 0) && (valueFromSysctl != 0))
+ result |= ARM64IntrinsicConstants_Aes;
+
+ if ((sysctlbyname("hw.optional.armv8_crc32", &valueFromSysctl, &sz, NULL, 0) == 0) && (valueFromSysctl != 0))
+ result |= ARM64IntrinsicConstants_Crc32;
+
+ if ((sysctlbyname("hw.optional.arm.FEAT_DotProd", &valueFromSysctl, &sz, NULL, 0) == 0) && (valueFromSysctl != 0))
+ result |= ARM64IntrinsicConstants_Dp;
+
+ if ((sysctlbyname("hw.optional.arm.FEAT_RDM", &valueFromSysctl, &sz, NULL, 0) == 0) && (valueFromSysctl != 0))
+ result |= ARM64IntrinsicConstants_Rdm;
+
+ if ((sysctlbyname("hw.optional.arm.FEAT_SHA1", &valueFromSysctl, &sz, NULL, 0) == 0) && (valueFromSysctl != 0))
+ result |= ARM64IntrinsicConstants_Sha1;
+
+ if ((sysctlbyname("hw.optional.arm.FEAT_SHA256", &valueFromSysctl, &sz, NULL, 0) == 0) && (valueFromSysctl != 0))
+ result |= ARM64IntrinsicConstants_Sha256;
+
+ if ((sysctlbyname("hw.optional.armv8_1_atomics", &valueFromSysctl, &sz, NULL, 0) == 0) && (valueFromSysctl != 0))
+ result |= ARM64IntrinsicConstants_Atomics;
+
+ if ((sysctlbyname("hw.optional.arm.FEAT_LRCPC", &valueFromSysctl, &sz, NULL, 0) == 0) && (valueFromSysctl != 0))
+ result |= ARM64IntrinsicConstants_Rcpc;
+
+ if ((sysctlbyname("hw.optional.arm.FEAT_LRCPC2", &valueFromSysctl, &sz, NULL, 0) == 0) && (valueFromSysctl != 0))
+ result |= ARM64IntrinsicConstants_Rcpc2;
+#endif // HAVE_SYSCTLBYNAME
+
+ // Every ARM64 CPU should support SIMD and FP
+ // If the OS have no function to query for CPU capabilities we set just these
+
+ result |= ARM64IntrinsicConstants_AdvSimd;
+#endif // HAVE_AUXV_HWCAP_H
+#endif // HOST_UNIX
+
+#if defined(HOST_WINDOWS)
+ // FP and SIMD support are enabled by default
+ result |= ARM64IntrinsicConstants_AdvSimd;
+
+ if (IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE))
+ {
+ result |= ARM64IntrinsicConstants_Aes;
+ result |= ARM64IntrinsicConstants_Sha1;
+ result |= ARM64IntrinsicConstants_Sha256;
+ }
+
+ if (IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE))
+ {
+ result |= ARM64IntrinsicConstants_Crc32;
+ }
+
+ if (IsProcessorFeaturePresent(PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE))
+ {
+ result |= ARM64IntrinsicConstants_Atomics;
+ }
+
+ if (IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE))
+ {
+ result |= ARM64IntrinsicConstants_Dp;
+ }
+
+ if (IsProcessorFeaturePresent(PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE))
+ {
+ result |= ARM64IntrinsicConstants_Rcpc;
+ }
+
+ // TODO: IsProcessorFeaturePresent doesn't support LRCPC2 yet.
+
+ if (IsProcessorFeaturePresent(PF_ARM_SVE_INSTRUCTIONS_AVAILABLE))
+ {
+ result |= ARM64IntrinsicConstants_Sve;
+ }
+
+#endif // HOST_WINDOWS
+
+#endif // HOST_ARM64
+
+ return result;
+}
+
+// Detect if the current process is running under the Apple Rosetta x64 emulator
+bool minipal_detect_rosetta(void)
+{
+#if defined(HOST_AMD64) || defined(HOST_X86)
+ // Check for CPU brand indicating emulation
+ int regs[4];
+ char brand[49];
+
+ // Get the maximum value for extended function CPUID info
+ __cpuid(regs, (int)0x80000000);
+ if ((unsigned int)regs[0] < 0x80000004)
+ {
+ return false; // Extended CPUID not supported
+ }
+
+ // Retrieve the CPU brand string
+ for (unsigned int i = 0x80000002; i <= 0x80000004; ++i)
+ {
+ __cpuid(regs, (int)i);
+ memcpy(brand + (i - 0x80000002) * sizeof(regs), regs, sizeof(regs));
+ }
+ brand[sizeof(brand) - 1] = '\0';
+
+ // Check if CPU brand indicates emulation
+ if (strstr(brand, "VirtualApple") != NULL)
+ {
+ return true;
+ }
+#endif // HOST_AMD64 || HOST_X86
+
+ return false;
+}
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef HAVE_MINIPAL_CPUFEATURES_H
+#define HAVE_MINIPAL_CPUFEATURES_H
+
+//
+// Should match the constants defined in the compiler in HardwareIntrinsicHelpers.cs
+//
+
+#if defined(HOST_X86) || defined(HOST_AMD64)
+enum XArchIntrinsicConstants
+{
+ XArchIntrinsicConstants_Aes = 0x0001,
+ XArchIntrinsicConstants_Pclmulqdq = 0x0002,
+ XArchIntrinsicConstants_Sse3 = 0x0004,
+ XArchIntrinsicConstants_Ssse3 = 0x0008,
+ XArchIntrinsicConstants_Sse41 = 0x0010,
+ XArchIntrinsicConstants_Sse42 = 0x0020,
+ XArchIntrinsicConstants_Popcnt = 0x0040,
+ XArchIntrinsicConstants_Avx = 0x0080,
+ XArchIntrinsicConstants_Fma = 0x0100,
+ XArchIntrinsicConstants_Avx2 = 0x0200,
+ XArchIntrinsicConstants_Bmi1 = 0x0400,
+ XArchIntrinsicConstants_Bmi2 = 0x0800,
+ XArchIntrinsicConstants_Lzcnt = 0x1000,
+ XArchIntrinsicConstants_AvxVnni = 0x2000,
+ XArchIntrinsicConstants_Movbe = 0x4000,
+ XArchIntrinsicConstants_Avx512 = 0x8000,
+ XArchIntrinsicConstants_Avx512Vbmi = 0x10000,
+ XArchIntrinsicConstants_Serialize = 0x20000,
+ XArchIntrinsicConstants_Avx10v1 = 0x40000,
+ XArchIntrinsicConstants_Evex = 0x80000,
+};
+#endif // HOST_X86 || HOST_AMD64
+
+#if defined(HOST_ARM64)
+enum ARM64IntrinsicConstants
+{
+ ARM64IntrinsicConstants_AdvSimd = 0x0001,
+ ARM64IntrinsicConstants_Aes = 0x0002,
+ ARM64IntrinsicConstants_Crc32 = 0x0004,
+ ARM64IntrinsicConstants_Dp = 0x0008,
+ ARM64IntrinsicConstants_Rdm = 0x0010,
+ ARM64IntrinsicConstants_Sha1 = 0x0020,
+ ARM64IntrinsicConstants_Sha256 = 0x0040,
+ ARM64IntrinsicConstants_Atomics = 0x0080,
+ ARM64IntrinsicConstants_Rcpc = 0x0100,
+ ARM64IntrinsicConstants_Rcpc2 = 0x0200,
+ ARM64IntrinsicConstants_Sve = 0x0400,
+};
+
+#include <assert.h>
+
+// Bit position for the ARM64IntrinsicConstants_Atomics flags, to be used with tbz / tbnz instructions
+#define ARM64_ATOMICS_FEATURE_FLAG_BIT 7
+static_assert((1 << ARM64_ATOMICS_FEATURE_FLAG_BIT) == ARM64IntrinsicConstants_Atomics, "ARM64_ATOMICS_FEATURE_FLAG_BIT must match with ARM64IntrinsicConstants_Atomics");
+
+#endif // HOST_ARM64
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif // __cplusplus
+
+int minipal_getcpufeatures(void);
+bool minipal_detect_rosetta(void);
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+
+#endif
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef HAVE_MINIPAL_CPUID_H
+#define HAVE_MINIPAL_CPUID_H
+
+#if defined(HOST_X86) || defined(HOST_AMD64)
+
+#if defined(HOST_WINDOWS)
+
+#include <intrin.h>
+
+#endif // HOST_WINDOWS
+
+#if defined(HOST_UNIX)
+
+#include <minipal/utils.h>
+
+// MSVC directly defines intrinsics for __cpuid and __cpuidex matching the below signatures
+// We define matching signatures for use on Unix platforms.
+//
+// IMPORTANT: Unlike MSVC, Unix does not explicitly zero ECX for __cpuid
+
+#if !__has_builtin(__cpuid)
+static void __cpuid(int cpuInfo[4], int function_id)
+{
+ // Based on the Clang implementation provided in cpuid.h:
+ // https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/cpuid.h
+
+ __asm(" cpuid\n" \
+ : "=a"(cpuInfo[0]), "=b"(cpuInfo[1]), "=c"(cpuInfo[2]), "=d"(cpuInfo[3]) \
+ : "0"(function_id)
+ );
+}
+#else
+void __cpuid(int cpuInfo[4], int function_id);
+#endif
+
+#if !__has_builtin(__cpuidex)
+static void __cpuidex(int cpuInfo[4], int function_id, int subFunction_id)
+{
+ // Based on the Clang implementation provided in cpuid.h:
+ // https://github.com/llvm/llvm-project/blob/main/clang/lib/Headers/cpuid.h
+
+ __asm(" cpuid\n" \
+ : "=a"(cpuInfo[0]), "=b"(cpuInfo[1]), "=c"(cpuInfo[2]), "=d"(cpuInfo[3]) \
+ : "0"(function_id), "2"(subFunction_id)
+ );
+}
+#else
+void __cpuidex(int cpuInfo[4], int function_id, int subFunction_id);
+#endif
+
+#endif // HOST_UNIX
+#endif // defined(HOST_X86) || defined(HOST_AMD64)
+
+#endif
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef HAVE_MINIPAL_ENTRYPOINTS_H
+#define HAVE_MINIPAL_ENTRYPOINTS_H
+
+#include <stdint.h>
+#include <string.h>
+#include <minipal/utils.h>
+
+typedef struct
+{
+ const char* name;
+ const void* method;
+} Entry;
+
+// expands to: {"impl", (void*)&impl},
+#define DllImportEntry(impl) \
+ {#impl, (void*)&impl},
+
+static const void* minipal_resolve_dllimport(const Entry* resolutionTable, size_t tableLength, const char* name)
+{
+ for (size_t i = 0; i < tableLength; i++)
+ {
+ if (strcmp(name, resolutionTable[i].name) == 0)
+ {
+ return resolutionTable[i].method;
+ }
+ }
+
+ return NULL;
+}
+
+#endif // HAVE_MINIPAL_ENTRYPOINTS_H
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef HAVE_MINIPAL_GETEXEPATH_H
+#define HAVE_MINIPAL_GETEXEPATH_H
+
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+
+#if defined(__APPLE__)
+#include <mach-o/dyld.h>
+#elif defined(__FreeBSD__)
+#include <string.h>
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#elif defined(_WIN32)
+#include <windows.h>
+#elif HAVE_GETAUXVAL
+#include <sys/auxv.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Returns the full path to the executable for the current process, resolving symbolic links.
+// The caller is responsible for releasing the buffer. Returns null on error.
+static inline char* minipal_getexepath(void)
+{
+#if defined(__APPLE__)
+ uint32_t len = PATH_MAX;
+ char pathBuf[PATH_MAX];
+ if (_NSGetExecutablePath(pathBuf, &len) != 0)
+ {
+ errno = EINVAL;
+ return NULL;
+ }
+
+ return realpath(pathBuf, NULL);
+#elif defined(__FreeBSD__)
+ static const int name[] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
+ char path[PATH_MAX];
+ size_t len = sizeof(path);
+ if (sysctl(name, 4, path, &len, NULL, 0) != 0)
+ {
+ return NULL;
+ }
+
+ return strdup(path);
+#elif defined(__sun)
+ const char* path = getexecname();
+ if (path == NULL)
+ {
+ return NULL;
+ }
+
+ return realpath(path, NULL);
+#elif defined(_WIN32)
+ char path[MAX_PATH];
+ if (GetModuleFileNameA(NULL, path, MAX_PATH) == 0)
+ {
+ return NULL;
+ }
+
+ return _strdup(path);
+#elif defined(TARGET_WASM)
+ // This is a packaging convention that our tooling should enforce.
+ return strdup("/managed");
+#else
+#ifdef __linux__
+ const char* symlinkEntrypointExecutable = "/proc/self/exe";
+#else
+ const char* symlinkEntrypointExecutable = "/proc/curproc/exe";
+#endif
+
+ // Resolve the symlink to the executable from /proc
+ char* path = realpath(symlinkEntrypointExecutable, NULL);
+ if (path)
+ {
+ return path;
+ }
+
+#if HAVE_GETAUXVAL && defined(AT_EXECFN)
+ // fallback to AT_EXECFN, which does not work properly in rare cases
+ // when .NET process is set as interpreter (shebang).
+ const char* exePath = (const char *)(getauxval(AT_EXECFN));
+ if (exePath)
+ {
+ return realpath(exePath, NULL);
+ }
+#endif // HAVE_GETAUXVAL && defined(AT_EXECFN)
+
+ return NULL;
+#endif // defined(__APPLE__)
+}
+
+#ifdef __cplusplus
+}
+#endif // extern "C"
+
+#endif // HAVE_MINIPAL_GETEXEPATH_H
--- /dev/null
+#ifndef HAVE_MINIPAL_MINIPALCONFIG_H
+#define HAVE_MINIPAL_MINIPALCONFIG_H
+
+#cmakedefine01 HAVE_ARC4RANDOM_BUF
+#cmakedefine01 HAVE_AUXV_HWCAP_H
+#cmakedefine01 HAVE_O_CLOEXEC
+#cmakedefine01 HAVE_SYSCTLBYNAME
+#cmakedefine01 HAVE_CLOCK_GETTIME_NSEC_NP
+
+#endif
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <assert.h>
+#include <unistd.h>
+#include <time.h>
+#include <errno.h>
+#if defined(__APPLE__) && __APPLE__
+#include <CommonCrypto/CommonRandom.h>
+#endif
+
+#include "minipalconfig.h"
+#include "random.h"
+
+/*
+
+Generate random bytes. The generated bytes are not cryptographically strong.
+
+*/
+
+void minipal_get_non_cryptographically_secure_random_bytes(uint8_t* buffer, int32_t bufferLength)
+{
+ assert(buffer != NULL);
+
+#if HAVE_ARC4RANDOM_BUF
+ arc4random_buf(buffer, (size_t)bufferLength);
+#else
+ long num = 0;
+ static bool sInitializedMRand;
+
+ // Fall back to the secure version
+ minipal_get_cryptographically_secure_random_bytes(buffer, bufferLength);
+
+ if (!sInitializedMRand)
+ {
+ srand48((long int)time(NULL));
+ sInitializedMRand = true;
+ }
+
+ // always xor srand48 over the whole buffer to get some randomness
+ // in case /dev/urandom is not really random
+
+ for (int i = 0; i < bufferLength; i++)
+ {
+ if (i % 4 == 0)
+ {
+ num = lrand48();
+ }
+
+ *(buffer + i) ^= num;
+ num >>= 8;
+ }
+#endif // HAVE_ARC4RANDOM_BUF
+}
+
+/*
+
+Generate cryptographically strong random bytes.
+
+Return 0 on success, -1 on failure.
+*/
+int32_t minipal_get_cryptographically_secure_random_bytes(uint8_t* buffer, int32_t bufferLength)
+{
+ assert(buffer != NULL);
+
+#ifdef __EMSCRIPTEN__
+ extern int32_t mono_wasm_browser_entropy(uint8_t* buffer, int32_t bufferLength);
+ static bool sMissingBrowserCrypto;
+ if (!sMissingBrowserCrypto)
+ {
+ int32_t bff = mono_wasm_browser_entropy(buffer, bufferLength);
+ if (bff == -1)
+ sMissingBrowserCrypto = true;
+ else
+ return 0;
+ }
+#elif defined(__APPLE__) && __APPLE__
+ CCRNGStatus status = CCRandomGenerateBytes(buffer, (size_t)bufferLength);
+
+ if (status == kCCSuccess)
+ {
+ return 0;
+ }
+#else
+
+ static volatile int rand_des = -1;
+ static bool sMissingDevURandom;
+
+ if (!sMissingDevURandom)
+ {
+ if (rand_des == -1)
+ {
+ int fd;
+
+ do
+ {
+#if HAVE_O_CLOEXEC
+ fd = open("/dev/urandom", O_RDONLY | O_CLOEXEC);
+#else
+ fd = open("/dev/urandom", O_RDONLY);
+ fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
+ }
+ while ((fd == -1) && (errno == EINTR));
+
+ if (fd != -1)
+ {
+ int expected = -1;
+ if (!__atomic_compare_exchange_n(&rand_des, &expected, fd, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST))
+ {
+ // Another thread has already set the rand_des
+ close(fd);
+ }
+ }
+ else if (errno == ENOENT)
+ {
+ sMissingDevURandom = true;
+ }
+ }
+
+ if (rand_des != -1)
+ {
+ int32_t offset = 0;
+ do
+ {
+ ssize_t n = read(rand_des, buffer + offset , (size_t)(bufferLength - offset));
+ if (n == -1)
+ {
+ if (errno == EINTR)
+ {
+ continue;
+ }
+ return -1;
+ }
+
+ offset += n;
+ }
+ while (offset != bufferLength);
+ return 0;
+ }
+ }
+#endif
+ return -1;
+}
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef HAVE_MINIPAL_RANDOM_H
+#define HAVE_MINIPAL_RANDOM_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif // __cplusplus
+
+/**
+ * Generate random bytes. The generated bytes are not cryptographically strong.
+ */
+void minipal_get_non_cryptographically_secure_random_bytes(uint8_t* buffer, int32_t bufferLength);
+
+/**
+ * Generate cryptographically strong random bytes.
+ *
+ * Return 0 on success, -1 on failure.
+ */
+int32_t minipal_get_cryptographically_secure_random_bytes(uint8_t* buffer, int32_t bufferLength);
+
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+#endif /* HAVE_MINIPAL_RANDOM_H */
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef HAVE_MINIPAL_STRINGS_H
+#define HAVE_MINIPAL_STRINGS_H
+
+#include <minipal/types.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif // __cplusplus
+
+/**
+ * Convert a UTF-16 character to uppercase using invariant culture.
+ *
+ * @param code The UTF-16 character to be converted.
+ * @return The uppercase equivalent of the character or the character itself if no conversion is necessary.
+ */
+CHAR16_T minipal_toupper_invariant(CHAR16_T code);
+
+/**
+ * Convert a UTF-16 character to lowercase using invariant culture.
+ *
+ * @param code The UTF-16 character to be converted.
+ * @return The lowercase equivalent of the character or the character itself if no conversion is necessary.
+ */
+CHAR16_T minipal_tolower_invariant(CHAR16_T code);
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+
+#endif /* HAVE_MINIPAL_STRINGS_H */
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#include <assert.h>
+#include <minipal/time.h>
+
+#ifdef HOST_WINDOWS
+
+#include <Windows.h>
+
+int64_t minipal_hires_ticks()
+{
+ LARGE_INTEGER ts;
+ QueryPerformanceCounter(&ts);
+ return ts.QuadPart;
+}
+
+int64_t minipal_hires_tick_frequency()
+{
+ LARGE_INTEGER ts;
+ QueryPerformanceFrequency(&ts);
+ return ts.QuadPart;
+}
+
+#else // HOST_WINDOWS
+
+#include "minipalconfig.h"
+
+#include <time.h> // nanosleep
+#include <errno.h>
+
+inline static void YieldProcessor()
+{
+#if defined(HOST_X86) || defined(HOST_AMD64)
+ __asm__ __volatile__(
+ "rep\n"
+ "nop");
+#elif defined(HOST_ARM)
+ __asm__ __volatile__( "yield");
+#elif defined(HOST_ARM64)
+ __asm__ __volatile__(
+ "dmb ishst\n"
+ "yield"
+ );
+#elif defined(HOST_LOONGARCH64)
+ __asm__ volatile( "dbar 0; \n");
+#elif defined(HOST_RISCV64)
+ // TODO-RISCV64-CQ: When Zihintpause is supported, replace with `pause` instruction.
+ __asm__ __volatile__(".word 0x0100000f");
+#else
+ return;
+#endif
+}
+
+#define tccSecondsToNanoSeconds 1000000000 // 10^9
+int64_t minipal_hires_tick_frequency()
+{
+ return tccSecondsToNanoSeconds;
+}
+
+int64_t minipal_hires_ticks()
+{
+#if HAVE_CLOCK_GETTIME_NSEC_NP
+ return (int64_t)clock_gettime_nsec_np(CLOCK_UPTIME_RAW);
+#else
+ struct timespec ts;
+ int result = clock_gettime(CLOCK_MONOTONIC, &ts);
+ if (result != 0)
+ {
+ assert(!"clock_gettime(CLOCK_MONOTONIC) failed");
+ }
+
+ return ((int64_t)(ts.tv_sec) * (int64_t)(tccSecondsToNanoSeconds)) + (int64_t)(ts.tv_nsec);
+#endif
+}
+
+#endif // !HOST_WINDOWS
+
+void minipal_microdelay(uint32_t usecs, uint32_t* usecsSinceYield)
+{
+#ifdef HOST_WINDOWS
+ if (usecs > 1000)
+ {
+ SleepEx(usecs / 1000, FALSE);
+ if (usecsSinceYield)
+ {
+ usecsSinceYield = 0;
+ }
+
+ return;
+ }
+#else
+ if (usecs > 10)
+ {
+ struct timespec requested;
+ requested.tv_sec = usecs / 1000;
+ requested.tv_nsec = (usecs - requested.tv_sec * 1000) * 1000;
+
+ struct timespec remaining;
+ while (nanosleep(&requested, &remaining) == EINTR)
+ {
+ requested = remaining;
+ }
+
+ if (usecsSinceYield)
+ {
+ usecsSinceYield = 0;
+ }
+
+ return;
+ }
+#endif
+
+ int64_t startTicks = minipal_hires_ticks();
+ int64_t ticksPerSecond = minipal_hires_tick_frequency();
+ int64_t endTicks = startTicks + (usecs * ticksPerSecond) / 1000000;
+
+ // start with 1 nop/pause and then double up until we hit the limit
+ // this way we should not overshoot by more than 2x.
+ for (int i = 0; i < 30; i++)
+ {
+ for (int j = 0; j < (1 << i); j++)
+ {
+ YieldProcessor();
+ }
+
+ int64_t currentTicks = minipal_hires_ticks();
+ if (currentTicks > endTicks)
+ {
+ break;
+ }
+ }
+
+ if (usecsSinceYield)
+ {
+ *usecsSinceYield += usecs;
+ }
+}
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef HAVE_MINIPAL_TIME_H
+#define HAVE_MINIPAL_TIME_H
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif // __cplusplus
+
+ // Returns current count of high resolution monotonically increasing timer ticks
+ int64_t minipal_hires_ticks();
+
+ // Returns the frequency of high resolution timer ticks in Hz
+ int64_t minipal_hires_tick_frequency();
+
+ // Delays execution of current thread by `usecs` microseconds.
+ // The delay is best-effort and may take longer than desired.
+ // Some delays, depending on OS and duration, could be implemented via busy waiting.
+ //
+ // If not NULL, `usecsSinceYield` keeps track of busy-waiting time, so that
+ // the containing algorithm could handle cases when busy-waiting time is too high.
+ void minipal_microdelay(uint32_t usecs, uint32_t* usecsSinceYield);
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+
+#endif /* HAVE_MINIPAL_TIME_H */
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef HAVE_MINIPAL_TYPES_H
+#define HAVE_MINIPAL_TYPES_H
+
+#include <stdlib.h>
+
+#if defined(TARGET_32BIT) || defined(TARGET_OSX) || defined(TARGET_WINDOWS)
+#define FORMAT_PREFIX "l"
+#else
+#define FORMAT_PREFIX ""
+#endif
+
+#ifndef PRIX64
+#define PRIX64 FORMAT_PREFIX "lX"
+#endif
+
+#ifndef PRIx64
+#define PRIx64 FORMAT_PREFIX "lx"
+#endif
+
+#ifndef PRIu64
+#define PRIu64 FORMAT_PREFIX "lu"
+#endif
+
+#ifdef TARGET_WINDOWS
+typedef wchar_t CHAR16_T;
+#else
+typedef unsigned short CHAR16_T;
+#endif
+
+#endif // HAVE_MINIPAL_TYPES_H
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+//
+// THIS FILE IS GENERATED. DO NOT HAND EDIT.
+// IF YOU NEED TO UPDATE UNICODE VERSION FOLLOW THE GUIDE AT src/libraries/System.Private.CoreLib/Tools/GenUnicodeProp/Updating-Unicode-Versions.md
+//
+
+#include <inttypes.h>
+#include <minipal/utils.h>
+#include <minipal/strings.h>
+
+typedef struct
+{
+ CHAR16_T code;
+ uint8_t upperOrLower;
+ CHAR16_T opposingCode;
+} UnicodeDataRec;
+
+#define UPPER_CASE 0
+#define LOWER_CASE 1
+
+static const UnicodeDataRec UnicodeData[] =
+{
+ { 0x41, UPPER_CASE, 0x61 },
+ { 0x42, UPPER_CASE, 0x62 },
+ { 0x43, UPPER_CASE, 0x63 },
+ { 0x44, UPPER_CASE, 0x64 },
+ { 0x45, UPPER_CASE, 0x65 },
+ { 0x46, UPPER_CASE, 0x66 },
+ { 0x47, UPPER_CASE, 0x67 },
+ { 0x48, UPPER_CASE, 0x68 },
+ { 0x49, UPPER_CASE, 0x69 },
+ { 0x4A, UPPER_CASE, 0x6A },
+ { 0x4B, UPPER_CASE, 0x6B },
+ { 0x4C, UPPER_CASE, 0x6C },
+ { 0x4D, UPPER_CASE, 0x6D },
+ { 0x4E, UPPER_CASE, 0x6E },
+ { 0x4F, UPPER_CASE, 0x6F },
+ { 0x50, UPPER_CASE, 0x70 },
+ { 0x51, UPPER_CASE, 0x71 },
+ { 0x52, UPPER_CASE, 0x72 },
+ { 0x53, UPPER_CASE, 0x73 },
+ { 0x54, UPPER_CASE, 0x74 },
+ { 0x55, UPPER_CASE, 0x75 },
+ { 0x56, UPPER_CASE, 0x76 },
+ { 0x57, UPPER_CASE, 0x77 },
+ { 0x58, UPPER_CASE, 0x78 },
+ { 0x59, UPPER_CASE, 0x79 },
+ { 0x5A, UPPER_CASE, 0x7A },
+ { 0x61, LOWER_CASE, 0x41 },
+ { 0x62, LOWER_CASE, 0x42 },
+ { 0x63, LOWER_CASE, 0x43 },
+ { 0x64, LOWER_CASE, 0x44 },
+ { 0x65, LOWER_CASE, 0x45 },
+ { 0x66, LOWER_CASE, 0x46 },
+ { 0x67, LOWER_CASE, 0x47 },
+ { 0x68, LOWER_CASE, 0x48 },
+ { 0x69, LOWER_CASE, 0x49 },
+ { 0x6A, LOWER_CASE, 0x4A },
+ { 0x6B, LOWER_CASE, 0x4B },
+ { 0x6C, LOWER_CASE, 0x4C },
+ { 0x6D, LOWER_CASE, 0x4D },
+ { 0x6E, LOWER_CASE, 0x4E },
+ { 0x6F, LOWER_CASE, 0x4F },
+ { 0x70, LOWER_CASE, 0x50 },
+ { 0x71, LOWER_CASE, 0x51 },
+ { 0x72, LOWER_CASE, 0x52 },
+ { 0x73, LOWER_CASE, 0x53 },
+ { 0x74, LOWER_CASE, 0x54 },
+ { 0x75, LOWER_CASE, 0x55 },
+ { 0x76, LOWER_CASE, 0x56 },
+ { 0x77, LOWER_CASE, 0x57 },
+ { 0x78, LOWER_CASE, 0x58 },
+ { 0x79, LOWER_CASE, 0x59 },
+ { 0x7A, LOWER_CASE, 0x5A },
+ { 0xB5, LOWER_CASE, 0x39C },
+ { 0xC0, UPPER_CASE, 0xE0 },
+ { 0xC1, UPPER_CASE, 0xE1 },
+ { 0xC2, UPPER_CASE, 0xE2 },
+ { 0xC3, UPPER_CASE, 0xE3 },
+ { 0xC4, UPPER_CASE, 0xE4 },
+ { 0xC5, UPPER_CASE, 0xE5 },
+ { 0xC6, UPPER_CASE, 0xE6 },
+ { 0xC7, UPPER_CASE, 0xE7 },
+ { 0xC8, UPPER_CASE, 0xE8 },
+ { 0xC9, UPPER_CASE, 0xE9 },
+ { 0xCA, UPPER_CASE, 0xEA },
+ { 0xCB, UPPER_CASE, 0xEB },
+ { 0xCC, UPPER_CASE, 0xEC },
+ { 0xCD, UPPER_CASE, 0xED },
+ { 0xCE, UPPER_CASE, 0xEE },
+ { 0xCF, UPPER_CASE, 0xEF },
+ { 0xD0, UPPER_CASE, 0xF0 },
+ { 0xD1, UPPER_CASE, 0xF1 },
+ { 0xD2, UPPER_CASE, 0xF2 },
+ { 0xD3, UPPER_CASE, 0xF3 },
+ { 0xD4, UPPER_CASE, 0xF4 },
+ { 0xD5, UPPER_CASE, 0xF5 },
+ { 0xD6, UPPER_CASE, 0xF6 },
+ { 0xD8, UPPER_CASE, 0xF8 },
+ { 0xD9, UPPER_CASE, 0xF9 },
+ { 0xDA, UPPER_CASE, 0xFA },
+ { 0xDB, UPPER_CASE, 0xFB },
+ { 0xDC, UPPER_CASE, 0xFC },
+ { 0xDD, UPPER_CASE, 0xFD },
+ { 0xDE, UPPER_CASE, 0xFE },
+ { 0xE0, LOWER_CASE, 0xC0 },
+ { 0xE1, LOWER_CASE, 0xC1 },
+ { 0xE2, LOWER_CASE, 0xC2 },
+ { 0xE3, LOWER_CASE, 0xC3 },
+ { 0xE4, LOWER_CASE, 0xC4 },
+ { 0xE5, LOWER_CASE, 0xC5 },
+ { 0xE6, LOWER_CASE, 0xC6 },
+ { 0xE7, LOWER_CASE, 0xC7 },
+ { 0xE8, LOWER_CASE, 0xC8 },
+ { 0xE9, LOWER_CASE, 0xC9 },
+ { 0xEA, LOWER_CASE, 0xCA },
+ { 0xEB, LOWER_CASE, 0xCB },
+ { 0xEC, LOWER_CASE, 0xCC },
+ { 0xED, LOWER_CASE, 0xCD },
+ { 0xEE, LOWER_CASE, 0xCE },
+ { 0xEF, LOWER_CASE, 0xCF },
+ { 0xF0, LOWER_CASE, 0xD0 },
+ { 0xF1, LOWER_CASE, 0xD1 },
+ { 0xF2, LOWER_CASE, 0xD2 },
+ { 0xF3, LOWER_CASE, 0xD3 },
+ { 0xF4, LOWER_CASE, 0xD4 },
+ { 0xF5, LOWER_CASE, 0xD5 },
+ { 0xF6, LOWER_CASE, 0xD6 },
+ { 0xF8, LOWER_CASE, 0xD8 },
+ { 0xF9, LOWER_CASE, 0xD9 },
+ { 0xFA, LOWER_CASE, 0xDA },
+ { 0xFB, LOWER_CASE, 0xDB },
+ { 0xFC, LOWER_CASE, 0xDC },
+ { 0xFD, LOWER_CASE, 0xDD },
+ { 0xFE, LOWER_CASE, 0xDE },
+ { 0xFF, LOWER_CASE, 0x178 },
+ { 0x100, UPPER_CASE, 0x101 },
+ { 0x101, LOWER_CASE, 0x100 },
+ { 0x102, UPPER_CASE, 0x103 },
+ { 0x103, LOWER_CASE, 0x102 },
+ { 0x104, UPPER_CASE, 0x105 },
+ { 0x105, LOWER_CASE, 0x104 },
+ { 0x106, UPPER_CASE, 0x107 },
+ { 0x107, LOWER_CASE, 0x106 },
+ { 0x108, UPPER_CASE, 0x109 },
+ { 0x109, LOWER_CASE, 0x108 },
+ { 0x10A, UPPER_CASE, 0x10B },
+ { 0x10B, LOWER_CASE, 0x10A },
+ { 0x10C, UPPER_CASE, 0x10D },
+ { 0x10D, LOWER_CASE, 0x10C },
+ { 0x10E, UPPER_CASE, 0x10F },
+ { 0x10F, LOWER_CASE, 0x10E },
+ { 0x110, UPPER_CASE, 0x111 },
+ { 0x111, LOWER_CASE, 0x110 },
+ { 0x112, UPPER_CASE, 0x113 },
+ { 0x113, LOWER_CASE, 0x112 },
+ { 0x114, UPPER_CASE, 0x115 },
+ { 0x115, LOWER_CASE, 0x114 },
+ { 0x116, UPPER_CASE, 0x117 },
+ { 0x117, LOWER_CASE, 0x116 },
+ { 0x118, UPPER_CASE, 0x119 },
+ { 0x119, LOWER_CASE, 0x118 },
+ { 0x11A, UPPER_CASE, 0x11B },
+ { 0x11B, LOWER_CASE, 0x11A },
+ { 0x11C, UPPER_CASE, 0x11D },
+ { 0x11D, LOWER_CASE, 0x11C },
+ { 0x11E, UPPER_CASE, 0x11F },
+ { 0x11F, LOWER_CASE, 0x11E },
+ { 0x120, UPPER_CASE, 0x121 },
+ { 0x121, LOWER_CASE, 0x120 },
+ { 0x122, UPPER_CASE, 0x123 },
+ { 0x123, LOWER_CASE, 0x122 },
+ { 0x124, UPPER_CASE, 0x125 },
+ { 0x125, LOWER_CASE, 0x124 },
+ { 0x126, UPPER_CASE, 0x127 },
+ { 0x127, LOWER_CASE, 0x126 },
+ { 0x128, UPPER_CASE, 0x129 },
+ { 0x129, LOWER_CASE, 0x128 },
+ { 0x12A, UPPER_CASE, 0x12B },
+ { 0x12B, LOWER_CASE, 0x12A },
+ { 0x12C, UPPER_CASE, 0x12D },
+ { 0x12D, LOWER_CASE, 0x12C },
+ { 0x12E, UPPER_CASE, 0x12F },
+ { 0x12F, LOWER_CASE, 0x12E },
+ { 0x130, UPPER_CASE, 0x69 },
+ { 0x131, LOWER_CASE, 0x49 },
+ { 0x132, UPPER_CASE, 0x133 },
+ { 0x133, LOWER_CASE, 0x132 },
+ { 0x134, UPPER_CASE, 0x135 },
+ { 0x135, LOWER_CASE, 0x134 },
+ { 0x136, UPPER_CASE, 0x137 },
+ { 0x137, LOWER_CASE, 0x136 },
+ { 0x139, UPPER_CASE, 0x13A },
+ { 0x13A, LOWER_CASE, 0x139 },
+ { 0x13B, UPPER_CASE, 0x13C },
+ { 0x13C, LOWER_CASE, 0x13B },
+ { 0x13D, UPPER_CASE, 0x13E },
+ { 0x13E, LOWER_CASE, 0x13D },
+ { 0x13F, UPPER_CASE, 0x140 },
+ { 0x140, LOWER_CASE, 0x13F },
+ { 0x141, UPPER_CASE, 0x142 },
+ { 0x142, LOWER_CASE, 0x141 },
+ { 0x143, UPPER_CASE, 0x144 },
+ { 0x144, LOWER_CASE, 0x143 },
+ { 0x145, UPPER_CASE, 0x146 },
+ { 0x146, LOWER_CASE, 0x145 },
+ { 0x147, UPPER_CASE, 0x148 },
+ { 0x148, LOWER_CASE, 0x147 },
+ { 0x14A, UPPER_CASE, 0x14B },
+ { 0x14B, LOWER_CASE, 0x14A },
+ { 0x14C, UPPER_CASE, 0x14D },
+ { 0x14D, LOWER_CASE, 0x14C },
+ { 0x14E, UPPER_CASE, 0x14F },
+ { 0x14F, LOWER_CASE, 0x14E },
+ { 0x150, UPPER_CASE, 0x151 },
+ { 0x151, LOWER_CASE, 0x150 },
+ { 0x152, UPPER_CASE, 0x153 },
+ { 0x153, LOWER_CASE, 0x152 },
+ { 0x154, UPPER_CASE, 0x155 },
+ { 0x155, LOWER_CASE, 0x154 },
+ { 0x156, UPPER_CASE, 0x157 },
+ { 0x157, LOWER_CASE, 0x156 },
+ { 0x158, UPPER_CASE, 0x159 },
+ { 0x159, LOWER_CASE, 0x158 },
+ { 0x15A, UPPER_CASE, 0x15B },
+ { 0x15B, LOWER_CASE, 0x15A },
+ { 0x15C, UPPER_CASE, 0x15D },
+ { 0x15D, LOWER_CASE, 0x15C },
+ { 0x15E, UPPER_CASE, 0x15F },
+ { 0x15F, LOWER_CASE, 0x15E },
+ { 0x160, UPPER_CASE, 0x161 },
+ { 0x161, LOWER_CASE, 0x160 },
+ { 0x162, UPPER_CASE, 0x163 },
+ { 0x163, LOWER_CASE, 0x162 },
+ { 0x164, UPPER_CASE, 0x165 },
+ { 0x165, LOWER_CASE, 0x164 },
+ { 0x166, UPPER_CASE, 0x167 },
+ { 0x167, LOWER_CASE, 0x166 },
+ { 0x168, UPPER_CASE, 0x169 },
+ { 0x169, LOWER_CASE, 0x168 },
+ { 0x16A, UPPER_CASE, 0x16B },
+ { 0x16B, LOWER_CASE, 0x16A },
+ { 0x16C, UPPER_CASE, 0x16D },
+ { 0x16D, LOWER_CASE, 0x16C },
+ { 0x16E, UPPER_CASE, 0x16F },
+ { 0x16F, LOWER_CASE, 0x16E },
+ { 0x170, UPPER_CASE, 0x171 },
+ { 0x171, LOWER_CASE, 0x170 },
+ { 0x172, UPPER_CASE, 0x173 },
+ { 0x173, LOWER_CASE, 0x172 },
+ { 0x174, UPPER_CASE, 0x175 },
+ { 0x175, LOWER_CASE, 0x174 },
+ { 0x176, UPPER_CASE, 0x177 },
+ { 0x177, LOWER_CASE, 0x176 },
+ { 0x178, UPPER_CASE, 0xFF },
+ { 0x179, UPPER_CASE, 0x17A },
+ { 0x17A, LOWER_CASE, 0x179 },
+ { 0x17B, UPPER_CASE, 0x17C },
+ { 0x17C, LOWER_CASE, 0x17B },
+ { 0x17D, UPPER_CASE, 0x17E },
+ { 0x17E, LOWER_CASE, 0x17D },
+ { 0x17F, LOWER_CASE, 0x53 },
+ { 0x180, LOWER_CASE, 0x243 },
+ { 0x181, UPPER_CASE, 0x253 },
+ { 0x182, UPPER_CASE, 0x183 },
+ { 0x183, LOWER_CASE, 0x182 },
+ { 0x184, UPPER_CASE, 0x185 },
+ { 0x185, LOWER_CASE, 0x184 },
+ { 0x186, UPPER_CASE, 0x254 },
+ { 0x187, UPPER_CASE, 0x188 },
+ { 0x188, LOWER_CASE, 0x187 },
+ { 0x189, UPPER_CASE, 0x256 },
+ { 0x18A, UPPER_CASE, 0x257 },
+ { 0x18B, UPPER_CASE, 0x18C },
+ { 0x18C, LOWER_CASE, 0x18B },
+ { 0x18E, UPPER_CASE, 0x1DD },
+ { 0x18F, UPPER_CASE, 0x259 },
+ { 0x190, UPPER_CASE, 0x25B },
+ { 0x191, UPPER_CASE, 0x192 },
+ { 0x192, LOWER_CASE, 0x191 },
+ { 0x193, UPPER_CASE, 0x260 },
+ { 0x194, UPPER_CASE, 0x263 },
+ { 0x195, LOWER_CASE, 0x1F6 },
+ { 0x196, UPPER_CASE, 0x269 },
+ { 0x197, UPPER_CASE, 0x268 },
+ { 0x198, UPPER_CASE, 0x199 },
+ { 0x199, LOWER_CASE, 0x198 },
+ { 0x19A, LOWER_CASE, 0x23D },
+ { 0x19C, UPPER_CASE, 0x26F },
+ { 0x19D, UPPER_CASE, 0x272 },
+ { 0x19E, LOWER_CASE, 0x220 },
+ { 0x19F, UPPER_CASE, 0x275 },
+ { 0x1A0, UPPER_CASE, 0x1A1 },
+ { 0x1A1, LOWER_CASE, 0x1A0 },
+ { 0x1A2, UPPER_CASE, 0x1A3 },
+ { 0x1A3, LOWER_CASE, 0x1A2 },
+ { 0x1A4, UPPER_CASE, 0x1A5 },
+ { 0x1A5, LOWER_CASE, 0x1A4 },
+ { 0x1A6, UPPER_CASE, 0x280 },
+ { 0x1A7, UPPER_CASE, 0x1A8 },
+ { 0x1A8, LOWER_CASE, 0x1A7 },
+ { 0x1A9, UPPER_CASE, 0x283 },
+ { 0x1AC, UPPER_CASE, 0x1AD },
+ { 0x1AD, LOWER_CASE, 0x1AC },
+ { 0x1AE, UPPER_CASE, 0x288 },
+ { 0x1AF, UPPER_CASE, 0x1B0 },
+ { 0x1B0, LOWER_CASE, 0x1AF },
+ { 0x1B1, UPPER_CASE, 0x28A },
+ { 0x1B2, UPPER_CASE, 0x28B },
+ { 0x1B3, UPPER_CASE, 0x1B4 },
+ { 0x1B4, LOWER_CASE, 0x1B3 },
+ { 0x1B5, UPPER_CASE, 0x1B6 },
+ { 0x1B6, LOWER_CASE, 0x1B5 },
+ { 0x1B7, UPPER_CASE, 0x292 },
+ { 0x1B8, UPPER_CASE, 0x1B9 },
+ { 0x1B9, LOWER_CASE, 0x1B8 },
+ { 0x1BC, UPPER_CASE, 0x1BD },
+ { 0x1BD, LOWER_CASE, 0x1BC },
+ { 0x1BF, LOWER_CASE, 0x1F7 },
+ { 0x1C4, UPPER_CASE, 0x1C6 },
+ { 0x1C5, LOWER_CASE, 0x1C4 },
+ { 0x1C6, LOWER_CASE, 0x1C4 },
+ { 0x1C7, UPPER_CASE, 0x1C9 },
+ { 0x1C8, LOWER_CASE, 0x1C7 },
+ { 0x1C9, LOWER_CASE, 0x1C7 },
+ { 0x1CA, UPPER_CASE, 0x1CC },
+ { 0x1CB, LOWER_CASE, 0x1CA },
+ { 0x1CC, LOWER_CASE, 0x1CA },
+ { 0x1CD, UPPER_CASE, 0x1CE },
+ { 0x1CE, LOWER_CASE, 0x1CD },
+ { 0x1CF, UPPER_CASE, 0x1D0 },
+ { 0x1D0, LOWER_CASE, 0x1CF },
+ { 0x1D1, UPPER_CASE, 0x1D2 },
+ { 0x1D2, LOWER_CASE, 0x1D1 },
+ { 0x1D3, UPPER_CASE, 0x1D4 },
+ { 0x1D4, LOWER_CASE, 0x1D3 },
+ { 0x1D5, UPPER_CASE, 0x1D6 },
+ { 0x1D6, LOWER_CASE, 0x1D5 },
+ { 0x1D7, UPPER_CASE, 0x1D8 },
+ { 0x1D8, LOWER_CASE, 0x1D7 },
+ { 0x1D9, UPPER_CASE, 0x1DA },
+ { 0x1DA, LOWER_CASE, 0x1D9 },
+ { 0x1DB, UPPER_CASE, 0x1DC },
+ { 0x1DC, LOWER_CASE, 0x1DB },
+ { 0x1DD, LOWER_CASE, 0x18E },
+ { 0x1DE, UPPER_CASE, 0x1DF },
+ { 0x1DF, LOWER_CASE, 0x1DE },
+ { 0x1E0, UPPER_CASE, 0x1E1 },
+ { 0x1E1, LOWER_CASE, 0x1E0 },
+ { 0x1E2, UPPER_CASE, 0x1E3 },
+ { 0x1E3, LOWER_CASE, 0x1E2 },
+ { 0x1E4, UPPER_CASE, 0x1E5 },
+ { 0x1E5, LOWER_CASE, 0x1E4 },
+ { 0x1E6, UPPER_CASE, 0x1E7 },
+ { 0x1E7, LOWER_CASE, 0x1E6 },
+ { 0x1E8, UPPER_CASE, 0x1E9 },
+ { 0x1E9, LOWER_CASE, 0x1E8 },
+ { 0x1EA, UPPER_CASE, 0x1EB },
+ { 0x1EB, LOWER_CASE, 0x1EA },
+ { 0x1EC, UPPER_CASE, 0x1ED },
+ { 0x1ED, LOWER_CASE, 0x1EC },
+ { 0x1EE, UPPER_CASE, 0x1EF },
+ { 0x1EF, LOWER_CASE, 0x1EE },
+ { 0x1F1, UPPER_CASE, 0x1F3 },
+ { 0x1F2, LOWER_CASE, 0x1F1 },
+ { 0x1F3, LOWER_CASE, 0x1F1 },
+ { 0x1F4, UPPER_CASE, 0x1F5 },
+ { 0x1F5, LOWER_CASE, 0x1F4 },
+ { 0x1F6, UPPER_CASE, 0x195 },
+ { 0x1F7, UPPER_CASE, 0x1BF },
+ { 0x1F8, UPPER_CASE, 0x1F9 },
+ { 0x1F9, LOWER_CASE, 0x1F8 },
+ { 0x1FA, UPPER_CASE, 0x1FB },
+ { 0x1FB, LOWER_CASE, 0x1FA },
+ { 0x1FC, UPPER_CASE, 0x1FD },
+ { 0x1FD, LOWER_CASE, 0x1FC },
+ { 0x1FE, UPPER_CASE, 0x1FF },
+ { 0x1FF, LOWER_CASE, 0x1FE },
+ { 0x200, UPPER_CASE, 0x201 },
+ { 0x201, LOWER_CASE, 0x200 },
+ { 0x202, UPPER_CASE, 0x203 },
+ { 0x203, LOWER_CASE, 0x202 },
+ { 0x204, UPPER_CASE, 0x205 },
+ { 0x205, LOWER_CASE, 0x204 },
+ { 0x206, UPPER_CASE, 0x207 },
+ { 0x207, LOWER_CASE, 0x206 },
+ { 0x208, UPPER_CASE, 0x209 },
+ { 0x209, LOWER_CASE, 0x208 },
+ { 0x20A, UPPER_CASE, 0x20B },
+ { 0x20B, LOWER_CASE, 0x20A },
+ { 0x20C, UPPER_CASE, 0x20D },
+ { 0x20D, LOWER_CASE, 0x20C },
+ { 0x20E, UPPER_CASE, 0x20F },
+ { 0x20F, LOWER_CASE, 0x20E },
+ { 0x210, UPPER_CASE, 0x211 },
+ { 0x211, LOWER_CASE, 0x210 },
+ { 0x212, UPPER_CASE, 0x213 },
+ { 0x213, LOWER_CASE, 0x212 },
+ { 0x214, UPPER_CASE, 0x215 },
+ { 0x215, LOWER_CASE, 0x214 },
+ { 0x216, UPPER_CASE, 0x217 },
+ { 0x217, LOWER_CASE, 0x216 },
+ { 0x218, UPPER_CASE, 0x219 },
+ { 0x219, LOWER_CASE, 0x218 },
+ { 0x21A, UPPER_CASE, 0x21B },
+ { 0x21B, LOWER_CASE, 0x21A },
+ { 0x21C, UPPER_CASE, 0x21D },
+ { 0x21D, LOWER_CASE, 0x21C },
+ { 0x21E, UPPER_CASE, 0x21F },
+ { 0x21F, LOWER_CASE, 0x21E },
+ { 0x220, UPPER_CASE, 0x19E },
+ { 0x222, UPPER_CASE, 0x223 },
+ { 0x223, LOWER_CASE, 0x222 },
+ { 0x224, UPPER_CASE, 0x225 },
+ { 0x225, LOWER_CASE, 0x224 },
+ { 0x226, UPPER_CASE, 0x227 },
+ { 0x227, LOWER_CASE, 0x226 },
+ { 0x228, UPPER_CASE, 0x229 },
+ { 0x229, LOWER_CASE, 0x228 },
+ { 0x22A, UPPER_CASE, 0x22B },
+ { 0x22B, LOWER_CASE, 0x22A },
+ { 0x22C, UPPER_CASE, 0x22D },
+ { 0x22D, LOWER_CASE, 0x22C },
+ { 0x22E, UPPER_CASE, 0x22F },
+ { 0x22F, LOWER_CASE, 0x22E },
+ { 0x230, UPPER_CASE, 0x231 },
+ { 0x231, LOWER_CASE, 0x230 },
+ { 0x232, UPPER_CASE, 0x233 },
+ { 0x233, LOWER_CASE, 0x232 },
+ { 0x23A, UPPER_CASE, 0x2C65 },
+ { 0x23B, UPPER_CASE, 0x23C },
+ { 0x23C, LOWER_CASE, 0x23B },
+ { 0x23D, UPPER_CASE, 0x19A },
+ { 0x23E, UPPER_CASE, 0x2C66 },
+ { 0x23F, LOWER_CASE, 0x2C7E },
+ { 0x240, LOWER_CASE, 0x2C7F },
+ { 0x241, UPPER_CASE, 0x242 },
+ { 0x242, LOWER_CASE, 0x241 },
+ { 0x243, UPPER_CASE, 0x180 },
+ { 0x244, UPPER_CASE, 0x289 },
+ { 0x245, UPPER_CASE, 0x28C },
+ { 0x246, UPPER_CASE, 0x247 },
+ { 0x247, LOWER_CASE, 0x246 },
+ { 0x248, UPPER_CASE, 0x249 },
+ { 0x249, LOWER_CASE, 0x248 },
+ { 0x24A, UPPER_CASE, 0x24B },
+ { 0x24B, LOWER_CASE, 0x24A },
+ { 0x24C, UPPER_CASE, 0x24D },
+ { 0x24D, LOWER_CASE, 0x24C },
+ { 0x24E, UPPER_CASE, 0x24F },
+ { 0x24F, LOWER_CASE, 0x24E },
+ { 0x250, LOWER_CASE, 0x2C6F },
+ { 0x251, LOWER_CASE, 0x2C6D },
+ { 0x252, LOWER_CASE, 0x2C70 },
+ { 0x253, LOWER_CASE, 0x181 },
+ { 0x254, LOWER_CASE, 0x186 },
+ { 0x256, LOWER_CASE, 0x189 },
+ { 0x257, LOWER_CASE, 0x18A },
+ { 0x259, LOWER_CASE, 0x18F },
+ { 0x25B, LOWER_CASE, 0x190 },
+ { 0x25C, LOWER_CASE, 0xA7AB },
+ { 0x260, LOWER_CASE, 0x193 },
+ { 0x261, LOWER_CASE, 0xA7AC },
+ { 0x263, LOWER_CASE, 0x194 },
+ { 0x265, LOWER_CASE, 0xA78D },
+ { 0x266, LOWER_CASE, 0xA7AA },
+ { 0x268, LOWER_CASE, 0x197 },
+ { 0x269, LOWER_CASE, 0x196 },
+ { 0x26A, LOWER_CASE, 0xA7AE },
+ { 0x26B, LOWER_CASE, 0x2C62 },
+ { 0x26C, LOWER_CASE, 0xA7AD },
+ { 0x26F, LOWER_CASE, 0x19C },
+ { 0x271, LOWER_CASE, 0x2C6E },
+ { 0x272, LOWER_CASE, 0x19D },
+ { 0x275, LOWER_CASE, 0x19F },
+ { 0x27D, LOWER_CASE, 0x2C64 },
+ { 0x280, LOWER_CASE, 0x1A6 },
+ { 0x282, LOWER_CASE, 0xA7C5 },
+ { 0x283, LOWER_CASE, 0x1A9 },
+ { 0x287, LOWER_CASE, 0xA7B1 },
+ { 0x288, LOWER_CASE, 0x1AE },
+ { 0x289, LOWER_CASE, 0x244 },
+ { 0x28A, LOWER_CASE, 0x1B1 },
+ { 0x28B, LOWER_CASE, 0x1B2 },
+ { 0x28C, LOWER_CASE, 0x245 },
+ { 0x292, LOWER_CASE, 0x1B7 },
+ { 0x29D, LOWER_CASE, 0xA7B2 },
+ { 0x29E, LOWER_CASE, 0xA7B0 },
+ { 0x345, LOWER_CASE, 0x399 },
+ { 0x370, UPPER_CASE, 0x371 },
+ { 0x371, LOWER_CASE, 0x370 },
+ { 0x372, UPPER_CASE, 0x373 },
+ { 0x373, LOWER_CASE, 0x372 },
+ { 0x376, UPPER_CASE, 0x377 },
+ { 0x377, LOWER_CASE, 0x376 },
+ { 0x37B, LOWER_CASE, 0x3FD },
+ { 0x37C, LOWER_CASE, 0x3FE },
+ { 0x37D, LOWER_CASE, 0x3FF },
+ { 0x37F, UPPER_CASE, 0x3F3 },
+ { 0x386, UPPER_CASE, 0x3AC },
+ { 0x388, UPPER_CASE, 0x3AD },
+ { 0x389, UPPER_CASE, 0x3AE },
+ { 0x38A, UPPER_CASE, 0x3AF },
+ { 0x38C, UPPER_CASE, 0x3CC },
+ { 0x38E, UPPER_CASE, 0x3CD },
+ { 0x38F, UPPER_CASE, 0x3CE },
+ { 0x391, UPPER_CASE, 0x3B1 },
+ { 0x392, UPPER_CASE, 0x3B2 },
+ { 0x393, UPPER_CASE, 0x3B3 },
+ { 0x394, UPPER_CASE, 0x3B4 },
+ { 0x395, UPPER_CASE, 0x3B5 },
+ { 0x396, UPPER_CASE, 0x3B6 },
+ { 0x397, UPPER_CASE, 0x3B7 },
+ { 0x398, UPPER_CASE, 0x3B8 },
+ { 0x399, UPPER_CASE, 0x3B9 },
+ { 0x39A, UPPER_CASE, 0x3BA },
+ { 0x39B, UPPER_CASE, 0x3BB },
+ { 0x39C, UPPER_CASE, 0x3BC },
+ { 0x39D, UPPER_CASE, 0x3BD },
+ { 0x39E, UPPER_CASE, 0x3BE },
+ { 0x39F, UPPER_CASE, 0x3BF },
+ { 0x3A0, UPPER_CASE, 0x3C0 },
+ { 0x3A1, UPPER_CASE, 0x3C1 },
+ { 0x3A3, UPPER_CASE, 0x3C3 },
+ { 0x3A4, UPPER_CASE, 0x3C4 },
+ { 0x3A5, UPPER_CASE, 0x3C5 },
+ { 0x3A6, UPPER_CASE, 0x3C6 },
+ { 0x3A7, UPPER_CASE, 0x3C7 },
+ { 0x3A8, UPPER_CASE, 0x3C8 },
+ { 0x3A9, UPPER_CASE, 0x3C9 },
+ { 0x3AA, UPPER_CASE, 0x3CA },
+ { 0x3AB, UPPER_CASE, 0x3CB },
+ { 0x3AC, LOWER_CASE, 0x386 },
+ { 0x3AD, LOWER_CASE, 0x388 },
+ { 0x3AE, LOWER_CASE, 0x389 },
+ { 0x3AF, LOWER_CASE, 0x38A },
+ { 0x3B1, LOWER_CASE, 0x391 },
+ { 0x3B2, LOWER_CASE, 0x392 },
+ { 0x3B3, LOWER_CASE, 0x393 },
+ { 0x3B4, LOWER_CASE, 0x394 },
+ { 0x3B5, LOWER_CASE, 0x395 },
+ { 0x3B6, LOWER_CASE, 0x396 },
+ { 0x3B7, LOWER_CASE, 0x397 },
+ { 0x3B8, LOWER_CASE, 0x398 },
+ { 0x3B9, LOWER_CASE, 0x399 },
+ { 0x3BA, LOWER_CASE, 0x39A },
+ { 0x3BB, LOWER_CASE, 0x39B },
+ { 0x3BC, LOWER_CASE, 0x39C },
+ { 0x3BD, LOWER_CASE, 0x39D },
+ { 0x3BE, LOWER_CASE, 0x39E },
+ { 0x3BF, LOWER_CASE, 0x39F },
+ { 0x3C0, LOWER_CASE, 0x3A0 },
+ { 0x3C1, LOWER_CASE, 0x3A1 },
+ { 0x3C2, LOWER_CASE, 0x3A3 },
+ { 0x3C3, LOWER_CASE, 0x3A3 },
+ { 0x3C4, LOWER_CASE, 0x3A4 },
+ { 0x3C5, LOWER_CASE, 0x3A5 },
+ { 0x3C6, LOWER_CASE, 0x3A6 },
+ { 0x3C7, LOWER_CASE, 0x3A7 },
+ { 0x3C8, LOWER_CASE, 0x3A8 },
+ { 0x3C9, LOWER_CASE, 0x3A9 },
+ { 0x3CA, LOWER_CASE, 0x3AA },
+ { 0x3CB, LOWER_CASE, 0x3AB },
+ { 0x3CC, LOWER_CASE, 0x38C },
+ { 0x3CD, LOWER_CASE, 0x38E },
+ { 0x3CE, LOWER_CASE, 0x38F },
+ { 0x3CF, UPPER_CASE, 0x3D7 },
+ { 0x3D0, LOWER_CASE, 0x392 },
+ { 0x3D1, LOWER_CASE, 0x398 },
+ { 0x3D5, LOWER_CASE, 0x3A6 },
+ { 0x3D6, LOWER_CASE, 0x3A0 },
+ { 0x3D7, LOWER_CASE, 0x3CF },
+ { 0x3D8, UPPER_CASE, 0x3D9 },
+ { 0x3D9, LOWER_CASE, 0x3D8 },
+ { 0x3DA, UPPER_CASE, 0x3DB },
+ { 0x3DB, LOWER_CASE, 0x3DA },
+ { 0x3DC, UPPER_CASE, 0x3DD },
+ { 0x3DD, LOWER_CASE, 0x3DC },
+ { 0x3DE, UPPER_CASE, 0x3DF },
+ { 0x3DF, LOWER_CASE, 0x3DE },
+ { 0x3E0, UPPER_CASE, 0x3E1 },
+ { 0x3E1, LOWER_CASE, 0x3E0 },
+ { 0x3E2, UPPER_CASE, 0x3E3 },
+ { 0x3E3, LOWER_CASE, 0x3E2 },
+ { 0x3E4, UPPER_CASE, 0x3E5 },
+ { 0x3E5, LOWER_CASE, 0x3E4 },
+ { 0x3E6, UPPER_CASE, 0x3E7 },
+ { 0x3E7, LOWER_CASE, 0x3E6 },
+ { 0x3E8, UPPER_CASE, 0x3E9 },
+ { 0x3E9, LOWER_CASE, 0x3E8 },
+ { 0x3EA, UPPER_CASE, 0x3EB },
+ { 0x3EB, LOWER_CASE, 0x3EA },
+ { 0x3EC, UPPER_CASE, 0x3ED },
+ { 0x3ED, LOWER_CASE, 0x3EC },
+ { 0x3EE, UPPER_CASE, 0x3EF },
+ { 0x3EF, LOWER_CASE, 0x3EE },
+ { 0x3F0, LOWER_CASE, 0x39A },
+ { 0x3F1, LOWER_CASE, 0x3A1 },
+ { 0x3F2, LOWER_CASE, 0x3F9 },
+ { 0x3F3, LOWER_CASE, 0x37F },
+ { 0x3F4, UPPER_CASE, 0x3B8 },
+ { 0x3F5, LOWER_CASE, 0x395 },
+ { 0x3F7, UPPER_CASE, 0x3F8 },
+ { 0x3F8, LOWER_CASE, 0x3F7 },
+ { 0x3F9, UPPER_CASE, 0x3F2 },
+ { 0x3FA, UPPER_CASE, 0x3FB },
+ { 0x3FB, LOWER_CASE, 0x3FA },
+ { 0x3FD, UPPER_CASE, 0x37B },
+ { 0x3FE, UPPER_CASE, 0x37C },
+ { 0x3FF, UPPER_CASE, 0x37D },
+ { 0x400, UPPER_CASE, 0x450 },
+ { 0x401, UPPER_CASE, 0x451 },
+ { 0x402, UPPER_CASE, 0x452 },
+ { 0x403, UPPER_CASE, 0x453 },
+ { 0x404, UPPER_CASE, 0x454 },
+ { 0x405, UPPER_CASE, 0x455 },
+ { 0x406, UPPER_CASE, 0x456 },
+ { 0x407, UPPER_CASE, 0x457 },
+ { 0x408, UPPER_CASE, 0x458 },
+ { 0x409, UPPER_CASE, 0x459 },
+ { 0x40A, UPPER_CASE, 0x45A },
+ { 0x40B, UPPER_CASE, 0x45B },
+ { 0x40C, UPPER_CASE, 0x45C },
+ { 0x40D, UPPER_CASE, 0x45D },
+ { 0x40E, UPPER_CASE, 0x45E },
+ { 0x40F, UPPER_CASE, 0x45F },
+ { 0x410, UPPER_CASE, 0x430 },
+ { 0x411, UPPER_CASE, 0x431 },
+ { 0x412, UPPER_CASE, 0x432 },
+ { 0x413, UPPER_CASE, 0x433 },
+ { 0x414, UPPER_CASE, 0x434 },
+ { 0x415, UPPER_CASE, 0x435 },
+ { 0x416, UPPER_CASE, 0x436 },
+ { 0x417, UPPER_CASE, 0x437 },
+ { 0x418, UPPER_CASE, 0x438 },
+ { 0x419, UPPER_CASE, 0x439 },
+ { 0x41A, UPPER_CASE, 0x43A },
+ { 0x41B, UPPER_CASE, 0x43B },
+ { 0x41C, UPPER_CASE, 0x43C },
+ { 0x41D, UPPER_CASE, 0x43D },
+ { 0x41E, UPPER_CASE, 0x43E },
+ { 0x41F, UPPER_CASE, 0x43F },
+ { 0x420, UPPER_CASE, 0x440 },
+ { 0x421, UPPER_CASE, 0x441 },
+ { 0x422, UPPER_CASE, 0x442 },
+ { 0x423, UPPER_CASE, 0x443 },
+ { 0x424, UPPER_CASE, 0x444 },
+ { 0x425, UPPER_CASE, 0x445 },
+ { 0x426, UPPER_CASE, 0x446 },
+ { 0x427, UPPER_CASE, 0x447 },
+ { 0x428, UPPER_CASE, 0x448 },
+ { 0x429, UPPER_CASE, 0x449 },
+ { 0x42A, UPPER_CASE, 0x44A },
+ { 0x42B, UPPER_CASE, 0x44B },
+ { 0x42C, UPPER_CASE, 0x44C },
+ { 0x42D, UPPER_CASE, 0x44D },
+ { 0x42E, UPPER_CASE, 0x44E },
+ { 0x42F, UPPER_CASE, 0x44F },
+ { 0x430, LOWER_CASE, 0x410 },
+ { 0x431, LOWER_CASE, 0x411 },
+ { 0x432, LOWER_CASE, 0x412 },
+ { 0x433, LOWER_CASE, 0x413 },
+ { 0x434, LOWER_CASE, 0x414 },
+ { 0x435, LOWER_CASE, 0x415 },
+ { 0x436, LOWER_CASE, 0x416 },
+ { 0x437, LOWER_CASE, 0x417 },
+ { 0x438, LOWER_CASE, 0x418 },
+ { 0x439, LOWER_CASE, 0x419 },
+ { 0x43A, LOWER_CASE, 0x41A },
+ { 0x43B, LOWER_CASE, 0x41B },
+ { 0x43C, LOWER_CASE, 0x41C },
+ { 0x43D, LOWER_CASE, 0x41D },
+ { 0x43E, LOWER_CASE, 0x41E },
+ { 0x43F, LOWER_CASE, 0x41F },
+ { 0x440, LOWER_CASE, 0x420 },
+ { 0x441, LOWER_CASE, 0x421 },
+ { 0x442, LOWER_CASE, 0x422 },
+ { 0x443, LOWER_CASE, 0x423 },
+ { 0x444, LOWER_CASE, 0x424 },
+ { 0x445, LOWER_CASE, 0x425 },
+ { 0x446, LOWER_CASE, 0x426 },
+ { 0x447, LOWER_CASE, 0x427 },
+ { 0x448, LOWER_CASE, 0x428 },
+ { 0x449, LOWER_CASE, 0x429 },
+ { 0x44A, LOWER_CASE, 0x42A },
+ { 0x44B, LOWER_CASE, 0x42B },
+ { 0x44C, LOWER_CASE, 0x42C },
+ { 0x44D, LOWER_CASE, 0x42D },
+ { 0x44E, LOWER_CASE, 0x42E },
+ { 0x44F, LOWER_CASE, 0x42F },
+ { 0x450, LOWER_CASE, 0x400 },
+ { 0x451, LOWER_CASE, 0x401 },
+ { 0x452, LOWER_CASE, 0x402 },
+ { 0x453, LOWER_CASE, 0x403 },
+ { 0x454, LOWER_CASE, 0x404 },
+ { 0x455, LOWER_CASE, 0x405 },
+ { 0x456, LOWER_CASE, 0x406 },
+ { 0x457, LOWER_CASE, 0x407 },
+ { 0x458, LOWER_CASE, 0x408 },
+ { 0x459, LOWER_CASE, 0x409 },
+ { 0x45A, LOWER_CASE, 0x40A },
+ { 0x45B, LOWER_CASE, 0x40B },
+ { 0x45C, LOWER_CASE, 0x40C },
+ { 0x45D, LOWER_CASE, 0x40D },
+ { 0x45E, LOWER_CASE, 0x40E },
+ { 0x45F, LOWER_CASE, 0x40F },
+ { 0x460, UPPER_CASE, 0x461 },
+ { 0x461, LOWER_CASE, 0x460 },
+ { 0x462, UPPER_CASE, 0x463 },
+ { 0x463, LOWER_CASE, 0x462 },
+ { 0x464, UPPER_CASE, 0x465 },
+ { 0x465, LOWER_CASE, 0x464 },
+ { 0x466, UPPER_CASE, 0x467 },
+ { 0x467, LOWER_CASE, 0x466 },
+ { 0x468, UPPER_CASE, 0x469 },
+ { 0x469, LOWER_CASE, 0x468 },
+ { 0x46A, UPPER_CASE, 0x46B },
+ { 0x46B, LOWER_CASE, 0x46A },
+ { 0x46C, UPPER_CASE, 0x46D },
+ { 0x46D, LOWER_CASE, 0x46C },
+ { 0x46E, UPPER_CASE, 0x46F },
+ { 0x46F, LOWER_CASE, 0x46E },
+ { 0x470, UPPER_CASE, 0x471 },
+ { 0x471, LOWER_CASE, 0x470 },
+ { 0x472, UPPER_CASE, 0x473 },
+ { 0x473, LOWER_CASE, 0x472 },
+ { 0x474, UPPER_CASE, 0x475 },
+ { 0x475, LOWER_CASE, 0x474 },
+ { 0x476, UPPER_CASE, 0x477 },
+ { 0x477, LOWER_CASE, 0x476 },
+ { 0x478, UPPER_CASE, 0x479 },
+ { 0x479, LOWER_CASE, 0x478 },
+ { 0x47A, UPPER_CASE, 0x47B },
+ { 0x47B, LOWER_CASE, 0x47A },
+ { 0x47C, UPPER_CASE, 0x47D },
+ { 0x47D, LOWER_CASE, 0x47C },
+ { 0x47E, UPPER_CASE, 0x47F },
+ { 0x47F, LOWER_CASE, 0x47E },
+ { 0x480, UPPER_CASE, 0x481 },
+ { 0x481, LOWER_CASE, 0x480 },
+ { 0x48A, UPPER_CASE, 0x48B },
+ { 0x48B, LOWER_CASE, 0x48A },
+ { 0x48C, UPPER_CASE, 0x48D },
+ { 0x48D, LOWER_CASE, 0x48C },
+ { 0x48E, UPPER_CASE, 0x48F },
+ { 0x48F, LOWER_CASE, 0x48E },
+ { 0x490, UPPER_CASE, 0x491 },
+ { 0x491, LOWER_CASE, 0x490 },
+ { 0x492, UPPER_CASE, 0x493 },
+ { 0x493, LOWER_CASE, 0x492 },
+ { 0x494, UPPER_CASE, 0x495 },
+ { 0x495, LOWER_CASE, 0x494 },
+ { 0x496, UPPER_CASE, 0x497 },
+ { 0x497, LOWER_CASE, 0x496 },
+ { 0x498, UPPER_CASE, 0x499 },
+ { 0x499, LOWER_CASE, 0x498 },
+ { 0x49A, UPPER_CASE, 0x49B },
+ { 0x49B, LOWER_CASE, 0x49A },
+ { 0x49C, UPPER_CASE, 0x49D },
+ { 0x49D, LOWER_CASE, 0x49C },
+ { 0x49E, UPPER_CASE, 0x49F },
+ { 0x49F, LOWER_CASE, 0x49E },
+ { 0x4A0, UPPER_CASE, 0x4A1 },
+ { 0x4A1, LOWER_CASE, 0x4A0 },
+ { 0x4A2, UPPER_CASE, 0x4A3 },
+ { 0x4A3, LOWER_CASE, 0x4A2 },
+ { 0x4A4, UPPER_CASE, 0x4A5 },
+ { 0x4A5, LOWER_CASE, 0x4A4 },
+ { 0x4A6, UPPER_CASE, 0x4A7 },
+ { 0x4A7, LOWER_CASE, 0x4A6 },
+ { 0x4A8, UPPER_CASE, 0x4A9 },
+ { 0x4A9, LOWER_CASE, 0x4A8 },
+ { 0x4AA, UPPER_CASE, 0x4AB },
+ { 0x4AB, LOWER_CASE, 0x4AA },
+ { 0x4AC, UPPER_CASE, 0x4AD },
+ { 0x4AD, LOWER_CASE, 0x4AC },
+ { 0x4AE, UPPER_CASE, 0x4AF },
+ { 0x4AF, LOWER_CASE, 0x4AE },
+ { 0x4B0, UPPER_CASE, 0x4B1 },
+ { 0x4B1, LOWER_CASE, 0x4B0 },
+ { 0x4B2, UPPER_CASE, 0x4B3 },
+ { 0x4B3, LOWER_CASE, 0x4B2 },
+ { 0x4B4, UPPER_CASE, 0x4B5 },
+ { 0x4B5, LOWER_CASE, 0x4B4 },
+ { 0x4B6, UPPER_CASE, 0x4B7 },
+ { 0x4B7, LOWER_CASE, 0x4B6 },
+ { 0x4B8, UPPER_CASE, 0x4B9 },
+ { 0x4B9, LOWER_CASE, 0x4B8 },
+ { 0x4BA, UPPER_CASE, 0x4BB },
+ { 0x4BB, LOWER_CASE, 0x4BA },
+ { 0x4BC, UPPER_CASE, 0x4BD },
+ { 0x4BD, LOWER_CASE, 0x4BC },
+ { 0x4BE, UPPER_CASE, 0x4BF },
+ { 0x4BF, LOWER_CASE, 0x4BE },
+ { 0x4C0, UPPER_CASE, 0x4CF },
+ { 0x4C1, UPPER_CASE, 0x4C2 },
+ { 0x4C2, LOWER_CASE, 0x4C1 },
+ { 0x4C3, UPPER_CASE, 0x4C4 },
+ { 0x4C4, LOWER_CASE, 0x4C3 },
+ { 0x4C5, UPPER_CASE, 0x4C6 },
+ { 0x4C6, LOWER_CASE, 0x4C5 },
+ { 0x4C7, UPPER_CASE, 0x4C8 },
+ { 0x4C8, LOWER_CASE, 0x4C7 },
+ { 0x4C9, UPPER_CASE, 0x4CA },
+ { 0x4CA, LOWER_CASE, 0x4C9 },
+ { 0x4CB, UPPER_CASE, 0x4CC },
+ { 0x4CC, LOWER_CASE, 0x4CB },
+ { 0x4CD, UPPER_CASE, 0x4CE },
+ { 0x4CE, LOWER_CASE, 0x4CD },
+ { 0x4CF, LOWER_CASE, 0x4C0 },
+ { 0x4D0, UPPER_CASE, 0x4D1 },
+ { 0x4D1, LOWER_CASE, 0x4D0 },
+ { 0x4D2, UPPER_CASE, 0x4D3 },
+ { 0x4D3, LOWER_CASE, 0x4D2 },
+ { 0x4D4, UPPER_CASE, 0x4D5 },
+ { 0x4D5, LOWER_CASE, 0x4D4 },
+ { 0x4D6, UPPER_CASE, 0x4D7 },
+ { 0x4D7, LOWER_CASE, 0x4D6 },
+ { 0x4D8, UPPER_CASE, 0x4D9 },
+ { 0x4D9, LOWER_CASE, 0x4D8 },
+ { 0x4DA, UPPER_CASE, 0x4DB },
+ { 0x4DB, LOWER_CASE, 0x4DA },
+ { 0x4DC, UPPER_CASE, 0x4DD },
+ { 0x4DD, LOWER_CASE, 0x4DC },
+ { 0x4DE, UPPER_CASE, 0x4DF },
+ { 0x4DF, LOWER_CASE, 0x4DE },
+ { 0x4E0, UPPER_CASE, 0x4E1 },
+ { 0x4E1, LOWER_CASE, 0x4E0 },
+ { 0x4E2, UPPER_CASE, 0x4E3 },
+ { 0x4E3, LOWER_CASE, 0x4E2 },
+ { 0x4E4, UPPER_CASE, 0x4E5 },
+ { 0x4E5, LOWER_CASE, 0x4E4 },
+ { 0x4E6, UPPER_CASE, 0x4E7 },
+ { 0x4E7, LOWER_CASE, 0x4E6 },
+ { 0x4E8, UPPER_CASE, 0x4E9 },
+ { 0x4E9, LOWER_CASE, 0x4E8 },
+ { 0x4EA, UPPER_CASE, 0x4EB },
+ { 0x4EB, LOWER_CASE, 0x4EA },
+ { 0x4EC, UPPER_CASE, 0x4ED },
+ { 0x4ED, LOWER_CASE, 0x4EC },
+ { 0x4EE, UPPER_CASE, 0x4EF },
+ { 0x4EF, LOWER_CASE, 0x4EE },
+ { 0x4F0, UPPER_CASE, 0x4F1 },
+ { 0x4F1, LOWER_CASE, 0x4F0 },
+ { 0x4F2, UPPER_CASE, 0x4F3 },
+ { 0x4F3, LOWER_CASE, 0x4F2 },
+ { 0x4F4, UPPER_CASE, 0x4F5 },
+ { 0x4F5, LOWER_CASE, 0x4F4 },
+ { 0x4F6, UPPER_CASE, 0x4F7 },
+ { 0x4F7, LOWER_CASE, 0x4F6 },
+ { 0x4F8, UPPER_CASE, 0x4F9 },
+ { 0x4F9, LOWER_CASE, 0x4F8 },
+ { 0x4FA, UPPER_CASE, 0x4FB },
+ { 0x4FB, LOWER_CASE, 0x4FA },
+ { 0x4FC, UPPER_CASE, 0x4FD },
+ { 0x4FD, LOWER_CASE, 0x4FC },
+ { 0x4FE, UPPER_CASE, 0x4FF },
+ { 0x4FF, LOWER_CASE, 0x4FE },
+ { 0x500, UPPER_CASE, 0x501 },
+ { 0x501, LOWER_CASE, 0x500 },
+ { 0x502, UPPER_CASE, 0x503 },
+ { 0x503, LOWER_CASE, 0x502 },
+ { 0x504, UPPER_CASE, 0x505 },
+ { 0x505, LOWER_CASE, 0x504 },
+ { 0x506, UPPER_CASE, 0x507 },
+ { 0x507, LOWER_CASE, 0x506 },
+ { 0x508, UPPER_CASE, 0x509 },
+ { 0x509, LOWER_CASE, 0x508 },
+ { 0x50A, UPPER_CASE, 0x50B },
+ { 0x50B, LOWER_CASE, 0x50A },
+ { 0x50C, UPPER_CASE, 0x50D },
+ { 0x50D, LOWER_CASE, 0x50C },
+ { 0x50E, UPPER_CASE, 0x50F },
+ { 0x50F, LOWER_CASE, 0x50E },
+ { 0x510, UPPER_CASE, 0x511 },
+ { 0x511, LOWER_CASE, 0x510 },
+ { 0x512, UPPER_CASE, 0x513 },
+ { 0x513, LOWER_CASE, 0x512 },
+ { 0x514, UPPER_CASE, 0x515 },
+ { 0x515, LOWER_CASE, 0x514 },
+ { 0x516, UPPER_CASE, 0x517 },
+ { 0x517, LOWER_CASE, 0x516 },
+ { 0x518, UPPER_CASE, 0x519 },
+ { 0x519, LOWER_CASE, 0x518 },
+ { 0x51A, UPPER_CASE, 0x51B },
+ { 0x51B, LOWER_CASE, 0x51A },
+ { 0x51C, UPPER_CASE, 0x51D },
+ { 0x51D, LOWER_CASE, 0x51C },
+ { 0x51E, UPPER_CASE, 0x51F },
+ { 0x51F, LOWER_CASE, 0x51E },
+ { 0x520, UPPER_CASE, 0x521 },
+ { 0x521, LOWER_CASE, 0x520 },
+ { 0x522, UPPER_CASE, 0x523 },
+ { 0x523, LOWER_CASE, 0x522 },
+ { 0x524, UPPER_CASE, 0x525 },
+ { 0x525, LOWER_CASE, 0x524 },
+ { 0x526, UPPER_CASE, 0x527 },
+ { 0x527, LOWER_CASE, 0x526 },
+ { 0x528, UPPER_CASE, 0x529 },
+ { 0x529, LOWER_CASE, 0x528 },
+ { 0x52A, UPPER_CASE, 0x52B },
+ { 0x52B, LOWER_CASE, 0x52A },
+ { 0x52C, UPPER_CASE, 0x52D },
+ { 0x52D, LOWER_CASE, 0x52C },
+ { 0x52E, UPPER_CASE, 0x52F },
+ { 0x52F, LOWER_CASE, 0x52E },
+ { 0x531, UPPER_CASE, 0x561 },
+ { 0x532, UPPER_CASE, 0x562 },
+ { 0x533, UPPER_CASE, 0x563 },
+ { 0x534, UPPER_CASE, 0x564 },
+ { 0x535, UPPER_CASE, 0x565 },
+ { 0x536, UPPER_CASE, 0x566 },
+ { 0x537, UPPER_CASE, 0x567 },
+ { 0x538, UPPER_CASE, 0x568 },
+ { 0x539, UPPER_CASE, 0x569 },
+ { 0x53A, UPPER_CASE, 0x56A },
+ { 0x53B, UPPER_CASE, 0x56B },
+ { 0x53C, UPPER_CASE, 0x56C },
+ { 0x53D, UPPER_CASE, 0x56D },
+ { 0x53E, UPPER_CASE, 0x56E },
+ { 0x53F, UPPER_CASE, 0x56F },
+ { 0x540, UPPER_CASE, 0x570 },
+ { 0x541, UPPER_CASE, 0x571 },
+ { 0x542, UPPER_CASE, 0x572 },
+ { 0x543, UPPER_CASE, 0x573 },
+ { 0x544, UPPER_CASE, 0x574 },
+ { 0x545, UPPER_CASE, 0x575 },
+ { 0x546, UPPER_CASE, 0x576 },
+ { 0x547, UPPER_CASE, 0x577 },
+ { 0x548, UPPER_CASE, 0x578 },
+ { 0x549, UPPER_CASE, 0x579 },
+ { 0x54A, UPPER_CASE, 0x57A },
+ { 0x54B, UPPER_CASE, 0x57B },
+ { 0x54C, UPPER_CASE, 0x57C },
+ { 0x54D, UPPER_CASE, 0x57D },
+ { 0x54E, UPPER_CASE, 0x57E },
+ { 0x54F, UPPER_CASE, 0x57F },
+ { 0x550, UPPER_CASE, 0x580 },
+ { 0x551, UPPER_CASE, 0x581 },
+ { 0x552, UPPER_CASE, 0x582 },
+ { 0x553, UPPER_CASE, 0x583 },
+ { 0x554, UPPER_CASE, 0x584 },
+ { 0x555, UPPER_CASE, 0x585 },
+ { 0x556, UPPER_CASE, 0x586 },
+ { 0x561, LOWER_CASE, 0x531 },
+ { 0x562, LOWER_CASE, 0x532 },
+ { 0x563, LOWER_CASE, 0x533 },
+ { 0x564, LOWER_CASE, 0x534 },
+ { 0x565, LOWER_CASE, 0x535 },
+ { 0x566, LOWER_CASE, 0x536 },
+ { 0x567, LOWER_CASE, 0x537 },
+ { 0x568, LOWER_CASE, 0x538 },
+ { 0x569, LOWER_CASE, 0x539 },
+ { 0x56A, LOWER_CASE, 0x53A },
+ { 0x56B, LOWER_CASE, 0x53B },
+ { 0x56C, LOWER_CASE, 0x53C },
+ { 0x56D, LOWER_CASE, 0x53D },
+ { 0x56E, LOWER_CASE, 0x53E },
+ { 0x56F, LOWER_CASE, 0x53F },
+ { 0x570, LOWER_CASE, 0x540 },
+ { 0x571, LOWER_CASE, 0x541 },
+ { 0x572, LOWER_CASE, 0x542 },
+ { 0x573, LOWER_CASE, 0x543 },
+ { 0x574, LOWER_CASE, 0x544 },
+ { 0x575, LOWER_CASE, 0x545 },
+ { 0x576, LOWER_CASE, 0x546 },
+ { 0x577, LOWER_CASE, 0x547 },
+ { 0x578, LOWER_CASE, 0x548 },
+ { 0x579, LOWER_CASE, 0x549 },
+ { 0x57A, LOWER_CASE, 0x54A },
+ { 0x57B, LOWER_CASE, 0x54B },
+ { 0x57C, LOWER_CASE, 0x54C },
+ { 0x57D, LOWER_CASE, 0x54D },
+ { 0x57E, LOWER_CASE, 0x54E },
+ { 0x57F, LOWER_CASE, 0x54F },
+ { 0x580, LOWER_CASE, 0x550 },
+ { 0x581, LOWER_CASE, 0x551 },
+ { 0x582, LOWER_CASE, 0x552 },
+ { 0x583, LOWER_CASE, 0x553 },
+ { 0x584, LOWER_CASE, 0x554 },
+ { 0x585, LOWER_CASE, 0x555 },
+ { 0x586, LOWER_CASE, 0x556 },
+ { 0x10A0, UPPER_CASE, 0x2D00 },
+ { 0x10A1, UPPER_CASE, 0x2D01 },
+ { 0x10A2, UPPER_CASE, 0x2D02 },
+ { 0x10A3, UPPER_CASE, 0x2D03 },
+ { 0x10A4, UPPER_CASE, 0x2D04 },
+ { 0x10A5, UPPER_CASE, 0x2D05 },
+ { 0x10A6, UPPER_CASE, 0x2D06 },
+ { 0x10A7, UPPER_CASE, 0x2D07 },
+ { 0x10A8, UPPER_CASE, 0x2D08 },
+ { 0x10A9, UPPER_CASE, 0x2D09 },
+ { 0x10AA, UPPER_CASE, 0x2D0A },
+ { 0x10AB, UPPER_CASE, 0x2D0B },
+ { 0x10AC, UPPER_CASE, 0x2D0C },
+ { 0x10AD, UPPER_CASE, 0x2D0D },
+ { 0x10AE, UPPER_CASE, 0x2D0E },
+ { 0x10AF, UPPER_CASE, 0x2D0F },
+ { 0x10B0, UPPER_CASE, 0x2D10 },
+ { 0x10B1, UPPER_CASE, 0x2D11 },
+ { 0x10B2, UPPER_CASE, 0x2D12 },
+ { 0x10B3, UPPER_CASE, 0x2D13 },
+ { 0x10B4, UPPER_CASE, 0x2D14 },
+ { 0x10B5, UPPER_CASE, 0x2D15 },
+ { 0x10B6, UPPER_CASE, 0x2D16 },
+ { 0x10B7, UPPER_CASE, 0x2D17 },
+ { 0x10B8, UPPER_CASE, 0x2D18 },
+ { 0x10B9, UPPER_CASE, 0x2D19 },
+ { 0x10BA, UPPER_CASE, 0x2D1A },
+ { 0x10BB, UPPER_CASE, 0x2D1B },
+ { 0x10BC, UPPER_CASE, 0x2D1C },
+ { 0x10BD, UPPER_CASE, 0x2D1D },
+ { 0x10BE, UPPER_CASE, 0x2D1E },
+ { 0x10BF, UPPER_CASE, 0x2D1F },
+ { 0x10C0, UPPER_CASE, 0x2D20 },
+ { 0x10C1, UPPER_CASE, 0x2D21 },
+ { 0x10C2, UPPER_CASE, 0x2D22 },
+ { 0x10C3, UPPER_CASE, 0x2D23 },
+ { 0x10C4, UPPER_CASE, 0x2D24 },
+ { 0x10C5, UPPER_CASE, 0x2D25 },
+ { 0x10C7, UPPER_CASE, 0x2D27 },
+ { 0x10CD, UPPER_CASE, 0x2D2D },
+ { 0x10D0, LOWER_CASE, 0x1C90 },
+ { 0x10D1, LOWER_CASE, 0x1C91 },
+ { 0x10D2, LOWER_CASE, 0x1C92 },
+ { 0x10D3, LOWER_CASE, 0x1C93 },
+ { 0x10D4, LOWER_CASE, 0x1C94 },
+ { 0x10D5, LOWER_CASE, 0x1C95 },
+ { 0x10D6, LOWER_CASE, 0x1C96 },
+ { 0x10D7, LOWER_CASE, 0x1C97 },
+ { 0x10D8, LOWER_CASE, 0x1C98 },
+ { 0x10D9, LOWER_CASE, 0x1C99 },
+ { 0x10DA, LOWER_CASE, 0x1C9A },
+ { 0x10DB, LOWER_CASE, 0x1C9B },
+ { 0x10DC, LOWER_CASE, 0x1C9C },
+ { 0x10DD, LOWER_CASE, 0x1C9D },
+ { 0x10DE, LOWER_CASE, 0x1C9E },
+ { 0x10DF, LOWER_CASE, 0x1C9F },
+ { 0x10E0, LOWER_CASE, 0x1CA0 },
+ { 0x10E1, LOWER_CASE, 0x1CA1 },
+ { 0x10E2, LOWER_CASE, 0x1CA2 },
+ { 0x10E3, LOWER_CASE, 0x1CA3 },
+ { 0x10E4, LOWER_CASE, 0x1CA4 },
+ { 0x10E5, LOWER_CASE, 0x1CA5 },
+ { 0x10E6, LOWER_CASE, 0x1CA6 },
+ { 0x10E7, LOWER_CASE, 0x1CA7 },
+ { 0x10E8, LOWER_CASE, 0x1CA8 },
+ { 0x10E9, LOWER_CASE, 0x1CA9 },
+ { 0x10EA, LOWER_CASE, 0x1CAA },
+ { 0x10EB, LOWER_CASE, 0x1CAB },
+ { 0x10EC, LOWER_CASE, 0x1CAC },
+ { 0x10ED, LOWER_CASE, 0x1CAD },
+ { 0x10EE, LOWER_CASE, 0x1CAE },
+ { 0x10EF, LOWER_CASE, 0x1CAF },
+ { 0x10F0, LOWER_CASE, 0x1CB0 },
+ { 0x10F1, LOWER_CASE, 0x1CB1 },
+ { 0x10F2, LOWER_CASE, 0x1CB2 },
+ { 0x10F3, LOWER_CASE, 0x1CB3 },
+ { 0x10F4, LOWER_CASE, 0x1CB4 },
+ { 0x10F5, LOWER_CASE, 0x1CB5 },
+ { 0x10F6, LOWER_CASE, 0x1CB6 },
+ { 0x10F7, LOWER_CASE, 0x1CB7 },
+ { 0x10F8, LOWER_CASE, 0x1CB8 },
+ { 0x10F9, LOWER_CASE, 0x1CB9 },
+ { 0x10FA, LOWER_CASE, 0x1CBA },
+ { 0x10FD, LOWER_CASE, 0x1CBD },
+ { 0x10FE, LOWER_CASE, 0x1CBE },
+ { 0x10FF, LOWER_CASE, 0x1CBF },
+ { 0x13A0, UPPER_CASE, 0xAB70 },
+ { 0x13A1, UPPER_CASE, 0xAB71 },
+ { 0x13A2, UPPER_CASE, 0xAB72 },
+ { 0x13A3, UPPER_CASE, 0xAB73 },
+ { 0x13A4, UPPER_CASE, 0xAB74 },
+ { 0x13A5, UPPER_CASE, 0xAB75 },
+ { 0x13A6, UPPER_CASE, 0xAB76 },
+ { 0x13A7, UPPER_CASE, 0xAB77 },
+ { 0x13A8, UPPER_CASE, 0xAB78 },
+ { 0x13A9, UPPER_CASE, 0xAB79 },
+ { 0x13AA, UPPER_CASE, 0xAB7A },
+ { 0x13AB, UPPER_CASE, 0xAB7B },
+ { 0x13AC, UPPER_CASE, 0xAB7C },
+ { 0x13AD, UPPER_CASE, 0xAB7D },
+ { 0x13AE, UPPER_CASE, 0xAB7E },
+ { 0x13AF, UPPER_CASE, 0xAB7F },
+ { 0x13B0, UPPER_CASE, 0xAB80 },
+ { 0x13B1, UPPER_CASE, 0xAB81 },
+ { 0x13B2, UPPER_CASE, 0xAB82 },
+ { 0x13B3, UPPER_CASE, 0xAB83 },
+ { 0x13B4, UPPER_CASE, 0xAB84 },
+ { 0x13B5, UPPER_CASE, 0xAB85 },
+ { 0x13B6, UPPER_CASE, 0xAB86 },
+ { 0x13B7, UPPER_CASE, 0xAB87 },
+ { 0x13B8, UPPER_CASE, 0xAB88 },
+ { 0x13B9, UPPER_CASE, 0xAB89 },
+ { 0x13BA, UPPER_CASE, 0xAB8A },
+ { 0x13BB, UPPER_CASE, 0xAB8B },
+ { 0x13BC, UPPER_CASE, 0xAB8C },
+ { 0x13BD, UPPER_CASE, 0xAB8D },
+ { 0x13BE, UPPER_CASE, 0xAB8E },
+ { 0x13BF, UPPER_CASE, 0xAB8F },
+ { 0x13C0, UPPER_CASE, 0xAB90 },
+ { 0x13C1, UPPER_CASE, 0xAB91 },
+ { 0x13C2, UPPER_CASE, 0xAB92 },
+ { 0x13C3, UPPER_CASE, 0xAB93 },
+ { 0x13C4, UPPER_CASE, 0xAB94 },
+ { 0x13C5, UPPER_CASE, 0xAB95 },
+ { 0x13C6, UPPER_CASE, 0xAB96 },
+ { 0x13C7, UPPER_CASE, 0xAB97 },
+ { 0x13C8, UPPER_CASE, 0xAB98 },
+ { 0x13C9, UPPER_CASE, 0xAB99 },
+ { 0x13CA, UPPER_CASE, 0xAB9A },
+ { 0x13CB, UPPER_CASE, 0xAB9B },
+ { 0x13CC, UPPER_CASE, 0xAB9C },
+ { 0x13CD, UPPER_CASE, 0xAB9D },
+ { 0x13CE, UPPER_CASE, 0xAB9E },
+ { 0x13CF, UPPER_CASE, 0xAB9F },
+ { 0x13D0, UPPER_CASE, 0xABA0 },
+ { 0x13D1, UPPER_CASE, 0xABA1 },
+ { 0x13D2, UPPER_CASE, 0xABA2 },
+ { 0x13D3, UPPER_CASE, 0xABA3 },
+ { 0x13D4, UPPER_CASE, 0xABA4 },
+ { 0x13D5, UPPER_CASE, 0xABA5 },
+ { 0x13D6, UPPER_CASE, 0xABA6 },
+ { 0x13D7, UPPER_CASE, 0xABA7 },
+ { 0x13D8, UPPER_CASE, 0xABA8 },
+ { 0x13D9, UPPER_CASE, 0xABA9 },
+ { 0x13DA, UPPER_CASE, 0xABAA },
+ { 0x13DB, UPPER_CASE, 0xABAB },
+ { 0x13DC, UPPER_CASE, 0xABAC },
+ { 0x13DD, UPPER_CASE, 0xABAD },
+ { 0x13DE, UPPER_CASE, 0xABAE },
+ { 0x13DF, UPPER_CASE, 0xABAF },
+ { 0x13E0, UPPER_CASE, 0xABB0 },
+ { 0x13E1, UPPER_CASE, 0xABB1 },
+ { 0x13E2, UPPER_CASE, 0xABB2 },
+ { 0x13E3, UPPER_CASE, 0xABB3 },
+ { 0x13E4, UPPER_CASE, 0xABB4 },
+ { 0x13E5, UPPER_CASE, 0xABB5 },
+ { 0x13E6, UPPER_CASE, 0xABB6 },
+ { 0x13E7, UPPER_CASE, 0xABB7 },
+ { 0x13E8, UPPER_CASE, 0xABB8 },
+ { 0x13E9, UPPER_CASE, 0xABB9 },
+ { 0x13EA, UPPER_CASE, 0xABBA },
+ { 0x13EB, UPPER_CASE, 0xABBB },
+ { 0x13EC, UPPER_CASE, 0xABBC },
+ { 0x13ED, UPPER_CASE, 0xABBD },
+ { 0x13EE, UPPER_CASE, 0xABBE },
+ { 0x13EF, UPPER_CASE, 0xABBF },
+ { 0x13F0, UPPER_CASE, 0x13F8 },
+ { 0x13F1, UPPER_CASE, 0x13F9 },
+ { 0x13F2, UPPER_CASE, 0x13FA },
+ { 0x13F3, UPPER_CASE, 0x13FB },
+ { 0x13F4, UPPER_CASE, 0x13FC },
+ { 0x13F5, UPPER_CASE, 0x13FD },
+ { 0x13F8, LOWER_CASE, 0x13F0 },
+ { 0x13F9, LOWER_CASE, 0x13F1 },
+ { 0x13FA, LOWER_CASE, 0x13F2 },
+ { 0x13FB, LOWER_CASE, 0x13F3 },
+ { 0x13FC, LOWER_CASE, 0x13F4 },
+ { 0x13FD, LOWER_CASE, 0x13F5 },
+ { 0x1C80, LOWER_CASE, 0x412 },
+ { 0x1C81, LOWER_CASE, 0x414 },
+ { 0x1C82, LOWER_CASE, 0x41E },
+ { 0x1C83, LOWER_CASE, 0x421 },
+ { 0x1C84, LOWER_CASE, 0x422 },
+ { 0x1C85, LOWER_CASE, 0x422 },
+ { 0x1C86, LOWER_CASE, 0x42A },
+ { 0x1C87, LOWER_CASE, 0x462 },
+ { 0x1C88, LOWER_CASE, 0xA64A },
+ { 0x1C90, UPPER_CASE, 0x10D0 },
+ { 0x1C91, UPPER_CASE, 0x10D1 },
+ { 0x1C92, UPPER_CASE, 0x10D2 },
+ { 0x1C93, UPPER_CASE, 0x10D3 },
+ { 0x1C94, UPPER_CASE, 0x10D4 },
+ { 0x1C95, UPPER_CASE, 0x10D5 },
+ { 0x1C96, UPPER_CASE, 0x10D6 },
+ { 0x1C97, UPPER_CASE, 0x10D7 },
+ { 0x1C98, UPPER_CASE, 0x10D8 },
+ { 0x1C99, UPPER_CASE, 0x10D9 },
+ { 0x1C9A, UPPER_CASE, 0x10DA },
+ { 0x1C9B, UPPER_CASE, 0x10DB },
+ { 0x1C9C, UPPER_CASE, 0x10DC },
+ { 0x1C9D, UPPER_CASE, 0x10DD },
+ { 0x1C9E, UPPER_CASE, 0x10DE },
+ { 0x1C9F, UPPER_CASE, 0x10DF },
+ { 0x1CA0, UPPER_CASE, 0x10E0 },
+ { 0x1CA1, UPPER_CASE, 0x10E1 },
+ { 0x1CA2, UPPER_CASE, 0x10E2 },
+ { 0x1CA3, UPPER_CASE, 0x10E3 },
+ { 0x1CA4, UPPER_CASE, 0x10E4 },
+ { 0x1CA5, UPPER_CASE, 0x10E5 },
+ { 0x1CA6, UPPER_CASE, 0x10E6 },
+ { 0x1CA7, UPPER_CASE, 0x10E7 },
+ { 0x1CA8, UPPER_CASE, 0x10E8 },
+ { 0x1CA9, UPPER_CASE, 0x10E9 },
+ { 0x1CAA, UPPER_CASE, 0x10EA },
+ { 0x1CAB, UPPER_CASE, 0x10EB },
+ { 0x1CAC, UPPER_CASE, 0x10EC },
+ { 0x1CAD, UPPER_CASE, 0x10ED },
+ { 0x1CAE, UPPER_CASE, 0x10EE },
+ { 0x1CAF, UPPER_CASE, 0x10EF },
+ { 0x1CB0, UPPER_CASE, 0x10F0 },
+ { 0x1CB1, UPPER_CASE, 0x10F1 },
+ { 0x1CB2, UPPER_CASE, 0x10F2 },
+ { 0x1CB3, UPPER_CASE, 0x10F3 },
+ { 0x1CB4, UPPER_CASE, 0x10F4 },
+ { 0x1CB5, UPPER_CASE, 0x10F5 },
+ { 0x1CB6, UPPER_CASE, 0x10F6 },
+ { 0x1CB7, UPPER_CASE, 0x10F7 },
+ { 0x1CB8, UPPER_CASE, 0x10F8 },
+ { 0x1CB9, UPPER_CASE, 0x10F9 },
+ { 0x1CBA, UPPER_CASE, 0x10FA },
+ { 0x1CBD, UPPER_CASE, 0x10FD },
+ { 0x1CBE, UPPER_CASE, 0x10FE },
+ { 0x1CBF, UPPER_CASE, 0x10FF },
+ { 0x1D79, LOWER_CASE, 0xA77D },
+ { 0x1D7D, LOWER_CASE, 0x2C63 },
+ { 0x1D8E, LOWER_CASE, 0xA7C6 },
+ { 0x1E00, UPPER_CASE, 0x1E01 },
+ { 0x1E01, LOWER_CASE, 0x1E00 },
+ { 0x1E02, UPPER_CASE, 0x1E03 },
+ { 0x1E03, LOWER_CASE, 0x1E02 },
+ { 0x1E04, UPPER_CASE, 0x1E05 },
+ { 0x1E05, LOWER_CASE, 0x1E04 },
+ { 0x1E06, UPPER_CASE, 0x1E07 },
+ { 0x1E07, LOWER_CASE, 0x1E06 },
+ { 0x1E08, UPPER_CASE, 0x1E09 },
+ { 0x1E09, LOWER_CASE, 0x1E08 },
+ { 0x1E0A, UPPER_CASE, 0x1E0B },
+ { 0x1E0B, LOWER_CASE, 0x1E0A },
+ { 0x1E0C, UPPER_CASE, 0x1E0D },
+ { 0x1E0D, LOWER_CASE, 0x1E0C },
+ { 0x1E0E, UPPER_CASE, 0x1E0F },
+ { 0x1E0F, LOWER_CASE, 0x1E0E },
+ { 0x1E10, UPPER_CASE, 0x1E11 },
+ { 0x1E11, LOWER_CASE, 0x1E10 },
+ { 0x1E12, UPPER_CASE, 0x1E13 },
+ { 0x1E13, LOWER_CASE, 0x1E12 },
+ { 0x1E14, UPPER_CASE, 0x1E15 },
+ { 0x1E15, LOWER_CASE, 0x1E14 },
+ { 0x1E16, UPPER_CASE, 0x1E17 },
+ { 0x1E17, LOWER_CASE, 0x1E16 },
+ { 0x1E18, UPPER_CASE, 0x1E19 },
+ { 0x1E19, LOWER_CASE, 0x1E18 },
+ { 0x1E1A, UPPER_CASE, 0x1E1B },
+ { 0x1E1B, LOWER_CASE, 0x1E1A },
+ { 0x1E1C, UPPER_CASE, 0x1E1D },
+ { 0x1E1D, LOWER_CASE, 0x1E1C },
+ { 0x1E1E, UPPER_CASE, 0x1E1F },
+ { 0x1E1F, LOWER_CASE, 0x1E1E },
+ { 0x1E20, UPPER_CASE, 0x1E21 },
+ { 0x1E21, LOWER_CASE, 0x1E20 },
+ { 0x1E22, UPPER_CASE, 0x1E23 },
+ { 0x1E23, LOWER_CASE, 0x1E22 },
+ { 0x1E24, UPPER_CASE, 0x1E25 },
+ { 0x1E25, LOWER_CASE, 0x1E24 },
+ { 0x1E26, UPPER_CASE, 0x1E27 },
+ { 0x1E27, LOWER_CASE, 0x1E26 },
+ { 0x1E28, UPPER_CASE, 0x1E29 },
+ { 0x1E29, LOWER_CASE, 0x1E28 },
+ { 0x1E2A, UPPER_CASE, 0x1E2B },
+ { 0x1E2B, LOWER_CASE, 0x1E2A },
+ { 0x1E2C, UPPER_CASE, 0x1E2D },
+ { 0x1E2D, LOWER_CASE, 0x1E2C },
+ { 0x1E2E, UPPER_CASE, 0x1E2F },
+ { 0x1E2F, LOWER_CASE, 0x1E2E },
+ { 0x1E30, UPPER_CASE, 0x1E31 },
+ { 0x1E31, LOWER_CASE, 0x1E30 },
+ { 0x1E32, UPPER_CASE, 0x1E33 },
+ { 0x1E33, LOWER_CASE, 0x1E32 },
+ { 0x1E34, UPPER_CASE, 0x1E35 },
+ { 0x1E35, LOWER_CASE, 0x1E34 },
+ { 0x1E36, UPPER_CASE, 0x1E37 },
+ { 0x1E37, LOWER_CASE, 0x1E36 },
+ { 0x1E38, UPPER_CASE, 0x1E39 },
+ { 0x1E39, LOWER_CASE, 0x1E38 },
+ { 0x1E3A, UPPER_CASE, 0x1E3B },
+ { 0x1E3B, LOWER_CASE, 0x1E3A },
+ { 0x1E3C, UPPER_CASE, 0x1E3D },
+ { 0x1E3D, LOWER_CASE, 0x1E3C },
+ { 0x1E3E, UPPER_CASE, 0x1E3F },
+ { 0x1E3F, LOWER_CASE, 0x1E3E },
+ { 0x1E40, UPPER_CASE, 0x1E41 },
+ { 0x1E41, LOWER_CASE, 0x1E40 },
+ { 0x1E42, UPPER_CASE, 0x1E43 },
+ { 0x1E43, LOWER_CASE, 0x1E42 },
+ { 0x1E44, UPPER_CASE, 0x1E45 },
+ { 0x1E45, LOWER_CASE, 0x1E44 },
+ { 0x1E46, UPPER_CASE, 0x1E47 },
+ { 0x1E47, LOWER_CASE, 0x1E46 },
+ { 0x1E48, UPPER_CASE, 0x1E49 },
+ { 0x1E49, LOWER_CASE, 0x1E48 },
+ { 0x1E4A, UPPER_CASE, 0x1E4B },
+ { 0x1E4B, LOWER_CASE, 0x1E4A },
+ { 0x1E4C, UPPER_CASE, 0x1E4D },
+ { 0x1E4D, LOWER_CASE, 0x1E4C },
+ { 0x1E4E, UPPER_CASE, 0x1E4F },
+ { 0x1E4F, LOWER_CASE, 0x1E4E },
+ { 0x1E50, UPPER_CASE, 0x1E51 },
+ { 0x1E51, LOWER_CASE, 0x1E50 },
+ { 0x1E52, UPPER_CASE, 0x1E53 },
+ { 0x1E53, LOWER_CASE, 0x1E52 },
+ { 0x1E54, UPPER_CASE, 0x1E55 },
+ { 0x1E55, LOWER_CASE, 0x1E54 },
+ { 0x1E56, UPPER_CASE, 0x1E57 },
+ { 0x1E57, LOWER_CASE, 0x1E56 },
+ { 0x1E58, UPPER_CASE, 0x1E59 },
+ { 0x1E59, LOWER_CASE, 0x1E58 },
+ { 0x1E5A, UPPER_CASE, 0x1E5B },
+ { 0x1E5B, LOWER_CASE, 0x1E5A },
+ { 0x1E5C, UPPER_CASE, 0x1E5D },
+ { 0x1E5D, LOWER_CASE, 0x1E5C },
+ { 0x1E5E, UPPER_CASE, 0x1E5F },
+ { 0x1E5F, LOWER_CASE, 0x1E5E },
+ { 0x1E60, UPPER_CASE, 0x1E61 },
+ { 0x1E61, LOWER_CASE, 0x1E60 },
+ { 0x1E62, UPPER_CASE, 0x1E63 },
+ { 0x1E63, LOWER_CASE, 0x1E62 },
+ { 0x1E64, UPPER_CASE, 0x1E65 },
+ { 0x1E65, LOWER_CASE, 0x1E64 },
+ { 0x1E66, UPPER_CASE, 0x1E67 },
+ { 0x1E67, LOWER_CASE, 0x1E66 },
+ { 0x1E68, UPPER_CASE, 0x1E69 },
+ { 0x1E69, LOWER_CASE, 0x1E68 },
+ { 0x1E6A, UPPER_CASE, 0x1E6B },
+ { 0x1E6B, LOWER_CASE, 0x1E6A },
+ { 0x1E6C, UPPER_CASE, 0x1E6D },
+ { 0x1E6D, LOWER_CASE, 0x1E6C },
+ { 0x1E6E, UPPER_CASE, 0x1E6F },
+ { 0x1E6F, LOWER_CASE, 0x1E6E },
+ { 0x1E70, UPPER_CASE, 0x1E71 },
+ { 0x1E71, LOWER_CASE, 0x1E70 },
+ { 0x1E72, UPPER_CASE, 0x1E73 },
+ { 0x1E73, LOWER_CASE, 0x1E72 },
+ { 0x1E74, UPPER_CASE, 0x1E75 },
+ { 0x1E75, LOWER_CASE, 0x1E74 },
+ { 0x1E76, UPPER_CASE, 0x1E77 },
+ { 0x1E77, LOWER_CASE, 0x1E76 },
+ { 0x1E78, UPPER_CASE, 0x1E79 },
+ { 0x1E79, LOWER_CASE, 0x1E78 },
+ { 0x1E7A, UPPER_CASE, 0x1E7B },
+ { 0x1E7B, LOWER_CASE, 0x1E7A },
+ { 0x1E7C, UPPER_CASE, 0x1E7D },
+ { 0x1E7D, LOWER_CASE, 0x1E7C },
+ { 0x1E7E, UPPER_CASE, 0x1E7F },
+ { 0x1E7F, LOWER_CASE, 0x1E7E },
+ { 0x1E80, UPPER_CASE, 0x1E81 },
+ { 0x1E81, LOWER_CASE, 0x1E80 },
+ { 0x1E82, UPPER_CASE, 0x1E83 },
+ { 0x1E83, LOWER_CASE, 0x1E82 },
+ { 0x1E84, UPPER_CASE, 0x1E85 },
+ { 0x1E85, LOWER_CASE, 0x1E84 },
+ { 0x1E86, UPPER_CASE, 0x1E87 },
+ { 0x1E87, LOWER_CASE, 0x1E86 },
+ { 0x1E88, UPPER_CASE, 0x1E89 },
+ { 0x1E89, LOWER_CASE, 0x1E88 },
+ { 0x1E8A, UPPER_CASE, 0x1E8B },
+ { 0x1E8B, LOWER_CASE, 0x1E8A },
+ { 0x1E8C, UPPER_CASE, 0x1E8D },
+ { 0x1E8D, LOWER_CASE, 0x1E8C },
+ { 0x1E8E, UPPER_CASE, 0x1E8F },
+ { 0x1E8F, LOWER_CASE, 0x1E8E },
+ { 0x1E90, UPPER_CASE, 0x1E91 },
+ { 0x1E91, LOWER_CASE, 0x1E90 },
+ { 0x1E92, UPPER_CASE, 0x1E93 },
+ { 0x1E93, LOWER_CASE, 0x1E92 },
+ { 0x1E94, UPPER_CASE, 0x1E95 },
+ { 0x1E95, LOWER_CASE, 0x1E94 },
+ { 0x1E9B, LOWER_CASE, 0x1E60 },
+ { 0x1E9E, UPPER_CASE, 0xDF },
+ { 0x1EA0, UPPER_CASE, 0x1EA1 },
+ { 0x1EA1, LOWER_CASE, 0x1EA0 },
+ { 0x1EA2, UPPER_CASE, 0x1EA3 },
+ { 0x1EA3, LOWER_CASE, 0x1EA2 },
+ { 0x1EA4, UPPER_CASE, 0x1EA5 },
+ { 0x1EA5, LOWER_CASE, 0x1EA4 },
+ { 0x1EA6, UPPER_CASE, 0x1EA7 },
+ { 0x1EA7, LOWER_CASE, 0x1EA6 },
+ { 0x1EA8, UPPER_CASE, 0x1EA9 },
+ { 0x1EA9, LOWER_CASE, 0x1EA8 },
+ { 0x1EAA, UPPER_CASE, 0x1EAB },
+ { 0x1EAB, LOWER_CASE, 0x1EAA },
+ { 0x1EAC, UPPER_CASE, 0x1EAD },
+ { 0x1EAD, LOWER_CASE, 0x1EAC },
+ { 0x1EAE, UPPER_CASE, 0x1EAF },
+ { 0x1EAF, LOWER_CASE, 0x1EAE },
+ { 0x1EB0, UPPER_CASE, 0x1EB1 },
+ { 0x1EB1, LOWER_CASE, 0x1EB0 },
+ { 0x1EB2, UPPER_CASE, 0x1EB3 },
+ { 0x1EB3, LOWER_CASE, 0x1EB2 },
+ { 0x1EB4, UPPER_CASE, 0x1EB5 },
+ { 0x1EB5, LOWER_CASE, 0x1EB4 },
+ { 0x1EB6, UPPER_CASE, 0x1EB7 },
+ { 0x1EB7, LOWER_CASE, 0x1EB6 },
+ { 0x1EB8, UPPER_CASE, 0x1EB9 },
+ { 0x1EB9, LOWER_CASE, 0x1EB8 },
+ { 0x1EBA, UPPER_CASE, 0x1EBB },
+ { 0x1EBB, LOWER_CASE, 0x1EBA },
+ { 0x1EBC, UPPER_CASE, 0x1EBD },
+ { 0x1EBD, LOWER_CASE, 0x1EBC },
+ { 0x1EBE, UPPER_CASE, 0x1EBF },
+ { 0x1EBF, LOWER_CASE, 0x1EBE },
+ { 0x1EC0, UPPER_CASE, 0x1EC1 },
+ { 0x1EC1, LOWER_CASE, 0x1EC0 },
+ { 0x1EC2, UPPER_CASE, 0x1EC3 },
+ { 0x1EC3, LOWER_CASE, 0x1EC2 },
+ { 0x1EC4, UPPER_CASE, 0x1EC5 },
+ { 0x1EC5, LOWER_CASE, 0x1EC4 },
+ { 0x1EC6, UPPER_CASE, 0x1EC7 },
+ { 0x1EC7, LOWER_CASE, 0x1EC6 },
+ { 0x1EC8, UPPER_CASE, 0x1EC9 },
+ { 0x1EC9, LOWER_CASE, 0x1EC8 },
+ { 0x1ECA, UPPER_CASE, 0x1ECB },
+ { 0x1ECB, LOWER_CASE, 0x1ECA },
+ { 0x1ECC, UPPER_CASE, 0x1ECD },
+ { 0x1ECD, LOWER_CASE, 0x1ECC },
+ { 0x1ECE, UPPER_CASE, 0x1ECF },
+ { 0x1ECF, LOWER_CASE, 0x1ECE },
+ { 0x1ED0, UPPER_CASE, 0x1ED1 },
+ { 0x1ED1, LOWER_CASE, 0x1ED0 },
+ { 0x1ED2, UPPER_CASE, 0x1ED3 },
+ { 0x1ED3, LOWER_CASE, 0x1ED2 },
+ { 0x1ED4, UPPER_CASE, 0x1ED5 },
+ { 0x1ED5, LOWER_CASE, 0x1ED4 },
+ { 0x1ED6, UPPER_CASE, 0x1ED7 },
+ { 0x1ED7, LOWER_CASE, 0x1ED6 },
+ { 0x1ED8, UPPER_CASE, 0x1ED9 },
+ { 0x1ED9, LOWER_CASE, 0x1ED8 },
+ { 0x1EDA, UPPER_CASE, 0x1EDB },
+ { 0x1EDB, LOWER_CASE, 0x1EDA },
+ { 0x1EDC, UPPER_CASE, 0x1EDD },
+ { 0x1EDD, LOWER_CASE, 0x1EDC },
+ { 0x1EDE, UPPER_CASE, 0x1EDF },
+ { 0x1EDF, LOWER_CASE, 0x1EDE },
+ { 0x1EE0, UPPER_CASE, 0x1EE1 },
+ { 0x1EE1, LOWER_CASE, 0x1EE0 },
+ { 0x1EE2, UPPER_CASE, 0x1EE3 },
+ { 0x1EE3, LOWER_CASE, 0x1EE2 },
+ { 0x1EE4, UPPER_CASE, 0x1EE5 },
+ { 0x1EE5, LOWER_CASE, 0x1EE4 },
+ { 0x1EE6, UPPER_CASE, 0x1EE7 },
+ { 0x1EE7, LOWER_CASE, 0x1EE6 },
+ { 0x1EE8, UPPER_CASE, 0x1EE9 },
+ { 0x1EE9, LOWER_CASE, 0x1EE8 },
+ { 0x1EEA, UPPER_CASE, 0x1EEB },
+ { 0x1EEB, LOWER_CASE, 0x1EEA },
+ { 0x1EEC, UPPER_CASE, 0x1EED },
+ { 0x1EED, LOWER_CASE, 0x1EEC },
+ { 0x1EEE, UPPER_CASE, 0x1EEF },
+ { 0x1EEF, LOWER_CASE, 0x1EEE },
+ { 0x1EF0, UPPER_CASE, 0x1EF1 },
+ { 0x1EF1, LOWER_CASE, 0x1EF0 },
+ { 0x1EF2, UPPER_CASE, 0x1EF3 },
+ { 0x1EF3, LOWER_CASE, 0x1EF2 },
+ { 0x1EF4, UPPER_CASE, 0x1EF5 },
+ { 0x1EF5, LOWER_CASE, 0x1EF4 },
+ { 0x1EF6, UPPER_CASE, 0x1EF7 },
+ { 0x1EF7, LOWER_CASE, 0x1EF6 },
+ { 0x1EF8, UPPER_CASE, 0x1EF9 },
+ { 0x1EF9, LOWER_CASE, 0x1EF8 },
+ { 0x1EFA, UPPER_CASE, 0x1EFB },
+ { 0x1EFB, LOWER_CASE, 0x1EFA },
+ { 0x1EFC, UPPER_CASE, 0x1EFD },
+ { 0x1EFD, LOWER_CASE, 0x1EFC },
+ { 0x1EFE, UPPER_CASE, 0x1EFF },
+ { 0x1EFF, LOWER_CASE, 0x1EFE },
+ { 0x1F00, LOWER_CASE, 0x1F08 },
+ { 0x1F01, LOWER_CASE, 0x1F09 },
+ { 0x1F02, LOWER_CASE, 0x1F0A },
+ { 0x1F03, LOWER_CASE, 0x1F0B },
+ { 0x1F04, LOWER_CASE, 0x1F0C },
+ { 0x1F05, LOWER_CASE, 0x1F0D },
+ { 0x1F06, LOWER_CASE, 0x1F0E },
+ { 0x1F07, LOWER_CASE, 0x1F0F },
+ { 0x1F08, UPPER_CASE, 0x1F00 },
+ { 0x1F09, UPPER_CASE, 0x1F01 },
+ { 0x1F0A, UPPER_CASE, 0x1F02 },
+ { 0x1F0B, UPPER_CASE, 0x1F03 },
+ { 0x1F0C, UPPER_CASE, 0x1F04 },
+ { 0x1F0D, UPPER_CASE, 0x1F05 },
+ { 0x1F0E, UPPER_CASE, 0x1F06 },
+ { 0x1F0F, UPPER_CASE, 0x1F07 },
+ { 0x1F10, LOWER_CASE, 0x1F18 },
+ { 0x1F11, LOWER_CASE, 0x1F19 },
+ { 0x1F12, LOWER_CASE, 0x1F1A },
+ { 0x1F13, LOWER_CASE, 0x1F1B },
+ { 0x1F14, LOWER_CASE, 0x1F1C },
+ { 0x1F15, LOWER_CASE, 0x1F1D },
+ { 0x1F18, UPPER_CASE, 0x1F10 },
+ { 0x1F19, UPPER_CASE, 0x1F11 },
+ { 0x1F1A, UPPER_CASE, 0x1F12 },
+ { 0x1F1B, UPPER_CASE, 0x1F13 },
+ { 0x1F1C, UPPER_CASE, 0x1F14 },
+ { 0x1F1D, UPPER_CASE, 0x1F15 },
+ { 0x1F20, LOWER_CASE, 0x1F28 },
+ { 0x1F21, LOWER_CASE, 0x1F29 },
+ { 0x1F22, LOWER_CASE, 0x1F2A },
+ { 0x1F23, LOWER_CASE, 0x1F2B },
+ { 0x1F24, LOWER_CASE, 0x1F2C },
+ { 0x1F25, LOWER_CASE, 0x1F2D },
+ { 0x1F26, LOWER_CASE, 0x1F2E },
+ { 0x1F27, LOWER_CASE, 0x1F2F },
+ { 0x1F28, UPPER_CASE, 0x1F20 },
+ { 0x1F29, UPPER_CASE, 0x1F21 },
+ { 0x1F2A, UPPER_CASE, 0x1F22 },
+ { 0x1F2B, UPPER_CASE, 0x1F23 },
+ { 0x1F2C, UPPER_CASE, 0x1F24 },
+ { 0x1F2D, UPPER_CASE, 0x1F25 },
+ { 0x1F2E, UPPER_CASE, 0x1F26 },
+ { 0x1F2F, UPPER_CASE, 0x1F27 },
+ { 0x1F30, LOWER_CASE, 0x1F38 },
+ { 0x1F31, LOWER_CASE, 0x1F39 },
+ { 0x1F32, LOWER_CASE, 0x1F3A },
+ { 0x1F33, LOWER_CASE, 0x1F3B },
+ { 0x1F34, LOWER_CASE, 0x1F3C },
+ { 0x1F35, LOWER_CASE, 0x1F3D },
+ { 0x1F36, LOWER_CASE, 0x1F3E },
+ { 0x1F37, LOWER_CASE, 0x1F3F },
+ { 0x1F38, UPPER_CASE, 0x1F30 },
+ { 0x1F39, UPPER_CASE, 0x1F31 },
+ { 0x1F3A, UPPER_CASE, 0x1F32 },
+ { 0x1F3B, UPPER_CASE, 0x1F33 },
+ { 0x1F3C, UPPER_CASE, 0x1F34 },
+ { 0x1F3D, UPPER_CASE, 0x1F35 },
+ { 0x1F3E, UPPER_CASE, 0x1F36 },
+ { 0x1F3F, UPPER_CASE, 0x1F37 },
+ { 0x1F40, LOWER_CASE, 0x1F48 },
+ { 0x1F41, LOWER_CASE, 0x1F49 },
+ { 0x1F42, LOWER_CASE, 0x1F4A },
+ { 0x1F43, LOWER_CASE, 0x1F4B },
+ { 0x1F44, LOWER_CASE, 0x1F4C },
+ { 0x1F45, LOWER_CASE, 0x1F4D },
+ { 0x1F48, UPPER_CASE, 0x1F40 },
+ { 0x1F49, UPPER_CASE, 0x1F41 },
+ { 0x1F4A, UPPER_CASE, 0x1F42 },
+ { 0x1F4B, UPPER_CASE, 0x1F43 },
+ { 0x1F4C, UPPER_CASE, 0x1F44 },
+ { 0x1F4D, UPPER_CASE, 0x1F45 },
+ { 0x1F51, LOWER_CASE, 0x1F59 },
+ { 0x1F53, LOWER_CASE, 0x1F5B },
+ { 0x1F55, LOWER_CASE, 0x1F5D },
+ { 0x1F57, LOWER_CASE, 0x1F5F },
+ { 0x1F59, UPPER_CASE, 0x1F51 },
+ { 0x1F5B, UPPER_CASE, 0x1F53 },
+ { 0x1F5D, UPPER_CASE, 0x1F55 },
+ { 0x1F5F, UPPER_CASE, 0x1F57 },
+ { 0x1F60, LOWER_CASE, 0x1F68 },
+ { 0x1F61, LOWER_CASE, 0x1F69 },
+ { 0x1F62, LOWER_CASE, 0x1F6A },
+ { 0x1F63, LOWER_CASE, 0x1F6B },
+ { 0x1F64, LOWER_CASE, 0x1F6C },
+ { 0x1F65, LOWER_CASE, 0x1F6D },
+ { 0x1F66, LOWER_CASE, 0x1F6E },
+ { 0x1F67, LOWER_CASE, 0x1F6F },
+ { 0x1F68, UPPER_CASE, 0x1F60 },
+ { 0x1F69, UPPER_CASE, 0x1F61 },
+ { 0x1F6A, UPPER_CASE, 0x1F62 },
+ { 0x1F6B, UPPER_CASE, 0x1F63 },
+ { 0x1F6C, UPPER_CASE, 0x1F64 },
+ { 0x1F6D, UPPER_CASE, 0x1F65 },
+ { 0x1F6E, UPPER_CASE, 0x1F66 },
+ { 0x1F6F, UPPER_CASE, 0x1F67 },
+ { 0x1F70, LOWER_CASE, 0x1FBA },
+ { 0x1F71, LOWER_CASE, 0x1FBB },
+ { 0x1F72, LOWER_CASE, 0x1FC8 },
+ { 0x1F73, LOWER_CASE, 0x1FC9 },
+ { 0x1F74, LOWER_CASE, 0x1FCA },
+ { 0x1F75, LOWER_CASE, 0x1FCB },
+ { 0x1F76, LOWER_CASE, 0x1FDA },
+ { 0x1F77, LOWER_CASE, 0x1FDB },
+ { 0x1F78, LOWER_CASE, 0x1FF8 },
+ { 0x1F79, LOWER_CASE, 0x1FF9 },
+ { 0x1F7A, LOWER_CASE, 0x1FEA },
+ { 0x1F7B, LOWER_CASE, 0x1FEB },
+ { 0x1F7C, LOWER_CASE, 0x1FFA },
+ { 0x1F7D, LOWER_CASE, 0x1FFB },
+ { 0x1F80, LOWER_CASE, 0x1F88 },
+ { 0x1F81, LOWER_CASE, 0x1F89 },
+ { 0x1F82, LOWER_CASE, 0x1F8A },
+ { 0x1F83, LOWER_CASE, 0x1F8B },
+ { 0x1F84, LOWER_CASE, 0x1F8C },
+ { 0x1F85, LOWER_CASE, 0x1F8D },
+ { 0x1F86, LOWER_CASE, 0x1F8E },
+ { 0x1F87, LOWER_CASE, 0x1F8F },
+ { 0x1F88, UPPER_CASE, 0x1F80 },
+ { 0x1F89, UPPER_CASE, 0x1F81 },
+ { 0x1F8A, UPPER_CASE, 0x1F82 },
+ { 0x1F8B, UPPER_CASE, 0x1F83 },
+ { 0x1F8C, UPPER_CASE, 0x1F84 },
+ { 0x1F8D, UPPER_CASE, 0x1F85 },
+ { 0x1F8E, UPPER_CASE, 0x1F86 },
+ { 0x1F8F, UPPER_CASE, 0x1F87 },
+ { 0x1F90, LOWER_CASE, 0x1F98 },
+ { 0x1F91, LOWER_CASE, 0x1F99 },
+ { 0x1F92, LOWER_CASE, 0x1F9A },
+ { 0x1F93, LOWER_CASE, 0x1F9B },
+ { 0x1F94, LOWER_CASE, 0x1F9C },
+ { 0x1F95, LOWER_CASE, 0x1F9D },
+ { 0x1F96, LOWER_CASE, 0x1F9E },
+ { 0x1F97, LOWER_CASE, 0x1F9F },
+ { 0x1F98, UPPER_CASE, 0x1F90 },
+ { 0x1F99, UPPER_CASE, 0x1F91 },
+ { 0x1F9A, UPPER_CASE, 0x1F92 },
+ { 0x1F9B, UPPER_CASE, 0x1F93 },
+ { 0x1F9C, UPPER_CASE, 0x1F94 },
+ { 0x1F9D, UPPER_CASE, 0x1F95 },
+ { 0x1F9E, UPPER_CASE, 0x1F96 },
+ { 0x1F9F, UPPER_CASE, 0x1F97 },
+ { 0x1FA0, LOWER_CASE, 0x1FA8 },
+ { 0x1FA1, LOWER_CASE, 0x1FA9 },
+ { 0x1FA2, LOWER_CASE, 0x1FAA },
+ { 0x1FA3, LOWER_CASE, 0x1FAB },
+ { 0x1FA4, LOWER_CASE, 0x1FAC },
+ { 0x1FA5, LOWER_CASE, 0x1FAD },
+ { 0x1FA6, LOWER_CASE, 0x1FAE },
+ { 0x1FA7, LOWER_CASE, 0x1FAF },
+ { 0x1FA8, UPPER_CASE, 0x1FA0 },
+ { 0x1FA9, UPPER_CASE, 0x1FA1 },
+ { 0x1FAA, UPPER_CASE, 0x1FA2 },
+ { 0x1FAB, UPPER_CASE, 0x1FA3 },
+ { 0x1FAC, UPPER_CASE, 0x1FA4 },
+ { 0x1FAD, UPPER_CASE, 0x1FA5 },
+ { 0x1FAE, UPPER_CASE, 0x1FA6 },
+ { 0x1FAF, UPPER_CASE, 0x1FA7 },
+ { 0x1FB0, LOWER_CASE, 0x1FB8 },
+ { 0x1FB1, LOWER_CASE, 0x1FB9 },
+ { 0x1FB3, LOWER_CASE, 0x1FBC },
+ { 0x1FB8, UPPER_CASE, 0x1FB0 },
+ { 0x1FB9, UPPER_CASE, 0x1FB1 },
+ { 0x1FBA, UPPER_CASE, 0x1F70 },
+ { 0x1FBB, UPPER_CASE, 0x1F71 },
+ { 0x1FBC, UPPER_CASE, 0x1FB3 },
+ { 0x1FBE, LOWER_CASE, 0x399 },
+ { 0x1FC3, LOWER_CASE, 0x1FCC },
+ { 0x1FC8, UPPER_CASE, 0x1F72 },
+ { 0x1FC9, UPPER_CASE, 0x1F73 },
+ { 0x1FCA, UPPER_CASE, 0x1F74 },
+ { 0x1FCB, UPPER_CASE, 0x1F75 },
+ { 0x1FCC, UPPER_CASE, 0x1FC3 },
+ { 0x1FD0, LOWER_CASE, 0x1FD8 },
+ { 0x1FD1, LOWER_CASE, 0x1FD9 },
+ { 0x1FD8, UPPER_CASE, 0x1FD0 },
+ { 0x1FD9, UPPER_CASE, 0x1FD1 },
+ { 0x1FDA, UPPER_CASE, 0x1F76 },
+ { 0x1FDB, UPPER_CASE, 0x1F77 },
+ { 0x1FE0, LOWER_CASE, 0x1FE8 },
+ { 0x1FE1, LOWER_CASE, 0x1FE9 },
+ { 0x1FE5, LOWER_CASE, 0x1FEC },
+ { 0x1FE8, UPPER_CASE, 0x1FE0 },
+ { 0x1FE9, UPPER_CASE, 0x1FE1 },
+ { 0x1FEA, UPPER_CASE, 0x1F7A },
+ { 0x1FEB, UPPER_CASE, 0x1F7B },
+ { 0x1FEC, UPPER_CASE, 0x1FE5 },
+ { 0x1FF3, LOWER_CASE, 0x1FFC },
+ { 0x1FF8, UPPER_CASE, 0x1F78 },
+ { 0x1FF9, UPPER_CASE, 0x1F79 },
+ { 0x1FFA, UPPER_CASE, 0x1F7C },
+ { 0x1FFB, UPPER_CASE, 0x1F7D },
+ { 0x1FFC, UPPER_CASE, 0x1FF3 },
+ { 0x2126, UPPER_CASE, 0x3C9 },
+ { 0x212A, UPPER_CASE, 0x6B },
+ { 0x212B, UPPER_CASE, 0xE5 },
+ { 0x2132, UPPER_CASE, 0x214E },
+ { 0x214E, LOWER_CASE, 0x2132 },
+ { 0x2160, UPPER_CASE, 0x2170 },
+ { 0x2161, UPPER_CASE, 0x2171 },
+ { 0x2162, UPPER_CASE, 0x2172 },
+ { 0x2163, UPPER_CASE, 0x2173 },
+ { 0x2164, UPPER_CASE, 0x2174 },
+ { 0x2165, UPPER_CASE, 0x2175 },
+ { 0x2166, UPPER_CASE, 0x2176 },
+ { 0x2167, UPPER_CASE, 0x2177 },
+ { 0x2168, UPPER_CASE, 0x2178 },
+ { 0x2169, UPPER_CASE, 0x2179 },
+ { 0x216A, UPPER_CASE, 0x217A },
+ { 0x216B, UPPER_CASE, 0x217B },
+ { 0x216C, UPPER_CASE, 0x217C },
+ { 0x216D, UPPER_CASE, 0x217D },
+ { 0x216E, UPPER_CASE, 0x217E },
+ { 0x216F, UPPER_CASE, 0x217F },
+ { 0x2170, LOWER_CASE, 0x2160 },
+ { 0x2171, LOWER_CASE, 0x2161 },
+ { 0x2172, LOWER_CASE, 0x2162 },
+ { 0x2173, LOWER_CASE, 0x2163 },
+ { 0x2174, LOWER_CASE, 0x2164 },
+ { 0x2175, LOWER_CASE, 0x2165 },
+ { 0x2176, LOWER_CASE, 0x2166 },
+ { 0x2177, LOWER_CASE, 0x2167 },
+ { 0x2178, LOWER_CASE, 0x2168 },
+ { 0x2179, LOWER_CASE, 0x2169 },
+ { 0x217A, LOWER_CASE, 0x216A },
+ { 0x217B, LOWER_CASE, 0x216B },
+ { 0x217C, LOWER_CASE, 0x216C },
+ { 0x217D, LOWER_CASE, 0x216D },
+ { 0x217E, LOWER_CASE, 0x216E },
+ { 0x217F, LOWER_CASE, 0x216F },
+ { 0x2183, UPPER_CASE, 0x2184 },
+ { 0x2184, LOWER_CASE, 0x2183 },
+ { 0x24B6, UPPER_CASE, 0x24D0 },
+ { 0x24B7, UPPER_CASE, 0x24D1 },
+ { 0x24B8, UPPER_CASE, 0x24D2 },
+ { 0x24B9, UPPER_CASE, 0x24D3 },
+ { 0x24BA, UPPER_CASE, 0x24D4 },
+ { 0x24BB, UPPER_CASE, 0x24D5 },
+ { 0x24BC, UPPER_CASE, 0x24D6 },
+ { 0x24BD, UPPER_CASE, 0x24D7 },
+ { 0x24BE, UPPER_CASE, 0x24D8 },
+ { 0x24BF, UPPER_CASE, 0x24D9 },
+ { 0x24C0, UPPER_CASE, 0x24DA },
+ { 0x24C1, UPPER_CASE, 0x24DB },
+ { 0x24C2, UPPER_CASE, 0x24DC },
+ { 0x24C3, UPPER_CASE, 0x24DD },
+ { 0x24C4, UPPER_CASE, 0x24DE },
+ { 0x24C5, UPPER_CASE, 0x24DF },
+ { 0x24C6, UPPER_CASE, 0x24E0 },
+ { 0x24C7, UPPER_CASE, 0x24E1 },
+ { 0x24C8, UPPER_CASE, 0x24E2 },
+ { 0x24C9, UPPER_CASE, 0x24E3 },
+ { 0x24CA, UPPER_CASE, 0x24E4 },
+ { 0x24CB, UPPER_CASE, 0x24E5 },
+ { 0x24CC, UPPER_CASE, 0x24E6 },
+ { 0x24CD, UPPER_CASE, 0x24E7 },
+ { 0x24CE, UPPER_CASE, 0x24E8 },
+ { 0x24CF, UPPER_CASE, 0x24E9 },
+ { 0x24D0, LOWER_CASE, 0x24B6 },
+ { 0x24D1, LOWER_CASE, 0x24B7 },
+ { 0x24D2, LOWER_CASE, 0x24B8 },
+ { 0x24D3, LOWER_CASE, 0x24B9 },
+ { 0x24D4, LOWER_CASE, 0x24BA },
+ { 0x24D5, LOWER_CASE, 0x24BB },
+ { 0x24D6, LOWER_CASE, 0x24BC },
+ { 0x24D7, LOWER_CASE, 0x24BD },
+ { 0x24D8, LOWER_CASE, 0x24BE },
+ { 0x24D9, LOWER_CASE, 0x24BF },
+ { 0x24DA, LOWER_CASE, 0x24C0 },
+ { 0x24DB, LOWER_CASE, 0x24C1 },
+ { 0x24DC, LOWER_CASE, 0x24C2 },
+ { 0x24DD, LOWER_CASE, 0x24C3 },
+ { 0x24DE, LOWER_CASE, 0x24C4 },
+ { 0x24DF, LOWER_CASE, 0x24C5 },
+ { 0x24E0, LOWER_CASE, 0x24C6 },
+ { 0x24E1, LOWER_CASE, 0x24C7 },
+ { 0x24E2, LOWER_CASE, 0x24C8 },
+ { 0x24E3, LOWER_CASE, 0x24C9 },
+ { 0x24E4, LOWER_CASE, 0x24CA },
+ { 0x24E5, LOWER_CASE, 0x24CB },
+ { 0x24E6, LOWER_CASE, 0x24CC },
+ { 0x24E7, LOWER_CASE, 0x24CD },
+ { 0x24E8, LOWER_CASE, 0x24CE },
+ { 0x24E9, LOWER_CASE, 0x24CF },
+ { 0x2C00, UPPER_CASE, 0x2C30 },
+ { 0x2C01, UPPER_CASE, 0x2C31 },
+ { 0x2C02, UPPER_CASE, 0x2C32 },
+ { 0x2C03, UPPER_CASE, 0x2C33 },
+ { 0x2C04, UPPER_CASE, 0x2C34 },
+ { 0x2C05, UPPER_CASE, 0x2C35 },
+ { 0x2C06, UPPER_CASE, 0x2C36 },
+ { 0x2C07, UPPER_CASE, 0x2C37 },
+ { 0x2C08, UPPER_CASE, 0x2C38 },
+ { 0x2C09, UPPER_CASE, 0x2C39 },
+ { 0x2C0A, UPPER_CASE, 0x2C3A },
+ { 0x2C0B, UPPER_CASE, 0x2C3B },
+ { 0x2C0C, UPPER_CASE, 0x2C3C },
+ { 0x2C0D, UPPER_CASE, 0x2C3D },
+ { 0x2C0E, UPPER_CASE, 0x2C3E },
+ { 0x2C0F, UPPER_CASE, 0x2C3F },
+ { 0x2C10, UPPER_CASE, 0x2C40 },
+ { 0x2C11, UPPER_CASE, 0x2C41 },
+ { 0x2C12, UPPER_CASE, 0x2C42 },
+ { 0x2C13, UPPER_CASE, 0x2C43 },
+ { 0x2C14, UPPER_CASE, 0x2C44 },
+ { 0x2C15, UPPER_CASE, 0x2C45 },
+ { 0x2C16, UPPER_CASE, 0x2C46 },
+ { 0x2C17, UPPER_CASE, 0x2C47 },
+ { 0x2C18, UPPER_CASE, 0x2C48 },
+ { 0x2C19, UPPER_CASE, 0x2C49 },
+ { 0x2C1A, UPPER_CASE, 0x2C4A },
+ { 0x2C1B, UPPER_CASE, 0x2C4B },
+ { 0x2C1C, UPPER_CASE, 0x2C4C },
+ { 0x2C1D, UPPER_CASE, 0x2C4D },
+ { 0x2C1E, UPPER_CASE, 0x2C4E },
+ { 0x2C1F, UPPER_CASE, 0x2C4F },
+ { 0x2C20, UPPER_CASE, 0x2C50 },
+ { 0x2C21, UPPER_CASE, 0x2C51 },
+ { 0x2C22, UPPER_CASE, 0x2C52 },
+ { 0x2C23, UPPER_CASE, 0x2C53 },
+ { 0x2C24, UPPER_CASE, 0x2C54 },
+ { 0x2C25, UPPER_CASE, 0x2C55 },
+ { 0x2C26, UPPER_CASE, 0x2C56 },
+ { 0x2C27, UPPER_CASE, 0x2C57 },
+ { 0x2C28, UPPER_CASE, 0x2C58 },
+ { 0x2C29, UPPER_CASE, 0x2C59 },
+ { 0x2C2A, UPPER_CASE, 0x2C5A },
+ { 0x2C2B, UPPER_CASE, 0x2C5B },
+ { 0x2C2C, UPPER_CASE, 0x2C5C },
+ { 0x2C2D, UPPER_CASE, 0x2C5D },
+ { 0x2C2E, UPPER_CASE, 0x2C5E },
+ { 0x2C2F, UPPER_CASE, 0x2C5F },
+ { 0x2C30, LOWER_CASE, 0x2C00 },
+ { 0x2C31, LOWER_CASE, 0x2C01 },
+ { 0x2C32, LOWER_CASE, 0x2C02 },
+ { 0x2C33, LOWER_CASE, 0x2C03 },
+ { 0x2C34, LOWER_CASE, 0x2C04 },
+ { 0x2C35, LOWER_CASE, 0x2C05 },
+ { 0x2C36, LOWER_CASE, 0x2C06 },
+ { 0x2C37, LOWER_CASE, 0x2C07 },
+ { 0x2C38, LOWER_CASE, 0x2C08 },
+ { 0x2C39, LOWER_CASE, 0x2C09 },
+ { 0x2C3A, LOWER_CASE, 0x2C0A },
+ { 0x2C3B, LOWER_CASE, 0x2C0B },
+ { 0x2C3C, LOWER_CASE, 0x2C0C },
+ { 0x2C3D, LOWER_CASE, 0x2C0D },
+ { 0x2C3E, LOWER_CASE, 0x2C0E },
+ { 0x2C3F, LOWER_CASE, 0x2C0F },
+ { 0x2C40, LOWER_CASE, 0x2C10 },
+ { 0x2C41, LOWER_CASE, 0x2C11 },
+ { 0x2C42, LOWER_CASE, 0x2C12 },
+ { 0x2C43, LOWER_CASE, 0x2C13 },
+ { 0x2C44, LOWER_CASE, 0x2C14 },
+ { 0x2C45, LOWER_CASE, 0x2C15 },
+ { 0x2C46, LOWER_CASE, 0x2C16 },
+ { 0x2C47, LOWER_CASE, 0x2C17 },
+ { 0x2C48, LOWER_CASE, 0x2C18 },
+ { 0x2C49, LOWER_CASE, 0x2C19 },
+ { 0x2C4A, LOWER_CASE, 0x2C1A },
+ { 0x2C4B, LOWER_CASE, 0x2C1B },
+ { 0x2C4C, LOWER_CASE, 0x2C1C },
+ { 0x2C4D, LOWER_CASE, 0x2C1D },
+ { 0x2C4E, LOWER_CASE, 0x2C1E },
+ { 0x2C4F, LOWER_CASE, 0x2C1F },
+ { 0x2C50, LOWER_CASE, 0x2C20 },
+ { 0x2C51, LOWER_CASE, 0x2C21 },
+ { 0x2C52, LOWER_CASE, 0x2C22 },
+ { 0x2C53, LOWER_CASE, 0x2C23 },
+ { 0x2C54, LOWER_CASE, 0x2C24 },
+ { 0x2C55, LOWER_CASE, 0x2C25 },
+ { 0x2C56, LOWER_CASE, 0x2C26 },
+ { 0x2C57, LOWER_CASE, 0x2C27 },
+ { 0x2C58, LOWER_CASE, 0x2C28 },
+ { 0x2C59, LOWER_CASE, 0x2C29 },
+ { 0x2C5A, LOWER_CASE, 0x2C2A },
+ { 0x2C5B, LOWER_CASE, 0x2C2B },
+ { 0x2C5C, LOWER_CASE, 0x2C2C },
+ { 0x2C5D, LOWER_CASE, 0x2C2D },
+ { 0x2C5E, LOWER_CASE, 0x2C2E },
+ { 0x2C5F, LOWER_CASE, 0x2C2F },
+ { 0x2C60, UPPER_CASE, 0x2C61 },
+ { 0x2C61, LOWER_CASE, 0x2C60 },
+ { 0x2C62, UPPER_CASE, 0x26B },
+ { 0x2C63, UPPER_CASE, 0x1D7D },
+ { 0x2C64, UPPER_CASE, 0x27D },
+ { 0x2C65, LOWER_CASE, 0x23A },
+ { 0x2C66, LOWER_CASE, 0x23E },
+ { 0x2C67, UPPER_CASE, 0x2C68 },
+ { 0x2C68, LOWER_CASE, 0x2C67 },
+ { 0x2C69, UPPER_CASE, 0x2C6A },
+ { 0x2C6A, LOWER_CASE, 0x2C69 },
+ { 0x2C6B, UPPER_CASE, 0x2C6C },
+ { 0x2C6C, LOWER_CASE, 0x2C6B },
+ { 0x2C6D, UPPER_CASE, 0x251 },
+ { 0x2C6E, UPPER_CASE, 0x271 },
+ { 0x2C6F, UPPER_CASE, 0x250 },
+ { 0x2C70, UPPER_CASE, 0x252 },
+ { 0x2C72, UPPER_CASE, 0x2C73 },
+ { 0x2C73, LOWER_CASE, 0x2C72 },
+ { 0x2C75, UPPER_CASE, 0x2C76 },
+ { 0x2C76, LOWER_CASE, 0x2C75 },
+ { 0x2C7E, UPPER_CASE, 0x23F },
+ { 0x2C7F, UPPER_CASE, 0x240 },
+ { 0x2C80, UPPER_CASE, 0x2C81 },
+ { 0x2C81, LOWER_CASE, 0x2C80 },
+ { 0x2C82, UPPER_CASE, 0x2C83 },
+ { 0x2C83, LOWER_CASE, 0x2C82 },
+ { 0x2C84, UPPER_CASE, 0x2C85 },
+ { 0x2C85, LOWER_CASE, 0x2C84 },
+ { 0x2C86, UPPER_CASE, 0x2C87 },
+ { 0x2C87, LOWER_CASE, 0x2C86 },
+ { 0x2C88, UPPER_CASE, 0x2C89 },
+ { 0x2C89, LOWER_CASE, 0x2C88 },
+ { 0x2C8A, UPPER_CASE, 0x2C8B },
+ { 0x2C8B, LOWER_CASE, 0x2C8A },
+ { 0x2C8C, UPPER_CASE, 0x2C8D },
+ { 0x2C8D, LOWER_CASE, 0x2C8C },
+ { 0x2C8E, UPPER_CASE, 0x2C8F },
+ { 0x2C8F, LOWER_CASE, 0x2C8E },
+ { 0x2C90, UPPER_CASE, 0x2C91 },
+ { 0x2C91, LOWER_CASE, 0x2C90 },
+ { 0x2C92, UPPER_CASE, 0x2C93 },
+ { 0x2C93, LOWER_CASE, 0x2C92 },
+ { 0x2C94, UPPER_CASE, 0x2C95 },
+ { 0x2C95, LOWER_CASE, 0x2C94 },
+ { 0x2C96, UPPER_CASE, 0x2C97 },
+ { 0x2C97, LOWER_CASE, 0x2C96 },
+ { 0x2C98, UPPER_CASE, 0x2C99 },
+ { 0x2C99, LOWER_CASE, 0x2C98 },
+ { 0x2C9A, UPPER_CASE, 0x2C9B },
+ { 0x2C9B, LOWER_CASE, 0x2C9A },
+ { 0x2C9C, UPPER_CASE, 0x2C9D },
+ { 0x2C9D, LOWER_CASE, 0x2C9C },
+ { 0x2C9E, UPPER_CASE, 0x2C9F },
+ { 0x2C9F, LOWER_CASE, 0x2C9E },
+ { 0x2CA0, UPPER_CASE, 0x2CA1 },
+ { 0x2CA1, LOWER_CASE, 0x2CA0 },
+ { 0x2CA2, UPPER_CASE, 0x2CA3 },
+ { 0x2CA3, LOWER_CASE, 0x2CA2 },
+ { 0x2CA4, UPPER_CASE, 0x2CA5 },
+ { 0x2CA5, LOWER_CASE, 0x2CA4 },
+ { 0x2CA6, UPPER_CASE, 0x2CA7 },
+ { 0x2CA7, LOWER_CASE, 0x2CA6 },
+ { 0x2CA8, UPPER_CASE, 0x2CA9 },
+ { 0x2CA9, LOWER_CASE, 0x2CA8 },
+ { 0x2CAA, UPPER_CASE, 0x2CAB },
+ { 0x2CAB, LOWER_CASE, 0x2CAA },
+ { 0x2CAC, UPPER_CASE, 0x2CAD },
+ { 0x2CAD, LOWER_CASE, 0x2CAC },
+ { 0x2CAE, UPPER_CASE, 0x2CAF },
+ { 0x2CAF, LOWER_CASE, 0x2CAE },
+ { 0x2CB0, UPPER_CASE, 0x2CB1 },
+ { 0x2CB1, LOWER_CASE, 0x2CB0 },
+ { 0x2CB2, UPPER_CASE, 0x2CB3 },
+ { 0x2CB3, LOWER_CASE, 0x2CB2 },
+ { 0x2CB4, UPPER_CASE, 0x2CB5 },
+ { 0x2CB5, LOWER_CASE, 0x2CB4 },
+ { 0x2CB6, UPPER_CASE, 0x2CB7 },
+ { 0x2CB7, LOWER_CASE, 0x2CB6 },
+ { 0x2CB8, UPPER_CASE, 0x2CB9 },
+ { 0x2CB9, LOWER_CASE, 0x2CB8 },
+ { 0x2CBA, UPPER_CASE, 0x2CBB },
+ { 0x2CBB, LOWER_CASE, 0x2CBA },
+ { 0x2CBC, UPPER_CASE, 0x2CBD },
+ { 0x2CBD, LOWER_CASE, 0x2CBC },
+ { 0x2CBE, UPPER_CASE, 0x2CBF },
+ { 0x2CBF, LOWER_CASE, 0x2CBE },
+ { 0x2CC0, UPPER_CASE, 0x2CC1 },
+ { 0x2CC1, LOWER_CASE, 0x2CC0 },
+ { 0x2CC2, UPPER_CASE, 0x2CC3 },
+ { 0x2CC3, LOWER_CASE, 0x2CC2 },
+ { 0x2CC4, UPPER_CASE, 0x2CC5 },
+ { 0x2CC5, LOWER_CASE, 0x2CC4 },
+ { 0x2CC6, UPPER_CASE, 0x2CC7 },
+ { 0x2CC7, LOWER_CASE, 0x2CC6 },
+ { 0x2CC8, UPPER_CASE, 0x2CC9 },
+ { 0x2CC9, LOWER_CASE, 0x2CC8 },
+ { 0x2CCA, UPPER_CASE, 0x2CCB },
+ { 0x2CCB, LOWER_CASE, 0x2CCA },
+ { 0x2CCC, UPPER_CASE, 0x2CCD },
+ { 0x2CCD, LOWER_CASE, 0x2CCC },
+ { 0x2CCE, UPPER_CASE, 0x2CCF },
+ { 0x2CCF, LOWER_CASE, 0x2CCE },
+ { 0x2CD0, UPPER_CASE, 0x2CD1 },
+ { 0x2CD1, LOWER_CASE, 0x2CD0 },
+ { 0x2CD2, UPPER_CASE, 0x2CD3 },
+ { 0x2CD3, LOWER_CASE, 0x2CD2 },
+ { 0x2CD4, UPPER_CASE, 0x2CD5 },
+ { 0x2CD5, LOWER_CASE, 0x2CD4 },
+ { 0x2CD6, UPPER_CASE, 0x2CD7 },
+ { 0x2CD7, LOWER_CASE, 0x2CD6 },
+ { 0x2CD8, UPPER_CASE, 0x2CD9 },
+ { 0x2CD9, LOWER_CASE, 0x2CD8 },
+ { 0x2CDA, UPPER_CASE, 0x2CDB },
+ { 0x2CDB, LOWER_CASE, 0x2CDA },
+ { 0x2CDC, UPPER_CASE, 0x2CDD },
+ { 0x2CDD, LOWER_CASE, 0x2CDC },
+ { 0x2CDE, UPPER_CASE, 0x2CDF },
+ { 0x2CDF, LOWER_CASE, 0x2CDE },
+ { 0x2CE0, UPPER_CASE, 0x2CE1 },
+ { 0x2CE1, LOWER_CASE, 0x2CE0 },
+ { 0x2CE2, UPPER_CASE, 0x2CE3 },
+ { 0x2CE3, LOWER_CASE, 0x2CE2 },
+ { 0x2CEB, UPPER_CASE, 0x2CEC },
+ { 0x2CEC, LOWER_CASE, 0x2CEB },
+ { 0x2CED, UPPER_CASE, 0x2CEE },
+ { 0x2CEE, LOWER_CASE, 0x2CED },
+ { 0x2CF2, UPPER_CASE, 0x2CF3 },
+ { 0x2CF3, LOWER_CASE, 0x2CF2 },
+ { 0x2D00, LOWER_CASE, 0x10A0 },
+ { 0x2D01, LOWER_CASE, 0x10A1 },
+ { 0x2D02, LOWER_CASE, 0x10A2 },
+ { 0x2D03, LOWER_CASE, 0x10A3 },
+ { 0x2D04, LOWER_CASE, 0x10A4 },
+ { 0x2D05, LOWER_CASE, 0x10A5 },
+ { 0x2D06, LOWER_CASE, 0x10A6 },
+ { 0x2D07, LOWER_CASE, 0x10A7 },
+ { 0x2D08, LOWER_CASE, 0x10A8 },
+ { 0x2D09, LOWER_CASE, 0x10A9 },
+ { 0x2D0A, LOWER_CASE, 0x10AA },
+ { 0x2D0B, LOWER_CASE, 0x10AB },
+ { 0x2D0C, LOWER_CASE, 0x10AC },
+ { 0x2D0D, LOWER_CASE, 0x10AD },
+ { 0x2D0E, LOWER_CASE, 0x10AE },
+ { 0x2D0F, LOWER_CASE, 0x10AF },
+ { 0x2D10, LOWER_CASE, 0x10B0 },
+ { 0x2D11, LOWER_CASE, 0x10B1 },
+ { 0x2D12, LOWER_CASE, 0x10B2 },
+ { 0x2D13, LOWER_CASE, 0x10B3 },
+ { 0x2D14, LOWER_CASE, 0x10B4 },
+ { 0x2D15, LOWER_CASE, 0x10B5 },
+ { 0x2D16, LOWER_CASE, 0x10B6 },
+ { 0x2D17, LOWER_CASE, 0x10B7 },
+ { 0x2D18, LOWER_CASE, 0x10B8 },
+ { 0x2D19, LOWER_CASE, 0x10B9 },
+ { 0x2D1A, LOWER_CASE, 0x10BA },
+ { 0x2D1B, LOWER_CASE, 0x10BB },
+ { 0x2D1C, LOWER_CASE, 0x10BC },
+ { 0x2D1D, LOWER_CASE, 0x10BD },
+ { 0x2D1E, LOWER_CASE, 0x10BE },
+ { 0x2D1F, LOWER_CASE, 0x10BF },
+ { 0x2D20, LOWER_CASE, 0x10C0 },
+ { 0x2D21, LOWER_CASE, 0x10C1 },
+ { 0x2D22, LOWER_CASE, 0x10C2 },
+ { 0x2D23, LOWER_CASE, 0x10C3 },
+ { 0x2D24, LOWER_CASE, 0x10C4 },
+ { 0x2D25, LOWER_CASE, 0x10C5 },
+ { 0x2D27, LOWER_CASE, 0x10C7 },
+ { 0x2D2D, LOWER_CASE, 0x10CD },
+ { 0xA640, UPPER_CASE, 0xA641 },
+ { 0xA641, LOWER_CASE, 0xA640 },
+ { 0xA642, UPPER_CASE, 0xA643 },
+ { 0xA643, LOWER_CASE, 0xA642 },
+ { 0xA644, UPPER_CASE, 0xA645 },
+ { 0xA645, LOWER_CASE, 0xA644 },
+ { 0xA646, UPPER_CASE, 0xA647 },
+ { 0xA647, LOWER_CASE, 0xA646 },
+ { 0xA648, UPPER_CASE, 0xA649 },
+ { 0xA649, LOWER_CASE, 0xA648 },
+ { 0xA64A, UPPER_CASE, 0xA64B },
+ { 0xA64B, LOWER_CASE, 0xA64A },
+ { 0xA64C, UPPER_CASE, 0xA64D },
+ { 0xA64D, LOWER_CASE, 0xA64C },
+ { 0xA64E, UPPER_CASE, 0xA64F },
+ { 0xA64F, LOWER_CASE, 0xA64E },
+ { 0xA650, UPPER_CASE, 0xA651 },
+ { 0xA651, LOWER_CASE, 0xA650 },
+ { 0xA652, UPPER_CASE, 0xA653 },
+ { 0xA653, LOWER_CASE, 0xA652 },
+ { 0xA654, UPPER_CASE, 0xA655 },
+ { 0xA655, LOWER_CASE, 0xA654 },
+ { 0xA656, UPPER_CASE, 0xA657 },
+ { 0xA657, LOWER_CASE, 0xA656 },
+ { 0xA658, UPPER_CASE, 0xA659 },
+ { 0xA659, LOWER_CASE, 0xA658 },
+ { 0xA65A, UPPER_CASE, 0xA65B },
+ { 0xA65B, LOWER_CASE, 0xA65A },
+ { 0xA65C, UPPER_CASE, 0xA65D },
+ { 0xA65D, LOWER_CASE, 0xA65C },
+ { 0xA65E, UPPER_CASE, 0xA65F },
+ { 0xA65F, LOWER_CASE, 0xA65E },
+ { 0xA660, UPPER_CASE, 0xA661 },
+ { 0xA661, LOWER_CASE, 0xA660 },
+ { 0xA662, UPPER_CASE, 0xA663 },
+ { 0xA663, LOWER_CASE, 0xA662 },
+ { 0xA664, UPPER_CASE, 0xA665 },
+ { 0xA665, LOWER_CASE, 0xA664 },
+ { 0xA666, UPPER_CASE, 0xA667 },
+ { 0xA667, LOWER_CASE, 0xA666 },
+ { 0xA668, UPPER_CASE, 0xA669 },
+ { 0xA669, LOWER_CASE, 0xA668 },
+ { 0xA66A, UPPER_CASE, 0xA66B },
+ { 0xA66B, LOWER_CASE, 0xA66A },
+ { 0xA66C, UPPER_CASE, 0xA66D },
+ { 0xA66D, LOWER_CASE, 0xA66C },
+ { 0xA680, UPPER_CASE, 0xA681 },
+ { 0xA681, LOWER_CASE, 0xA680 },
+ { 0xA682, UPPER_CASE, 0xA683 },
+ { 0xA683, LOWER_CASE, 0xA682 },
+ { 0xA684, UPPER_CASE, 0xA685 },
+ { 0xA685, LOWER_CASE, 0xA684 },
+ { 0xA686, UPPER_CASE, 0xA687 },
+ { 0xA687, LOWER_CASE, 0xA686 },
+ { 0xA688, UPPER_CASE, 0xA689 },
+ { 0xA689, LOWER_CASE, 0xA688 },
+ { 0xA68A, UPPER_CASE, 0xA68B },
+ { 0xA68B, LOWER_CASE, 0xA68A },
+ { 0xA68C, UPPER_CASE, 0xA68D },
+ { 0xA68D, LOWER_CASE, 0xA68C },
+ { 0xA68E, UPPER_CASE, 0xA68F },
+ { 0xA68F, LOWER_CASE, 0xA68E },
+ { 0xA690, UPPER_CASE, 0xA691 },
+ { 0xA691, LOWER_CASE, 0xA690 },
+ { 0xA692, UPPER_CASE, 0xA693 },
+ { 0xA693, LOWER_CASE, 0xA692 },
+ { 0xA694, UPPER_CASE, 0xA695 },
+ { 0xA695, LOWER_CASE, 0xA694 },
+ { 0xA696, UPPER_CASE, 0xA697 },
+ { 0xA697, LOWER_CASE, 0xA696 },
+ { 0xA698, UPPER_CASE, 0xA699 },
+ { 0xA699, LOWER_CASE, 0xA698 },
+ { 0xA69A, UPPER_CASE, 0xA69B },
+ { 0xA69B, LOWER_CASE, 0xA69A },
+ { 0xA722, UPPER_CASE, 0xA723 },
+ { 0xA723, LOWER_CASE, 0xA722 },
+ { 0xA724, UPPER_CASE, 0xA725 },
+ { 0xA725, LOWER_CASE, 0xA724 },
+ { 0xA726, UPPER_CASE, 0xA727 },
+ { 0xA727, LOWER_CASE, 0xA726 },
+ { 0xA728, UPPER_CASE, 0xA729 },
+ { 0xA729, LOWER_CASE, 0xA728 },
+ { 0xA72A, UPPER_CASE, 0xA72B },
+ { 0xA72B, LOWER_CASE, 0xA72A },
+ { 0xA72C, UPPER_CASE, 0xA72D },
+ { 0xA72D, LOWER_CASE, 0xA72C },
+ { 0xA72E, UPPER_CASE, 0xA72F },
+ { 0xA72F, LOWER_CASE, 0xA72E },
+ { 0xA732, UPPER_CASE, 0xA733 },
+ { 0xA733, LOWER_CASE, 0xA732 },
+ { 0xA734, UPPER_CASE, 0xA735 },
+ { 0xA735, LOWER_CASE, 0xA734 },
+ { 0xA736, UPPER_CASE, 0xA737 },
+ { 0xA737, LOWER_CASE, 0xA736 },
+ { 0xA738, UPPER_CASE, 0xA739 },
+ { 0xA739, LOWER_CASE, 0xA738 },
+ { 0xA73A, UPPER_CASE, 0xA73B },
+ { 0xA73B, LOWER_CASE, 0xA73A },
+ { 0xA73C, UPPER_CASE, 0xA73D },
+ { 0xA73D, LOWER_CASE, 0xA73C },
+ { 0xA73E, UPPER_CASE, 0xA73F },
+ { 0xA73F, LOWER_CASE, 0xA73E },
+ { 0xA740, UPPER_CASE, 0xA741 },
+ { 0xA741, LOWER_CASE, 0xA740 },
+ { 0xA742, UPPER_CASE, 0xA743 },
+ { 0xA743, LOWER_CASE, 0xA742 },
+ { 0xA744, UPPER_CASE, 0xA745 },
+ { 0xA745, LOWER_CASE, 0xA744 },
+ { 0xA746, UPPER_CASE, 0xA747 },
+ { 0xA747, LOWER_CASE, 0xA746 },
+ { 0xA748, UPPER_CASE, 0xA749 },
+ { 0xA749, LOWER_CASE, 0xA748 },
+ { 0xA74A, UPPER_CASE, 0xA74B },
+ { 0xA74B, LOWER_CASE, 0xA74A },
+ { 0xA74C, UPPER_CASE, 0xA74D },
+ { 0xA74D, LOWER_CASE, 0xA74C },
+ { 0xA74E, UPPER_CASE, 0xA74F },
+ { 0xA74F, LOWER_CASE, 0xA74E },
+ { 0xA750, UPPER_CASE, 0xA751 },
+ { 0xA751, LOWER_CASE, 0xA750 },
+ { 0xA752, UPPER_CASE, 0xA753 },
+ { 0xA753, LOWER_CASE, 0xA752 },
+ { 0xA754, UPPER_CASE, 0xA755 },
+ { 0xA755, LOWER_CASE, 0xA754 },
+ { 0xA756, UPPER_CASE, 0xA757 },
+ { 0xA757, LOWER_CASE, 0xA756 },
+ { 0xA758, UPPER_CASE, 0xA759 },
+ { 0xA759, LOWER_CASE, 0xA758 },
+ { 0xA75A, UPPER_CASE, 0xA75B },
+ { 0xA75B, LOWER_CASE, 0xA75A },
+ { 0xA75C, UPPER_CASE, 0xA75D },
+ { 0xA75D, LOWER_CASE, 0xA75C },
+ { 0xA75E, UPPER_CASE, 0xA75F },
+ { 0xA75F, LOWER_CASE, 0xA75E },
+ { 0xA760, UPPER_CASE, 0xA761 },
+ { 0xA761, LOWER_CASE, 0xA760 },
+ { 0xA762, UPPER_CASE, 0xA763 },
+ { 0xA763, LOWER_CASE, 0xA762 },
+ { 0xA764, UPPER_CASE, 0xA765 },
+ { 0xA765, LOWER_CASE, 0xA764 },
+ { 0xA766, UPPER_CASE, 0xA767 },
+ { 0xA767, LOWER_CASE, 0xA766 },
+ { 0xA768, UPPER_CASE, 0xA769 },
+ { 0xA769, LOWER_CASE, 0xA768 },
+ { 0xA76A, UPPER_CASE, 0xA76B },
+ { 0xA76B, LOWER_CASE, 0xA76A },
+ { 0xA76C, UPPER_CASE, 0xA76D },
+ { 0xA76D, LOWER_CASE, 0xA76C },
+ { 0xA76E, UPPER_CASE, 0xA76F },
+ { 0xA76F, LOWER_CASE, 0xA76E },
+ { 0xA779, UPPER_CASE, 0xA77A },
+ { 0xA77A, LOWER_CASE, 0xA779 },
+ { 0xA77B, UPPER_CASE, 0xA77C },
+ { 0xA77C, LOWER_CASE, 0xA77B },
+ { 0xA77D, UPPER_CASE, 0x1D79 },
+ { 0xA77E, UPPER_CASE, 0xA77F },
+ { 0xA77F, LOWER_CASE, 0xA77E },
+ { 0xA780, UPPER_CASE, 0xA781 },
+ { 0xA781, LOWER_CASE, 0xA780 },
+ { 0xA782, UPPER_CASE, 0xA783 },
+ { 0xA783, LOWER_CASE, 0xA782 },
+ { 0xA784, UPPER_CASE, 0xA785 },
+ { 0xA785, LOWER_CASE, 0xA784 },
+ { 0xA786, UPPER_CASE, 0xA787 },
+ { 0xA787, LOWER_CASE, 0xA786 },
+ { 0xA78B, UPPER_CASE, 0xA78C },
+ { 0xA78C, LOWER_CASE, 0xA78B },
+ { 0xA78D, UPPER_CASE, 0x265 },
+ { 0xA790, UPPER_CASE, 0xA791 },
+ { 0xA791, LOWER_CASE, 0xA790 },
+ { 0xA792, UPPER_CASE, 0xA793 },
+ { 0xA793, LOWER_CASE, 0xA792 },
+ { 0xA794, LOWER_CASE, 0xA7C4 },
+ { 0xA796, UPPER_CASE, 0xA797 },
+ { 0xA797, LOWER_CASE, 0xA796 },
+ { 0xA798, UPPER_CASE, 0xA799 },
+ { 0xA799, LOWER_CASE, 0xA798 },
+ { 0xA79A, UPPER_CASE, 0xA79B },
+ { 0xA79B, LOWER_CASE, 0xA79A },
+ { 0xA79C, UPPER_CASE, 0xA79D },
+ { 0xA79D, LOWER_CASE, 0xA79C },
+ { 0xA79E, UPPER_CASE, 0xA79F },
+ { 0xA79F, LOWER_CASE, 0xA79E },
+ { 0xA7A0, UPPER_CASE, 0xA7A1 },
+ { 0xA7A1, LOWER_CASE, 0xA7A0 },
+ { 0xA7A2, UPPER_CASE, 0xA7A3 },
+ { 0xA7A3, LOWER_CASE, 0xA7A2 },
+ { 0xA7A4, UPPER_CASE, 0xA7A5 },
+ { 0xA7A5, LOWER_CASE, 0xA7A4 },
+ { 0xA7A6, UPPER_CASE, 0xA7A7 },
+ { 0xA7A7, LOWER_CASE, 0xA7A6 },
+ { 0xA7A8, UPPER_CASE, 0xA7A9 },
+ { 0xA7A9, LOWER_CASE, 0xA7A8 },
+ { 0xA7AA, UPPER_CASE, 0x266 },
+ { 0xA7AB, UPPER_CASE, 0x25C },
+ { 0xA7AC, UPPER_CASE, 0x261 },
+ { 0xA7AD, UPPER_CASE, 0x26C },
+ { 0xA7AE, UPPER_CASE, 0x26A },
+ { 0xA7B0, UPPER_CASE, 0x29E },
+ { 0xA7B1, UPPER_CASE, 0x287 },
+ { 0xA7B2, UPPER_CASE, 0x29D },
+ { 0xA7B3, UPPER_CASE, 0xAB53 },
+ { 0xA7B4, UPPER_CASE, 0xA7B5 },
+ { 0xA7B5, LOWER_CASE, 0xA7B4 },
+ { 0xA7B6, UPPER_CASE, 0xA7B7 },
+ { 0xA7B7, LOWER_CASE, 0xA7B6 },
+ { 0xA7B8, UPPER_CASE, 0xA7B9 },
+ { 0xA7B9, LOWER_CASE, 0xA7B8 },
+ { 0xA7BA, UPPER_CASE, 0xA7BB },
+ { 0xA7BB, LOWER_CASE, 0xA7BA },
+ { 0xA7BC, UPPER_CASE, 0xA7BD },
+ { 0xA7BD, LOWER_CASE, 0xA7BC },
+ { 0xA7BE, UPPER_CASE, 0xA7BF },
+ { 0xA7BF, LOWER_CASE, 0xA7BE },
+ { 0xA7C0, UPPER_CASE, 0xA7C1 },
+ { 0xA7C1, LOWER_CASE, 0xA7C0 },
+ { 0xA7C2, UPPER_CASE, 0xA7C3 },
+ { 0xA7C3, LOWER_CASE, 0xA7C2 },
+ { 0xA7C4, UPPER_CASE, 0xA794 },
+ { 0xA7C5, UPPER_CASE, 0x282 },
+ { 0xA7C6, UPPER_CASE, 0x1D8E },
+ { 0xA7C7, UPPER_CASE, 0xA7C8 },
+ { 0xA7C8, LOWER_CASE, 0xA7C7 },
+ { 0xA7C9, UPPER_CASE, 0xA7CA },
+ { 0xA7CA, LOWER_CASE, 0xA7C9 },
+ { 0xA7D0, UPPER_CASE, 0xA7D1 },
+ { 0xA7D1, LOWER_CASE, 0xA7D0 },
+ { 0xA7D6, UPPER_CASE, 0xA7D7 },
+ { 0xA7D7, LOWER_CASE, 0xA7D6 },
+ { 0xA7D8, UPPER_CASE, 0xA7D9 },
+ { 0xA7D9, LOWER_CASE, 0xA7D8 },
+ { 0xA7F5, UPPER_CASE, 0xA7F6 },
+ { 0xA7F6, LOWER_CASE, 0xA7F5 },
+ { 0xAB53, LOWER_CASE, 0xA7B3 },
+ { 0xAB70, LOWER_CASE, 0x13A0 },
+ { 0xAB71, LOWER_CASE, 0x13A1 },
+ { 0xAB72, LOWER_CASE, 0x13A2 },
+ { 0xAB73, LOWER_CASE, 0x13A3 },
+ { 0xAB74, LOWER_CASE, 0x13A4 },
+ { 0xAB75, LOWER_CASE, 0x13A5 },
+ { 0xAB76, LOWER_CASE, 0x13A6 },
+ { 0xAB77, LOWER_CASE, 0x13A7 },
+ { 0xAB78, LOWER_CASE, 0x13A8 },
+ { 0xAB79, LOWER_CASE, 0x13A9 },
+ { 0xAB7A, LOWER_CASE, 0x13AA },
+ { 0xAB7B, LOWER_CASE, 0x13AB },
+ { 0xAB7C, LOWER_CASE, 0x13AC },
+ { 0xAB7D, LOWER_CASE, 0x13AD },
+ { 0xAB7E, LOWER_CASE, 0x13AE },
+ { 0xAB7F, LOWER_CASE, 0x13AF },
+ { 0xAB80, LOWER_CASE, 0x13B0 },
+ { 0xAB81, LOWER_CASE, 0x13B1 },
+ { 0xAB82, LOWER_CASE, 0x13B2 },
+ { 0xAB83, LOWER_CASE, 0x13B3 },
+ { 0xAB84, LOWER_CASE, 0x13B4 },
+ { 0xAB85, LOWER_CASE, 0x13B5 },
+ { 0xAB86, LOWER_CASE, 0x13B6 },
+ { 0xAB87, LOWER_CASE, 0x13B7 },
+ { 0xAB88, LOWER_CASE, 0x13B8 },
+ { 0xAB89, LOWER_CASE, 0x13B9 },
+ { 0xAB8A, LOWER_CASE, 0x13BA },
+ { 0xAB8B, LOWER_CASE, 0x13BB },
+ { 0xAB8C, LOWER_CASE, 0x13BC },
+ { 0xAB8D, LOWER_CASE, 0x13BD },
+ { 0xAB8E, LOWER_CASE, 0x13BE },
+ { 0xAB8F, LOWER_CASE, 0x13BF },
+ { 0xAB90, LOWER_CASE, 0x13C0 },
+ { 0xAB91, LOWER_CASE, 0x13C1 },
+ { 0xAB92, LOWER_CASE, 0x13C2 },
+ { 0xAB93, LOWER_CASE, 0x13C3 },
+ { 0xAB94, LOWER_CASE, 0x13C4 },
+ { 0xAB95, LOWER_CASE, 0x13C5 },
+ { 0xAB96, LOWER_CASE, 0x13C6 },
+ { 0xAB97, LOWER_CASE, 0x13C7 },
+ { 0xAB98, LOWER_CASE, 0x13C8 },
+ { 0xAB99, LOWER_CASE, 0x13C9 },
+ { 0xAB9A, LOWER_CASE, 0x13CA },
+ { 0xAB9B, LOWER_CASE, 0x13CB },
+ { 0xAB9C, LOWER_CASE, 0x13CC },
+ { 0xAB9D, LOWER_CASE, 0x13CD },
+ { 0xAB9E, LOWER_CASE, 0x13CE },
+ { 0xAB9F, LOWER_CASE, 0x13CF },
+ { 0xABA0, LOWER_CASE, 0x13D0 },
+ { 0xABA1, LOWER_CASE, 0x13D1 },
+ { 0xABA2, LOWER_CASE, 0x13D2 },
+ { 0xABA3, LOWER_CASE, 0x13D3 },
+ { 0xABA4, LOWER_CASE, 0x13D4 },
+ { 0xABA5, LOWER_CASE, 0x13D5 },
+ { 0xABA6, LOWER_CASE, 0x13D6 },
+ { 0xABA7, LOWER_CASE, 0x13D7 },
+ { 0xABA8, LOWER_CASE, 0x13D8 },
+ { 0xABA9, LOWER_CASE, 0x13D9 },
+ { 0xABAA, LOWER_CASE, 0x13DA },
+ { 0xABAB, LOWER_CASE, 0x13DB },
+ { 0xABAC, LOWER_CASE, 0x13DC },
+ { 0xABAD, LOWER_CASE, 0x13DD },
+ { 0xABAE, LOWER_CASE, 0x13DE },
+ { 0xABAF, LOWER_CASE, 0x13DF },
+ { 0xABB0, LOWER_CASE, 0x13E0 },
+ { 0xABB1, LOWER_CASE, 0x13E1 },
+ { 0xABB2, LOWER_CASE, 0x13E2 },
+ { 0xABB3, LOWER_CASE, 0x13E3 },
+ { 0xABB4, LOWER_CASE, 0x13E4 },
+ { 0xABB5, LOWER_CASE, 0x13E5 },
+ { 0xABB6, LOWER_CASE, 0x13E6 },
+ { 0xABB7, LOWER_CASE, 0x13E7 },
+ { 0xABB8, LOWER_CASE, 0x13E8 },
+ { 0xABB9, LOWER_CASE, 0x13E9 },
+ { 0xABBA, LOWER_CASE, 0x13EA },
+ { 0xABBB, LOWER_CASE, 0x13EB },
+ { 0xABBC, LOWER_CASE, 0x13EC },
+ { 0xABBD, LOWER_CASE, 0x13ED },
+ { 0xABBE, LOWER_CASE, 0x13EE },
+ { 0xABBF, LOWER_CASE, 0x13EF },
+ { 0xFF21, UPPER_CASE, 0xFF41 },
+ { 0xFF22, UPPER_CASE, 0xFF42 },
+ { 0xFF23, UPPER_CASE, 0xFF43 },
+ { 0xFF24, UPPER_CASE, 0xFF44 },
+ { 0xFF25, UPPER_CASE, 0xFF45 },
+ { 0xFF26, UPPER_CASE, 0xFF46 },
+ { 0xFF27, UPPER_CASE, 0xFF47 },
+ { 0xFF28, UPPER_CASE, 0xFF48 },
+ { 0xFF29, UPPER_CASE, 0xFF49 },
+ { 0xFF2A, UPPER_CASE, 0xFF4A },
+ { 0xFF2B, UPPER_CASE, 0xFF4B },
+ { 0xFF2C, UPPER_CASE, 0xFF4C },
+ { 0xFF2D, UPPER_CASE, 0xFF4D },
+ { 0xFF2E, UPPER_CASE, 0xFF4E },
+ { 0xFF2F, UPPER_CASE, 0xFF4F },
+ { 0xFF30, UPPER_CASE, 0xFF50 },
+ { 0xFF31, UPPER_CASE, 0xFF51 },
+ { 0xFF32, UPPER_CASE, 0xFF52 },
+ { 0xFF33, UPPER_CASE, 0xFF53 },
+ { 0xFF34, UPPER_CASE, 0xFF54 },
+ { 0xFF35, UPPER_CASE, 0xFF55 },
+ { 0xFF36, UPPER_CASE, 0xFF56 },
+ { 0xFF37, UPPER_CASE, 0xFF57 },
+ { 0xFF38, UPPER_CASE, 0xFF58 },
+ { 0xFF39, UPPER_CASE, 0xFF59 },
+ { 0xFF3A, UPPER_CASE, 0xFF5A },
+ { 0xFF41, LOWER_CASE, 0xFF21 },
+ { 0xFF42, LOWER_CASE, 0xFF22 },
+ { 0xFF43, LOWER_CASE, 0xFF23 },
+ { 0xFF44, LOWER_CASE, 0xFF24 },
+ { 0xFF45, LOWER_CASE, 0xFF25 },
+ { 0xFF46, LOWER_CASE, 0xFF26 },
+ { 0xFF47, LOWER_CASE, 0xFF27 },
+ { 0xFF48, LOWER_CASE, 0xFF28 },
+ { 0xFF49, LOWER_CASE, 0xFF29 },
+ { 0xFF4A, LOWER_CASE, 0xFF2A },
+ { 0xFF4B, LOWER_CASE, 0xFF2B },
+ { 0xFF4C, LOWER_CASE, 0xFF2C },
+ { 0xFF4D, LOWER_CASE, 0xFF2D },
+ { 0xFF4E, LOWER_CASE, 0xFF2E },
+ { 0xFF4F, LOWER_CASE, 0xFF2F },
+ { 0xFF50, LOWER_CASE, 0xFF30 },
+ { 0xFF51, LOWER_CASE, 0xFF31 },
+ { 0xFF52, LOWER_CASE, 0xFF32 },
+ { 0xFF53, LOWER_CASE, 0xFF33 },
+ { 0xFF54, LOWER_CASE, 0xFF34 },
+ { 0xFF55, LOWER_CASE, 0xFF35 },
+ { 0xFF56, LOWER_CASE, 0xFF36 },
+ { 0xFF57, LOWER_CASE, 0xFF37 },
+ { 0xFF58, LOWER_CASE, 0xFF38 },
+ { 0xFF59, LOWER_CASE, 0xFF39 },
+ { 0xFF5A, LOWER_CASE, 0xFF3A },
+};
+
+#define UNICODE_DATA_SIZE 2359
+
+static int LIBC_CALLBACK UnicodeDataComp(const void *opposingCode, const void *elem)
+{
+ CHAR16_T code = ((UnicodeDataRec*)elem)->code;
+
+ if (*((CHAR16_T*)opposingCode) < code)
+ {
+ return -1;
+ }
+ else if (*((CHAR16_T*)opposingCode) > code)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+CHAR16_T minipal_toupper_invariant(CHAR16_T code)
+{
+ UnicodeDataRec *record = (UnicodeDataRec *) bsearch(&code, UnicodeData, UNICODE_DATA_SIZE,
+ sizeof(UnicodeDataRec), UnicodeDataComp);
+
+ if (!record || record->upperOrLower != LOWER_CASE)
+ return code;
+
+ return record->opposingCode;
+}
+
+CHAR16_T minipal_tolower_invariant(CHAR16_T code)
+{
+ UnicodeDataRec *record = (UnicodeDataRec *) bsearch(&code, UnicodeData, UNICODE_DATA_SIZE,
+ sizeof(UnicodeDataRec), UnicodeDataComp);
+
+ if (!record || record->upperOrLower != UPPER_CASE)
+ return code;
+
+ return record->opposingCode;
+}
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#include <minipal/utf8.h>
+
+#include <errno.h>
+#include <limits.h>
+#include <string.h>
+#include <assert.h>
+
+#define HIGH_SURROGATE_START 0xd800
+#define HIGH_SURROGATE_END 0xdbff
+#define LOW_SURROGATE_START 0xdc00
+#define LOW_SURROGATE_END 0xdfff
+
+// Test if the wide character is a high surrogate
+static bool IsHighSurrogate(const CHAR16_T c)
+{
+ return (c & 0xFC00) == HIGH_SURROGATE_START;
+}
+
+// Test if the wide character is a low surrogate
+static bool IsLowSurrogate(const CHAR16_T c)
+{
+ return (c & 0xFC00) == LOW_SURROGATE_START;
+}
+
+// Test if the wide character is a surrogate half
+static bool IsSurrogate(const CHAR16_T c)
+{
+ return (c & 0xF800) == HIGH_SURROGATE_START;
+}
+
+typedef struct
+{
+ // Store our default string
+ unsigned char* byteStart;
+ CHAR16_T* charEnd;
+ const CHAR16_T strDefault[2];
+ int strDefaultLength;
+ int fallbackCount;
+ int fallbackIndex;
+} DecoderBuffer;
+
+static CHAR16_T DecoderReplacementFallbackBuffer_GetNextChar(DecoderBuffer* self)
+{
+ // We want it to get < 0 because == 0 means that the current/last character is a fallback
+ // and we need to detect recursion. We could have a flag but we already have this counter.
+ self->fallbackCount--;
+ self->fallbackIndex++;
+
+ // Do we have anything left? 0 is now last fallback char, negative is nothing left
+ if (self->fallbackCount < 0)
+ return '\0';
+
+ // Need to get it out of the buffer.
+ // Make sure it didn't wrap from the fast count-- path
+ if (self->fallbackCount == INT_MAX)
+ {
+ self->fallbackCount = -1;
+ return '\0';
+ }
+
+ // Now make sure its in the expected range
+ assert(self->fallbackIndex < self->strDefaultLength && self->fallbackIndex >= 0);
+
+ return self->strDefault[self->fallbackIndex];
+}
+
+// Fallback Methods
+static bool DecoderReplacementFallbackBuffer_Fallback(DecoderBuffer* self)
+{
+ // We expect no previous fallback in our buffer
+ // We can't call recursively but others might (note, we don't test on last char!!!)
+ assert(self->fallbackCount < 1);
+
+ // Go ahead and get our fallback
+ if (self->strDefaultLength == 0)
+ return false;
+
+ self->fallbackCount = self->strDefaultLength;
+ self->fallbackIndex = -1;
+
+ return true;
+}
+
+// Fallback the current byte by sticking it into the remaining char buffer.
+// This can only be called by our encodings (other have to use the public fallback methods), so
+// we can use our DecoderNLS here too (except we don't).
+// Returns true if we are successful, false if we can't fallback the character (no buffer space)
+// So caller needs to throw buffer space if return false.
+// Right now this has both bytes and bytes[], since we might have extra bytes, hence the
+// array, and we might need the index, hence the byte*
+// Don't touch ref chars unless we succeed
+static bool DecoderReplacementFallbackBuffer_InternalFallback_Copy(DecoderBuffer* self, CHAR16_T** chars, CHAR16_T* pAllocatedBufferEnd)
+{
+ assert(self->byteStart != NULL);
+
+ bool fallbackResult = DecoderReplacementFallbackBuffer_Fallback(self);
+
+ // See if there's a fallback character and we have an output buffer then copy our string.
+ if (fallbackResult)
+ {
+ // Copy the chars to our output
+ CHAR16_T ch;
+ CHAR16_T* charTemp = *chars;
+ bool bHighSurrogate = false;
+ (void)bHighSurrogate; // unused in release build
+ while ((ch = DecoderReplacementFallbackBuffer_GetNextChar(self)) != 0)
+ {
+ // Make sure no mixed up surrogates
+ if (IsSurrogate(ch))
+ {
+ if (IsHighSurrogate(ch))
+ {
+ // High Surrogate
+ assert(!bHighSurrogate);
+ bHighSurrogate = true;
+ }
+ else
+ {
+ // Low surrogate
+ assert(bHighSurrogate);
+ bHighSurrogate = false;
+ }
+ }
+
+ if (charTemp >= self->charEnd)
+ {
+ // No buffer space
+ return false;
+ }
+
+ *(charTemp++) = ch;
+ if (charTemp > pAllocatedBufferEnd)
+ {
+ errno = MINIPAL_ERROR_INSUFFICIENT_BUFFER;
+ return false;
+ }
+ }
+
+ // Need to make sure that bHighSurrogate isn't true
+ assert(!bHighSurrogate);
+
+ // Now we aren't going to be false, so its OK to update chars
+ *chars = charTemp;
+ }
+
+ return true;
+}
+
+// Clear the buffer
+static void DecoderReplacementFallbackBuffer_Reset(DecoderBuffer* self)
+{
+ self->fallbackCount = -1;
+ self->fallbackIndex = -1;
+ self->byteStart = NULL;
+}
+
+typedef struct
+{
+ const CHAR16_T strDefault[3];
+ int strDefaultLength;
+ CHAR16_T* charStart;
+ CHAR16_T* charEnd;
+ bool setEncoder;
+ bool bUsedEncoder;
+ bool bFallingBack;
+ int iRecursionCount;
+ int fallbackCount;
+ int fallbackIndex;
+} EncoderBuffer;
+
+#define MAX_RECURSION 250
+
+// Set the above values
+// This can't be part of the constructor because EncoderFallbacks would have to know how to implement these.
+static void EncoderReplacementFallbackBuffer_InternalInitialize(EncoderBuffer* self, CHAR16_T* charStart, CHAR16_T* charEnd, bool setEncoder)
+{
+ self->charStart = charStart;
+ self->charEnd = charEnd;
+ self->setEncoder = setEncoder;
+ self->bUsedEncoder = false;
+ self->bFallingBack = false;
+ self->iRecursionCount = 0;
+}
+
+static CHAR16_T EncoderReplacementFallbackBuffer_InternalGetNextChar(EncoderBuffer* self)
+{
+ // We want it to get < 0 because == 0 means that the current/last character is a fallback
+ // and we need to detect recursion. We could have a flag but we already have this counter.
+ self->fallbackCount--;
+ self->fallbackIndex++;
+
+ // Do we have anything left? 0 is now last fallback char, negative is nothing left
+ if (self->fallbackCount < 0)
+ return '\0';
+
+ // Need to get it out of the buffer.
+ // Make sure it didn't wrap from the fast count-- path
+ if (self->fallbackCount == INT_MAX)
+ {
+ self->fallbackCount = -1;
+ return '\0';
+ }
+
+ // Now make sure its in the expected range
+ assert(self->fallbackIndex < self->strDefaultLength && self->fallbackIndex >= 0);
+
+ CHAR16_T ch = self->strDefault[self->fallbackIndex];
+ self->bFallingBack = (ch != 0);
+ if (ch == 0) self->iRecursionCount = 0;
+ return ch;
+}
+
+// Fallback Methods
+static bool EncoderReplacementFallbackBuffer_Fallback(EncoderBuffer* self)
+{
+ // If we had a buffer already we're being recursive, throw, it's probably at the suspect
+ // character in our array.
+ assert(self->fallbackCount < 1);
+
+ // Go ahead and get our fallback
+ // Divide by 2 because we aren't a surrogate pair
+ self->fallbackCount = self->strDefaultLength / 2;
+ self->fallbackIndex = -1;
+
+ return self->fallbackCount != 0;
+}
+
+static bool EncoderReplacementFallbackBuffer_Fallback_Unknown(EncoderBuffer* self)
+{
+ // If we had a buffer already we're being recursive, throw, it's probably at the suspect
+ // character in our array.
+ assert(self->fallbackCount < 1);
+
+ // Go ahead and get our fallback
+ self->fallbackCount = self->strDefaultLength;
+ self->fallbackIndex = -1;
+
+ return self->fallbackCount != 0;
+}
+
+// Fallback the current character using the remaining buffer and encoder if necessary
+// This can only be called by our encodings (other have to use the public fallback methods), so
+// we can use our EncoderNLS here too.
+// setEncoder is true if we're calling from a GetBytes method, false if we're calling from a GetByteCount
+//
+// Note that this could also change the contents of self->buffer.encoder, which is the same
+// object that the caller is using, so the caller could mess up the encoder for us
+// if they aren't careful.
+static bool EncoderReplacementFallbackBuffer_InternalFallback(EncoderBuffer* self, CHAR16_T ch, CHAR16_T** chars)
+{
+ // Shouldn't have null charStart
+ assert(self->charStart != NULL);
+
+ // See if it was a high surrogate
+ if (IsHighSurrogate(ch))
+ {
+ // See if there's a low surrogate to go with it
+ if (*chars >= self->charEnd)
+ {
+ // Nothing left in input buffer
+ // No input, return 0
+ }
+ else
+ {
+ // Might have a low surrogate
+ CHAR16_T cNext = **chars;
+ if (IsLowSurrogate(cNext))
+ {
+ // If already falling back then fail
+ assert(!self->bFallingBack || self->iRecursionCount++ <= MAX_RECURSION);
+
+ // Next is a surrogate, add it as surrogate pair, and increment chars
+ (*chars)++;
+ self->bFallingBack = EncoderReplacementFallbackBuffer_Fallback_Unknown(self);
+ return self->bFallingBack;
+ }
+
+ // Next isn't a low surrogate, just fallback the high surrogate
+ }
+ }
+
+ // If already falling back then fail
+ assert(!self->bFallingBack || self->iRecursionCount++ <= MAX_RECURSION);
+
+ // Fall back our char
+ self->bFallingBack = EncoderReplacementFallbackBuffer_Fallback(self);
+
+ return self->bFallingBack;
+}
+
+static bool EncoderReplacementFallbackBuffer_MovePrevious(EncoderBuffer* self)
+{
+ // Back up one, only if we just processed the last character (or earlier)
+ if (self->fallbackCount >= -1 && self->fallbackIndex >= 0)
+ {
+ self->fallbackIndex--;
+ self->fallbackCount++;
+ return true;
+ }
+
+ // Return false 'cause we couldn't do it.
+ return false;
+}
+
+typedef struct
+{
+ union
+ {
+ DecoderBuffer decoder;
+ EncoderBuffer encoder;
+ } buffer;
+
+ bool useFallback;
+
+#if BIGENDIAN
+ bool treatAsLE;
+#endif
+} UTF8Encoding;
+
+// These are bitmasks used to maintain the state in the decoder. They occupy the higher bits
+// while the actual character is being built in the lower bits. They are shifted together
+// with the actual bits of the character.
+
+// bits 30 & 31 are used for pending bits fixup
+#define FinalByte (1 << 29)
+#define SupplimentarySeq (1 << 28)
+#define ThreeByteSeq (1 << 27)
+
+static bool InRange(int c, int begin, int end)
+{
+ return begin <= c && c <= end;
+}
+
+// During GetChars we had an invalid byte sequence
+// pSrc is backed up to the start of the bad sequence if we didn't have room to
+// fall it back. Otherwise pSrc remains where it is.
+static bool FallbackInvalidByteSequence_Copy(UTF8Encoding* self, unsigned char** pSrc, CHAR16_T** pTarget, CHAR16_T* pAllocatedBufferEnd)
+{
+ assert(self->useFallback);
+
+ // Get our byte[]
+ unsigned char* pStart = *pSrc;
+ bool fallbackResult = DecoderReplacementFallbackBuffer_InternalFallback_Copy(&self->buffer.decoder, pTarget, pAllocatedBufferEnd);
+
+ // Do the actual fallback
+ if (!fallbackResult)
+ {
+ // Oops, it failed, back up to pStart
+ *pSrc = pStart;
+ return false;
+ }
+
+ // It worked
+ return true;
+}
+
+static size_t GetCharCount(UTF8Encoding* self, unsigned char* bytes, size_t count)
+{
+ assert(bytes != NULL);
+ assert(count >= 0);
+
+ // Initialize stuff
+ unsigned char *pSrc = bytes;
+ unsigned char *pEnd = pSrc + count;
+ size_t availableBytes;
+ int chc;
+
+ // Start by assuming we have as many as count, charCount always includes the adjustment
+ // for the character being decoded
+ size_t charCount = count;
+ int ch = 0;
+ bool fallbackUsed = false;
+
+ while (true)
+ {
+ // SLOWLOOP: does all range checks, handles all special cases, but it is slow
+ if (pSrc >= pEnd) break;
+
+ // read next byte. The JIT optimization seems to be getting confused when
+ // compiling "ch = *pSrc++;", so rather use "ch = *pSrc; pSrc++;" instead
+ int cha = *pSrc;
+
+ // no pending bits
+ if (ch == 0) goto ReadChar;
+
+ pSrc++;
+
+ // we are expecting to see trailing bytes like 10vvvvvv
+ if ((cha & 0xC0) != 0x80)
+ {
+ // This can be a valid starting byte for another UTF8 byte sequence, so let's put
+ // the current byte back, and try to see if this is a valid byte for another UTF8 byte sequence
+ pSrc--;
+ charCount += (ch >> 30);
+ goto InvalidByteSequence;
+ }
+
+ // fold in the new byte
+ ch = (ch << 6) | (cha & 0x3F);
+
+ if ((ch & FinalByte) == 0)
+ {
+ assert((ch & (SupplimentarySeq | ThreeByteSeq)) != 0);
+
+ if ((ch & SupplimentarySeq) != 0)
+ {
+ if ((ch & (FinalByte >> 6)) != 0)
+ {
+ // this is 3rd byte (of 4 byte supplimentary) - nothing to do
+ continue;
+ }
+
+ // 2nd byte, check for non-shortest form of supplimentary char and the valid
+ // supplimentary characters in range 0x010000 - 0x10FFFF at the same time
+ if (!InRange(ch & 0x1F0, 0x10, 0x100))
+ {
+ goto InvalidByteSequence;
+ }
+ }
+ else
+ {
+ // Must be 2nd byte of a 3-byte sequence
+ // check for non-shortest form of 3 byte seq
+ if ((ch & (0x1F << 5)) == 0 || // non-shortest form
+ (ch & (0xF800 >> 6)) == (0xD800 >> 6)) // illegal individually encoded surrogate
+ {
+ goto InvalidByteSequence;
+ }
+ }
+ continue;
+ }
+
+ // ready to punch
+
+ // adjust for surrogates in non-shortest form
+ if ((ch & (SupplimentarySeq | 0x1F0000)) == SupplimentarySeq) charCount--;
+
+ goto EncodeChar;
+
+ InvalidByteSequence:
+ if (!self->useFallback)
+ {
+ errno = MINIPAL_ERROR_NO_UNICODE_TRANSLATION;
+ return 0;
+ }
+
+ if (!fallbackUsed)
+ {
+ fallbackUsed = true;
+ self->buffer.decoder.byteStart = bytes;
+ self->buffer.decoder.charEnd = NULL;
+ }
+ charCount += self->buffer.decoder.strDefaultLength;
+
+ ch = 0;
+ continue;
+
+ ReadChar:
+ ch = *pSrc;
+ pSrc++;
+
+ ProcessChar:
+ if (ch > 0x7F)
+ {
+ // If its > 0x7F, its start of a new multi-byte sequence
+
+ // Long sequence, so unreserve our char.
+ charCount--;
+
+ // bit 6 has to be non-zero for start of multibyte chars.
+ if ((ch & 0x40) == 0) goto InvalidByteSequence;
+
+ // start a new long code
+ if ((ch & 0x20) != 0)
+ {
+ if ((ch & 0x10) != 0)
+ {
+ // 4 byte encoding - supplimentary character (2 surrogates)
+
+ ch &= 0x0F;
+
+ // check that bit 4 is zero and the valid supplimentary character
+ // range 0x000000 - 0x10FFFF at the same time
+ if (ch > 0x04)
+ {
+ ch |= 0xf0;
+ goto InvalidByteSequence;
+ }
+
+ // Add bit flags so that when we check new characters & rotate we'll be flagged correctly.
+ // Final byte flag, count fix if we don't make final byte & supplimentary sequence flag.
+ ch |= (FinalByte >> 3 * 6) | // Final byte is 3 more bytes from now
+ (1 << 30) | // If it dies on next byte we'll need an extra char
+ (3 << (30 - 2 * 6)) | // If it dies on last byte we'll need to subtract a char
+ (SupplimentarySeq) | (SupplimentarySeq >> 6) |
+ (SupplimentarySeq >> 2 * 6) | (SupplimentarySeq >> 3 * 6);
+
+ // Our character count will be 2 characters for these 4 bytes, so subtract another char
+ charCount--;
+ }
+ else
+ {
+ // 3 byte encoding
+ // Add bit flags so that when we check new characters & rotate we'll be flagged correctly.
+ ch = (ch & 0x0F) | ((FinalByte >> 2 * 6) | (1 << 30) |
+ (ThreeByteSeq) | (ThreeByteSeq >> 6) | (ThreeByteSeq >> 2 * 6));
+
+ // We'll expect 1 character for these 3 bytes, so subtract another char.
+ charCount--;
+ }
+ }
+ else
+ {
+ // 2 byte encoding
+
+ ch &= 0x1F;
+
+ // check for non-shortest form
+ if (ch <= 1)
+ {
+ ch |= 0xc0;
+ goto InvalidByteSequence;
+ }
+
+ // Add bit flags so we'll be flagged correctly
+ ch |= (FinalByte >> 6);
+ }
+ continue;
+ }
+
+ EncodeChar:
+
+ availableBytes = (size_t)(pEnd - pSrc);
+
+ // don't fall into the fast decoding loop if we don't have enough bytes
+ if (availableBytes <= 13)
+ {
+ // try to get over the remainder of the ascii characters fast though
+ unsigned char* pLocalEnd = pEnd; // hint to get pLocalEnd enregistered
+ while (pSrc < pLocalEnd)
+ {
+ ch = *pSrc;
+ pSrc++;
+
+ if (ch > 0x7F)
+ goto ProcessChar;
+ }
+ // we are done
+ ch = 0;
+ break;
+ }
+
+ // To compute the upper bound, assume that all characters are ASCII characters at this point,
+ // the boundary will be decreased for every non-ASCII character we encounter
+ // Also, we need 7 chars reserve for the unrolled ansi decoding loop and for decoding of multibyte sequences
+ unsigned char *pStop = pSrc + availableBytes - 7;
+
+ while (pSrc < pStop)
+ {
+ ch = *pSrc;
+ pSrc++;
+
+ if (ch > 0x7F)
+ {
+ goto LongCode;
+ }
+
+ // get pSrc 2-byte aligned
+ if (((size_t)pSrc & 0x1) != 0)
+ {
+ ch = *pSrc;
+ pSrc++;
+ if (ch > 0x7F)
+ {
+ goto LongCode;
+ }
+ }
+
+ // get pSrc 4-byte aligned
+ if (((size_t)pSrc & 0x2) != 0)
+ {
+ ch = *(unsigned short*)pSrc;
+ if ((ch & 0x8080) != 0)
+ {
+ goto LongCodeWithMask16;
+ }
+ pSrc += 2;
+ }
+
+
+ // Run 8 + 8 characters at a time!
+ while (pSrc < pStop)
+ {
+ ch = *(int*)pSrc;
+ int chb = *(int*)(pSrc + 4);
+ if (((ch | chb) & (int)0x80808080) != 0)
+ {
+ goto LongCodeWithMask32;
+ }
+ pSrc += 8;
+
+ // This is a really small loop - unroll it
+ if (pSrc >= pStop)
+ break;
+
+ ch = *(int*)pSrc;
+ chb = *(int*)(pSrc + 4);
+ if (((ch | chb) & (int)0x80808080) != 0)
+ {
+ goto LongCodeWithMask32;
+ }
+ pSrc += 8;
+ }
+ break;
+
+ LongCodeWithMask32 :
+#if BIGENDIAN
+ // be careful about the sign extension
+ if (!self->treatAsLE) ch = (int)(((unsigned int)ch) >> 16);
+ else
+#endif
+ ch &= 0xFF;
+
+ LongCodeWithMask16:
+#if BIGENDIAN
+ if (!self->treatAsLE) ch = (int)(((unsigned int)ch) >> 8);
+ else
+#endif
+ ch &= 0xFF;
+
+ pSrc++;
+ if (ch <= 0x7F)
+ {
+ continue;
+ }
+
+ LongCode:
+ chc = *pSrc;
+ pSrc++;
+
+ if (
+ // bit 6 has to be zero
+ (ch & 0x40) == 0 ||
+ // we are expecting to see trailing bytes like 10vvvvvv
+ (chc & 0xC0) != 0x80)
+ {
+ goto BadLongCode;
+ }
+
+ chc &= 0x3F;
+
+ // start a new long code
+ if ((ch & 0x20) != 0)
+ {
+ // fold the first two bytes together
+ chc |= (ch & 0x0F) << 6;
+
+ if ((ch & 0x10) != 0)
+ {
+ // 4 byte encoding - surrogate
+ ch = *pSrc;
+ if (
+ // check that bit 4 is zero, the non-shortest form of surrogate
+ // and the valid surrogate range 0x000000 - 0x10FFFF at the same time
+ !InRange(chc >> 4, 0x01, 0x10) ||
+ // we are expecting to see trailing bytes like 10vvvvvv
+ (ch & 0xC0) != 0x80)
+ {
+ goto BadLongCode;
+ }
+
+ chc = (chc << 6) | (ch & 0x3F);
+
+ ch = *(pSrc + 1);
+ // we are expecting to see trailing bytes like 10vvvvvv
+ if ((ch & 0xC0) != 0x80)
+ {
+ goto BadLongCode;
+ }
+ pSrc += 2;
+
+ // extra byte
+ charCount--;
+ }
+ else
+ {
+ // 3 byte encoding
+ ch = *pSrc;
+ if (
+ // check for non-shortest form of 3 byte seq
+ (chc & (0x1F << 5)) == 0 ||
+ // Can't have surrogates here.
+ (chc & (0xF800 >> 6)) == (0xD800 >> 6) ||
+ // we are expecting to see trailing bytes like 10vvvvvv
+ (ch & 0xC0) != 0x80)
+ {
+ goto BadLongCode;
+ }
+ pSrc++;
+
+ // extra byte
+ charCount--;
+ }
+ }
+ else
+ {
+ // 2 byte encoding
+
+ // check for non-shortest form
+ if ((ch & 0x1E) == 0) goto BadLongCode;
+ }
+
+ // extra byte
+ charCount--;
+ }
+
+ // no pending bits at this point
+ ch = 0;
+ continue;
+
+ BadLongCode:
+ pSrc -= 2;
+ ch = 0;
+ continue;
+ }
+
+ // May have a problem if we have to flush
+ if (ch != 0)
+ {
+ // We were already adjusting for these, so need to unadjust
+ charCount += (ch >> 30);
+ charCount += self->buffer.decoder.strDefaultLength;
+ }
+
+ // Shouldn't have anything in fallback buffer for GetCharCount
+ // (don't have to check m_throwOnOverflow for count)
+ assert(!fallbackUsed || !self->useFallback || self->buffer.decoder.fallbackCount < 0);
+
+ return charCount;
+}
+
+#define ENSURE_BUFFER_INC \
+ pTarget++; \
+ if (pTarget > pAllocatedBufferEnd) \
+ { \
+ errno = MINIPAL_ERROR_INSUFFICIENT_BUFFER; \
+ return 0; \
+ }
+
+static size_t GetChars(UTF8Encoding* self, unsigned char* bytes, size_t byteCount, CHAR16_T* chars, size_t charCount)
+{
+ assert(chars != NULL);
+ assert(byteCount >= 0);
+ assert(charCount >= 0);
+ assert(bytes != NULL);
+
+ unsigned char *pSrc = bytes;
+ CHAR16_T *pTarget = chars;
+
+ unsigned char *pEnd = pSrc + byteCount;
+ CHAR16_T *pAllocatedBufferEnd = pTarget + charCount;
+
+ int ch = 0;
+ int chc;
+
+ bool fallbackUsed = false;
+
+ while (true)
+ {
+ // SLOWLOOP: does all range checks, handles all special cases, but it is slow
+
+ if (pSrc >= pEnd) break;
+
+ // read next byte. The JIT optimization seems to be getting confused when
+ // compiling "ch = *pSrc++;", so rather use "ch = *pSrc; pSrc++;" instead
+ int cha = *pSrc;
+
+ if (ch == 0)
+ {
+ // no pending bits
+ goto ReadChar;
+ }
+
+ pSrc++;
+
+ // we are expecting to see trailing bytes like 10vvvvvv
+ if ((cha & 0xC0) != 0x80)
+ {
+ // This can be a valid starting byte for another UTF8 byte sequence, so let's put
+ // the current byte back, and try to see if this is a valid byte for another UTF8 byte sequence
+ pSrc--;
+ goto InvalidByteSequence;
+ }
+
+ // fold in the new byte
+ ch = (ch << 6) | (cha & 0x3F);
+
+ if ((ch & FinalByte) == 0)
+ {
+ // Not at last byte yet
+ assert((ch & (SupplimentarySeq | ThreeByteSeq)) != 0);
+
+ if ((ch & SupplimentarySeq) != 0)
+ {
+ // Its a 4-byte supplimentary sequence
+ if ((ch & (FinalByte >> 6)) != 0)
+ {
+ // this is 3rd byte of 4 byte sequence - nothing to do
+ continue;
+ }
+
+ // 2nd byte of 4 bytes
+ // check for non-shortest form of surrogate and the valid surrogate
+ // range 0x000000 - 0x10FFFF at the same time
+ if (!InRange(ch & 0x1F0, 0x10, 0x100))
+ {
+ goto InvalidByteSequence;
+ }
+ }
+ else
+ {
+ // Must be 2nd byte of a 3-byte sequence
+ // check for non-shortest form of 3 byte seq
+ if ((ch & (0x1F << 5)) == 0 || // non-shortest form
+ (ch & (0xF800 >> 6)) == (0xD800 >> 6)) // illegal individually encoded surrogate
+ {
+ goto InvalidByteSequence;
+ }
+ }
+ continue;
+ }
+
+ // ready to punch
+
+ // surrogate in shortest form?
+ // Might be possible to get rid of this? Already did non-shortest check for 4-byte sequence when reading 2nd byte?
+ if ((ch & (SupplimentarySeq | 0x1F0000)) > SupplimentarySeq)
+ {
+ // let the range check for the second char throw the exception
+ if (pTarget < pAllocatedBufferEnd)
+ {
+ *pTarget = (CHAR16_T)(((ch >> 10) & 0x7FF) +
+ (HIGH_SURROGATE_START - (0x10000 >> 10)));
+
+ ENSURE_BUFFER_INC
+
+ ch = (ch & 0x3FF) +
+ (int)(LOW_SURROGATE_START);
+ }
+ }
+
+ goto EncodeChar;
+
+ InvalidByteSequence:
+ if (!self->useFallback)
+ {
+ errno = MINIPAL_ERROR_NO_UNICODE_TRANSLATION;
+ return 0;
+ }
+
+ // this code fragment should be close to the gotos referencing it
+ // Have to do fallback for invalid bytes
+ if (!fallbackUsed)
+ {
+ fallbackUsed = true;
+ self->buffer.decoder.byteStart = bytes;
+ self->buffer.decoder.charEnd = pAllocatedBufferEnd;
+ }
+
+ // That'll back us up the appropriate # of bytes if we didn't get anywhere
+ if (!FallbackInvalidByteSequence_Copy(self, &pSrc, &pTarget, pAllocatedBufferEnd))
+ {
+ if (errno == MINIPAL_ERROR_INSUFFICIENT_BUFFER) return 0;
+
+ // Check if we ran out of buffer space
+ assert(pSrc >= bytes);
+
+ DecoderReplacementFallbackBuffer_Reset(&self->buffer.decoder);
+ ch = 0;
+ break;
+ }
+
+ assert(pSrc >= bytes);
+
+ ch = 0;
+ continue;
+
+ ReadChar:
+ ch = *pSrc;
+ pSrc++;
+
+ ProcessChar:
+ if (ch > 0x7F)
+ {
+ // If its > 0x7F, its start of a new multi-byte sequence
+
+ // bit 6 has to be non-zero
+ if ((ch & 0x40) == 0) goto InvalidByteSequence;
+
+ // start a new long code
+ if ((ch & 0x20) != 0)
+ {
+ if ((ch & 0x10) != 0)
+ {
+ // 4 byte encoding - supplimentary character (2 surrogates)
+
+ ch &= 0x0F;
+
+ // check that bit 4 is zero and the valid supplimentary character
+ // range 0x000000 - 0x10FFFF at the same time
+ if (ch > 0x04)
+ {
+ ch |= 0xf0;
+ goto InvalidByteSequence;
+ }
+
+ ch |= (FinalByte >> 3 * 6) | (1 << 30) | (3 << (30 - 2 * 6)) |
+ (SupplimentarySeq) | (SupplimentarySeq >> 6) |
+ (SupplimentarySeq >> 2 * 6) | (SupplimentarySeq >> 3 * 6);
+ }
+ else
+ {
+ // 3 byte encoding
+ ch = (ch & 0x0F) | ((FinalByte >> 2 * 6) | (1 << 30) |
+ (ThreeByteSeq) | (ThreeByteSeq >> 6) | (ThreeByteSeq >> 2 * 6));
+ }
+ }
+ else
+ {
+ // 2 byte encoding
+
+ ch &= 0x1F;
+
+ // check for non-shortest form
+ if (ch <= 1)
+ {
+ ch |= 0xc0;
+ goto InvalidByteSequence;
+ }
+
+ ch |= (FinalByte >> 6);
+ }
+ continue;
+ }
+
+ EncodeChar:
+ // write the pending character
+ if (pTarget >= pAllocatedBufferEnd)
+ {
+ // Fix chars so we make sure to throw if we didn't output anything
+ ch &= 0x1fffff;
+ if (ch > 0x7f)
+ {
+ if (ch > 0x7ff)
+ {
+ if (ch >= LOW_SURROGATE_START &&
+ ch <= LOW_SURROGATE_END)
+ {
+ pSrc--; // It was 4 bytes
+ pTarget--; // 1 was stored already, but we can't remember 1/2, so back up
+ }
+ else if (ch > 0xffff)
+ {
+ pSrc--; // It was 4 bytes, nothing was stored
+ }
+ pSrc--; // It was at least 3 bytes
+ }
+ pSrc--; // It was at least 2 bytes
+ }
+ pSrc--;
+
+ assert(pSrc >= bytes);
+
+ // Don't store ch in decoder, we already backed up to its start
+ ch = 0;
+
+ // Didn't throw, just use this buffer size.
+ break;
+ }
+ *pTarget = (CHAR16_T)ch;
+ ENSURE_BUFFER_INC
+
+ size_t availableChars = (size_t)(pAllocatedBufferEnd - pTarget);
+ size_t availableBytes = (size_t)(pEnd - pSrc);
+
+ // don't fall into the fast decoding loop if we don't have enough bytes
+ // Test for availableChars is done because pStop would be <= pTarget.
+ if (availableBytes <= 13)
+ {
+ // we may need as many as 1 character per byte
+ if (availableChars < availableBytes)
+ {
+ // not enough output room. no pending bits at this point
+ ch = 0;
+ continue;
+ }
+
+ // try to get over the remainder of the ascii characters fast though
+ unsigned char* pLocalEnd = pEnd; // hint to get pLocalEnd enregistered
+ while (pSrc < pLocalEnd)
+ {
+ ch = *pSrc;
+ pSrc++;
+
+ if (ch > 0x7F) goto ProcessChar;
+
+ *pTarget = (CHAR16_T)ch;
+ ENSURE_BUFFER_INC
+ }
+ // we are done
+ ch = 0;
+ break;
+ }
+
+ // we may need as many as 1 character per byte, so reduce the byte count if necessary.
+ // If availableChars is too small, pStop will be before pTarget and we won't do fast loop.
+ if (availableChars < availableBytes) availableBytes = availableChars;
+
+ // To compute the upper bound, assume that all characters are ASCII characters at this point,
+ // the boundary will be decreased for every non-ASCII character we encounter
+ // Also, we need 7 chars reserve for the unrolled ansi decoding loop and for decoding of multibyte sequences
+ CHAR16_T *pStop = pTarget + availableBytes - 7;
+
+ while (pTarget < pStop)
+ {
+ ch = *pSrc;
+ pSrc++;
+
+ if (ch > 0x7F) goto LongCode;
+
+ *pTarget = (CHAR16_T)ch;
+ ENSURE_BUFFER_INC
+
+ // get pSrc to be 2-byte aligned
+ if ((((size_t)pSrc) & 0x1) != 0)
+ {
+ ch = *pSrc;
+ pSrc++;
+ if (ch > 0x7F) goto LongCode;
+
+ *pTarget = (CHAR16_T)ch;
+ ENSURE_BUFFER_INC
+ }
+
+ // get pSrc to be 4-byte aligned
+ if ((((size_t)pSrc) & 0x2) != 0)
+ {
+ ch = *(unsigned short*)pSrc;
+ if ((ch & 0x8080) != 0) goto LongCodeWithMask16;
+
+
+ if (pTarget + 2 > pAllocatedBufferEnd)
+ {
+ errno = MINIPAL_ERROR_INSUFFICIENT_BUFFER;
+ return 0;
+ }
+
+ // Unfortunately, this is endianness sensitive
+#if BIGENDIAN
+ if (!self->treatAsLE)
+ {
+ *pTarget = (CHAR16_T)((ch >> 8) & 0x7F);
+ pSrc += 2;
+ *(pTarget + 1) = (CHAR16_T)(ch & 0x7F);
+ pTarget += 2;
+ }
+ else
+#endif
+ {
+ *pTarget = (CHAR16_T)(ch & 0x7F);
+ pSrc += 2;
+ *(pTarget + 1) = (CHAR16_T)((ch >> 8) & 0x7F);
+ pTarget += 2;
+ }
+ }
+
+ // Run 8 characters at a time!
+ while (pTarget < pStop)
+ {
+ ch = *(int*)pSrc;
+ int chb = *(int*)(pSrc + 4);
+ if (((ch | chb) & (int)0x80808080) != 0) goto LongCodeWithMask32;
+
+ if (pTarget + 8 > pAllocatedBufferEnd)
+ {
+ errno = MINIPAL_ERROR_INSUFFICIENT_BUFFER;
+ return 0;
+ }
+
+ // Unfortunately, this is endianness sensitive
+#if BIGENDIAN
+ if (!self->treatAsLE)
+ {
+ *pTarget = (CHAR16_T)((ch >> 24) & 0x7F);
+ *(pTarget + 1) = (CHAR16_T)((ch >> 16) & 0x7F);
+ *(pTarget + 2) = (CHAR16_T)((ch >> 8) & 0x7F);
+ *(pTarget + 3) = (CHAR16_T)(ch & 0x7F);
+ pSrc += 8;
+ *(pTarget + 4) = (CHAR16_T)((chb >> 24) & 0x7F);
+ *(pTarget + 5) = (CHAR16_T)((chb >> 16) & 0x7F);
+ *(pTarget + 6) = (CHAR16_T)((chb >> 8) & 0x7F);
+ *(pTarget + 7) = (CHAR16_T)(chb & 0x7F);
+ pTarget += 8;
+ }
+ else
+#endif
+ {
+ *pTarget = (CHAR16_T)(ch & 0x7F);
+ *(pTarget + 1) = (CHAR16_T)((ch >> 8) & 0x7F);
+ *(pTarget + 2) = (CHAR16_T)((ch >> 16) & 0x7F);
+ *(pTarget + 3) = (CHAR16_T)((ch >> 24) & 0x7F);
+ pSrc += 8;
+ *(pTarget + 4) = (CHAR16_T)(chb & 0x7F);
+ *(pTarget + 5) = (CHAR16_T)((chb >> 8) & 0x7F);
+ *(pTarget + 6) = (CHAR16_T)((chb >> 16) & 0x7F);
+ *(pTarget + 7) = (CHAR16_T)((chb >> 24) & 0x7F);
+ pTarget += 8;
+ }
+ }
+ break;
+
+ LongCodeWithMask32 :
+#if BIGENDIAN
+ // be careful about the sign extension
+ if (!self->treatAsLE) ch = (int)(((unsigned int)ch) >> 16);
+ else
+#endif
+ ch &= 0xFF;
+
+ LongCodeWithMask16:
+#if BIGENDIAN
+ if (!self->treatAsLE) ch = (int)(((unsigned int)ch) >> 8);
+ else
+#endif
+ ch &= 0xFF;
+
+ pSrc++;
+ if (ch <= 0x7F)
+ {
+ *pTarget = (CHAR16_T)ch;
+ ENSURE_BUFFER_INC
+ continue;
+ }
+
+ LongCode:
+ chc = *pSrc;
+ pSrc++;
+
+ if (
+ // bit 6 has to be zero
+ (ch & 0x40) == 0 ||
+ // we are expecting to see trailing bytes like 10vvvvvv
+ (chc & 0xC0) != 0x80)
+ {
+ goto BadLongCode;
+ }
+
+ chc &= 0x3F;
+
+ // start a new long code
+ if ((ch & 0x20) != 0)
+ {
+
+ // fold the first two bytes together
+ chc |= (ch & 0x0F) << 6;
+
+ if ((ch & 0x10) != 0)
+ {
+ // 4 byte encoding - surrogate
+ ch = *pSrc;
+ if (
+ // check that bit 4 is zero, the non-shortest form of surrogate
+ // and the valid surrogate range 0x000000 - 0x10FFFF at the same time
+ !InRange(chc >> 4, 0x01, 0x10) ||
+ // we are expecting to see trailing bytes like 10vvvvvv
+ (ch & 0xC0) != 0x80)
+ {
+ goto BadLongCode;
+ }
+
+ chc = (chc << 6) | (ch & 0x3F);
+
+ ch = *(pSrc + 1);
+ // we are expecting to see trailing bytes like 10vvvvvv
+ if ((ch & 0xC0) != 0x80) goto BadLongCode;
+
+ pSrc += 2;
+
+ ch = (chc << 6) | (ch & 0x3F);
+
+ *pTarget = (CHAR16_T)(((ch >> 10) & 0x7FF) +
+ (HIGH_SURROGATE_START - (0x10000 >> 10)));
+ ENSURE_BUFFER_INC
+
+ ch = (ch & 0x3FF) + (LOW_SURROGATE_START);
+
+ // extra byte, we're already planning 2 chars for 2 of these bytes,
+ // but the big loop is testing the target against pStop, so we need
+ // to subtract 2 more or we risk overrunning the input. Subtract
+ // one here and one below.
+ pStop--;
+ }
+ else
+ {
+ // 3 byte encoding
+ ch = *pSrc;
+ if (
+ // check for non-shortest form of 3 byte seq
+ (chc & (0x1F << 5)) == 0 ||
+ // Can't have surrogates here.
+ (chc & (0xF800 >> 6)) == (0xD800 >> 6) ||
+ // we are expecting to see trailing bytes like 10vvvvvv
+ (ch & 0xC0) != 0x80)
+ {
+ goto BadLongCode;
+ }
+ pSrc++;
+
+ ch = (chc << 6) | (ch & 0x3F);
+
+ // extra byte, we're only expecting 1 char for each of these 3 bytes,
+ // but the loop is testing the target (not source) against pStop, so
+ // we need to subtract 2 more or we risk overrunning the input.
+ // Subtract 1 here and one more below
+ pStop--;
+ }
+ }
+ else
+ {
+ // 2 byte encoding
+
+ ch &= 0x1F;
+
+ // check for non-shortest form
+ if (ch <= 1) goto BadLongCode;
+
+ ch = (ch << 6) | chc;
+ }
+
+ *pTarget = (CHAR16_T)ch;
+ ENSURE_BUFFER_INC
+
+ // extra byte, we're only expecting 1 char for each of these 2 bytes,
+ // but the loop is testing the target (not source) against pStop.
+ // subtract an extra count from pStop so that we don't overrun the input.
+ pStop--;
+ }
+
+ assert(pTarget <= pAllocatedBufferEnd);
+
+ // no pending bits at this point
+ ch = 0;
+ continue;
+
+ BadLongCode:
+ pSrc -= 2;
+ ch = 0;
+ continue;
+ }
+
+ if (ch != 0)
+ {
+ // This'll back us up the appropriate # of bytes if we didn't get anywhere
+ if (!self->useFallback)
+ {
+ assert(pSrc >= bytes || pTarget == chars);
+
+ // Ran out of buffer space
+ // Need to throw an exception?
+ if (pTarget == chars)
+ {
+ errno = MINIPAL_ERROR_INSUFFICIENT_BUFFER;
+ return 0;
+ }
+ }
+ assert(pSrc >= bytes);
+ ch = 0;
+ }
+
+ // Shouldn't have anything in fallback buffer for GetChars
+ // (don't have to check m_throwOnOverflow for chars)
+ assert(!fallbackUsed || self->buffer.decoder.fallbackCount < 0);
+
+ if (pSrc < pEnd)
+ {
+ errno = MINIPAL_ERROR_INSUFFICIENT_BUFFER;
+ return 0;
+ }
+
+ return (size_t)(pTarget - chars);
+}
+
+static size_t GetBytes(UTF8Encoding* self, CHAR16_T* chars, size_t charCount, unsigned char* bytes, size_t byteCount)
+{
+ assert(chars != NULL);
+ assert(byteCount >= 0);
+ assert(charCount >= 0);
+ assert(bytes != NULL);
+
+ // For fallback we may need a fallback buffer.
+ // We wait to initialize it though in case we don't have any broken input unicode
+ bool fallbackUsed = false;
+ CHAR16_T *pSrc = chars;
+ unsigned char *pTarget = bytes;
+
+ CHAR16_T *pEnd = pSrc + charCount;
+ unsigned char *pAllocatedBufferEnd = pTarget + byteCount;
+
+ int ch = 0;
+ int chd;
+
+ // assume that JIT will enregister pSrc, pTarget and ch
+
+ while (true)
+ {
+ // SLOWLOOP: does all range checks, handles all special cases, but it is slow
+
+ if (pSrc >= pEnd)
+ {
+ if (ch == 0)
+ {
+ // Check if there's anything left to get out of the fallback buffer
+ ch = fallbackUsed ? EncoderReplacementFallbackBuffer_InternalGetNextChar(&self->buffer.encoder) : 0;
+ if (ch > 0) goto ProcessChar;
+ }
+ else
+ {
+ // Case of leftover surrogates in the fallback buffer
+ if (fallbackUsed && self->buffer.encoder.bFallingBack)
+ {
+ assert(ch >= 0xD800 && ch <= 0xDBFF);
+
+ int cha = ch;
+
+ ch = EncoderReplacementFallbackBuffer_InternalGetNextChar(&self->buffer.encoder);
+
+ if (InRange(ch, LOW_SURROGATE_START, LOW_SURROGATE_END))
+ {
+ ch = ch + (cha << 10) + (0x10000 - LOW_SURROGATE_START - (HIGH_SURROGATE_START << 10));
+ goto EncodeChar;
+ }
+ else if (ch > 0)
+ {
+ goto ProcessChar;
+ }
+
+ break;
+ }
+ }
+
+ // attempt to encode the partial surrogate (will fail or ignore)
+ if (ch > 0) goto EncodeChar;
+
+ // We're done
+ break;
+ }
+
+ if (ch > 0)
+ {
+ // We have a high surrogate left over from a previous loop.
+ assert(ch >= 0xD800 && ch <= 0xDBFF);
+
+ // use separate helper variables for local contexts so that the jit optimizations
+ // won't get confused about the variable lifetimes
+ int cha = *pSrc;
+
+ // In previous byte, we encountered a high surrogate, so we are expecting a low surrogate here.
+ if (InRange(cha, LOW_SURROGATE_START, LOW_SURROGATE_END))
+ {
+ ch = cha + (ch << 10) +
+ (0x10000
+ - LOW_SURROGATE_START
+ - (HIGH_SURROGATE_START << 10));
+
+ pSrc++;
+ }
+ // else ch is still high surrogate and encoding will fail
+
+ // attempt to encode the surrogate or partial surrogate
+ goto EncodeChar;
+ }
+
+ // If we've used a fallback, then we have to check for it
+ if (fallbackUsed)
+ {
+ ch = EncoderReplacementFallbackBuffer_InternalGetNextChar(&self->buffer.encoder);
+ if (ch > 0) goto ProcessChar;
+ }
+
+ // read next char. The JIT optimization seems to be getting confused when
+ // compiling "ch = *pSrc++;", so rather use "ch = *pSrc; pSrc++;" instead
+ ch = *pSrc;
+ pSrc++;
+
+ ProcessChar:
+ if (InRange(ch, HIGH_SURROGATE_START, HIGH_SURROGATE_END)) continue;
+
+ // either good char or partial surrogate
+
+ EncodeChar:
+ // throw exception on partial surrogate if necessary
+ if (InRange(ch, HIGH_SURROGATE_START, LOW_SURROGATE_END))
+ {
+ // Lone surrogates aren't allowed, we have to do fallback for them
+ // Have to make a fallback buffer if we don't have one
+ if (!fallbackUsed)
+ {
+ // wait on fallbacks if we can
+ // For fallback we may need a fallback buffer
+ fallbackUsed = true;
+
+ // Set our internal fallback interesting things.
+ EncoderReplacementFallbackBuffer_InternalInitialize(&self->buffer.encoder, chars, pEnd, true);
+ }
+
+ // Do our fallback. Actually we already know its a mixed up surrogate,
+ // so the ref pSrc isn't gonna do anything.
+ EncoderReplacementFallbackBuffer_InternalFallback(&self->buffer.encoder, (CHAR16_T)ch, &pSrc);
+
+ // Ignore it if we don't throw
+ ch = 0;
+ continue;
+ }
+
+ // Count bytes needed
+ int bytesNeeded = 1;
+ if (ch > 0x7F)
+ {
+ if (ch > 0x7FF)
+ {
+ if (ch > 0xFFFF)
+ {
+ bytesNeeded++; // 4 bytes (surrogate pair)
+ }
+ bytesNeeded++; // 3 bytes (800-FFFF)
+ }
+ bytesNeeded++; // 2 bytes (80-7FF)
+ }
+
+ if (pTarget > pAllocatedBufferEnd - bytesNeeded)
+ {
+ // Left over surrogate from last time will cause pSrc == chars, so we'll throw
+ if (fallbackUsed && self->buffer.encoder.bFallingBack)
+ {
+ EncoderReplacementFallbackBuffer_MovePrevious(&self->buffer.encoder); // Didn't use this fallback char
+ if (ch > 0xFFFF)
+ EncoderReplacementFallbackBuffer_MovePrevious(&self->buffer.encoder); // Was surrogate, didn't use 2nd part either
+ }
+ else
+ {
+ pSrc--; // Didn't use this char
+ if (ch > 0xFFFF)
+ pSrc--; // Was surrogate, didn't use 2nd part either
+ }
+
+ assert(pSrc >= chars || pTarget == bytes);
+
+ if (pTarget == bytes) // Throw if we must
+ {
+ errno = MINIPAL_ERROR_INSUFFICIENT_BUFFER;
+ return 0;
+ }
+ ch = 0; // Nothing left over (we backed up to start of pair if supplimentary)
+ break;
+ }
+
+ if (ch <= 0x7F)
+ {
+ *pTarget = (unsigned char)ch;
+ }
+ else
+ {
+ // use separate helper variables for local contexts so that the jit optimizations
+ // won't get confused about the variable lifetimes
+ int chb;
+ if (ch <= 0x7FF)
+ {
+ // 2 unsigned char encoding
+ chb = (unsigned char)(0xC0 | (ch >> 6));
+ }
+ else
+ {
+ if (ch <= 0xFFFF)
+ {
+ chb = (unsigned char)(0xE0 | (ch >> 12));
+ }
+ else
+ {
+ *pTarget = (unsigned char)(0xF0 | (ch >> 18));
+ ENSURE_BUFFER_INC
+
+ chb = 0x80 | ((ch >> 12) & 0x3F);
+ }
+ *pTarget = (unsigned char)chb;
+ ENSURE_BUFFER_INC
+
+ chb = 0x80 | ((ch >> 6) & 0x3F);
+ }
+ *pTarget = (unsigned char)chb;
+ ENSURE_BUFFER_INC
+
+ *pTarget = (unsigned char)0x80 | (ch & 0x3F);
+ }
+
+ ENSURE_BUFFER_INC
+
+ // If still have fallback don't do fast loop
+ if (fallbackUsed && (ch = EncoderReplacementFallbackBuffer_InternalGetNextChar(&self->buffer.encoder)) != 0)
+ goto ProcessChar;
+
+ size_t availableChars = (size_t)(pEnd - pSrc);
+ size_t availableBytes = (size_t)(pAllocatedBufferEnd - pTarget);
+
+ // don't fall into the fast decoding loop if we don't have enough characters
+ // Note that if we don't have enough bytes, pStop will prevent us from entering the fast loop.
+ if (availableChars <= 13)
+ {
+ // we are hoping for 1 unsigned char per char
+ if (availableBytes < availableChars)
+ {
+ // not enough output room. no pending bits at this point
+ ch = 0;
+ continue;
+ }
+
+ // try to get over the remainder of the ascii characters fast though
+ CHAR16_T* pLocalEnd = pEnd; // hint to get pLocalEnd enregistered
+ while (pSrc < pLocalEnd)
+ {
+ ch = *pSrc;
+ pSrc++;
+
+ // Not ASCII, need more than 1 unsigned char per char
+ if (ch > 0x7F) goto ProcessChar;
+
+ *pTarget = (unsigned char)ch;
+ ENSURE_BUFFER_INC
+ }
+ // we are done, let ch be 0 to clear encoder
+ ch = 0;
+ break;
+ }
+
+ // we need at least 1 unsigned char per character, but Convert might allow us to convert
+ // only part of the input, so try as much as we can. Reduce charCount if necessary
+ if (availableBytes < availableChars)
+ {
+ availableChars = availableBytes;
+ }
+
+ // FASTLOOP:
+ // - optimistic range checks
+ // - fallbacks to the slow loop for all special cases, exception throwing, etc.
+
+ // To compute the upper bound, assume that all characters are ASCII characters at this point,
+ // the boundary will be decreased for every non-ASCII character we encounter
+ // Also, we need 5 chars reserve for the unrolled ansi decoding loop and for decoding of surrogates
+ // If there aren't enough bytes for the output, then pStop will be <= pSrc and will bypass the loop.
+ CHAR16_T *pStop = pSrc + availableChars - 5;
+
+ while (pSrc < pStop)
+ {
+ ch = *pSrc;
+ pSrc++;
+
+ if (ch > 0x7F) goto LongCode;
+
+ *pTarget = (unsigned char)ch;
+ ENSURE_BUFFER_INC
+
+ // get pSrc aligned
+ if (((size_t)pSrc & 0x2) != 0)
+ {
+ ch = *pSrc;
+ pSrc++;
+ if (ch > 0x7F) goto LongCode;
+
+ *pTarget = (unsigned char)ch;
+ ENSURE_BUFFER_INC
+ }
+
+ // Run 4 characters at a time!
+ while (pSrc < pStop)
+ {
+ ch = *(int*)pSrc;
+ int chc = *(int*)(pSrc + 2);
+
+ if (((ch | chc) & (int)0xFF80FF80) != 0) goto LongCodeWithMask;
+
+ if (pTarget + 4 > pAllocatedBufferEnd)
+ {
+ errno = MINIPAL_ERROR_INSUFFICIENT_BUFFER;
+ return 0;
+ }
+
+ // Unfortunately, this is endianness sensitive
+#if BIGENDIAN
+ if (!self->treatAsLE)
+ {
+ *pTarget = (unsigned char)(ch >> 16);
+ *(pTarget + 1) = (unsigned char)ch;
+ pSrc += 4;
+ *(pTarget + 2) = (unsigned char)(chc >> 16);
+ *(pTarget + 3) = (unsigned char)chc;
+ pTarget += 4;
+ }
+ else
+#endif
+ {
+ *pTarget = (unsigned char)ch;
+ *(pTarget + 1) = (unsigned char)(ch >> 16);
+ pSrc += 4;
+ *(pTarget + 2) = (unsigned char)chc;
+ *(pTarget + 3) = (unsigned char)(chc >> 16);
+ pTarget += 4;
+ }
+ }
+ continue;
+
+ LongCodeWithMask:
+#if BIGENDIAN
+ // be careful about the sign extension
+ if (!self->treatAsLE) ch = (int)(((unsigned int)ch) >> 16);
+ else
+#endif
+ ch = (CHAR16_T)ch;
+ pSrc++;
+
+ if (ch > 0x7F) goto LongCode;
+
+ *pTarget = (unsigned char)ch;
+ ENSURE_BUFFER_INC
+ continue;
+
+ LongCode:
+ // use separate helper variables for slow and fast loop so that the jit optimizations
+ // won't get confused about the variable lifetimes
+ if (ch <= 0x7FF)
+ {
+ // 2 unsigned char encoding
+ chd = 0xC0 | (ch >> 6);
+ }
+ else
+ {
+ if (!InRange(ch, HIGH_SURROGATE_START, LOW_SURROGATE_END))
+ {
+ // 3 unsigned char encoding
+ chd = 0xE0 | (ch >> 12);
+ }
+ else
+ {
+ // 4 unsigned char encoding - high surrogate + low surrogate
+ if (ch > HIGH_SURROGATE_END)
+ {
+ // low without high -> bad, try again in slow loop
+ pSrc -= 1;
+ break;
+ }
+
+ chd = *pSrc;
+ pSrc++;
+
+ if (!InRange(chd, LOW_SURROGATE_START, LOW_SURROGATE_END))
+ {
+ // high not followed by low -> bad, try again in slow loop
+ pSrc -= 2;
+ break;
+ }
+
+ ch = chd + (ch << 10) +
+ (0x10000
+ - LOW_SURROGATE_START
+ - (HIGH_SURROGATE_START << 10));
+
+ *pTarget = (unsigned char)(0xF0 | (ch >> 18));
+ // pStop - this unsigned char is compensated by the second surrogate character
+ // 2 input chars require 4 output bytes. 2 have been anticipated already
+ // and 2 more will be accounted for by the 2 pStop-- calls below.
+ ENSURE_BUFFER_INC
+
+ chd = 0x80 | ((ch >> 12) & 0x3F);
+ }
+ *pTarget = (unsigned char)chd;
+ pStop--; // 3 unsigned char sequence for 1 char, so need pStop-- and the one below too.
+ ENSURE_BUFFER_INC
+
+ chd = 0x80 | ((ch >> 6) & 0x3F);
+ }
+ *pTarget = (unsigned char)chd;
+ pStop--; // 2 unsigned char sequence for 1 char so need pStop--.
+ ENSURE_BUFFER_INC
+
+ *pTarget = (unsigned char)(0x80 | (ch & 0x3F));
+ // pStop - this unsigned char is already included
+ ENSURE_BUFFER_INC
+ }
+
+ assert(pTarget <= pAllocatedBufferEnd);
+
+ // no pending char at this point
+ ch = 0;
+ }
+
+ if (pSrc < pEnd)
+ {
+ errno = MINIPAL_ERROR_INSUFFICIENT_BUFFER;
+ return 0;
+ }
+
+ return (size_t)(pTarget - bytes);
+}
+
+static size_t GetByteCount(UTF8Encoding* self, CHAR16_T *chars, size_t count)
+{
+ // For fallback we may need a fallback buffer.
+ // We wait to initialize it though in case we don't have any broken input unicode
+ bool fallbackUsed = false;
+ CHAR16_T *pSrc = chars;
+ CHAR16_T *pEnd = pSrc + count;
+
+ // Start by assuming we have as many as count
+ size_t byteCount = count;
+
+ int ch = 0;
+
+ while (true)
+ {
+ // SLOWLOOP: does all range checks, handles all special cases, but it is slow
+ if (pSrc >= pEnd)
+ {
+
+ if (ch == 0)
+ {
+ // Unroll any fallback that happens at the end
+ ch = fallbackUsed ? EncoderReplacementFallbackBuffer_InternalGetNextChar(&self->buffer.encoder) : 0;
+ if (ch > 0)
+ {
+ byteCount++;
+ goto ProcessChar;
+ }
+ }
+ else
+ {
+ // Case of surrogates in the fallback.
+ if (fallbackUsed && self->buffer.encoder.bFallingBack)
+ {
+ assert(ch >= 0xD800 && ch <= 0xDBFF);
+
+ ch = EncoderReplacementFallbackBuffer_InternalGetNextChar(&self->buffer.encoder);
+ byteCount++;
+
+ if (InRange(ch, LOW_SURROGATE_START, LOW_SURROGATE_END))
+ {
+ ch = 0xfffd;
+ byteCount++;
+ goto EncodeChar;
+ }
+ else if (ch > 0)
+ {
+ goto ProcessChar;
+ }
+ else
+ {
+ byteCount--; // ignore last one.
+ break;
+ }
+ }
+ }
+
+ if (ch <= 0)
+ {
+ break;
+ }
+
+ // attempt to encode the partial surrogate (will fallback or ignore it), it'll also subtract 1.
+ byteCount++;
+ goto EncodeChar;
+ }
+
+ if (ch > 0)
+ {
+ assert(ch >= 0xD800 && ch <= 0xDBFF);
+
+ // use separate helper variables for local contexts so that the jit optimizations
+ // won't get confused about the variable lifetimes
+ int cha = *pSrc;
+
+ // count the pending surrogate
+ byteCount++;
+
+ // In previous byte, we encountered a high surrogate, so we are expecting a low surrogate here.
+ if (InRange(cha, LOW_SURROGATE_START, LOW_SURROGATE_END))
+ {
+ // Don't need a real # because we're just counting, anything > 0x7ff ('cept surrogate) will do.
+ ch = 0xfffd;
+ // ch = cha + (ch << 10) +
+ // (0x10000
+ // - LOW_SURROGATE_START
+ // - (HIGH_SURROGATE_START << 10) );
+
+ // Use this next char
+ pSrc++;
+ }
+ // else ch is still high surrogate and encoding will fail (so don't add count)
+
+ // attempt to encode the surrogate or partial surrogate
+ goto EncodeChar;
+ }
+
+ // If we've used a fallback, then we have to check for it
+ if (fallbackUsed)
+ {
+ ch = EncoderReplacementFallbackBuffer_InternalGetNextChar(&self->buffer.encoder);
+ if (ch > 0)
+ {
+ // We have an extra byte we weren't expecting.
+ byteCount++;
+ goto ProcessChar;
+ }
+ }
+
+ // read next char. The JIT optimization seems to be getting confused when
+ // compiling "ch = *pSrc++;", so rather use "ch = *pSrc; pSrc++;" instead
+ ch = *pSrc;
+ pSrc++;
+
+ ProcessChar:
+ if (InRange(ch, HIGH_SURROGATE_START, HIGH_SURROGATE_END))
+ {
+ // we will count this surrogate next time around
+ byteCount--;
+ continue;
+ }
+ // either good char or partial surrogate
+
+ EncodeChar:
+ // throw exception on partial surrogate if necessary
+ if (InRange(ch, HIGH_SURROGATE_START, LOW_SURROGATE_END))
+ {
+ // Lone surrogates aren't allowed
+ // Have to make a fallback buffer if we don't have one
+ if (!fallbackUsed)
+ {
+ // wait on fallbacks if we can
+ // For fallback we may need a fallback buffer
+ fallbackUsed = true;
+
+ // Set our internal fallback interesting things.
+ EncoderReplacementFallbackBuffer_InternalInitialize(&self->buffer.encoder, chars, chars + count, false);
+ }
+
+ // Do our fallback. Actually we already know its a mixed up surrogate,
+ // so the ref pSrc isn't gonna do anything.
+ EncoderReplacementFallbackBuffer_InternalFallback(&self->buffer.encoder, (CHAR16_T)ch, &pSrc);
+
+ // Ignore it if we don't throw (we had preallocated this ch)
+ byteCount--;
+ ch = 0;
+ continue;
+ }
+
+ // Count them
+ if (ch > 0x7F)
+ {
+ if (ch > 0x7FF)
+ {
+ // the extra surrogate byte was compensated by the second surrogate character
+ // (2 surrogates make 4 bytes. We've already counted 2 bytes, 1 per char)
+ byteCount++;
+ }
+ byteCount++;
+ }
+
+#if WIN64
+ // check for overflow
+ if (byteCount < 0)
+ {
+ break;
+ }
+#endif
+
+ // If still have fallback don't do fast loop
+ if (fallbackUsed && (ch = EncoderReplacementFallbackBuffer_InternalGetNextChar(&self->buffer.encoder)) != 0)
+ {
+ // We're reserving 1 byte for each char by default
+ byteCount++;
+ goto ProcessChar;
+ }
+
+ size_t availableChars = (size_t)(pEnd - pSrc);
+
+ // don't fall into the fast decoding loop if we don't have enough characters
+ if (availableChars <= 13)
+ {
+ // try to get over the remainder of the ascii characters fast though
+ CHAR16_T* pLocalEnd = pEnd; // hint to get pLocalEnd enregistered
+ while (pSrc < pLocalEnd)
+ {
+ ch = *pSrc;
+ pSrc++;
+ if (ch > 0x7F) goto ProcessChar;
+ }
+
+ // we are done
+ break;
+ }
+
+#if WIN64
+ // make sure that we won't get a silent overflow inside the fast loop
+ // (Fall out to slow loop if we have this many characters)
+ availableChars &= 0x0FFFFFFF;
+#endif
+
+ // To compute the upper bound, assume that all characters are ASCII characters at this point,
+ // the boundary will be decreased for every non-ASCII character we encounter
+ // Also, we need 3 + 4 chars reserve for the unrolled ansi decoding loop and for decoding of surrogates
+ CHAR16_T *pStop = pSrc + availableChars - (3 + 4);
+
+ while (pSrc < pStop)
+ {
+ ch = *pSrc;
+ pSrc++;
+
+ if (ch > 0x7F) // Not ASCII
+ {
+ if (ch > 0x7FF) // Not 2 Byte
+ {
+ if ((ch & 0xF800) == 0xD800) // See if its a Surrogate
+ goto LongCode;
+ byteCount++;
+ }
+ byteCount++;
+ }
+
+ // get pSrc aligned
+ if (((size_t)pSrc & 0x2) != 0)
+ {
+ ch = *pSrc;
+ pSrc++;
+ if (ch > 0x7F) // Not ASCII
+ {
+ if (ch > 0x7FF) // Not 2 Byte
+ {
+ if ((ch & 0xF800) == 0xD800) // See if its a Surrogate
+ goto LongCode;
+ byteCount++;
+ }
+ byteCount++;
+ }
+ }
+
+ // Run 2 * 4 characters at a time!
+ while (pSrc < pStop)
+ {
+ ch = *(int*)pSrc;
+ int chc = *(int*)(pSrc + 2);
+ if (((ch | chc) & (int)0xFF80FF80) != 0) // See if not ASCII
+ {
+ if (((ch | chc) & (int)0xF800F800) != 0) // See if not 2 Byte
+ {
+ goto LongCodeWithMask;
+ }
+
+
+ if ((ch & (int)0xFF800000) != 0) // Actually 0x07800780 is all we care about (4 bits)
+ byteCount++;
+ if ((ch & (int)0xFF80) != 0)
+ byteCount++;
+ if ((chc & (int)0xFF800000) != 0)
+ byteCount++;
+ if ((chc & (int)0xFF80) != 0)
+ byteCount++;
+ }
+ pSrc += 4;
+
+ ch = *(int*)pSrc;
+ chc = *(int*)(pSrc + 2);
+ if (((ch | chc) & (int)0xFF80FF80) != 0) // See if not ASCII
+ {
+ if (((ch | chc) & (int)0xF800F800) != 0) // See if not 2 Byte
+ {
+ goto LongCodeWithMask;
+ }
+
+ if ((ch & (int)0xFF800000) != 0)
+ byteCount++;
+ if ((ch & (int)0xFF80) != 0)
+ byteCount++;
+ if ((chc & (int)0xFF800000) != 0)
+ byteCount++;
+ if ((chc & (int)0xFF80) != 0)
+ byteCount++;
+ }
+ pSrc += 4;
+ }
+ break;
+
+ LongCodeWithMask:
+#if BIGENDIAN
+ // be careful about the sign extension
+ if (!self->treatAsLE) ch = (int)(((unsigned int)ch) >> 16);
+ else
+#endif
+ ch = (CHAR16_T)ch;
+
+ pSrc++;
+
+ if (ch <= 0x7F)
+ {
+ continue;
+ }
+
+ LongCode:
+ // use separate helper variables for slow and fast loop so that the jit optimizations
+ // won't get confused about the variable lifetimes
+ if (ch > 0x7FF)
+ {
+ if (InRange(ch, HIGH_SURROGATE_START, LOW_SURROGATE_END))
+ {
+ // 4 byte encoding - high surrogate + low surrogate
+
+ int chd = *pSrc;
+ if (
+ ch > HIGH_SURROGATE_END ||
+ !InRange(chd, LOW_SURROGATE_START, LOW_SURROGATE_END))
+ {
+ // Back up and drop out to slow loop to figure out error
+ pSrc--;
+ break;
+ }
+ pSrc++;
+
+ // byteCount - this byte is compensated by the second surrogate character
+ }
+ byteCount++;
+ }
+ byteCount++;
+
+ // byteCount - the last byte is already included
+ }
+
+ // no pending char at this point
+ ch = 0;
+ }
+
+#if WIN64
+ // check for overflow
+ assert(byteCount >= 0);
+#endif
+ assert(!fallbackUsed || self->buffer.encoder.fallbackCount < 0);
+
+ return byteCount;
+}
+
+size_t minipal_get_length_utf8_to_utf16(const char* source, size_t sourceLength, unsigned int flags)
+{
+ errno = 0;
+
+ if (sourceLength == 0)
+ return 0;
+
+ UTF8Encoding enc =
+ {
+ .buffer = { .decoder = { .fallbackCount = -1, .fallbackIndex = -1, .strDefault = { 0xFFFD, 0 }, .strDefaultLength = 1 } },
+ .useFallback = !(flags & MINIPAL_MB_NO_REPLACE_INVALID_CHARS),
+#if BIGENDIAN
+ .treatAsLE = (flags & MINIPAL_TREAT_AS_LITTLE_ENDIAN)
+#endif
+ };
+
+ return GetCharCount(&enc, (unsigned char*)source, sourceLength);
+}
+
+size_t minipal_get_length_utf16_to_utf8(const CHAR16_T* source, size_t sourceLength, unsigned int flags)
+{
+ errno = 0;
+
+ if (sourceLength == 0)
+ return 0;
+
+ UTF8Encoding enc =
+ {
+ // repeat replacement char (0xFFFD) twice for a surrogate pair
+ .buffer = { .encoder = { .fallbackCount = -1, .fallbackIndex = -1, .strDefault = { 0xFFFD, 0xFFFD, 0 }, .strDefaultLength = 2 } },
+ .useFallback = true,
+#if BIGENDIAN
+ .treatAsLE = (flags & MINIPAL_TREAT_AS_LITTLE_ENDIAN)
+#endif
+ };
+
+#if !BIGENDIAN
+ (void)flags; // unused
+#endif
+
+ return GetByteCount(&enc, (CHAR16_T*)source, sourceLength);
+}
+
+size_t minipal_convert_utf8_to_utf16(const char* source, size_t sourceLength, CHAR16_T* destination, size_t destinationLength, unsigned int flags)
+{
+ size_t ret;
+ errno = 0;
+
+ if (sourceLength == 0)
+ return 0;
+
+ UTF8Encoding enc =
+ {
+ .buffer = { .decoder = { .fallbackCount = -1, .fallbackIndex = -1, .strDefault = { 0xFFFD, 0 }, .strDefaultLength = 1 } },
+ .useFallback = !(flags & MINIPAL_MB_NO_REPLACE_INVALID_CHARS),
+#if BIGENDIAN
+ .treatAsLE = (flags & MINIPAL_TREAT_AS_LITTLE_ENDIAN)
+#endif
+ };
+
+ ret = GetChars(&enc, (unsigned char*)source, sourceLength, destination, destinationLength);
+ if (errno) ret = 0;
+
+ return ret;
+}
+
+size_t minipal_convert_utf16_to_utf8(const CHAR16_T* source, size_t sourceLength, char* destination, size_t destinationLength, unsigned int flags)
+{
+ size_t ret;
+ errno = 0;
+
+ if (sourceLength == 0)
+ return 0;
+
+ UTF8Encoding enc =
+ {
+ // repeat replacement char (0xFFFD) twice for a surrogate pair
+ .buffer = { .encoder = { .fallbackCount = -1, .fallbackIndex = -1, .strDefault = { 0xFFFD, 0xFFFD, 0 }, .strDefaultLength = 2 } },
+ .useFallback = true,
+#if BIGENDIAN
+ .treatAsLE = (flags & MINIPAL_TREAT_AS_LITTLE_ENDIAN)
+#endif
+ };
+
+#if !BIGENDIAN
+ (void)flags; // unused
+#endif
+
+ ret = GetBytes(&enc, (CHAR16_T*)source, sourceLength, (unsigned char*)destination, destinationLength);
+ if (errno) ret = 0;
+
+ return ret;
+}
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef HAVE_MINIPAL_UTF8_H
+#define HAVE_MINIPAL_UTF8_H
+
+#include <minipal/utils.h>
+#include <minipal/types.h>
+#include <stdbool.h>
+
+#define MINIPAL_MB_NO_REPLACE_INVALID_CHARS 0x00000008
+#define MINIPAL_TREAT_AS_LITTLE_ENDIAN 0x00000016
+#define MINIPAL_ERROR_INSUFFICIENT_BUFFER 122L
+#define MINIPAL_ERROR_NO_UNICODE_TRANSLATION 1113L
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif // __cplusplus
+
+/**
+ * Get length of destination needed for UTF-8 to UTF-16 (UCS-2) conversion
+ *
+ * @param source The source string in UTF-8 format.
+ * @param sourceLength Length of the source string.
+ * @param flags Flags to alter the behavior of converter. Supported flags are MINIPAL_MB_NO_REPLACE_INVALID_CHARS and MINIPAL_TREAT_AS_LITTLE_ENDIAN.
+ * @return Length of UTF-16 buffer required by the conversion.
+ */
+size_t minipal_get_length_utf8_to_utf16(const char* source, size_t sourceLength, unsigned int flags);
+
+/**
+ * Get length of destination needed for UTF-16 (UCS-2) to UTF-8 conversion
+ *
+ * @param source The source string in UTF-16 format.
+ * @param sourceLength Length of the source string.
+ * @param flags Flags to alter the behavior of converter. Supported flags are MINIPAL_MB_NO_REPLACE_INVALID_CHARS and MINIPAL_TREAT_AS_LITTLE_ENDIAN.
+ * @return Length of UTF-8 buffer required by the conversion.
+ */
+size_t minipal_get_length_utf16_to_utf8(const CHAR16_T* source, size_t sourceLength, unsigned int flags);
+
+/**
+ * Convert a string from UTF-8 to UTF-16 (UCS-2) with preallocated memory
+ *
+ * @param source The source string in UTF-8 format.
+ * @param sourceLength Length of the source string.
+ * @param destination Pointer to the destination UTF-16 string. It can be NULL to query number of items required by the conversion.
+ * @param destinationLength Length of the destination string.
+ * @param flags Flags to alter the behavior of converter. Supported flags are MINIPAL_MB_NO_REPLACE_INVALID_CHARS and MINIPAL_TREAT_AS_LITTLE_ENDIAN.
+ * @return Number of items written by the conversion.
+ */
+size_t minipal_convert_utf8_to_utf16(const char* source, size_t sourceLength, CHAR16_T* destination, size_t destinationLength, unsigned int flags);
+
+/**
+ * Convert a string from UTF-16 (UCS-2) to UTF-8 with preallocated memory
+ *
+ * @param source The source string in UTF-16 format.
+ * @param sourceLength Length of the source string.
+ * @param destination Pointer to the destination UTF-8 string. It can be NULL to query number of items required by the conversion.
+ * @param destinationLength Length of the destination string.
+ * @param flags Flags to alter the behavior of converter. Supported flags are MINIPAL_MB_NO_REPLACE_INVALID_CHARS and MINIPAL_TREAT_AS_LITTLE_ENDIAN.
+ * @return Number of items written by the conversion.
+ */
+size_t minipal_convert_utf16_to_utf8(const CHAR16_T* source, size_t sourceLength, char* destination, size_t destinationLength, unsigned int flags);
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+
+#endif /* HAVE_MINIPAL_UTF8_H */
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef HAVE_MINIPAL_UTILS_H
+#define HAVE_MINIPAL_UTILS_H
+
+#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))
+
+// Number of characters in a string literal. Excludes terminating NULL.
+#define STRING_LENGTH(str) (ARRAY_SIZE(str) - 1)
+
+#ifndef __has_builtin
+#define __has_builtin(x) 0
+#endif
+
+#ifndef __has_attribute
+#define __has_attribute(x) 0
+#endif
+
+#ifdef __cplusplus
+# ifndef __has_cpp_attribute
+# define __has_cpp_attribute(x) 0
+# endif
+# if __has_cpp_attribute(fallthrough)
+# define FALLTHROUGH [[fallthrough]]
+# else
+# define FALLTHROUGH
+# endif
+#elif __has_attribute(fallthrough)
+# define FALLTHROUGH __attribute__((fallthrough))
+#else
+# define FALLTHROUGH
+#endif
+
+#if defined(_MSC_VER)
+#define LIBC_CALLBACK __cdecl
+#else
+#define LIBC_CALLBACK
+#endif
+
+#if defined(_MSC_VER)
+# if defined(__SANITIZE_ADDRESS__)
+# define HAS_ADDRESS_SANITIZER
+# define DISABLE_ASAN __declspec(no_sanitize_address)
+# else
+# define DISABLE_ASAN
+# endif
+#elif defined(__has_feature)
+# if __has_feature(address_sanitizer)
+# define HAS_ADDRESS_SANITIZER
+# define DISABLE_ASAN __attribute__((no_sanitize("address")))
+# else
+# define DISABLE_ASAN
+# endif
+#else
+# define DISABLE_ASAN
+#endif
+
+#if defined(_MSC_VER)
+# ifdef SANITIZER_SHARED_RUNTIME
+# define SANITIZER_CALLBACK_CALLCONV __declspec(dllexport no_sanitize_address) __cdecl
+# define SANITIZER_INTERFACE_CALLCONV __declspec(dllimport) __cdecl
+# else
+# define SANITIZER_CALLBACK_CALLCONV __declspec(no_sanitize_address) __cdecl
+# define SANITIZER_INTERFACE_CALLCONV __cdecl
+# endif
+#else
+# ifdef SANITIZER_SHARED_RUNTIME
+# define SANITIZER_CALLBACK_CALLCONV __attribute__((no_address_safety_analysis)) __attribute__((visibility("default")))
+# else
+# define SANITIZER_CALLBACK_CALLCONV __attribute__((no_address_safety_analysis))
+# endif
+# define SANITIZER_INTERFACE_CALLCONV
+#endif
+
+#if defined(HAS_ADDRESS_SANITIZER)
+# ifdef __cplusplus
+ extern "C"
+ {
+# endif
+ void SANITIZER_INTERFACE_CALLCONV __asan_handle_no_return(void);
+# ifdef __cplusplus
+ }
+# endif
+#elif defined(__llvm__)
+# pragma clang diagnostic push
+# ifdef COMPILER_SUPPORTS_W_RESERVED_IDENTIFIER
+# pragma clang diagnostic ignored "-Wreserved-identifier"
+# endif
+ // Stub out a dummy implmentation when asan isn't enabled.
+ inline void __asan_handle_no_return(void);
+ inline void __asan_handle_no_return(void){}
+# pragma clang diagnostic pop
+#else
+ // Use a macro for GCC since __asan_handle_no_return is always available as a built-in on GCC
+ #define __asan_handle_no_return()
+#endif
+
+#endif // HAVE_MINIPAL_UTILS_H
project(COREPAL)
+include(../clrfeatures.cmake)
+
include_directories(${COREPAL_SOURCE_DIR}/inc)
include_directories(${COREPAL_SOURCE_DIR}/src)
+include_directories(${COREPAL_SOURCE_DIR}/../inc)
add_compile_options(-fexceptions)
-add_definitions(-DUSE_STL)
-
-remove_definitions(-DUNICODE)
-remove_definitions(-D_UNICODE)
add_subdirectory(src)
// define the return value for success
#define SAFECRT_SUCCESS 0
-#ifndef THROW_DECL
-#if defined(_MSC_VER) || defined(__llvm__) || !defined(__cplusplus)
-#define THROW_DECL
-#else
-#define THROW_DECL throw()
-#endif // !_MSC_VER
-#endif // !THROW_DECL
-
#ifdef __cplusplus
extern "C" {
#endif
extern errno_t strncpy_s( char* outDest, size_t inDestBufferSize, const char* inSrc, size_t inCount );
extern errno_t wcsncpy_s( WCHAR* outDest, size_t inDestBufferSize, const WCHAR* inSrc, size_t inCount );
+extern errno_t wcsncpy_s( WCHAR* outDest, size_t inDestBufferSize, const WCHAR* inSrc, size_t inCount );
-extern char* strtok_s( char* inString, const char* inControl, char** ioContext );
-extern WCHAR* wcstok_s( WCHAR* inString, const WCHAR* inControl, WCHAR** ioContext );
-
-// strnlen is not required unless the source string is completely untrusted (e.g. anonymous input on a website)
-#ifndef SUPPRESS_STRNLEN
- extern size_t PAL_strnlen( const char* inString, size_t inMaxSize );
- extern size_t PAL_wcsnlen( const WCHAR* inString, size_t inMaxSize );
-#endif
+extern size_t PAL_wcsnlen( const WCHAR* inString, size_t inMaxSize );
extern errno_t _itoa_s( int inValue, char* outBuffer, size_t inDestBufferSize, int inRadix );
extern errno_t _itow_s( int inValue, WCHAR* outBuffer, size_t inDestBufferSize, int inRadix );
extern errno_t _wmakepath_s( WCHAR* outDest, size_t inDestBufferSize, const WCHAR* inDrive, const WCHAR* inDirectory, const WCHAR* inFilename, const WCHAR* inExtension );
extern errno_t _splitpath_s( const char* inPath, char* outDrive, size_t inDriveSize, char* outDirectory, size_t inDirectorySize, char* outFilename, size_t inFilenameSize, char* outExtension, size_t inExtensionSize );
-extern errno_t _wsplitpath_s( const WCHAR* inPath, WCHAR* outDrive, size_t inDriveSize, WCHAR* outDirectory, size_t inDirectorySize, WCHAR* outFilename, size_t inFilenameSize, WCHAR* outExtension, size_t inExtensionSize );
extern int sprintf_s( char *string, size_t sizeInBytes, const char *format, ... );
extern int swprintf_s( WCHAR *string, size_t sizeInWords, const WCHAR *format, ... );
extern int sscanf_s( const char *string, const char *format, ... );
extern int swscanf_s( const WCHAR *string, const WCHAR *format, ... );
-extern errno_t memcpy_s( void * dst, size_t sizeInBytes, const void * src, size_t count ) THROW_DECL;
+extern errno_t memcpy_s( void * dst, size_t sizeInBytes, const void * src, size_t count );
extern errno_t memmove_s( void * dst, size_t sizeInBytes, const void * src, size_t count );
extern errno_t _wcslwr_s(char16_t *string, size_t sz);
If you want to add a PAL_ wrapper function to a native function in
here, you also need to edit palinternal.h and win32pal.h.
-
-
--*/
#ifndef __PAL_H__
#define __PAL_H__
-#ifdef PAL_STDCPP_COMPAT
#include <float.h>
#include <limits.h>
#include <stddef.h>
#include <stdarg.h>
#include <stdint.h>
#include <string.h>
+#include <math.h>
+#include <strings.h>
#include <errno.h>
#include <ctype.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
+#include <wctype.h>
+#if defined(__has_include)
+
+#if __has_include(<alloca.h>)
+#include <alloca.h>
+#endif // __has_include(alloca.h)
+#endif // defined(__has_include)
+
+#ifdef __cplusplus
+extern "C++"
+{
+
+#include <new>
+
+}
#endif
#ifdef __cplusplus
#include <pal_error.h>
#include <pal_mstypes.h>
+#include <minipal/utils.h>
// Native system libray handle.
// On Unix systems, NATIVE_LIBRARY_HANDLE type represents a library handle not registered with the PAL.
typedef PVOID NATIVE_LIBRARY_HANDLE;
-/******************* Processor-specific glue *****************************/
-
-#ifndef _MSC_VER
-
-#if defined(__i686__) && !defined(_M_IX86)
-#define _M_IX86 600
-#elif defined(__i586__) && !defined(_M_IX86)
-#define _M_IX86 500
-#elif defined(__i486__) && !defined(_M_IX86)
-#define _M_IX86 400
-#elif defined(__i386__) && !defined(_M_IX86)
-#define _M_IX86 300
-#elif defined(__x86_64__) && !defined(_M_AMD64)
-#define _M_AMD64 100
-#elif defined(__arm__) && !defined(_M_ARM)
-#define _M_ARM 7
-#elif defined(__aarch64__) && !defined(_M_ARM64)
-#define _M_ARM64 1
-#elif defined(__s390x__) && !defined(_M_S390X)
-#define _M_S390X 1
-#elif defined(__loongarch64) && !defined(_M_LOONGARCH64)
-#define _M_LOONGARCH64 1
-#elif defined(__riscv) && (__riscv_xlen == 64) && !defined(_M_RISCV64)
-#define _M_RISCV64 1
-#endif
-
-#if defined(_M_IX86) && !defined(HOST_X86)
-#define HOST_X86
-#elif defined(_M_AMD64) && !defined(HOST_AMD64)
-#define HOST_AMD64
-#elif defined(_M_ARM) && !defined(HOST_ARM)
-#define HOST_ARM
-#elif defined(_M_ARM64) && !defined(HOST_ARM64)
-#define HOST_ARM64
-#elif defined(_M_S390X) && !defined(HOST_S390X)
-#define HOST_S390X
-#elif defined(_M_LOONGARCH64) && !defined(HOST_LOONGARCH64)
-#define HOST_LOONGARCH64
-#elif defined(_M_RISCV64) && !defined(HOST_RISCV64)
-#define HOST_RISCV64
+#if defined(HOST_ARM64)
+// Flag to check if atomics feature is available on
+// the machine
+extern bool g_arm64_atomics_present;
#endif
-#endif // !_MSC_VER
-
/******************* ABI-specific glue *******************************/
#define MAX_PATH 260
#define LANG_ENGLISH 0x09
/******************* Compiler-specific glue *******************************/
-#ifndef THROW_DECL
-#if defined(_MSC_VER) || !defined(__cplusplus)
-#define THROW_DECL
-#else
-#define THROW_DECL throw()
-#endif // !_MSC_VER
-#endif // !THROW_DECL
-
-#ifdef __sun
-#define MATH_THROW_DECL
-#else
-#define MATH_THROW_DECL THROW_DECL
-#endif
-
#if defined(_MSC_VER)
#define DECLSPEC_ALIGN(x) __declspec(align(x))
#else
#ifndef NOOPT_ATTRIBUTE
#if defined(__llvm__)
#define NOOPT_ATTRIBUTE optnone
-#elif defined(__GNUC__)
+#else
#define NOOPT_ATTRIBUTE optimize("O0")
#endif
#endif
-#ifndef NODEBUG_ATTRIBUTE
-#if defined(__llvm__)
-#define NODEBUG_ATTRIBUTE __nodebug__
-#elif defined(__GNUC__)
-#define NODEBUG_ATTRIBUTE __artificial__
-#endif
-#endif
-
#ifndef __has_cpp_attribute
#define __has_cpp_attribute(x) (0)
#endif
-#ifndef FALLTHROUGH
-#if __has_cpp_attribute(fallthrough)
-#define FALLTHROUGH [[fallthrough]]
-#else // __has_cpp_attribute(fallthrough)
-#define FALLTHROUGH
-#endif // __has_cpp_attribute(fallthrough)
-#endif // FALLTHROUGH
-
-#ifndef PAL_STDCPP_COMPAT
-
-#if __GNUC__
-
-typedef __builtin_va_list va_list;
-
-/* We should consider if the va_arg definition here is actually necessary.
- Could we use the standard va_arg definition? */
-
-#define va_start __builtin_va_start
-#define va_arg __builtin_va_arg
-
-#define va_copy __builtin_va_copy
-#define va_end __builtin_va_end
-
-#define VOID void
-
-#else // __GNUC__
-
-typedef char * va_list;
-
-#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) )
-
-#if _MSC_VER >= 1400
-
-#ifdef __cplusplus
-#define _ADDRESSOF(v) ( &reinterpret_cast<const char &>(v) )
-#else
-#define _ADDRESSOF(v) ( &(v) )
-#endif
-
-#define _crt_va_start(ap,v) ( ap = (va_list)_ADDRESSOF(v) + _INTSIZEOF(v) )
-#define _crt_va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) )
-#define _crt_va_end(ap) ( ap = (va_list)0 )
-
-#define va_start _crt_va_start
-#define va_arg _crt_va_arg
-#define va_end _crt_va_end
-
-#else // _MSC_VER
-
-#define va_start(ap,v) (ap = (va_list) (&(v)) + _INTSIZEOF(v))
-#define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) )
-#define va_end(ap)
-
-#endif // _MSC_VER
-
-#define va_copy(dest,src) (dest = src)
-
-#endif // __GNUC__
-
-#define CHAR_BIT 8
-
-#define SCHAR_MIN (-128)
-#define SCHAR_MAX 127
-#define UCHAR_MAX 0xff
-
-#define SHRT_MIN (-32768)
-#define SHRT_MAX 32767
-#define USHRT_MAX 0xffff
-
-#define INT_MIN (-2147483647 - 1)
-#define INT_MAX 2147483647
-#define UINT_MAX 0xffffffff
-
-#define LONG_MIN (-2147483647L - 1)
-#define LONG_MAX 2147483647L
-#define ULONG_MAX 0xffffffffUL
-
-#define FLT_MAX 3.402823466e+38F
-#define DBL_MAX 1.7976931348623157e+308
-
-#endif // !PAL_STDCPP_COMPAT
-
/******************* PAL-Specific Entrypoints *****************************/
#define IsDebuggerPresent PAL_IsDebuggerPresent
PALAPI
PAL_IsDebuggerPresent();
-/* minimum signed 64 bit value */
-#define _I64_MIN (I64(-9223372036854775807) - 1)
-/* maximum signed 64 bit value */
-#define _I64_MAX I64(9223372036854775807)
-/* maximum unsigned 64 bit value */
-#define _UI64_MAX UI64(0xffffffffffffffff)
-
-#define _I8_MAX SCHAR_MAX
-#define _I8_MIN SCHAR_MIN
-#define _I16_MAX SHRT_MAX
-#define _I16_MIN SHRT_MIN
-#define _I32_MAX INT_MAX
-#define _I32_MIN INT_MIN
-#define _UI8_MAX UCHAR_MAX
-#define _UI8_MIN UCHAR_MIN
-#define _UI16_MAX USHRT_MAX
-#define _UI16_MIN USHRT_MIN
-#define _UI32_MAX UINT_MAX
-#define _UI32_MIN UINT_MIN
-
-#undef NULL
-
-#if defined(__cplusplus)
-#define NULL 0
-#else
-#define NULL ((PVOID)0)
-#endif
-
-#if defined(PAL_STDCPP_COMPAT) && !defined(__cplusplus)
-#define nullptr NULL
-#endif // defined(PAL_STDCPP_COMPAT) && !defined(__cplusplus)
-
-#ifndef PAL_STDCPP_COMPAT
-
-typedef __int64 time_t;
-#define _TIME_T_DEFINED
-#endif // !PAL_STDCPP_COMPAT
-
#define DLL_PROCESS_ATTACH 1
#define DLL_THREAD_ATTACH 2
#define DLL_THREAD_DETACH 3
IN PVOID pUnregisterToken);
static const unsigned int MAX_DEBUGGER_TRANSPORT_PIPE_NAME_LENGTH = MAX_PATH;
+
PALIMPORT
VOID
PALAPI
IN DWORD id,
IN const char *applicationGroupId,
IN const char *suffix);
+
PALIMPORT
VOID
PALAPI
PAL_UnregisterModule(
IN HINSTANCE hInstance);
-PALIMPORT
-BOOL
-PALAPI
-PAL_GetPALDirectoryW(
- OUT LPWSTR lpDirectoryName,
- IN OUT UINT* cchDirectoryName);
-
-PALIMPORT
-BOOL
-PALAPI
-PAL_GetPALDirectoryA(
- OUT LPSTR lpDirectoryName,
- IN OUT UINT* cchDirectoryName);
-
-#ifdef UNICODE
-#define PAL_GetPALDirectory PAL_GetPALDirectoryW
-#else
-#define PAL_GetPALDirectory PAL_GetPALDirectoryA
-#endif
-
PALIMPORT
VOID
PALAPI
#define CopyFile CopyFileA
#endif
-PALIMPORT
-BOOL
-PALAPI
-DeleteFileW(
- IN LPCWSTR lpFileName);
-
-#ifdef UNICODE
-#define DeleteFile DeleteFileW
-#else
-#define DeleteFile DeleteFileA
-#endif
-
-#define MOVEFILE_REPLACE_EXISTING 0x00000001
-#define MOVEFILE_COPY_ALLOWED 0x00000002
-
-PALIMPORT
-BOOL
-PALAPI
-MoveFileExW(
- IN LPCWSTR lpExistingFileName,
- IN LPCWSTR lpNewFileName,
- IN DWORD dwFlags);
-
-#ifdef UNICODE
-#define MoveFileEx MoveFileExW
-#else
-#define MoveFileEx MoveFileExA
-#endif
PALIMPORT
BOOL
PALAPI
#define RemoveDirectory RemoveDirectoryA
#endif
-typedef struct _BY_HANDLE_FILE_INFORMATION {
- DWORD dwFileAttributes;
- FILETIME ftCreationTime;
- FILETIME ftLastAccessTime;
- FILETIME ftLastWriteTime;
- DWORD dwVolumeSerialNumber;
- DWORD nFileSizeHigh;
- DWORD nFileSizeLow;
- DWORD nNumberOfLinks;
- DWORD nFileIndexHigh;
- DWORD nFileIndexLow;
-} BY_HANDLE_FILE_INFORMATION, *PBY_HANDLE_FILE_INFORMATION, *LPBY_HANDLE_FILE_INFORMATION;
-
typedef struct _WIN32_FIND_DATAA {
DWORD dwFileAttributes;
FILETIME ftCreationTime;
GetStdHandle(
IN DWORD nStdHandle);
-PALIMPORT
-BOOL
-PALAPI
-SetEndOfFile(
- IN HANDLE hFile);
-
PALIMPORT
DWORD
PALAPI
DWORD dwProcessId;
DWORD dwThreadId_PAL_Undefined;
} PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
+
PALIMPORT
BOOL
PALAPI
} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
+
+//
+// Context Frame
+//
+//
+// The flags field within this record controls the contents of a CONTEXT
+// record.
+//
+// If the context record is used as an input parameter, then for each
+// portion of the context record controlled by a flag whose value is
+// set, it is assumed that such portion of the context record contains
+// valid context. If the context record is being used to modify a threads
+// context, then only that portion of the threads context is modified.
+//
+// If the context record is used as an output parameter to capture the
+// context of a thread, then only those portions of the thread's context
+// corresponding to set flags will be returned.
+//
+
#elif defined(HOST_AMD64)
+
// copied from winnt.h
#define CONTEXT_AMD64 0x100000
#define CONTEXT_EXCEPTION_REQUEST 0x40000000
#define CONTEXT_EXCEPTION_REPORTING 0x80000000
+#define XSTATE_GSSE (2)
+#define XSTATE_AVX (XSTATE_GSSE)
+#define XSTATE_AVX512_KMASK (5)
+#define XSTATE_AVX512_ZMM_H (6)
+#define XSTATE_AVX512_ZMM (7)
+
+#define XSTATE_MASK_GSSE (UI64(1) << (XSTATE_GSSE))
+#define XSTATE_MASK_AVX (XSTATE_MASK_GSSE)
+#define XSTATE_MASK_AVX512 ((UI64(1) << (XSTATE_AVX512_KMASK)) | \
+ (UI64(1) << (XSTATE_AVX512_ZMM_H)) | \
+ (UI64(1) << (XSTATE_AVX512_ZMM)))
+
typedef struct DECLSPEC_ALIGN(16) _M128A {
ULONGLONG Low;
LONGLONG High;
} M128A, *PM128A;
+typedef struct DECLSPEC_ALIGN(16) _M256 {
+ M128A Low;
+ M128A High;
+} M256, *PM256;
+
+typedef struct DECLSPEC_ALIGN(16) _M512 {
+ M256 Low;
+ M256 High;
+} M512, *PM512;
+
typedef struct _XMM_SAVE_AREA32 {
WORD ControlWord;
WORD StatusWord;
BYTE Reserved4[96];
} XMM_SAVE_AREA32, *PXMM_SAVE_AREA32;
-#define LEGACY_SAVE_AREA_LENGTH sizeof(XMM_SAVE_AREA32)
+typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
-//
-// Context Frame
-//
-// This frame has a several purposes: 1) it is used as an argument to
-// NtContinue, 2) is is used to constuct a call frame for APC delivery,
-// and 3) it is used in the user level thread creation routines.
-//
-//
-// The flags field within this record controls the contents of a CONTEXT
-// record.
-//
-// If the context record is used as an input parameter, then for each
-// portion of the context record controlled by a flag whose value is
-// set, it is assumed that that portion of the context record contains
-// valid context. If the context record is being used to modify a threads
-// context, then only that portion of the threads context is modified.
-//
-// If the context record is used as an output parameter to capture the
-// context of a thread, then only those portions of the thread's context
-// corresponding to set flags will be returned.
-//
-// CONTEXT_CONTROL specifies SegSs, Rsp, SegCs, Rip, and EFlags.
-//
-// CONTEXT_INTEGER specifies Rax, Rcx, Rdx, Rbx, Rbp, Rsi, Rdi, and R8-R15.
-//
-// CONTEXT_SEGMENTS specifies SegDs, SegEs, SegFs, and SegGs.
-//
-// CONTEXT_DEBUG_REGISTERS specifies Dr0-Dr3 and Dr6-Dr7.
-//
-// CONTEXT_MMX_REGISTERS specifies the floating point and extended registers
-// Mm0/St0-Mm7/St7 and Xmm0-Xmm15).
-//
+ _CONTEXT() = default;
+ _CONTEXT(const _CONTEXT& ctx)
+ {
+ *this = ctx;
+ }
-typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
+ _CONTEXT& operator=(const _CONTEXT& ctx);
//
// Register parameter home addresses.
DWORD64 LastBranchFromRip;
DWORD64 LastExceptionToRip;
DWORD64 LastExceptionFromRip;
+
+ // XSTATE
+ DWORD64 XStateFeaturesMask;
+ DWORD64 XStateReserved0;
+
+ // XSTATE_AVX
+ struct {
+ M128A Ymm0H;
+ M128A Ymm1H;
+ M128A Ymm2H;
+ M128A Ymm3H;
+ M128A Ymm4H;
+ M128A Ymm5H;
+ M128A Ymm6H;
+ M128A Ymm7H;
+ M128A Ymm8H;
+ M128A Ymm9H;
+ M128A Ymm10H;
+ M128A Ymm11H;
+ M128A Ymm12H;
+ M128A Ymm13H;
+ M128A Ymm14H;
+ M128A Ymm15H;
+ };
+
+ // XSTATE_AVX512_KMASK
+ struct {
+ DWORD64 KMask0;
+ DWORD64 KMask1;
+ DWORD64 KMask2;
+ DWORD64 KMask3;
+ DWORD64 KMask4;
+ DWORD64 KMask5;
+ DWORD64 KMask6;
+ DWORD64 KMask7;
+ };
+
+ // XSTATE_AVX512_ZMM_H
+ struct {
+ M256 Zmm0H;
+ M256 Zmm1H;
+ M256 Zmm2H;
+ M256 Zmm3H;
+ M256 Zmm4H;
+ M256 Zmm5H;
+ M256 Zmm6H;
+ M256 Zmm7H;
+ M256 Zmm8H;
+ M256 Zmm9H;
+ M256 Zmm10H;
+ M256 Zmm11H;
+ M256 Zmm12H;
+ M256 Zmm13H;
+ M256 Zmm14H;
+ M256 Zmm15H;
+ };
+
+ // XSTATE_AVX512_ZMM
+ struct {
+ M512 Zmm16;
+ M512 Zmm17;
+ M512 Zmm18;
+ M512 Zmm19;
+ M512 Zmm20;
+ M512 Zmm21;
+ M512 Zmm22;
+ M512 Zmm23;
+ M512 Zmm24;
+ M512 Zmm25;
+ M512 Zmm26;
+ M512 Zmm27;
+ M512 Zmm28;
+ M512 Zmm29;
+ M512 Zmm30;
+ M512 Zmm31;
+ };
} CONTEXT, *PCONTEXT, *LPCONTEXT;
//
LONGLONG High;
} NEON128, *PNEON128;
-//
-// Context Frame
-//
-// This frame has a several purposes: 1) it is used as an argument to
-// NtContinue, 2) it is used to constuct a call frame for APC delivery,
-// and 3) it is used in the user level thread creation routines.
-//
-//
-// The flags field within this record controls the contents of a CONTEXT
-// record.
-//
-// If the context record is used as an input parameter, then for each
-// portion of the context record controlled by a flag whose value is
-// set, it is assumed that that portion of the context record contains
-// valid context. If the context record is being used to modify a threads
-// context, then only that portion of the threads context is modified.
-//
-// If the context record is used as an output parameter to capture the
-// context of a thread, then only those portions of the thread's context
-// corresponding to set flags will be returned.
-//
-// CONTEXT_CONTROL specifies Sp, Lr, Pc, and Cpsr
-//
-// CONTEXT_INTEGER specifies R0-R12
-//
-// CONTEXT_FLOATING_POINT specifies Q0-Q15 / D0-D31 / S0-S31
-//
-// CONTEXT_DEBUG_REGISTERS specifies up to 16 of DBGBVR, DBGBCR, DBGWVR,
-// DBGWCR.
-//
-
typedef struct DECLSPEC_ALIGN(8) _CONTEXT {
//
#define CONTEXT_EXCEPTION_REQUEST 0x40000000L
#define CONTEXT_EXCEPTION_REPORTING 0x80000000L
+#define CONTEXT_ARM64_XSTATE (CONTEXT_ARM64 | 0x20L)
+#define CONTEXT_XSTATE CONTEXT_ARM64_XSTATE
+
+#define XSTATE_ARM64_SVE (2)
+#define XSTATE_MASK_ARM64_SVE (UI64(1) << (XSTATE_ARM64_SVE))
+
//
// This flag is set by the unwinder if it has unwound to a call
// site, and cleared whenever it unwinds through a trap frame.
#define ARM64_MAX_BREAKPOINTS 8
#define ARM64_MAX_WATCHPOINTS 2
-//
-// Context Frame
-//
-// This frame has a several purposes: 1) it is used as an argument to
-// NtContinue, 2) it is used to constuct a call frame for APC delivery,
-// and 3) it is used in the user level thread creation routines.
-//
-//
-// The flags field within this record controls the contents of a CONTEXT
-// record.
-//
-// If the context record is used as an input parameter, then for each
-// portion of the context record controlled by a flag whose value is
-// set, it is assumed that that portion of the context record contains
-// valid context. If the context record is being used to modify a threads
-// context, then only that portion of the threads context is modified.
-//
-// If the context record is used as an output parameter to capture the
-// context of a thread, then only those portions of the thread's context
-// corresponding to set flags will be returned.
-//
-// CONTEXT_CONTROL specifies Sp, Lr, Pc, and Cpsr
-//
-// CONTEXT_INTEGER specifies R0-R12
-//
-// CONTEXT_FLOATING_POINT specifies Q0-Q15 / D0-D31 / S0-S31
-//
-// CONTEXT_DEBUG_REGISTERS specifies up to 16 of DBGBVR, DBGBCR, DBGWVR,
-// DBGWCR.
-//
-
typedef struct _NEON128 {
ULONGLONG Low;
LONGLONG High;
/* +0x338 */ DWORD64 Bvr[ARM64_MAX_BREAKPOINTS];
/* +0x378 */ DWORD Wcr[ARM64_MAX_WATCHPOINTS];
/* +0x380 */ DWORD64 Wvr[ARM64_MAX_WATCHPOINTS];
- /* +0x390 */
+
+ /* +0x390 */ DWORD64 XStateFeaturesMask;
+
+ //
+ // Sve Registers
+ //
+ // TODO-SVE: Support Vector register sizes >128bit
+ // For 128bit, Z and V registers fully overlap, so there is no need to load/store both.
+ /* +0x398 */ DWORD Vl;
+ /* +0x39c */ DWORD Ffr;
+ /* +0x3a0 */ DWORD P[16];
+ /* +0x3e0 */
} CONTEXT, *PCONTEXT, *LPCONTEXT;
} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
+typedef struct _IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY {
+ DWORD BeginAddress;
+ union {
+ DWORD UnwindData;
+ struct {
+ DWORD Flag : 2;
+ DWORD FunctionLength : 11;
+ DWORD RegF : 3;
+ DWORD RegI : 4;
+ DWORD H : 1;
+ DWORD CR : 2;
+ DWORD FrameSize : 9;
+ };
+ };
+} IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY, * PIMAGE_ARM64_RUNTIME_FUNCTION_ENTRY;
+
+typedef union IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY_XDATA {
+ ULONG HeaderData;
+ struct {
+ ULONG FunctionLength : 18; // in words (2 bytes)
+ ULONG Version : 2;
+ ULONG ExceptionDataPresent : 1;
+ ULONG EpilogInHeader : 1;
+ ULONG EpilogCount : 5; // number of epilogs or byte index of the first unwind code for the one only epilog
+ ULONG CodeWords : 5; // number of dwords with unwind codes
+ };
+} IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY_XDATA;
+
#elif defined(HOST_LOONGARCH64)
// Please refer to src/coreclr/pal/src/arch/loongarch64/asmconstants.h
} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
+#elif defined(HOST_POWERPC64)
+
+// There is no context for ppc64le defined in winnt.h,
+// so we re-use the amd64 values.
+#define CONTEXT_PPC64 0x100000
+
+#define CONTEXT_CONTROL (CONTEXT_PPC64 | 0x1L)
+#define CONTEXT_INTEGER (CONTEXT_PPC64 | 0x2L)
+#define CONTEXT_FLOATING_POINT (CONTEXT_PPC64 | 0x4L)
+
+#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT)
+
+#define CONTEXT_ALL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT)
+
+#define CONTEXT_EXCEPTION_ACTIVE 0x8000000
+#define CONTEXT_SERVICE_ACTIVE 0x10000000
+#define CONTEXT_EXCEPTION_REQUEST 0x40000000
+#define CONTEXT_EXCEPTION_REPORTING 0x80000000
+
+typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
+
+ //
+ // Control flags.
+ //
+
+ DWORD ContextFlags;
+
+ //
+ // Integer Registers
+ //
+
+ DWORD64 R0;
+ DWORD64 R1;
+ DWORD64 R2;
+ DWORD64 R3;
+ DWORD64 R4;
+ DWORD64 R5;
+ DWORD64 R6;
+ DWORD64 R7;
+ DWORD64 R8;
+ DWORD64 R9;
+ DWORD64 R10;
+ DWORD64 R11;
+ DWORD64 R12;
+ DWORD64 R13;
+ DWORD64 R14;
+ DWORD64 R15;
+ DWORD64 R16;
+ DWORD64 R17;
+ DWORD64 R18;
+ DWORD64 R19;
+ DWORD64 R20;
+ DWORD64 R21;
+ DWORD64 R22;
+ DWORD64 R23;
+ DWORD64 R24;
+ DWORD64 R25;
+ DWORD64 R26;
+ DWORD64 R27;
+ DWORD64 R28;
+ DWORD64 R29;
+ DWORD64 R30;
+ DWORD64 R31;
+
+ //
+ // Floaring Point Registers
+ //
+
+ DWORD64 F0;
+ DWORD64 F1;
+ DWORD64 F2;
+ DWORD64 F3;
+ DWORD64 F4;
+ DWORD64 F5;
+ DWORD64 F6;
+ DWORD64 F7;
+ DWORD64 F8;
+ DWORD64 F9;
+ DWORD64 F10;
+ DWORD64 F11;
+ DWORD64 F12;
+ DWORD64 F13;
+ DWORD64 F14;
+ DWORD64 F15;
+ DWORD64 F16;
+ DWORD64 F17;
+ DWORD64 F18;
+ DWORD64 F19;
+ DWORD64 F20;
+ DWORD64 F21;
+ DWORD64 F22;
+ DWORD64 F23;
+ DWORD64 F24;
+ DWORD64 F25;
+ DWORD64 F26;
+ DWORD64 F27;
+ DWORD64 F28;
+ DWORD64 F29;
+ DWORD64 F30;
+ DWORD64 F31;
+ DWORD64 Fpscr;
+
+ //
+ // Control Registers
+ //
+
+ DWORD64 Nip;
+ DWORD64 Msr;
+ DWORD64 Ctr;
+ DWORD64 Link;
+
+ DWORD Xer;
+ DWORD Ccr;
+
+
+} CONTEXT, *PCONTEXT, *LPCONTEXT;
+
+//
+// Nonvolatile context pointer record.
+//
+
+typedef struct _KNONVOLATILE_CONTEXT_POINTERS {
+ PDWORD64 R14;
+ PDWORD64 R15;
+ PDWORD64 R16;
+ PDWORD64 R17;
+ PDWORD64 R18;
+ PDWORD64 R19;
+ PDWORD64 R20;
+ PDWORD64 R21;
+ PDWORD64 R22;
+ PDWORD64 R23;
+ PDWORD64 R24;
+ PDWORD64 R25;
+ PDWORD64 R26;
+ PDWORD64 R27;
+ PDWORD64 R28;
+ PDWORD64 R29;
+ PDWORD64 R30;
+ PDWORD64 R31;
+
+ //
+ // Need to add Floating point non-volatile registers.
+ //
+
+} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
+
#else
#error Unknown architecture for defining CONTEXT.
#endif
#if defined(__APPLE__) && defined(__i386__)
#define PAL_CS_NATIVE_DATA_SIZE 76
-#elif defined(__APPLE__) && defined(__x86_64__)
+#elif defined(__APPLE__) && defined(HOST_AMD64)
#define PAL_CS_NATIVE_DATA_SIZE 120
#elif defined(__APPLE__) && defined(HOST_ARM64)
#define PAL_CS_NATIVE_DATA_SIZE 120
#define PAL_CS_NATIVE_DATA_SIZE 12
#elif defined(__FreeBSD__) && defined(__x86_64__)
#define PAL_CS_NATIVE_DATA_SIZE 24
+#elif defined(__FreeBSD__) && defined(HOST_ARM64)
+#define PAL_CS_NATIVE_DATA_SIZE 24
#elif defined(__linux__) && defined(HOST_ARM)
#define PAL_CS_NATIVE_DATA_SIZE 80
#elif defined(__linux__) && defined(HOST_ARM64)
-#define PAL_CS_NATIVE_DATA_SIZE 116
+#define PAL_CS_NATIVE_DATA_SIZE 104
#elif defined(__linux__) && defined(__i386__)
#define PAL_CS_NATIVE_DATA_SIZE 76
#elif defined(__linux__) && defined(__x86_64__)
#define PAL_CS_NATIVE_DATA_SIZE 96
#elif defined(__linux__) && defined(HOST_S390X)
#define PAL_CS_NATIVE_DATA_SIZE 96
+#elif defined(__linux__) && defined(HOST_POWERPC64)
+#define PAL_CS_NATIVE_DATA_SIZE 96
#elif defined(__NetBSD__) && defined(__amd64__)
#define PAL_CS_NATIVE_DATA_SIZE 96
#elif defined(__NetBSD__) && defined(__earm__)
#elif defined(__linux__) && defined(__riscv) && __riscv_xlen == 64
#define PAL_CS_NATIVE_DATA_SIZE 96
#else
-#warning
#error PAL_CS_NATIVE_DATA_SIZE is not defined for this architecture
#endif
PALIMPORT VOID PALAPI EnterCriticalSection(IN OUT LPCRITICAL_SECTION lpCriticalSection);
PALIMPORT VOID PALAPI LeaveCriticalSection(IN OUT LPCRITICAL_SECTION lpCriticalSection);
PALIMPORT VOID PALAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection);
-PALIMPORT BOOL PALAPI InitializeCriticalSectionEx(LPCRITICAL_SECTION lpCriticalSection, DWORD dwSpinCount, DWORD Flags);
PALIMPORT VOID PALAPI DeleteCriticalSection(IN OUT LPCRITICAL_SECTION lpCriticalSection);
-PALIMPORT BOOL PALAPI TryEnterCriticalSection(IN OUT LPCRITICAL_SECTION lpCriticalSection);
-
-#define SEM_FAILCRITICALERRORS 0x0001
-#define SEM_NOOPENFILEERRORBOX 0x8000
-
-PALIMPORT
-UINT
-PALAPI
-SetErrorMode(
- IN UINT uMode);
#define PAGE_NOACCESS 0x01
#define PAGE_READONLY 0x02
#define MEM_RESERVE 0x2000
#define MEM_DECOMMIT 0x4000
#define MEM_RELEASE 0x8000
-#define MEM_RESET 0x80000
#define MEM_FREE 0x10000
#define MEM_PRIVATE 0x20000
#define MEM_MAPPED 0x40000
#define FILE_MAP_ALL_ACCESS SECTION_ALL_ACCESS
#define FILE_MAP_COPY SECTION_QUERY
-PALIMPORT
-HANDLE
-PALAPI
-OpenFileMappingW(
- IN DWORD dwDesiredAccess,
- IN BOOL bInheritHandle,
- IN LPCWSTR lpName);
-
-#define OpenFileMapping OpenFileMappingW
-
typedef INT_PTR (PALAPI_NOEXPORT *FARPROC)();
PALIMPORT
IN DWORD flNewProtect,
OUT PDWORD lpflOldProtect);
-typedef struct _MEMORYSTATUSEX {
- DWORD dwLength;
- DWORD dwMemoryLoad;
- DWORDLONG ullTotalPhys;
- DWORDLONG ullAvailPhys;
- DWORDLONG ullTotalPageFile;
- DWORDLONG ullAvailPageFile;
- DWORDLONG ullTotalVirtual;
- DWORDLONG ullAvailVirtual;
- DWORDLONG ullAvailExtendedVirtual;
-} MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
-
-PALIMPORT
-BOOL
-PALAPI
-GlobalMemoryStatusEx(
- IN OUT LPMEMORYSTATUSEX lpBuffer);
-
typedef struct _MEMORY_BASIC_INFORMATION {
PVOID BaseAddress;
PVOID AllocationBase_PAL_Undefined;
//
// A function table entry is generated for each frame function.
//
+#if defined(HOST_ARM64)
+typedef IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
+#else // HOST_ARM64
typedef struct _RUNTIME_FUNCTION {
DWORD BeginAddress;
-#ifdef TARGET_AMD64
+#ifdef HOST_AMD64
DWORD EndAddress;
#endif
DWORD UnwindData;
} RUNTIME_FUNCTION, *PRUNTIME_FUNCTION;
+#endif // HOST_ARM64
#define STANDARD_RIGHTS_REQUIRED (0x000F0000L)
#define SYNCHRONIZE (0x00100000L)
CloseHandle(
IN OUT HANDLE hObject);
+
+
+PALIMPORT
+VOID
+PALAPI
+DECLSPEC_NORETURN
+RaiseFailFastException(
+ IN PEXCEPTION_RECORD pExceptionRecord,
+ IN PCONTEXT pContextRecord,
+ IN DWORD dwFlags);
+
PALIMPORT
DWORD
PALAPI
// intrinsic, which returns the number of leading 0-bits in x starting at the most significant
// bit position (the result is undefined when x = 0).
//
-// The same is true for BitScanReverse, except that the GCC function is __builtin_clzl.
+// The same is true for BitScanReverse, except that the GCC function is __builtin_clz.
EXTERN_C
PALIMPORT
IN OUT PDWORD Index,
IN UINT qwMask)
{
- // The result of __builtin_clzl is undefined when qwMask is zero,
+ // The result of __builtin_clz is undefined when qwMask is zero,
// but it's still OK to call the intrinsic in that case (just don't use the output).
// Unconditionally calling the intrinsic in this way allows the compiler to
// emit branchless code for this function when possible (depending on how the
// intrinsic is implemented for the target platform).
- int lzcount = __builtin_clzl(qwMask);
+ int lzcount = __builtin_clz(qwMask);
*Index = (DWORD)(31 - lzcount);
return qwMask != 0;
}
FORCEINLINE void PAL_InterlockedOperationBarrier()
{
-#if defined(HOST_ARM64) || defined(HOST_LOONGARCH64) || defined(HOST_RISCV64)
+#if (defined(HOST_ARM64) && !defined(LSE_INSTRUCTIONS_ENABLED_BY_DEFAULT) && !defined(__clang__)) || defined(HOST_LOONGARCH64) || defined(HOST_RISCV64)
// On arm64, most of the __sync* functions generate a code sequence like:
// loop:
// ldaxr (load acquire exclusive)
#endif
}
+#if defined(HOST_ARM64)
+
+#if defined(LSE_INSTRUCTIONS_ENABLED_BY_DEFAULT)
+
+#define Define_InterlockMethod(RETURN_TYPE, METHOD_DECL, METHOD_INVOC, INTRINSIC_NAME) \
+EXTERN_C PALIMPORT inline RETURN_TYPE PALAPI METHOD_DECL \
+{ \
+ return INTRINSIC_NAME; \
+} \
+
+#else // !LSE_INSTRUCTIONS_ENABLED_BY_DEFAULT
+
+#define Define_InterlockMethod(RETURN_TYPE, METHOD_DECL, METHOD_INVOC, INTRINSIC_NAME) \
+/* Function multiversioning will never inline a method that is \
+ marked such. However, just to make sure that we don't see \
+ surprises, explicitely mark them as noinline. */ \
+EXTERN_C PALIMPORT inline RETURN_TYPE PALAPI \
+__attribute__((target("+lse"))) __attribute__((noinline)) \
+Lse_##METHOD_DECL \
+{ \
+ return INTRINSIC_NAME; \
+} \
+ \
+EXTERN_C PALIMPORT inline RETURN_TYPE PALAPI METHOD_DECL \
+{ \
+ if (g_arm64_atomics_present) \
+ { \
+ return Lse_##METHOD_INVOC; \
+ } \
+ else \
+ { \
+ RETURN_TYPE result = INTRINSIC_NAME; \
+ PAL_InterlockedOperationBarrier(); \
+ return result; \
+ } \
+} \
+
+#endif // LSE_INSTRUCTIONS_ENABLED_BY_DEFAULT
+#else // !HOST_ARM64
+
+#define Define_InterlockMethod(RETURN_TYPE, METHOD_DECL, METHOD_INVOC, INTRINSIC_NAME) \
+EXTERN_C PALIMPORT inline RETURN_TYPE PALAPI METHOD_DECL \
+{ \
+ RETURN_TYPE result = INTRINSIC_NAME; \
+ PAL_InterlockedOperationBarrier(); \
+ return result; \
+} \
+
+#endif // HOST_ARM64
+
+/*++
+Function:
+InterlockedAdd
+
+The InterlockedAdd function adds the value of the specified variable
+with another specified value. The function prevents more than one thread
+from using the same variable simultaneously.
+
+Parameters
+
+lpAddend
+[in/out] Pointer to the variable to add.
+
+lpAddend
+[in] The value to add.
+
+Return Values
+
+The return value is the resulting added value.
+--*/
+Define_InterlockMethod(
+ LONG,
+ InterlockedAdd( IN OUT LONG volatile *lpAddend, IN LONG value),
+ InterlockedAdd(lpAddend, value),
+ __sync_add_and_fetch(lpAddend, value)
+)
+
+Define_InterlockMethod(
+ LONGLONG,
+ InterlockedAdd64(IN OUT LONGLONG volatile *lpAddend, IN LONGLONG value),
+ InterlockedAdd64(lpAddend, value),
+ __sync_add_and_fetch(lpAddend, value)
+)
+
/*++
Function:
InterlockedIncrement
The return value is the resulting incremented value.
--*/
-EXTERN_C
-PALIMPORT
-inline
-LONG
-PALAPI
-InterlockedIncrement(
- IN OUT LONG volatile *lpAddend)
-{
- LONG result = __sync_add_and_fetch(lpAddend, (LONG)1);
- PAL_InterlockedOperationBarrier();
- return result;
-}
-
-EXTERN_C
-PALIMPORT
-inline
-LONGLONG
-PALAPI
-InterlockedIncrement64(
- IN OUT LONGLONG volatile *lpAddend)
-{
- LONGLONG result = __sync_add_and_fetch(lpAddend, (LONGLONG)1);
- PAL_InterlockedOperationBarrier();
- return result;
-}
+Define_InterlockMethod(
+ LONG,
+ InterlockedIncrement(IN OUT LONG volatile *lpAddend),
+ InterlockedIncrement(lpAddend),
+ __sync_add_and_fetch(lpAddend, (LONG)1)
+)
+
+Define_InterlockMethod(
+ LONGLONG,
+ InterlockedIncrement64(IN OUT LONGLONG volatile *lpAddend),
+ InterlockedIncrement64(lpAddend),
+ __sync_add_and_fetch(lpAddend, (LONGLONG)1)
+)
/*++
Function:
The return value is the resulting decremented value.
--*/
-EXTERN_C
-PALIMPORT
-inline
-LONG
-PALAPI
-InterlockedDecrement(
- IN OUT LONG volatile *lpAddend)
-{
- LONG result = __sync_sub_and_fetch(lpAddend, (LONG)1);
- PAL_InterlockedOperationBarrier();
- return result;
-}
+Define_InterlockMethod(
+ LONG,
+ InterlockedDecrement(IN OUT LONG volatile *lpAddend),
+ InterlockedDecrement(lpAddend),
+ __sync_sub_and_fetch(lpAddend, (LONG)1)
+)
-#define InterlockedDecrementAcquire InterlockedDecrement
#define InterlockedDecrementRelease InterlockedDecrement
-EXTERN_C
-PALIMPORT
-inline
-LONGLONG
-PALAPI
-InterlockedDecrement64(
- IN OUT LONGLONG volatile *lpAddend)
-{
- LONGLONG result = __sync_sub_and_fetch(lpAddend, (LONGLONG)1);
- PAL_InterlockedOperationBarrier();
- return result;
-}
+Define_InterlockMethod(
+ LONGLONG,
+ InterlockedDecrement64(IN OUT LONGLONG volatile *lpAddend),
+ InterlockedDecrement64(lpAddend),
+ __sync_sub_and_fetch(lpAddend, (LONGLONG)1)
+)
/*++
Function:
The function returns the initial value pointed to by Target.
--*/
-EXTERN_C
-PALIMPORT
-inline
-LONG
-PALAPI
-InterlockedExchange(
- IN OUT LONG volatile *Target,
- IN LONG Value)
-{
- LONG result = __atomic_exchange_n(Target, Value, __ATOMIC_ACQ_REL);
- PAL_InterlockedOperationBarrier();
- return result;
-}
+Define_InterlockMethod(
+ LONG,
+ InterlockedExchange(IN OUT LONG volatile *Target, LONG Value),
+ InterlockedExchange(Target, Value),
+ __atomic_exchange_n(Target, Value, __ATOMIC_ACQ_REL)
+)
-EXTERN_C
-PALIMPORT
-inline
-LONGLONG
-PALAPI
-InterlockedExchange64(
- IN OUT LONGLONG volatile *Target,
- IN LONGLONG Value)
+#if defined(HOST_X86)
+
+// 64-bit __atomic_exchange_n is not expanded as a compiler intrinsic on Linux x86.
+// Use inline implementation instead.
+
+inline LONGLONG InterlockedExchange64(LONGLONG volatile * Target, LONGLONG Value)
{
- LONGLONG result = __atomic_exchange_n(Target, Value, __ATOMIC_ACQ_REL);
- PAL_InterlockedOperationBarrier();
- return result;
+ LONGLONG Old;
+
+ do {
+ Old = *Target;
+ } while (__sync_val_compare_and_swap(Target, Old, Value) != Old);
+
+ return Old;
}
+#else
+
+Define_InterlockMethod(
+ LONGLONG,
+ InterlockedExchange64(IN OUT LONGLONG volatile *Target, IN LONGLONG Value),
+ InterlockedExchange64(Target, Value),
+ __atomic_exchange_n(Target, Value, __ATOMIC_ACQ_REL)
+)
+
+#endif
+
+
/*++
Function:
InterlockedCompareExchange
The return value is the initial value of the destination.
--*/
-EXTERN_C
-PALIMPORT
-inline
-LONG
-PALAPI
-InterlockedCompareExchange(
- IN OUT LONG volatile *Destination,
- IN LONG Exchange,
- IN LONG Comperand)
-{
- LONG result =
- __sync_val_compare_and_swap(
- Destination, /* The pointer to a variable whose value is to be compared with. */
- Comperand, /* The value to be compared */
- Exchange /* The value to be stored */);
- PAL_InterlockedOperationBarrier();
- return result;
-}
+Define_InterlockMethod(
+ LONG,
+ InterlockedCompareExchange(IN OUT LONG volatile *Destination, IN LONG Exchange, IN LONG Comperand),
+ InterlockedCompareExchange(Destination, Exchange, Comperand),
+ __sync_val_compare_and_swap(
+ Destination, /* The pointer to a variable whose value is to be compared with. */
+ Comperand, /* The value to be compared */
+ Exchange /* The value to be stored */)
+)
#define InterlockedCompareExchangeAcquire InterlockedCompareExchange
#define InterlockedCompareExchangeRelease InterlockedCompareExchange
-// See the 32-bit variant in interlock2.s
-EXTERN_C
-PALIMPORT
-inline
-LONGLONG
-PALAPI
-InterlockedCompareExchange64(
- IN OUT LONGLONG volatile *Destination,
- IN LONGLONG Exchange,
- IN LONGLONG Comperand)
-{
- LONGLONG result =
- __sync_val_compare_and_swap(
- Destination, /* The pointer to a variable whose value is to be compared with. */
- Comperand, /* The value to be compared */
- Exchange /* The value to be stored */);
- PAL_InterlockedOperationBarrier();
- return result;
-}
+Define_InterlockMethod(
+ LONGLONG,
+ InterlockedCompareExchange64(IN OUT LONGLONG volatile *Destination, IN LONGLONG Exchange, IN LONGLONG Comperand),
+ InterlockedCompareExchange64(Destination, Exchange, Comperand),
+ __sync_val_compare_and_swap(
+ Destination, /* The pointer to a variable whose value is to be compared with. */
+ Comperand, /* The value to be compared */
+ Exchange /* The value to be stored */)
+)
/*++
Function:
Parameters
lpAddend
-[in/out] Pointer to the variable to to added.
+[in/out] Pointer to the variable to added.
Return Values
The return value is the original value that 'Addend' pointed to.
--*/
-EXTERN_C
-PALIMPORT
-inline
-LONG
-PALAPI
-InterlockedExchangeAdd(
- IN OUT LONG volatile *Addend,
- IN LONG Value)
-{
- LONG result = __sync_fetch_and_add(Addend, Value);
- PAL_InterlockedOperationBarrier();
- return result;
-}
-
-EXTERN_C
-PALIMPORT
-inline
-LONGLONG
-PALAPI
-InterlockedExchangeAdd64(
- IN OUT LONGLONG volatile *Addend,
- IN LONGLONG Value)
-{
- LONGLONG result = __sync_fetch_and_add(Addend, Value);
- PAL_InterlockedOperationBarrier();
- return result;
-}
-
-EXTERN_C
-PALIMPORT
-inline
-LONG
-PALAPI
-InterlockedAnd(
- IN OUT LONG volatile *Destination,
- IN LONG Value)
-{
- LONG result = __sync_fetch_and_and(Destination, Value);
- PAL_InterlockedOperationBarrier();
- return result;
-}
-
-EXTERN_C
-PALIMPORT
-inline
-LONG
-PALAPI
-InterlockedOr(
- IN OUT LONG volatile *Destination,
- IN LONG Value)
-{
- LONG result = __sync_fetch_and_or(Destination, Value);
- PAL_InterlockedOperationBarrier();
- return result;
-}
-
-EXTERN_C
-PALIMPORT
-inline
-UCHAR
-PALAPI
-InterlockedBitTestAndReset(
- IN OUT LONG volatile *Base,
- IN LONG Bit)
-{
- return (InterlockedAnd(Base, ~(1 << Bit)) & (1 << Bit)) != 0;
-}
-
-EXTERN_C
-PALIMPORT
-inline
-UCHAR
-PALAPI
-InterlockedBitTestAndSet(
- IN OUT LONG volatile *Base,
- IN LONG Bit)
-{
- return (InterlockedOr(Base, (1 << Bit)) & (1 << Bit)) != 0;
-}
+Define_InterlockMethod(
+ LONG,
+ InterlockedExchangeAdd(IN OUT LONG volatile *Addend, IN LONG Value),
+ InterlockedExchangeAdd(Addend, Value),
+ __sync_fetch_and_add(Addend, Value)
+)
+
+Define_InterlockMethod(
+ LONGLONG,
+ InterlockedExchangeAdd64(IN OUT LONGLONG volatile *Addend, IN LONGLONG Value),
+ InterlockedExchangeAdd64(Addend, Value),
+ __sync_fetch_and_add(Addend, Value)
+)
+
+Define_InterlockMethod(
+ LONG,
+ InterlockedAnd(IN OUT LONG volatile *Destination, IN LONG Value),
+ InterlockedAnd(Destination, Value),
+ __sync_fetch_and_and(Destination, Value)
+)
+
+Define_InterlockMethod(
+ LONG,
+ InterlockedOr(IN OUT LONG volatile *Destination, IN LONG Value),
+ InterlockedOr(Destination, Value),
+ __sync_fetch_and_or(Destination, Value)
+)
#if defined(HOST_64BIT)
#define InterlockedExchangePointer(Target, Value) \
typedef LPOSVERSIONINFOEXA LPOSVERSIONINFOEX;
#endif
-#define IMAGE_FILE_MACHINE_I386 0x014c
-#define IMAGE_FILE_MACHINE_ARM64 0xAA64 // ARM64 Little-Endian
-
typedef struct _SYSTEM_INFO {
WORD wProcessorArchitecture_PAL_Undefined;
WORD wReserved_PAL_Undefined; // NOTE: diff from winbase.h - no obsolete dwOemId union
#if defined FEATURE_PAL_ANSI
#include "palprivate.h"
#endif //FEATURE_PAL_ANSI
-
/******************* C Runtime Entrypoints *******************************/
-/* Some C runtime functions needs to be reimplemented by the PAL.
- To avoid name collisions, those functions have been renamed using
- defines */
-#ifndef PAL_STDCPP_COMPAT
-#define exit PAL_exit
-#define printf PAL_printf
-#define vprintf PAL_vprintf
-#define wprintf PAL_wprintf
-#define wcstod PAL_wcstod
-#define wcstoul PAL_wcstoul
-#define wcscat PAL_wcscat
-#define wcscpy PAL_wcscpy
-#define wcslen PAL_wcslen
-#define wcsncmp PAL_wcsncmp
-#define wcschr PAL_wcschr
-#define wcsrchr PAL_wcsrchr
-#define wcsstr PAL_wcsstr
-#define swscanf PAL_swscanf
-#define wcspbrk PAL_wcspbrk
-#define wcscmp PAL_wcscmp
-#define wcsncpy PAL_wcsncpy
-#define wcscspn PAL_wcscspn
-#define iswprint PAL_iswprint
-#define realloc PAL_realloc
-#define fopen PAL_fopen
-#define strtok PAL_strtok
-#define strtoul PAL_strtoul
-#define strtoull PAL_strtoull
-#define fprintf PAL_fprintf
-#define fwprintf PAL_fwprintf
-#define vfprintf PAL_vfprintf
-#define vfwprintf PAL_vfwprintf
-#define rand PAL_rand
-#define time PAL_time
-#define getenv PAL_getenv
-#define fgets PAL_fgets
-#define qsort PAL_qsort
-#define bsearch PAL_bsearch
-#define ferror PAL_ferror
-#define fread PAL_fread
-#define fwrite PAL_fwrite
-#define ftell PAL_ftell
-#define fclose PAL_fclose
-#define fflush PAL_fflush
-#define fputs PAL_fputs
-#define fseek PAL_fseek
-#define fgetpos PAL_fgetpos
-#define fsetpos PAL_fsetpos
-#define setvbuf PAL_setvbuf
-#define acos PAL_acos
-#define asin PAL_asin
-#define atan2 PAL_atan2
-#define exp PAL_exp
-#define ilogb PAL_ilogb
-#define log PAL_log
-#define log10 PAL_log10
-#define pow PAL_pow
-#define sincos PAL_sincos
-#define acosf PAL_acosf
-#define asinf PAL_asinf
-#define atan2f PAL_atan2f
-#define expf PAL_expf
-#define ilogbf PAL_ilogbf
-#define logf PAL_logf
-#define log10f PAL_log10f
-#define powf PAL_powf
-#define sincosf PAL_sincosf
-#define malloc PAL_malloc
-#define free PAL_free
-#define _strdup PAL__strdup
-#define _open PAL__open
-#define _pread PAL__pread
-#define _close PAL__close
-#define _wcstoui64 PAL__wcstoui64
-#define _flushall PAL__flushall
-#define strnlen PAL_strnlen
-#define wcsnlen PAL_wcsnlen
-
-#ifdef HOST_AMD64
-#define _mm_getcsr PAL__mm_getcsr
-#define _mm_setcsr PAL__mm_setcsr
-#endif // HOST_AMD64
-
-#else // !PAL_STDCPP_COMPAT
-#define _strdup strdup
-#endif // !PAL_STDCPP_COMPAT
-
#ifndef _CONST_RETURN
#ifdef __cplusplus
#define _CONST_RETURN const
/* For backwards compatibility */
#define _WConst_return _CONST_RETURN
-#define EOF (-1)
-
-typedef int errno_t;
-
-#if defined(__WINT_TYPE__)
-typedef __WINT_TYPE__ wint_t;
-#else
-typedef unsigned int wint_t;
-#endif
-
-#ifndef PAL_STDCPP_COMPAT
-
-#if defined(_DEBUG)
-
-/*++
-Function:
-PAL_memcpy
-
-Overlapping buffer-safe version of memcpy.
-See MSDN doc for memcpy
---*/
-EXTERN_C
-PALIMPORT
-DLLEXPORT
-void *PAL_memcpy (void *dest, const void * src, size_t count);
-
-PALIMPORT void * __cdecl memcpy(void *, const void *, size_t) THROW_DECL;
-
-#define memcpy PAL_memcpy
-#define IS_PAL_memcpy 1
-#define TEST_PAL_DEFERRED(def) IS_##def
-#define IS_REDEFINED_IN_PAL(def) TEST_PAL_DEFERRED(def)
-#else //defined(_DEBUG)
-PALIMPORT void * __cdecl memcpy(void *, const void *, size_t);
-#endif //defined(_DEBUG)
-PALIMPORT int __cdecl memcmp(const void *, const void *, size_t);
-PALIMPORT void * __cdecl memset(void *, int, size_t);
-PALIMPORT void * __cdecl memmove(void *, const void *, size_t);
-PALIMPORT void * __cdecl memchr(const void *, int, size_t);
-PALIMPORT long long int __cdecl atoll(const char *) MATH_THROW_DECL;
-PALIMPORT size_t __cdecl strlen(const char *);
-PALIMPORT int __cdecl strcmp(const char*, const char *);
-PALIMPORT int __cdecl strncmp(const char*, const char *, size_t);
-PALIMPORT int __cdecl _strnicmp(const char *, const char *, size_t);
-PALIMPORT char * __cdecl strcat(char *, const char *);
-PALIMPORT char * __cdecl strncat(char *, const char *, size_t);
-PALIMPORT char * __cdecl strcpy(char *, const char *);
-PALIMPORT char * __cdecl strncpy(char *, const char *, size_t);
-PALIMPORT char * __cdecl strchr(const char *, int);
-PALIMPORT char * __cdecl strrchr(const char *, int);
-PALIMPORT char * __cdecl strpbrk(const char *, const char *);
-PALIMPORT char * __cdecl strstr(const char *, const char *);
-PALIMPORT char * __cdecl strtok(char *, const char *);
-PALIMPORT size_t __cdecl strspn(const char *, const char *);
-PALIMPORT size_t __cdecl strcspn(const char *, const char *);
-PALIMPORT int __cdecl atoi(const char *);
-PALIMPORT ULONG __cdecl strtoul(const char *, char **, int);
-PALIMPORT ULONGLONG __cdecl strtoull(const char *, char **, int);
-PALIMPORT double __cdecl atof(const char *);
-PALIMPORT double __cdecl strtod(const char *, char **);
-PALIMPORT int __cdecl isprint(int);
-PALIMPORT int __cdecl isspace(int);
-PALIMPORT int __cdecl isalpha(int);
-PALIMPORT int __cdecl isalnum(int);
-PALIMPORT int __cdecl isdigit(int);
-PALIMPORT int __cdecl isxdigit(int);
-PALIMPORT int __cdecl isupper(int);
-PALIMPORT int __cdecl islower(int);
-PALIMPORT int __cdecl tolower(int);
-PALIMPORT int __cdecl toupper(int);
-PALIMPORT int __cdecl iswalpha(wint_t);
-PALIMPORT int __cdecl iswdigit(wint_t);
-PALIMPORT int __cdecl iswupper(wint_t);
-PALIMPORT int __cdecl iswspace(wint_t);
-PALIMPORT int __cdecl iswxdigit(wint_t);
-PALIMPORT wint_t __cdecl towupper(wint_t);
-PALIMPORT wint_t __cdecl towlower(wint_t);
-#endif // PAL_STDCPP_COMPAT
-
/* _TRUNCATE */
#if !defined(_TRUNCATE)
#define _TRUNCATE ((size_t)-1)
#endif
-PALIMPORT DLLEXPORT errno_t __cdecl memcpy_s(void *, size_t, const void *, size_t) THROW_DECL;
+// errno_t is only defined when the Secure CRT Extensions library is available (which no standard library that we build with implements anyway)
+typedef int errno_t;
+
+PALIMPORT DLLEXPORT errno_t __cdecl memcpy_s(void *, size_t, const void *, size_t);
PALIMPORT errno_t __cdecl memmove_s(void *, size_t, const void *, size_t);
PALIMPORT DLLEXPORT int __cdecl _stricmp(const char *, const char *);
PALIMPORT DLLEXPORT int __cdecl vsprintf_s(char *, size_t, const char *, va_list);
PALIMPORT DLLEXPORT int __cdecl _vsnwprintf_s(WCHAR *, size_t, size_t, const WCHAR *, va_list);
PALIMPORT DLLEXPORT int __cdecl _snwprintf_s(WCHAR *, size_t, size_t, const WCHAR *, ...);
PALIMPORT DLLEXPORT int __cdecl _snprintf_s(char *, size_t, size_t, const char *, ...);
+PALIMPORT DLLEXPORT int __cdecl vsprintf_s(char *, size_t, const char *, va_list);
PALIMPORT DLLEXPORT int __cdecl sprintf_s(char *, size_t, const char *, ... );
PALIMPORT DLLEXPORT int __cdecl swprintf_s(WCHAR *, size_t, const WCHAR *, ... );
PALIMPORT int __cdecl _snwprintf_s(WCHAR *, size_t, size_t, const WCHAR *, ...);
PALIMPORT int __cdecl vswprintf_s( WCHAR *, size_t, const WCHAR *, va_list);
PALIMPORT DLLEXPORT int __cdecl sscanf_s(const char *, const char *, ...);
+PALIMPORT DLLEXPORT int __cdecl swscanf_s(const WCHAR *string, const WCHAR *format,...);
+
PALIMPORT DLLEXPORT errno_t __cdecl _itow_s(int, WCHAR *, size_t, int);
PALIMPORT DLLEXPORT size_t __cdecl PAL_wcslen(const WCHAR *);
PALIMPORT DLLEXPORT const WCHAR * __cdecl PAL_wcsrchr(const WCHAR *, WCHAR);
PALIMPORT WCHAR _WConst_return * __cdecl PAL_wcspbrk(const WCHAR *, const WCHAR *);
PALIMPORT DLLEXPORT WCHAR _WConst_return * __cdecl PAL_wcsstr(const WCHAR *, const WCHAR *);
-PALIMPORT DLLEXPORT size_t __cdecl PAL_wcscspn(const WCHAR *, const WCHAR *);
-PALIMPORT int __cdecl PAL_swprintf(WCHAR *, const WCHAR *, ...);
-PALIMPORT int __cdecl PAL_vswprintf(WCHAR *, const WCHAR *, va_list);
-PALIMPORT int __cdecl PAL_swscanf(const WCHAR *, const WCHAR *, ...);
PALIMPORT DLLEXPORT ULONG __cdecl PAL_wcstoul(const WCHAR *, WCHAR **, int);
-PALIMPORT double __cdecl PAL_wcstod(const WCHAR *, WCHAR **);
-PALIMPORT int __cdecl PAL_iswprint(WCHAR);
+PALIMPORT DLLEXPORT ULONGLONG __cdecl PAL__wcstoui64(const WCHAR *, WCHAR **, int);
+PALIMPORT DLLEXPORT double __cdecl PAL_wcstod(const WCHAR *, WCHAR **);
PALIMPORT errno_t __cdecl _wcslwr_s(WCHAR *, size_t sz);
-PALIMPORT DLLEXPORT ULONGLONG _wcstoui64(const WCHAR *, WCHAR **, int);
PALIMPORT DLLEXPORT errno_t __cdecl _i64tow_s(long long, WCHAR *, size_t, int);
PALIMPORT int __cdecl _wtoi(const WCHAR *);
+PALIMPORT FILE * __cdecl _wfopen(const WCHAR *, const WCHAR *);
+
+inline int _stricmp(const char* a, const char* b)
+{
+ return strcasecmp(a, b);
+}
+
+inline int _strnicmp(const char* a, const char* b, size_t c)
+{
+ return strncasecmp(a, b, c);
+}
+
+inline char* _strdup(const char* a)
+{
+ return strdup(a);
+}
+
+// Define the MSVC implementation of the alloca concept.
+// As this allocates on the current stack frame, use a macro instead of an inline function.
+#define _alloca(x) alloca(x)
#ifdef __cplusplus
extern "C++" {
}
#endif
-#if defined(__llvm__)
-#define HAS_ROTL __has_builtin(_rotl)
-#define HAS_ROTR __has_builtin(_rotr)
-#else
-#define HAS_ROTL 0
-#define HAS_ROTR 0
-#endif
-
-#if !HAS_ROTL
+#if !__has_builtin(_rotl) && !defined(_rotl)
/*++
Function:
_rotl
retval = (value << shift) | (value >> (sizeof(int) * CHAR_BIT - shift));
return retval;
}
-#endif // !HAS_ROTL
+#endif // !__has_builtin(_rotl)
-// On 64 bit unix, make the long an int.
-#ifdef HOST_64BIT
-#define _lrotl _rotl
-#endif // HOST_64BIT
-
-#if !HAS_ROTR
+#if !__has_builtin(_rotr) && !defined(_rotr)
/*++
Function:
return retval;
}
-#endif // !HAS_ROTR
-
-PALIMPORT int __cdecl abs(int);
-
-// clang complains if this is declared with __int64
-PALIMPORT long long __cdecl llabs(long long);
-
-#ifndef PAL_STDCPP_COMPAT
-
-#ifdef __cplusplus
-extern "C++" {
-
-inline __int64 abs(__int64 _X) {
- return llabs(_X);
-}
-
-}
-#endif
-
-PALIMPORT DLLEXPORT void * __cdecl malloc(size_t);
-PALIMPORT DLLEXPORT void __cdecl free(void *);
-PALIMPORT DLLEXPORT void * __cdecl realloc(void *, size_t);
-PALIMPORT char * __cdecl _strdup(const char *);
-
-#if defined(_MSC_VER)
-#define alloca _alloca
-#else
-#define _alloca alloca
-#endif //_MSC_VER
-
-#define alloca __builtin_alloca
-
-#define max(a, b) (((a) > (b)) ? (a) : (b))
-#define min(a, b) (((a) < (b)) ? (a) : (b))
+#endif // !__has_builtin(_rotr)
-PALIMPORT DLLEXPORT void __cdecl qsort(void *, size_t, size_t, int(__cdecl *)(const void *, const void *));
-PALIMPORT DLLEXPORT void * __cdecl bsearch(const void *, const void *, size_t, size_t,
- int(__cdecl *)(const void *, const void *));
-
-PALIMPORT time_t __cdecl time(time_t *);
-
-#endif // !PAL_STDCPP_COMPAT
-
-PALIMPORT DLLEXPORT int __cdecl _open(const char *szPath, int nFlags, ...);
-PALIMPORT DLLEXPORT size_t __cdecl _pread(int fd, void *buf, size_t nbytes, ULONG64 offset);
-PALIMPORT DLLEXPORT int __cdecl _close(int);
-PALIMPORT DLLEXPORT int __cdecl _flushall();
-
-#ifdef PAL_STDCPP_COMPAT
-
-struct _PAL_FILE;
-typedef struct _PAL_FILE PAL_FILE;
-
-#else // PAL_STDCPP_COMPAT
-
-struct _FILE;
-typedef struct _FILE FILE;
-typedef struct _FILE PAL_FILE;
-
-#define SEEK_SET 0
-#define SEEK_CUR 1
-#define SEEK_END 2
-
-/* Locale categories */
-#define LC_ALL 0
-#define LC_COLLATE 1
-#define LC_CTYPE 2
-#define LC_MONETARY 3
-#define LC_NUMERIC 4
-#define LC_TIME 5
-
-#define _IOFBF 0 /* setvbuf should set fully buffered */
-#define _IOLBF 1 /* setvbuf should set line buffered */
-#define _IONBF 2 /* setvbuf should set unbuffered */
-
-#endif // PAL_STDCPP_COMPAT
-
-PALIMPORT int __cdecl PAL_fclose(PAL_FILE *);
-PALIMPORT DLLEXPORT int __cdecl PAL_fflush(PAL_FILE *);
-PALIMPORT size_t __cdecl PAL_fwrite(const void *, size_t, size_t, PAL_FILE *);
-PALIMPORT size_t __cdecl PAL_fread(void *, size_t, size_t, PAL_FILE *);
-PALIMPORT char * __cdecl PAL_fgets(char *, int, PAL_FILE *);
-PALIMPORT int __cdecl PAL_fputs(const char *, PAL_FILE *);
-PALIMPORT DLLEXPORT int __cdecl PAL_fprintf(PAL_FILE *, const char *, ...);
-PALIMPORT int __cdecl PAL_vfprintf(PAL_FILE *, const char *, va_list);
-PALIMPORT int __cdecl PAL_fseek(PAL_FILE *, LONG, int);
-PALIMPORT LONG __cdecl PAL_ftell(PAL_FILE *);
-PALIMPORT int __cdecl PAL_ferror(PAL_FILE *);
-PALIMPORT PAL_FILE * __cdecl PAL_fopen(const char *, const char *);
-PALIMPORT int __cdecl PAL_setvbuf(PAL_FILE *stream, char *, int, size_t);
-PALIMPORT DLLEXPORT int __cdecl PAL_fwprintf(PAL_FILE *, const WCHAR *, ...);
-PALIMPORT int __cdecl PAL_vfwprintf(PAL_FILE *, const WCHAR *, va_list);
-PALIMPORT int __cdecl PAL_wprintf(const WCHAR*, ...);
-
-PALIMPORT int __cdecl _getw(PAL_FILE *);
-PALIMPORT int __cdecl _putw(int, PAL_FILE *);
-PALIMPORT PAL_FILE * __cdecl _fdopen(int, const char *);
-PALIMPORT PAL_FILE * __cdecl _wfopen(const WCHAR *, const WCHAR *);
-
-/* Maximum value that can be returned by the rand function. */
-
-#ifndef PAL_STDCPP_COMPAT
-#define RAND_MAX 0x7fff
-#endif // !PAL_STDCPP_COMPAT
-
-PALIMPORT int __cdecl rand(void);
-PALIMPORT void __cdecl srand(unsigned int);
-
-PALIMPORT DLLEXPORT int __cdecl printf(const char *, ...);
-PALIMPORT int __cdecl vprintf(const char *, va_list);
-
-#ifdef _MSC_VER
-#define PAL_get_caller _MSC_VER
-#else
-#define PAL_get_caller 0
-#endif
-
-PALIMPORT DLLEXPORT PAL_FILE * __cdecl PAL_get_stdout(int caller);
-PALIMPORT PAL_FILE * __cdecl PAL_get_stdin(int caller);
-PALIMPORT DLLEXPORT PAL_FILE * __cdecl PAL_get_stderr(int caller);
-PALIMPORT DLLEXPORT int * __cdecl PAL_errno(int caller);
-
-#ifdef PAL_STDCPP_COMPAT
-#define PAL_stdout (PAL_get_stdout(PAL_get_caller))
-#define PAL_stdin (PAL_get_stdin(PAL_get_caller))
-#define PAL_stderr (PAL_get_stderr(PAL_get_caller))
-#define PAL_errno (*PAL_errno(PAL_get_caller))
-#else // PAL_STDCPP_COMPAT
-#define stdout (PAL_get_stdout(PAL_get_caller))
-#define stdin (PAL_get_stdin(PAL_get_caller))
-#define stderr (PAL_get_stderr(PAL_get_caller))
-#define errno (*PAL_errno(PAL_get_caller))
-#endif // PAL_STDCPP_COMPAT
-
-PALIMPORT DLLEXPORT char * __cdecl getenv(const char *);
+PALIMPORT DLLEXPORT char * __cdecl PAL_getenv(const char *);
PALIMPORT DLLEXPORT int __cdecl _putenv(const char *);
#define ERANGE 34
-/******************* PAL functions for SIMD extensions *****************/
-PALIMPORT
-unsigned int _mm_getcsr(void);
+#ifdef __cplusplus
-PALIMPORT
-void _mm_setcsr(unsigned int i);
+#define HardwareExceptionHolder
+extern "C++" {
+#define PAL_TRY(__ParamType, __paramDef, __paramRef) \
+{ \
+ __ParamType __param = __paramRef; \
+ auto tryBlock = [](__ParamType __paramDef) \
+ {
+// Start of an exception handler. If an exception raised by the RaiseException
+// occurs in the try block and the disposition is EXCEPTION_EXECUTE_HANDLER,
+// the handler code is executed. If the disposition is EXCEPTION_CONTINUE_SEARCH,
+// the exception is rethrown. The EXCEPTION_CONTINUE_EXECUTION disposition is
+// not supported.
+#define PAL_EXCEPT(dispositionExpression) \
+ }; \
+ const bool isFinally = false; \
+ auto finallyBlock = []() {}; \
+ EXCEPTION_DISPOSITION disposition = EXCEPTION_CONTINUE_EXECUTION; \
+ auto exceptionFilter = [&disposition, &__param](PAL_SEHException& ex) \
+ { \
+ (void)__param; \
+ disposition = dispositionExpression; \
+ _ASSERTE(disposition != EXCEPTION_CONTINUE_EXECUTION); \
+ return disposition; \
+ }; \
+ try \
+ { \
+ tryBlock(__param); \
+ } \
+ catch (PAL_SEHException& ex) \
+ { \
+ if (disposition == EXCEPTION_CONTINUE_EXECUTION) \
+ { \
+ exceptionFilter(ex); \
+ } \
+ if (disposition == EXCEPTION_CONTINUE_SEARCH) \
+ { \
+ throw; \
+ } \
+ ex.SecondPassDone();
+
+// Start of an exception handler. It works the same way as the PAL_EXCEPT except
+// that the disposition is obtained by calling the specified filter.
+#define PAL_EXCEPT_FILTER(filter) PAL_EXCEPT(filter(&ex.ExceptionPointers, __param))
+
+// Start of a finally block. The finally block is executed both when the try block
+// finishes or when an exception is raised using the RaiseException in it.
+#define PAL_FINALLY \
+ }; \
+ const bool isFinally = true; \
+ auto finallyBlock = [&]() \
+ {
-/******************* PAL functions for CPU capability detection *******/
+// End of an except or a finally block.
+#define PAL_ENDTRY \
+ }; \
+ if (isFinally) \
+ { \
+ try \
+ { \
+ HardwareExceptionHolder \
+ tryBlock(__param); \
+ } \
+ catch (...) \
+ { \
+ finallyBlock(); \
+ throw; \
+ } \
+ finallyBlock(); \
+ } \
+}
-#ifdef __cplusplus
+} // extern "C++"
#define PAL_CPP_THROW(type, obj) { throw obj; }
#define PAL_CPP_RETHROW { throw; }
-#define PAL_CPP_TRY try {
+#define PAL_CPP_TRY try { HardwareExceptionHolder
#define PAL_CPP_CATCH_EXCEPTION(ident) } catch (Exception *ident) {
#define PAL_CPP_CATCH_EXCEPTION_NOARG } catch (Exception *) {
#define PAL_CPP_CATCH_DERIVED(type, ident) } catch (type *ident) {
+#define PAL_CPP_CATCH_NON_DERIVED(type, ident) } catch (type ident) {
+#define PAL_CPP_CATCH_NON_DERIVED_NOARG(type) } catch (type) {
#define PAL_CPP_CATCH_ALL } catch (...) { \
try { throw; } \
catch (...) {}
#define PAL_CPP_ENDTRY }
-#ifdef _MSC_VER
-#pragma warning(disable:4611) // interaction between '_setjmp' and C++ object destruction is non-portable
-#endif
-
#define PAL_TRY_FOR_DLLMAIN(ParamType, paramDef, paramRef, _reason) PAL_TRY(ParamType, paramDef, paramRef)
#endif // __cplusplus
#endif // __cplusplus
+#ifndef _ASSERTE
#if defined(_DEBUG)
#define _ASSERTE(e) do { \
if (!(e)) { \
#else // !DEBUG
#define _ASSERTE(e) ((void)0)
#endif
+#endif // _ASSERTE
#ifndef assert
#define assert(e) _ASSERTE(e)
extern "C++" {
inline UINT16 SWAP16(UINT16 x)
{
- return (x >> 8) | (x << 8);
+ return (UINT16)((x >> 8) | (x << 8));
}
inline UINT32 SWAP32(UINT32 x)
#define ALIGN_ACCESS ((1<<LOG2_PTRSIZE)-1)
#endif
+#ifdef HOST_RISCV64
+#define LOG2_PTRSIZE 3
+#define ALIGN_ACCESS ((1<<LOG2_PTRSIZE)-1)
+#endif
+
#if defined(ALIGN_ACCESS) && !defined(_MSC_VER)
#ifdef __cplusplus
extern "C++" {
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*++
-
-
-
-
-
---*/
-
////////////////////////////////////////////////////////////////////////
// Extensions to the usual posix header files
////////////////////////////////////////////////////////////////////////
#ifndef __PAL_MSTYPES_H__
#define __PAL_MSTYPES_H__
+#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
#define EXTERN_C
#endif // __cplusplus
-#ifndef _MSC_VER
-
// Note: Win32-hosted GCC predefines __stdcall and __cdecl, but Unix-
// hosted GCC does not.
#define _cdecl
#define CDECL
-// On ARM __fastcall is ignored and causes a compile error
-#if !defined(PAL_STDCPP_COMPAT) || defined(__arm__)
-# undef __fastcall
-# undef _fastcall
-# define __fastcall
-# define _fastcall
-#endif // !defined(PAL_STDCPP_COMPAT) || defined(__arm__)
+// Some platforms (such as FreeBSD) define the __fastcall macro
+// on all targets, even when using it will fail.
+// Undefine it here so we can use it on all platforms without error.
+#ifdef __fastcall
+#undef __fastcall
+#endif
+
+#define __fastcall
+#define _fastcall
#endif // !defined(__i386__)
#define __forceinline inline
-#endif // !_MSC_VER
-
-#ifdef _MSC_VER
-
-#if defined(PAL_IMPLEMENTATION)
#define PALIMPORT
-#else
-#define PALIMPORT __declspec(dllimport)
-#endif
-#define DLLEXPORT __declspec(dllexport)
-#define PAL_NORETURN __declspec(noreturn)
-
-#else
-#define PALIMPORT
+#ifndef DLLEXPORT
#define DLLEXPORT __attribute__((visibility("default")))
-#define PAL_NORETURN __attribute__((noreturn))
-
#endif
+#define PAL_NORETURN __attribute__((noreturn))
+
#define PALAPI DLLEXPORT __cdecl
#define PALAPI_NOEXPORT __cdecl
#define PALAPIV __cdecl
// Misc. type helpers
////////////////////////////////////////////////////////////////////////
-#ifdef _MSC_VER
-
-// MSVC's way of declaring large integer constants
-// If you define these in one step, without the _HELPER macros, you
-// get extra whitespace when composing these with other concatenating macros.
-#define I64_HELPER(x) x ## i64
-#define I64(x) I64_HELPER(x)
-
-#define UI64_HELPER(x) x ## ui64
-#define UI64(x) UI64_HELPER(x)
-
-#else // _MSC_VER
-
// GCC's way of declaring large integer constants
// If you define these in one step, without the _HELPER macros, you
// get extra whitespace when composing these with other concatenating macros.
#define UI64_HELPER(x) x ## ULL
#define UI64(x) UI64_HELPER(x)
-#endif // _MSC_VER
-
////////////////////////////////////////////////////////////////////////
// Misc. types
////////////////////////////////////////////////////////////////////////
-#ifndef _MSC_VER
-
-// A bunch of source files (e.g. most of the ndp tree) include pal.h
-// but are written to be LLP64, not LP64. (LP64 => long = 64 bits
-// LLP64 => longs = 32 bits, long long = 64 bits)
-//
-// To handle this difference, we #define long to be int (and thus 32 bits) when
-// compiling those files. (See the bottom of this file or search for
-// #define long to see where we do this.)
-//
-// But this fix is more complicated than it seems, because we also use the
-// preprocessor to #define __int64 to long for LP64 architectures (__int64
-// isn't a builtin in gcc). We don't want __int64 to be an int (by cascading
-// macro rules). So we play this little trick below where we add
-// __cppmungestrip before "long", which is what we're really #defining __int64
-// to. The preprocessor sees __cppmungestriplong as something different than
-// long, so it doesn't replace it with int. The during the cppmunge phase, we
-// remove the __cppmungestrip part, leaving long for the compiler to see.
-//
-// Note that we can't just use a typedef to define __int64 as long before
-// #defining long because typedefed types can't be signedness-agnostic (i.e.
-// they must be either signed or unsigned) and we want to be able to use
-// __int64 as though it were intrinsic
-
-#ifdef HOST_64BIT
-#define __int64 long
-#else // HOST_64BIT
-#define __int64 long long
-#endif // HOST_64BIT
-
-#define __int32 int
-#define __int16 short int
-#define __int8 char // assumes char is signed
-
-#endif // _MSC_VER
-
-#ifndef PAL_STDCPP_COMPAT
-// Defined in gnu's types.h. For non PAL_IMPLEMENTATION system
-// includes are not included, so we need to define them.
-#ifndef PAL_IMPLEMENTATION
-
-typedef __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-typedef __int32 int32_t;
-typedef unsigned __int32 uint32_t;
-typedef __int16 int16_t;
-typedef unsigned __int16 uint16_t;
-typedef __int8 int8_t;
-typedef unsigned __int8 uint8_t;
-
-#endif // PAL_IMPLEMENTATION
-
-#ifndef _MSC_VER
-
#if HOST_64BIT
typedef long double LONG_DOUBLE;
#endif
-#endif // _MSC_VER
-#endif // !PAL_STDCPP_COMPAT
-
typedef void VOID;
typedef int LONG; // NOTE: diff from windows.h, for LP64 compat
typedef unsigned int ULONG; // NOTE: diff from windows.h, for LP64 compat
-typedef __int64 LONGLONG;
-typedef unsigned __int64 ULONGLONG;
+typedef int64_t LONGLONG;
+typedef uint64_t ULONGLONG;
typedef ULONGLONG DWORD64;
typedef DWORD64 *PDWORD64;
typedef LONGLONG *PLONG64;
typedef BYTE BOOLEAN;
typedef BOOLEAN *PBOOLEAN;
-typedef unsigned __int8 UINT8;
-typedef signed __int8 INT8;
-typedef unsigned __int16 UINT16;
-typedef signed __int16 INT16;
-typedef unsigned __int32 UINT32, *PUINT32;
-typedef signed __int32 INT32, *PINT32;
-typedef unsigned __int64 UINT64, *PUINT64;
-typedef signed __int64 INT64, *PINT64;
-
-typedef unsigned __int32 ULONG32, *PULONG32;
-typedef signed __int32 LONG32, *PLONG32;
-typedef unsigned __int64 ULONG64;
-typedef signed __int64 LONG64;
-
-#if defined(HOST_X86) && _MSC_VER >= 1300
-#define _W64 __w64
-#else
-#define _W64
-#endif
-
-#ifdef HOST_64BIT
-
-#define _atoi64 (__int64)atoll
-
-typedef __int64 INT_PTR, *PINT_PTR;
-typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
-typedef __int64 LONG_PTR, *PLONG_PTR;
-typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
-typedef unsigned __int64 DWORD_PTR, *PDWORD_PTR;
-
-/* maximum signed 64 bit value */
-#define LONG_PTR_MAX I64(9223372036854775807)
-/* maximum unsigned 64 bit value */
-#define ULONG_PTR_MAX UI64(0xffffffffffffffff)
-
-#ifndef SIZE_MAX
-#define SIZE_MAX _UI64_MAX
-#endif
-
-#define __int3264 __int64
-
-#if !defined(HOST_64BIT)
-__inline
-unsigned long
-HandleToULong(
- const void *h
- )
-{
- return((unsigned long) (ULONG_PTR) h );
-}
-
-__inline
-long
-HandleToLong(
- const void *h
- )
-{
- return((long) (LONG_PTR) h );
-}
-
-__inline
-void *
-ULongToHandle(
- const unsigned long h
- )
-{
- return((void *) (UINT_PTR) h );
-}
-
-
-__inline
-void *
-LongToHandle(
- const long h
- )
-{
- return((void *) (INT_PTR) h );
-}
-
-
-__inline
-unsigned long
-PtrToUlong(
- const void *p
- )
-{
- return((unsigned long) (ULONG_PTR) p );
-}
-
-__inline
-unsigned int
-PtrToUint(
- const void *p
- )
-{
- return((unsigned int) (UINT_PTR) p );
-}
+typedef uint8_t UINT8;
+typedef int8_t INT8;
+typedef uint16_t UINT16;
+typedef int16_t INT16;
+typedef uint32_t UINT32, *PUINT32;
+typedef int32_t INT32, *PINT32;
+typedef uint64_t UINT64, *PUINT64;
+typedef int64_t INT64, *PINT64;
-__inline
-unsigned short
-PtrToUshort(
- const void *p
- )
-{
- return((unsigned short) (unsigned long) (ULONG_PTR) p );
-}
-
-__inline
-long
-PtrToLong(
- const void *p
- )
-{
- return((long) (LONG_PTR) p );
-}
+typedef uint32_t ULONG32, *PULONG32;
+typedef int32_t LONG32, *PLONG32;
+typedef uint64_t ULONG64;
+typedef int64_t LONG64;
-__inline
-int
-PtrToInt(
- const void *p
- )
-{
- return((int) (INT_PTR) p );
-}
+typedef intptr_t INT_PTR, *PINT_PTR;
+typedef uintptr_t UINT_PTR, *PUINT_PTR;
-__inline
-short
-PtrToShort(
- const void *p
- )
-{
- return((short) (long) (LONG_PTR) p );
-}
-
-__inline
-void *
-IntToPtr(
- const int i
- )
-// Caution: IntToPtr() sign-extends the int value.
-{
- return( (void *)(INT_PTR)i );
-}
-
-__inline
-void *
-UIntToPtr(
- const unsigned int ui
- )
-// Caution: UIntToPtr() zero-extends the unsigned int value.
-{
- return( (void *)(UINT_PTR)ui );
-}
-
-__inline
-void *
-LongToPtr(
- const long l
- )
-// Caution: LongToPtr() sign-extends the long value.
-{
- return( (void *)(LONG_PTR)l );
-}
-
-__inline
-void *
-ULongToPtr(
- const unsigned long ul
- )
-// Caution: ULongToPtr() zero-extends the unsigned long value.
-{
- return( (void *)(ULONG_PTR)ul );
-}
-
-__inline
-void *
-ShortToPtr(
- const short s
- )
-// Caution: ShortToPtr() sign-extends the short value.
-{
- return( (void *)(INT_PTR)s );
-}
-
-__inline
-void *
-UShortToPtr(
- const unsigned short us
- )
-// Caution: UShortToPtr() zero-extends the unsigned short value.
-{
- return( (void *)(UINT_PTR)us );
-}
-
-#else // !defined(HOST_64BIT)
-#define HandleToULong( h ) ((ULONG)(ULONG_PTR)(h) )
-#define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
-#define ULongToHandle( ul ) ((HANDLE)(ULONG_PTR) (ul) )
-#define LongToHandle( h ) ((HANDLE)(LONG_PTR) (h) )
-#define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
-#define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
-#define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
-#define PtrToInt( p ) ((INT)(INT_PTR) (p) )
-#define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
-#define PtrToShort( p ) ((short)(LONG_PTR)(p) )
-#define IntToPtr( i ) ((VOID *)(INT_PTR)((int)(i)))
-#define UIntToPtr( ui ) ((VOID *)(UINT_PTR)((unsigned int)(ui)))
-#define LongToPtr( l ) ((VOID *)(LONG_PTR)((long)(l)))
-#define ULongToPtr( ul ) ((VOID *)(ULONG_PTR)((unsigned long)(ul)))
-#define ShortToPtr( s ) ((VOID *)(INT_PTR)((short)(s)))
-#define UShortToPtr( us ) ((VOID *)(UINT_PTR)((unsigned short)(s)))
-#endif // !defined(HOST_64BIT)
+#ifdef HOST_64BIT
+#define _atoi64 (int64_t)atoll
+typedef int64_t LONG_PTR, *PLONG_PTR;
+typedef uint64_t ULONG_PTR, *PULONG_PTR;
+typedef uint64_t DWORD_PTR, *PDWORD_PTR;
#else
-typedef _W64 __int32 INT_PTR;
-typedef _W64 unsigned __int32 UINT_PTR;
-
-typedef _W64 __int32 LONG_PTR;
-typedef _W64 unsigned __int32 ULONG_PTR, *PULONG_PTR;
-typedef _W64 unsigned __int32 DWORD_PTR, *PDWORD_PTR;
-
-/* maximum signed 32 bit value */
-#define LONG_PTR_MAX 2147483647L
-/* maximum unsigned 32 bit value */
-#define ULONG_PTR_MAX 0xffffffffUL
-
-#ifndef SIZE_MAX
-#define SIZE_MAX UINT_MAX
-#endif
-
-#define __int3264 __int32
-
-#define HandleToULong( h ) ((ULONG)(ULONG_PTR)(h) )
-#define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
-#define ULongToHandle( ul ) ((HANDLE)(ULONG_PTR) (ul) )
-#define LongToHandle( h ) ((HANDLE)(LONG_PTR) (h) )
-#define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
-#define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
-#define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
-#define PtrToInt( p ) ((INT)(INT_PTR) (p) )
-#define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
-#define PtrToShort( p ) ((short)(LONG_PTR)(p) )
-#define IntToPtr( i ) ((VOID *)(INT_PTR)((int)i))
-#define UIntToPtr( ui ) ((VOID *)(UINT_PTR)((unsigned int)ui))
-#define LongToPtr( l ) ((VOID *)(LONG_PTR)((long)l))
-#define ULongToPtr( ul ) ((VOID *)(ULONG_PTR)((unsigned long)ul))
-#define ShortToPtr( s ) ((VOID *)(INT_PTR)((short)s))
-#define UShortToPtr( us ) ((VOID *)(UINT_PTR)((unsigned short)s))
+typedef int32_t LONG_PTR, *PLONG_PTR;
+typedef uint32_t ULONG_PTR, *PULONG_PTR;
+typedef uint32_t DWORD_PTR, *PDWORD_PTR;
#endif
-#define HandleToUlong(h) HandleToULong(h)
-#define UlongToHandle(ul) ULongToHandle(ul)
-#define UlongToPtr(ul) ULongToPtr(ul)
-#define UintToPtr(ui) UIntToPtr(ui)
-
-typedef ULONG_PTR SIZE_T, *PSIZE_T;
-typedef LONG_PTR SSIZE_T, *PSSIZE_T;
+typedef uintptr_t SIZE_T;
+typedef intptr_t SSIZE_T;
#ifndef SIZE_T_MAX
-#define SIZE_T_MAX ULONG_PTR_MAX
+#define SIZE_T_MAX UINTPTR_MAX
#endif // SIZE_T_MAX
#ifndef SSIZE_T_MAX
-#define SSIZE_T_MAX LONG_PTR_MAX
+#define SSIZE_T_MAX INTPTR_MAX
#endif
#ifndef SSIZE_T_MIN
-#define SSIZE_T_MIN (ssize_t)I64(0x8000000000000000)
+#define SSIZE_T_MIN INTPTR_MIN
#endif
-#ifndef PAL_STDCPP_COMPAT
-#if defined(__APPLE_CC__) || defined(__linux__)
-#ifdef HOST_64BIT
-typedef unsigned long size_t;
-typedef long ptrdiff_t;
-#else // !HOST_64BIT
-typedef unsigned int size_t;
-typedef int ptrdiff_t;
-#endif // !HOST_64BIT
-#else
-typedef ULONG_PTR size_t;
-typedef LONG_PTR ptrdiff_t;
-#endif
-#endif // !PAL_STDCPP_COMPAT
-#define _SIZE_T_DEFINED
-
typedef LONG_PTR LPARAM;
-#define _PTRDIFF_T_DEFINED
-#ifdef _MINGW_
-// We need to define _PTRDIFF_T to make sure ptrdiff_t doesn't get defined
-// again by system headers - but only for MinGW.
-#define _PTRDIFF_T
-#endif
-
typedef char16_t WCHAR;
-#ifndef PAL_STDCPP_COMPAT
-
-#if defined(__linux__)
-#ifdef HOST_64BIT
-typedef long int intptr_t;
-typedef unsigned long int uintptr_t;
-#else // !HOST_64BIT
-typedef int intptr_t;
-typedef unsigned int uintptr_t;
-#endif // !HOST_64BIT
-#else
-typedef INT_PTR intptr_t;
-typedef UINT_PTR uintptr_t;
-#endif
-
-#endif // PAL_STDCPP_COMPAT
-
-#define _INTPTR_T_DEFINED
-#define _UINTPTR_T_DEFINED
-
typedef DWORD LCID;
typedef PDWORD PLCID;
typedef WORD LANGID;
DeleteFileA(
IN LPCSTR lpFileName);
-PALIMPORT
-BOOL
-PALAPI
-MoveFileExA(
- IN LPCSTR lpExistingFileName,
- IN LPCSTR lpNewFileName,
- IN DWORD dwFlags);
-
PALIMPORT
BOOL
PALAPI
IN DWORD nBufferLength,
OUT LPSTR lpBuffer);
-PALIMPORT
-DWORD
-PALAPI
-GetCurrentDirectoryA(
- IN DWORD nBufferLength,
- OUT LPSTR lpBuffer);
-
PALIMPORT
BOOL
PALAPI
IN CONST FILETIME *lpFileTime1,
IN CONST FILETIME *lpFileTime2);
-/* These are from the <FCNTL.H> file in windows.
- They are needed for _open_osfhandle.*/
-#define _O_RDONLY 0x0000
-#define _O_APPEND 0x0008
-#define _O_TEXT 0x4000
-#define _O_BINARY 0x8000
-
-PALIMPORT int __cdecl _open_osfhandle(INT_PTR, int);
-
#ifdef __cplusplus
}
#endif
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: aclapi.h
-//
-// ===========================================================================
-// dummy aclapi.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: commctrl.h
-//
-// ===========================================================================
-// dummy commctrl.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: commdlg.h
-//
-// ===========================================================================
-// dummy commdlg.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: conio.h
-//
-// ===========================================================================
-// dummy conio.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: assert.h
-//
-// ===========================================================================
-// dummy assert.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-//
-// <OWNER>clrosdev</OWNER>
-//
-// ===========================================================================
-// File: cstdlib
-//
-// ===========================================================================
-// dummy cstdlib for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: ctype.h
-//
-// ===========================================================================
-// dummy ctype.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-// From llvm-3.9/clang-3.9.1 emmintrin.h:
-
-/*===---- emmintrin.h - SSE2 intrinsics ------------------------------------===
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- *===-----------------------------------------------------------------------===
- */
-
-#include "palrt.h"
-#ifdef __GNUC__
-#ifndef __EMMINTRIN_H
-#define __IMMINTRIN_H
-
-typedef long long __m128i __attribute__((__vector_size__(16)));
-
-typedef unsigned long long __v2du __attribute__ ((__vector_size__ (16)));
-typedef short __v8hi __attribute__((__vector_size__(16)));
-typedef char __v16qi __attribute__((__vector_size__(16)));
-
-
-/* Define the default attribute for the functions in this file. */
-#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, NODEBUG_ATTRIBUTE))
-
-/// \brief Performs a bitwise OR of two 128-bit integer vectors.
-///
-/// \headerfile <x86intrin.h>
-///
-/// This intrinsic corresponds to the \c VPOR / POR instruction.
-///
-/// \param __a
-/// A 128-bit integer vector containing one of the source operands.
-/// \param __b
-/// A 128-bit integer vector containing one of the source operands.
-/// \returns A 128-bit integer vector containing the bitwise OR of the values
-/// in both operands.
-static __inline__ __m128i __DEFAULT_FN_ATTRS
-_mm_or_si128(__m128i __a, __m128i __b)
-{
- return (__m128i)((__v2du)__a | (__v2du)__b);
-}
-
-/// \brief Compares each of the corresponding 16-bit values of the 128-bit
-/// integer vectors for equality. Each comparison yields 0h for false, FFFFh
-/// for true.
-///
-/// \headerfile <x86intrin.h>
-///
-/// This intrinsic corresponds to the \c VPCMPEQW / PCMPEQW instruction.
-///
-/// \param __a
-/// A 128-bit integer vector.
-/// \param __b
-/// A 128-bit integer vector.
-/// \returns A 128-bit integer vector containing the comparison results.
-static __inline__ __m128i __DEFAULT_FN_ATTRS
-_mm_cmpeq_epi16(__m128i __a, __m128i __b)
-{
- return (__m128i)((__v8hi)__a == (__v8hi)__b);
-}
-
-/// \brief Moves packed integer values from an unaligned 128-bit memory location
-/// to elements in a 128-bit integer vector.
-///
-/// \headerfile <x86intrin.h>
-///
-/// This intrinsic corresponds to the \c VMOVDQU / MOVDQU instruction.
-///
-/// \param __p
-/// A pointer to a memory location containing integer values.
-/// \returns A 128-bit integer vector containing the moved values.
-static __inline__ __m128i __DEFAULT_FN_ATTRS
-_mm_loadu_si128(__m128i const *__p)
-{
- struct __loadu_si128 {
- __m128i __v;
- } __attribute__((__packed__, __may_alias__));
- return ((struct __loadu_si128*)__p)->__v;
-}
-
-/// \brief Initializes all values in a 128-bit vector of [8 x i16] with the
-/// specified 16-bit value.
-///
-/// \headerfile <x86intrin.h>
-///
-/// This intrinsic is a utility function and does not correspond to a specific
-/// instruction.
-///
-/// \param __w
-/// A 16-bit value used to initialize the elements of the destination integer
-/// vector.
-/// \returns An initialized 128-bit vector of [8 x i16] with all elements
-/// containing the value provided in the operand.
-static __inline__ __m128i __DEFAULT_FN_ATTRS
-_mm_set1_epi16(short __w)
-{
- return (__m128i)(__v8hi){ __w, __w, __w, __w, __w, __w, __w, __w };
-}
-
-static __inline__ int __DEFAULT_FN_ATTRS
-_mm_movemask_epi8(__m128i __a)
-{
- return __builtin_ia32_pmovmskb128((__v16qi)__a);
-}
-
-#undef __DEFAULT_FN_ATTRS
-
-#endif /* __EMMINTRIN_H */
-#endif // __GNUC__
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: fcntl.h
-//
-// ===========================================================================
-// dummy fcntl.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: float.h
-//
-// ===========================================================================
-// dummy float.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: io.h
-//
-// ===========================================================================
-// dummy io.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: limits.h
-//
-// ===========================================================================
-// dummy limits.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: malloc.h
-//
-// ===========================================================================
-// dummy malloc.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: math.h
-//
-// ===========================================================================
-// dummy math.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: memory.h
-//
-// ===========================================================================
-// dummy memory.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: stdarg.h
-//
-// ===========================================================================
-// dummy stdarg.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: stddef.h
-//
-// ===========================================================================
-// dummy stddef.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: stdio.h
-//
-// ===========================================================================
-// dummy stdio.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: stdlib.h
-//
-// ===========================================================================
-// dummy stdlib.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: string.h
-//
-// ===========================================================================
-// dummy string.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: time.h
-//
-// ===========================================================================
-// dummy time.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: wchar.h
-//
-// ===========================================================================
-// dummy wchar.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-// From llvm-3.9/clang-3.9.1 xmmintrin.h:
-
-/*===---- xmmintrin.h - SSE intrinsics -------------------------------------===
-*
-* Permission is hereby granted, free of charge, to any person obtaining a copy
-* of this software and associated documentation files (the "Software"), to deal
-* in the Software without restriction, including without limitation the rights
-* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-* copies of the Software, and to permit persons to whom the Software is
-* furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice shall be included in
-* all copies or substantial portions of the Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-* THE SOFTWARE.
-*
-*===-----------------------------------------------------------------------===
-*/
-
-#ifdef __GNUC__
-
-typedef float __m128 __attribute__((__vector_size__(16)));
-
-/* Define the default attributes for the functions in this file. */
-#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, NODEBUG_ATTRIBUTE))
-
-/// \brief Loads a 128-bit floating-point vector of [4 x float] from an aligned
-/// memory location.
-///
-/// \headerfile <x86intrin.h>
-///
-/// This intrinsic corresponds to the \c VMOVAPS / MOVAPS instruction.
-///
-/// \param __p
-/// A pointer to a 128-bit memory location. The address of the memory
-/// location has to be 128-bit aligned.
-/// \returns A 128-bit vector of [4 x float] containing the loaded valus.
-static __inline__ __m128 __DEFAULT_FN_ATTRS
-_mm_load_ps(const float *__p)
-{
- return *(__m128*)__p;
-}
-
-/// \brief Loads a 128-bit floating-point vector of [4 x float] from an
-/// unaligned memory location.
-///
-/// \headerfile <x86intrin.h>
-///
-/// This intrinsic corresponds to the \c VMOVUPS / MOVUPS instruction.
-///
-/// \param __p
-/// A pointer to a 128-bit memory location. The address of the memory
-/// location does not have to be aligned.
-/// \returns A 128-bit vector of [4 x float] containing the loaded values.
-static __inline__ __m128 __DEFAULT_FN_ATTRS
-_mm_loadu_ps(const float *__p)
-{
- struct __loadu_ps
- {
- __m128 __v;
- } __attribute__((__packed__, __may_alias__));
- return ((struct __loadu_ps*)__p)->__v;
-}
-
-/// \brief Stores float values from a 128-bit vector of [4 x float] to an
-/// unaligned memory location.
-///
-/// \headerfile <x86intrin.h>
-///
-/// This intrinsic corresponds to the \c VMOVUPS / MOVUPS instruction.
-///
-/// \param __p
-/// A pointer to a 128-bit memory location. The address of the memory
-/// location does not have to be aligned.
-/// \param __a
-/// A 128-bit vector of [4 x float] containing the values to be stored.
-static __inline__ void __DEFAULT_FN_ATTRS
-_mm_storeu_ps(float *__p, __m128 __a)
-{
- struct __storeu_ps
- {
- __m128 __v;
- } __attribute__((__packed__, __may_alias__));
- ((struct __storeu_ps*)__p)->__v = __a;
-}
-
-/// \brief Stores the lower 32 bits of a 128-bit vector of [4 x float] into
-/// four contiguous elements in an aligned memory location.
-///
-/// \headerfile <x86intrin.h>
-///
-/// This intrinsic corresponds to \c VMOVAPS / MOVAPS + \c shuffling
-/// instruction.
-///
-/// \param __p
-/// A pointer to a 128-bit memory location.
-/// \param __a
-/// A 128-bit vector of [4 x float] whose lower 32 bits are stored to each
-/// of the four contiguous elements pointed by __p.
-static __inline__ void __DEFAULT_FN_ATTRS
-_mm_store_ps(float *__p, __m128 __a)
-{
- *(__m128*)__p = __a;
-}
-
-#undef __DEFAULT_FN_ATTRS
-
-#endif // __GNUC__
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++ BUILD Version: 0000 Increment this if a change has global effects
-
-
-
-Module Name:
-
- dbghelp.h
-
-Abstract:
-
- This module defines the prototypes and constants required for the image
- help routines.
-
- Contains debugging support routines that are redistributable.
-
-Revision History:
-
---*/
-
-#ifndef _DBGHELP_
-#define _DBGHELP_
-
-#if _MSC_VER > 1020
-#pragma once
-#endif
-
-//
-// options that are set/returned by SymSetOptions() & SymGetOptions()
-// these are used as a mask
-//
-#define SYMOPT_LOAD_LINES 0x00000010
-
-#endif // _DBGHELP_
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: htmlhelp.h
-//
-// ===========================================================================
-// dummy htmlhelp.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/******************************************************************
-* *
-* intsafe.h -- This module defines helper functions to prevent *
-* integer overflow issues. *
-* *
-* *
-******************************************************************/
-#ifndef _INTSAFE_H_INCLUDED_
-#define _INTSAFE_H_INCLUDED_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif
-
-#include <specstrings.h> // for IN, etc.
-
-#define INTSAFE_E_ARITHMETIC_OVERFLOW ((HRESULT)0x80070216L) // 0x216 = 534 = ERROR_ARITHMETIC_OVERFLOW
-
-#ifndef LOWORD
-#define LOWORD(l) ((WORD)(((DWORD_PTR)(l)) & 0xffff))
-#endif
-
-#ifndef HIWORD
-#define HIWORD(l) ((WORD)(((DWORD_PTR)(l)) >> 16))
-#endif
-
-#define HIDWORD(_qw) ((ULONG)((_qw) >> 32))
-#define LODWORD(_qw) ((ULONG)(_qw))
-
-#if defined(MIDL_PASS) || defined(RC_INVOKED) || defined(_M_CEE_PURE) \
- || defined(_M_AMD64) || defined(__ARM_ARCH) || defined(_M_S390X) || defined(_M_RISCV64) || defined(_M_LOONGARCH64)
-
-#ifndef UInt32x32To64
-#define UInt32x32To64(a, b) ((unsigned __int64)((ULONG)(a)) * (unsigned __int64)((ULONG)(b)))
-#endif
-
-#elif defined(_M_IX86)
-
-#ifndef UInt32x32To64
-#define UInt32x32To64(a, b) (unsigned __int64)((unsigned __int64)(ULONG)(a) * (ULONG)(b))
-#endif
-
-#else
-
-#error Must define a target architecture.
-
-#endif
-
-#define DWORD_MAX 0xffffffffUL
-
-//
-// It is common for -1 to be used as an error value for various types
-//
-#define USHORT_ERROR (0xffff)
-#define INT_ERROR (-1)
-#define LONG_ERROR (-1L)
-#define UINT_ERROR (0xffffffff)
-#define ULONG_ERROR (0xffffffffUL)
-#ifdef _MSC_VER
-#define ULONGLONG_ERROR (0xffffffffffffffffui64)
-#define HIDWORD_MASK (0xffffffff00000000ui64)
-#else // _MSC_VER
-#define ULONGLONG_ERROR (0xffffffffffffffffULL)
-#define HIDWORD_MASK (0xffffffff00000000ULL)
-#endif // _MSC_VER
-#ifdef HOST_64BIT
-#define SIZET_ERROR ULONGLONG_ERROR
-#else
-#define SIZET_ERROR ULONG_ERROR
-#endif
-
-//
-// We make some assumptions about the sizes of various types. Let's be
-// explicit about those assumptions and check them.
-//
-C_ASSERT(sizeof(unsigned short) == 2);
-C_ASSERT(sizeof(unsigned int) == 4);
-C_ASSERT(sizeof(ULONG) == 4);
-
-//
-// INT -> signed char conversion
-//
-__inline
-HRESULT
-IntToSignedChar(
- IN INT iOperand,
- OUT signed char* pch)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pch = 0;
-
- if ((iOperand >= -128) && (iOperand <= 127))
- {
- *pch = (signed char)iOperand;
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// INT -> UCHAR conversion
-//
-__inline
-HRESULT
-IntToUChar(
- IN INT iOperand,
- OUT UCHAR* pch)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pch = 0;
-
- if ((iOperand >= 0) && (iOperand <= 255))
- {
- *pch = (UCHAR)iOperand;
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// LONG -> UCHAR conversion
-//
-__inline
-HRESULT
-LongToUChar(
- IN LONG lOperand,
- OUT UCHAR* pch)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pch = 0;
-
- if ((lOperand >= 0) && (lOperand <= 255))
- {
- *pch = (UCHAR)lOperand;
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// __inline is not sufficient. __forceinline is necessary.
-// If the function is not inlined and you link .objs compiled with different compiler switches,
-// you get one or the other function arbitrarily chosen.
-//
-// INT -> CHAR conversion
-//
-__forceinline
-HRESULT
-IntToChar(
- IN INT iOperand,
- OUT CHAR* pch)
-{
-#ifdef _CHAR_UNSIGNED
- return IntToUChar(iOperand, (UCHAR*)pch);
-#else
- return IntToSignedChar(iOperand, (signed char*)pch);
-#endif
-}
-
-//
-// INT -> USHORT conversion
-//
-__inline
-HRESULT
-IntToUShort(
- IN INT iOperand,
- OUT USHORT* pusResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pusResult = USHORT_ERROR;
-
- if ((iOperand >= 0) && (iOperand <= USHRT_MAX))
- {
- *pusResult = (USHORT)iOperand;
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// INT -> UINT conversion
-//
-__inline
-HRESULT
-IntToUInt(
- IN INT iOperand,
- OUT UINT* puResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *puResult = UINT_ERROR;
-
- if (iOperand >= 0)
- {
- *puResult = (UINT)iOperand;
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// INT -> ULONG conversion
-//
-__inline
-HRESULT
-IntToULong(
- IN INT iOperand,
- OUT ULONG* pulResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pulResult = ULONG_ERROR;
-
- if (iOperand >= 0)
- {
- *pulResult = (ULONG)iOperand;
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// INT -> ULONGLONG conversion
-//
-__inline
-HRESULT
-IntToULongLong(
- IN INT iOperand,
- OUT ULONGLONG* pullResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pullResult = ULONG_ERROR;
-
- if (iOperand >= 0)
- {
- *pullResult = (ULONGLONG)iOperand;
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// UINT -> signed char conversion
-//
-__inline
-HRESULT
-UIntToSignedChar(
- IN UINT uOperand,
- OUT signed char* pch)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pch = 0;
-
- if (uOperand <= 127)
- {
- *pch = (signed char)uOperand;
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// UINT -> UCHAR conversion
-//
-__inline
-HRESULT
-UIntToUChar(
- IN UINT uOperand,
- OUT UCHAR* pch)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pch = 0;
-
- if (uOperand <= 255)
- {
- *pch = (UCHAR)uOperand;
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// UINT -> BYTE conversion
-//
-#define UIntToByte UIntToUChar
-
-//
-// __inline is not sufficient. __forceinline is necessary.
-// If the function is not inlined and you link .objs compiled with different compiler switches,
-// you get one or the other function arbitrarily chosen.
-//
-// UINT -> CHAR conversion
-//
-__forceinline
-HRESULT
-UIntToChar(
- IN UINT uOperand,
- OUT CHAR* pch)
-{
-#ifdef _CHAR_UNSIGNED
- return UIntToUChar(uOperand, (UCHAR*)pch);
-#else
- return UIntToSignedChar(uOperand, (signed char*)pch);
-#endif // _CHAR_UNSIGNED
-}
-
-//
-// UINT -> INT conversion
-//
-__inline
-HRESULT
-UIntToInt(
- IN UINT uOperand,
- OUT INT* piResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *piResult = INT_ERROR;
-
- if (uOperand <= INT_MAX)
- {
- *piResult = (INT)uOperand;
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// UINT -> LONG conversion
-//
-__inline
-HRESULT
-UIntToLong(
- IN UINT Operand,
- OUT LONG* Result)
-{
- if (Operand <= _I32_MAX)
- {
- *Result = (LONG)Operand;
- return S_OK;
- }
- else
- {
- *Result = LONG_ERROR;
- return INTSAFE_E_ARITHMETIC_OVERFLOW;
- }
-}
-
-//
-// UINT -> ULONG conversion
-//
-__inline
-HRESULT
-UIntToULong(
- IN UINT uOperand,
- OUT ULONG* pulResult)
-{
- *pulResult = (ULONG)uOperand;
-
- return S_OK;
-}
-
-//
-// ULONG -> UCHAR conversion
-//
-__inline
-HRESULT
-ULongToSignedChar(
- IN ULONG ulOperand,
- OUT signed char* pch)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pch = 0;
-
- if (ulOperand <= 127)
- {
- *pch = (signed char)ulOperand;
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// ULONG -> UCHAR conversion
-//
-__inline
-HRESULT
-ULongToUChar(
- IN ULONG ulOperand,
- OUT unsigned char* pch)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pch = 0;
-
- if (ulOperand <= 255)
- {
- *pch = (unsigned char)ulOperand;
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// __inline is not sufficient. __forceinline is necessary.
-// If the function is not inlined and you link .objs compiled with different compiler switches,
-// you get one or the other function arbitrarily chosen.
-//
-// ULONG -> CHAR conversion
-//
-__forceinline
-HRESULT
-ULongToChar(
- IN ULONG ulOperand,
- OUT CHAR* pch)
-{
-#ifdef _CHAR_UNSIGNED
- return ULongToUChar(ulOperand, (unsigned char*)pch);
-#else
- return ULongToSignedChar(ulOperand, (signed char*)pch);
-#endif // _CHAR_UNSIGNED
-}
-
-//
-// ULONG -> USHORT conversion
-//
-__inline
-HRESULT
-ULongToUShort(
- IN ULONG ulOperand,
- OUT USHORT* pusResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pusResult = USHORT_ERROR;
-
- if (ulOperand <= USHRT_MAX)
- {
- *pusResult = (USHORT)ulOperand;
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// ULONG -> INT conversion
-//
-__inline
-HRESULT
-ULongToInt(
- IN ULONG ulOperand,
- OUT INT* piResult)
-{
- if (ulOperand <= INT_MAX)
- {
- *piResult = (INT)ulOperand;
- return S_OK;
- }
- else
- {
- *piResult = INT_ERROR;
- return INTSAFE_E_ARITHMETIC_OVERFLOW;
- }
-}
-
-//
-// ULONG -> UINT conversion
-//
-__inline
-HRESULT
-ULongToUInt(
- IN ULONG ulOperand,
- OUT UINT* puResult)
-{
- *puResult = (UINT)ulOperand;
-
- return S_OK;
-}
-
-//
-// ULONG -> LONG conversion
-//
-__inline
-HRESULT
-ULongToLong(
- IN ULONG Operand,
- OUT LONG* Result)
-{
- if (Operand <= _I32_MAX)
- {
- *Result = (LONG)Operand;
- return S_OK;
- }
- else
- {
- *Result = LONG_ERROR;
- return INTSAFE_E_ARITHMETIC_OVERFLOW;
- }
-}
-
-//
-// ULONGLONG -> INT conversion
-//
-__inline
-HRESULT
-ULongLongToInt(
- IN ULONGLONG ullOperand,
- OUT INT* piResult)
-{
- if (ullOperand <= INT_MAX)
- {
- *piResult = (INT)ullOperand;
- return S_OK;
- }
- else
- {
- *piResult = INT_ERROR;
- return INTSAFE_E_ARITHMETIC_OVERFLOW;
- }
-}
-
-//
-// ULONGLONG -> LONG conversion
-//
-__inline
-HRESULT
-ULongLongToLong(
- IN ULONGLONG Operand,
- OUT LONG* Result)
-{
- if (Operand <= _I32_MAX)
- {
- *Result = (LONG)Operand;
- return S_OK;
- }
- else
- {
- *Result = LONG_ERROR;
- return INTSAFE_E_ARITHMETIC_OVERFLOW;
- }
-}
-
-//
-// UINT -> USHORT conversion
-//
-__inline
-HRESULT
-UIntToUShort(
- IN UINT uOperand,
- OUT USHORT* pusResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pusResult = USHORT_ERROR;
-
- if (uOperand <= USHRT_MAX)
- {
- *pusResult = (USHORT)uOperand;
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// ULONGLONG -> USHORT conversion
-//
-__inline
-HRESULT
-ULongLongToUShort(
- IN ULONGLONG ullOperand,
- OUT USHORT* pusResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- USHORT usResult = USHORT_ERROR;
-
- if (ullOperand <= USHRT_MAX)
- {
- usResult = (USHORT)ullOperand;
- hr = S_OK;
- }
- *pusResult = usResult;
-
- return hr;
-}
-
-//
-// ULONGLONG -> ULONG conversion
-//
-__inline
-HRESULT
-ULongLongToULong(
- IN ULONGLONG ullOperand,
- OUT ULONG* pulResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pulResult = ULONG_ERROR;
-
- if (ullOperand <= _UI32_MAX)
- {
- *pulResult = (ULONG)ullOperand;
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// UINT_PTR -> ULONG conversion
-// ULONG_PTR -> ULONG conversion
-//
-#ifdef HOST_64BIT
-
-#define UIntPtrToULong ULongLongToULong
-#define ULongPtrToULong ULongLongToULong
-
-#else
-
-__inline
-HRESULT
-UIntPtrToULong(
- IN UINT_PTR Operand,
- OUT ULONG* pResult)
-{
- *pResult = (ULONG)Operand;
- return S_OK;
-}
-
-__inline
-HRESULT
-ULongPtrToULong(
- IN ULONG_PTR Operand,
- OUT ULONG* pResult)
-{
- *pResult = (ULONG)Operand;
- return S_OK;
-}
-
-#endif
-
-//
-// ULONGLONG -> UINT conversion
-//
-__inline
-HRESULT
-ULongLongToUInt(
- IN ULONGLONG ullOperand,
- OUT UINT* puResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *puResult = UINT_ERROR;
-
- if (ullOperand <= UINT_MAX)
- {
- *puResult = (UINT)ullOperand;
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// UINT_PTR -> UINT conversion
-// ULONG_PTR -> UINT conversion
-//
-#ifdef HOST_64BIT
-
-#define UIntPtrToUInt ULongLongToUInt
-#define ULongPtrToUInt ULongLongToUInt
-
-#else
-
-__inline
-HRESULT
-UIntPtrToUInt(
- IN UINT_PTR Operand,
- OUT UINT* pResult)
-{
- *pResult = (UINT)Operand;
- return S_OK;
-}
-
-__inline
-HRESULT
-ULongPtrToUInt(
- IN ULONG_PTR Operand,
- OUT UINT* pResult)
-{
- *pResult = (UINT)Operand;
- return S_OK;
-}
-
-#endif
-
-//
-// * -> BYTE conversion (BYTE is always unsigned char)
-//
-#define IntToByte IntToUChar
-#define UIntToByte UIntToUChar
-#define LongToByte LongToUChar
-#define ULongToByte ULongToUChar
-
-//
-// * -> WORD conversion (WORD is always unsigned short)
-//
-#define IntToWord IntToUShort
-#define LongToWord LongToUShort
-#define LongLongToWord LongLongToUShort
-#define UIntToWord UIntToUShort
-#define ULongToWord ULongToUShort
-#define ULongLongToWord ULongLongToUShort
-#define UIntPtrToWord UIntPtrToUShort
-#define ULongPtrToWord ULongPtrToUShort
-#define SizeTToWord SizeTToUShort
-#define SIZETToWord SIZETToUShort
-
-//
-// WORD -> * conversion (WORD is always unsigned short)
-//
-#define WordToUChar UShortToUChar
-#define WordToByte UShortToByte
-#define WordToChar UShortToChar
-#define WordToSignedChar UShortToSignedChar
-#define WordToInt UShortToInt
-#define WordToLong UShortToLong
-#define WordToLongLong UShortToLongLong
-#define WordToIntPtr UShortToIntPtr
-#define WordToLongPtr UShortToLongPtr
-
-//
-// * -> DWORD conversion (DWORD is always ULONG)
-//
-#define CharToDWord CharToULong
-#define SignedCharToDWord SignedCharToULong
-#define ShortToDWord ShortToULong
-#define IntToDWord IntToULong
-#define LongToDWord LongToULong
-#define LongLongToDWord LongLongToULong
-#define UIntToDWord UIntToULong
-#define ULongLongToDWord ULongLongToULong
-#define IntPtrToDWord IntPtrToULong
-#define LongPtrToDWord LongPtrToULong
-#define UIntPtrToDWord UIntPtrToULong
-#define ULongPtrToDWord ULongPtrToULong
-#define SizeTToDWord SizeTToULong
-#define SIZETToDWord SIZETToULong
-
-//
-// DWORD -> * conversion (DWORD is always ULONG)
-//
-#define DWordToChar ULongToChar
-#define DWordToUChar ULongToUChar
-#define DWordToByte ULongToByte
-#define DWordToSignedChar ULongToSignedChar
-#define DWordToUShort ULongToUShort
-#define DWordToUInt ULongToUInt
-#define DWordToInt ULongToInt
-#define DWordToLong ULongToLong
-#define DWordToLongLong ULongToLongLong
-#define DWordToIntPtr ULongToIntPtr
-#define DWordToLongPtr ULongToLongPtr
-
-
-//
-// * -> UINT_PTR conversion (UINT_PTR is UINT on Win32, ULONGLONG on Win64)
-//
-#ifdef HOST_64BIT
-#define CharToUIntPtr CharToULongLong
-#define SignedCharToUIntPtr SignedCharToULongLong
-#define ShortToUIntPtr ShortToULongLong
-#define IntToUIntPtr IntToULongLong
-#define LongToUIntPtr LongToULongLong
-#define LongLongToUIntPtr LongLongToULongLong
-#define IntPtrToUIntPtr IntPtrToULongLong
-#define LongPtrToUIntPtr LongPtrToULongLong
-#else
-#define CharToUIntPtr CharToUInt
-#define SignedCharToUIntPtr SignedCharToUInt
-#define ShortToUIntPtr ShortToUInt
-
-__inline
-HRESULT
-IntToUIntPtr(
- IN INT iOperand,
- OUT UINT_PTR* puResult)
-{
- return IntToUInt(iOperand, (UINT*)puResult);
-}
-
-#define LongToUIntPtr LongToUInt
-#define LongLongToUIntPtr LongLongToUInt
-
-#define IntPtrToUIntPtr IntPtrToUInt
-#define LongPtrToUIntPtr LongPtrToUInt
-#endif
-
-__inline
-HRESULT
-ULongLongToUIntPtr(
- IN ULONGLONG ullOperand,
- OUT UINT_PTR* puResult)
-{
-#ifdef HOST_64BIT
- *puResult = ullOperand;
- return S_OK;
-#else
- return ULongLongToUInt(ullOperand, (UINT*)puResult);
-#endif
-}
-
-
-//
-// UINT_PTR -> * conversion (UINT_PTR is UINT on Win32, ULONGLONG on Win64)
-//
-#ifdef HOST_64BIT
-#define UIntPtrToUShort ULongLongToUShort
-#define UIntPtrToInt ULongLongToInt
-#define UIntPtrToLong ULongLongToLong
-#define UIntPtrToLongLong ULongLongToLongLong
-#define UIntPtrToIntPtr ULongLongToIntPtr
-#define UIntPtrToLongPtr ULongLongToLongPtr
-#else
-
-__inline
-HRESULT
-UIntPtrToUShort(
- IN UINT_PTR uOperand,
- OUT USHORT* pusResult)
-{
- return UIntToUShort((UINT)uOperand, pusResult);
-}
-
-__inline
-HRESULT
-UIntPtrToInt(
- IN UINT_PTR uOperand,
- OUT INT* piResult)
-{
- return UIntToInt((UINT)uOperand, piResult);
-}
-
-__inline
-HRESULT
-UIntPtrToLong(
- IN UINT_PTR Operand,
- OUT LONG* Result)
-{
- return UIntToLong((UINT)Operand, Result);
-}
-
-#define UIntPtrToLongLong UIntToLongLong
-#define UIntPtrToIntPtr UIntToIntPtr
-#define UIntPtrToLongPtr UIntToLongPtr
-#endif
-
-
-//
-// * -> ULONG_PTR conversion (ULONG_PTR is ULONG on Win32, ULONGLONG on Win64)
-//
-#ifdef HOST_64BIT
-#define CharToULongPtr CharToULongLong
-#define SignedCharToULongPtr SignedCharToULongLong
-#define ShortToULongPtr ShortToULongLong
-#define IntToULongPtr IntToULongLong
-#define LongToULongPtr LongToULongLong
-#define LongLongToULongPtr LongLongToULongLong
-#define IntPtrToULongPtr IntPtrToULongLong
-#define LongPtrToULongPtr LongPtrToULongLong
-#else
-#define CharToULongPtr CharToULong
-#define SignedCharToULongPtr SignedCharToULong
-#define ShortToULongPtr ShortToULong
-
-__inline
-HRESULT
-IntToULongPtr(
- IN INT iOperand,
- OUT ULONG_PTR* pulResult)
-{
- return IntToULong(iOperand, (ULONG*)pulResult);
-}
-
-#define LongToULongPtr LongToULong
-#define LongLongToULongPtr LongLongToULong
-
-#define IntPtrToULongPtr IntPtrToULong
-#define LongPtrToULongPtr LongPtrToULong
-#endif
-
-__inline
-HRESULT
-ULongLongToULongPtr(
- IN ULONGLONG ullOperand,
- OUT ULONG_PTR* pulResult)
-{
-#ifdef HOST_64BIT
- *pulResult = ullOperand;
- return S_OK;
-#else
- return ULongLongToULong(ullOperand, (ULONG*)pulResult);
-#endif
-}
-
-
-//
-// ULONG_PTR -> * conversion (ULONG_PTR is ULONG on Win32, ULONGLONG on Win64)
-//
-#ifdef HOST_64BIT
-#define ULongPtrToUShort ULongLongToUShort
-#define ULongPtrToInt ULongLongToInt
-#define ULongPtrToLong ULongLongToLong
-#define ULongPtrToLongLong ULongLongToLongLong
-#define ULongPtrToIntPtr ULongLongToIntPtr
-#define ULongPtrToLongPtr ULongLongToLongPtr
-#else
-
-__inline
-HRESULT
-ULongPtrToUShort(
- IN ULONG_PTR ulOperand,
- OUT USHORT* pusResult)
-{
- return ULongToUShort((ULONG)ulOperand, pusResult);
-}
-
-__inline
-HRESULT
-ULongPtrToInt(
- IN ULONG_PTR ulOperand,
- OUT INT* piResult)
-{
- return ULongToInt((ULONG)ulOperand, piResult);
-}
-
-__inline
-HRESULT
-ULongPtrToLong(
- IN ULONG_PTR Operand,
- OUT LONG* Result)
-{
- return ULongToLong((ULONG)Operand, Result);
-}
-
-#define ULongPtrToLongLong ULongToLongLong
-#define ULongPtrToIntPtr ULongToIntPtr
-#define ULongPtrToLongPtr ULongToLongPtr
-#endif
-
-//
-// * -> size_t conversion (size_t is always UINT_PTR)
-//
-#define CharToSizeT CharToUIntPtr
-#define SignedCharToSizeT SignedCharToUIntPtr
-#define ShortToSizeT ShortToUIntPtr
-#define IntToSizeT IntToUIntPtr
-#define LongToSizeT LongToUIntPtr
-#define LongLongToSizeT LongLongToUIntPtr
-#define ULongLongToSizeT ULongLongToUIntPtr
-#define IntPtrToSizeT IntPtrToUIntPtr
-#define LongPtrToSizeT LongPtrToUIntPtr
-
-//
-// size_t -> * conversion (size_t is always UINT_PTR)
-//
-#define SizeTToUShort UIntPtrToUShort
-#define SizeTToUInt UIntPtrToUInt
-#define SizeTToULong UIntPtrToULong
-#define SizeTToInt UIntPtrToInt
-#define SizeTToLong UIntPtrToLong
-#define SizeTToLongLong UIntPtrToLongLong
-#define SizeTToIntPtr UIntPtrToIntPtr
-#define SizeTToLongPtr UIntPtrToLongPtr
-
-//
-// * -> SIZE_T conversion (SIZE_T is always ULONG_PTR)
-//
-#define CharToSIZET CharToULongPtr
-#define SignedCharToSIZET SignedCharToULongPtr
-#define ShortToSIZET ShortToULongPtr
-#define IntToSIZET IntToULongPtr
-#define LongToSIZET LongToULongPtr
-#define LongLongToSIZET LongLongToULongPtr
-#define IntPtrToSIZET IntPtrToULongPtr
-#define LongPtrToSIZET LongPtrToULongPtr
-#define ULongLongToSIZET ULongLongToULongPtr
-
-//
-// SIZE_T -> * conversion (SIZE_T is always ULONG_PTR)
-//
-#define SIZETToUShort ULongPtrToUShort
-#define SIZETToUInt ULongPtrToUInt
-#define SIZETToULong ULongPtrToULong
-#define SIZETToUIntPtr ULongPtrToUIntPtr
-#define SIZETToULongPtr ULongPtrToULongPtr
-#define SIZETToInt ULongPtrToInt
-#define SIZETToLong ULongPtrToLong
-#define SIZETToLongLong ULongPtrToLongLong
-#define SIZETToIntPtr ULongPtrToIntPtr
-#define SIZETToLongPtr ULongPtrToLongPtr
-
-//
-// * -> DWORD_PTR conversion (DWORD_PTR is always ULONG_PTR)
-//
-#define CharToDWordPtr CharToULongPtr
-#define SignedCharToDWordPtr SignedCharToULongPtr
-#define ShortToDWordPtr ShortToULongPtr
-#define IntToDWordPtr IntToULongPtr
-#define LongToDWordPtr LongToULongPtr
-#define LongLongToDWordPtr LongLongToULongPtr
-#define ULongLongToDWordPtr ULongLongToULongPtr
-#define IntPtrToDWordPtr IntPtrToULongPtr
-#define LongPtrToDWordPtr LongPtrToULongPtr
-
-//
-// DWORD_PTR -> * conversion (DWORD_PTR is always ULONG_PTR)
-//
-#define DWordPtrToUShort ULongPtrToUShort
-#define DWordPtrToUInt ULongPtrToUInt
-#define DWordPtrToULong ULongPtrToULong
-#define DWordPtrToDWord ULongPtrToDWord
-#define DWordPtrToInt ULongPtrToInt
-#define DWordPtrToLong ULongPtrToLong
-#define DWordPtrToLongLong ULongPtrToLongLong
-#define DWordPtrToIntPtr ULongPtrToIntPtr
-#define DWordPtrToLongPtr ULongPtrToLongPtr
-
-//
-// USHORT addition
-//
-__inline
-HRESULT
-UShortAdd(
- IN USHORT usAugend,
- IN USHORT usAddend,
- OUT USHORT* pusResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pusResult = USHORT_ERROR;
-
- if (((USHORT)(usAugend + usAddend)) >= usAugend)
- {
- *pusResult = (usAugend + usAddend);
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// WORD addtition
-//
-#define WordAdd UShortAdd
-
-//
-// UINT addition
-//
-__inline
-HRESULT
-UIntAdd(
- IN UINT uAugend,
- IN UINT uAddend,
- OUT UINT* puResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *puResult = UINT_ERROR;
-
- if ((uAugend + uAddend) >= uAugend)
- {
- *puResult = (uAugend + uAddend);
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// UINT_PTR addition
-//
-#define UIntPtrAdd SizeTAdd
-
-//
-// ULONG addition
-//
-__inline
-HRESULT
-ULongAdd(
- IN ULONG ulAugend,
- IN ULONG ulAddend,
- OUT ULONG* pulResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pulResult = ULONG_ERROR;
-
- if ((ulAugend + ulAddend) >= ulAugend)
- {
- *pulResult = (ulAugend + ulAddend);
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// ULONG_PTR addition
-//
-#ifdef HOST_64BIT
-#define ULongPtrAdd ULongLongAdd
-#else
-__inline
-HRESULT
-ULongPtrAdd(
- IN ULONG_PTR ulAugend,
- IN ULONG_PTR ulAddend,
- OUT ULONG_PTR* pulResult)
-{
- return ULongAdd((ULONG)ulAugend, (ULONG)ulAddend, (ULONG*)pulResult);
-}
-#endif // HOST_64BIT
-
-//
-// DWORD addition
-//
-#define DWordAdd ULongAdd
-
-//
-// DWORD_PTR addition
-//
-#define DWordPtrAdd ULongPtrAdd
-
-//
-// size_t addition
-//
-__inline
-HRESULT
-SizeTAdd(
- IN size_t Augend,
- IN size_t Addend,
- OUT size_t* pResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pResult = SIZET_ERROR;
-
- if ((Augend + Addend) >= Augend)
- {
- *pResult = (Augend + Addend);
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// SIZE_T addition
-//
-#define SIZETAdd ULongPtrAdd
-
-//
-// ULONGLONG addition
-//
-__inline
-HRESULT
-ULongLongAdd(
- IN ULONGLONG ullAugend,
- IN ULONGLONG ullAddend,
- OUT ULONGLONG* pullResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pullResult = ULONGLONG_ERROR;
-
- if ((ullAugend + ullAddend) >= ullAugend)
- {
- *pullResult = (ullAugend + ullAddend);
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// USHORT subtraction
-//
-__inline
-HRESULT
-UShortSub(
- IN USHORT usMinuend,
- IN USHORT usSubtrahend,
- OUT USHORT* pusResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pusResult = USHORT_ERROR;
-
- if (usMinuend >= usSubtrahend)
- {
- *pusResult = (usMinuend - usSubtrahend);
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// WORD subtraction
-//
-#define WordSub UShortSub
-
-
-//
-// UINT subtraction
-//
-__inline
-HRESULT
-UIntSub(
- IN UINT uMinuend,
- IN UINT uSubtrahend,
- OUT UINT* puResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *puResult = UINT_ERROR;
-
- if (uMinuend >= uSubtrahend)
- {
- *puResult = (uMinuend - uSubtrahend);
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// UINT_PTR subtraction
-//
-#define UIntPtrSub SizeTSub
-
-//
-// ULONG subtraction
-//
-__inline
-HRESULT
-ULongSub(
- IN ULONG ulMinuend,
- IN ULONG ulSubtrahend,
- OUT ULONG* pulResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pulResult = ULONG_ERROR;
-
- if (ulMinuend >= ulSubtrahend)
- {
- *pulResult = (ulMinuend - ulSubtrahend);
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// ULONG_PTR subtraction
-//
-#ifdef HOST_64BIT
-#define ULongPtrSub ULongLongSub
-#else
-__inline
-HRESULT
-ULongPtrSub(
- IN ULONG_PTR ulMinuend,
- IN ULONG_PTR ulSubtrahend,
- OUT ULONG_PTR* pulResult)
-{
- return ULongSub((ULONG)ulMinuend, (ULONG)ulSubtrahend, (ULONG*)pulResult);
-}
-#endif // HOST_64BIT
-
-
-//
-// DWORD subtraction
-//
-#define DWordSub ULongSub
-
-//
-// DWORD_PTR subtraction
-//
-#define DWordPtrSub ULongPtrSub
-
-//
-// size_t subtraction
-//
-__inline
-HRESULT
-SizeTSub(
- IN size_t Minuend,
- IN size_t Subtrahend,
- OUT size_t* pResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pResult = SIZET_ERROR;
-
- if (Minuend >= Subtrahend)
- {
- *pResult = (Minuend - Subtrahend);
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// SIZE_T subtraction
-//
-#define SIZETSub ULongPtrSub
-
-//
-// ULONGLONG subtraction
-//
-__inline
-HRESULT
-ULongLongSub(
- IN ULONGLONG ullMinuend,
- IN ULONGLONG ullSubtrahend,
- OUT ULONGLONG* pullResult)
-{
- HRESULT hr = INTSAFE_E_ARITHMETIC_OVERFLOW;
- *pullResult = ULONGLONG_ERROR;
-
- if (ullMinuend >= ullSubtrahend)
- {
- *pullResult = (ullMinuend - ullSubtrahend);
- hr = S_OK;
- }
-
- return hr;
-}
-
-//
-// USHORT multiplication
-//
-__inline
-HRESULT
-UShortMult(
- IN USHORT usMultiplicand,
- IN USHORT usMultiplier,
- OUT USHORT* pusResult)
-{
- ULONG ulResult = ((ULONG)usMultiplicand) * (ULONG)usMultiplier;
-
- return ULongToUShort(ulResult, pusResult);
-}
-
-//
-// WORD multiplication
-//
-#define WordMult UShortMult
-
-//
-// UINT multiplication
-//
-__inline
-HRESULT
-UIntMult(
- IN UINT uMultiplicand,
- IN UINT uMultiplier,
- OUT UINT* puResult)
-{
- ULONGLONG ull64Result = UInt32x32To64(uMultiplicand, uMultiplier);
-
- return ULongLongToUInt(ull64Result, puResult);
-}
-
-//
-// ULONG multiplication
-//
-__inline
-HRESULT
-ULongMult(
- IN ULONG ulMultiplicand,
- IN ULONG ulMultiplier,
- OUT ULONG* pulResult)
-{
- ULONGLONG ull64Result = UInt32x32To64(ulMultiplicand, ulMultiplier);
-
- return ULongLongToULong(ull64Result, pulResult);
-}
-
-//
-// DWORD multiplication
-//
-#define DWordMult ULongMult
-
-//
-// DWORD_PTR multiplication
-//
-#define DWordPtrMult ULongPtrMult
-
-#endif // _INTSAFE_H_INCLUDED_
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: new.h
-//
-// ===========================================================================
-// dummy new.h for PAL
-
-#include "palrt.h"
#define IMAGE_FIRST_SECTION( ntheader ) ((PIMAGE_SECTION_HEADER) \
((ULONG_PTR)ntheader + \
- FIELD_OFFSET( IMAGE_NT_HEADERS, OptionalHeader ) + \
+ offsetof( IMAGE_NT_HEADERS, OptionalHeader ) + \
VAL16(((PIMAGE_NT_HEADERS)(ntheader))->FileHeader.SizeOfOptionalHeader) \
))
#define IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT 13 // Delay Load Import Descriptors
#define IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR 14 // COM Runtime descriptor
-#ifdef _MSC_VER
-//
-// Non-COFF Object file header
-//
-
-typedef struct ANON_OBJECT_HEADER {
- USHORT Sig1; // Must be IMAGE_FILE_MACHINE_UNKNOWN
- USHORT Sig2; // Must be 0xffff
- USHORT Version; // >= 1 (implies the CLSID field is present)
- USHORT Machine;
- ULONG TimeDateStamp;
- CLSID ClassID; // Used to invoke CoCreateInstance
- ULONG SizeOfData; // Size of data that follows the header
-} ANON_OBJECT_HEADER;
-#endif
-
//
// Section header format.
//
// RISCV64 relocation types
//
#define IMAGE_REL_RISCV64_PC 0x0003
-#define IMAGE_REL_RISCV64_JALR 0x0004
//
// CEF relocation types.
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: oaidl.h
-//
-// ===========================================================================
-
-#ifndef __OAIDL_H__
-#define __OAIDL_H__
-
-#include "rpc.h"
-#include "rpcndr.h"
-
-#include "unknwn.h"
-
-typedef struct tagEXCEPINFO {
- WORD wCode;
- WORD wReserved;
- BSTR bstrSource;
- BSTR bstrDescription;
- BSTR bstrHelpFile;
- DWORD dwHelpContext;
- PVOID pvReserved;
- HRESULT (__stdcall *pfnDeferredFillIn)(struct tagEXCEPINFO *);
- SCODE scode;
-} EXCEPINFO, * LPEXCEPINFO;
-
-typedef interface IErrorInfo IErrorInfo;
-typedef /* [unique] */ IErrorInfo *LPERRORINFO;
-
-EXTERN_C const IID IID_IErrorInfo;
-
- interface
- IErrorInfo : public IUnknown
- {
- public:
- virtual HRESULT STDMETHODCALLTYPE GetGUID(
- /* [out] */ GUID *pGUID) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE GetSource(
- /* [out] */ BSTR *pBstrSource) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE GetDescription(
- /* [out] */ BSTR *pBstrDescription) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE GetHelpFile(
- /* [out] */ BSTR *pBstrHelpFile) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE GetHelpContext(
- /* [out] */ DWORD *pdwHelpContext) = 0;
-
- };
-
-typedef interface ICreateErrorInfo ICreateErrorInfo;
-
-EXTERN_C const IID IID_ICreateErrorInfo;
-
-typedef /* [unique] */ ICreateErrorInfo *LPCREATEERRORINFO;
-
- interface
- ICreateErrorInfo : public IUnknown
- {
- public:
- virtual HRESULT STDMETHODCALLTYPE SetGUID(
- /* [in] */ REFGUID rguid) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE SetSource(
- /* [in] */ LPOLESTR szSource) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE SetDescription(
- /* [in] */ LPOLESTR szDescription) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE SetHelpFile(
- /* [in] */ LPOLESTR szHelpFile) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE SetHelpContext(
- /* [in] */ DWORD dwHelpContext) = 0;
-
- };
-
-STDAPI
-SetErrorInfo(ULONG dwReserved, IErrorInfo FAR* perrinfo);
-
-STDAPI
-GetErrorInfo(ULONG dwReserved, IErrorInfo FAR* FAR* pperrinfo);
-
-STDAPI
-CreateErrorInfo(ICreateErrorInfo FAR* FAR* pperrinfo);
-
-
-typedef interface ISupportErrorInfo ISupportErrorInfo;
-
-typedef /* [unique] */ ISupportErrorInfo *LPSUPPORTERRORINFO;
-
-EXTERN_C const IID IID_ISupportErrorInfo;
-
-
- interface
- ISupportErrorInfo : public IUnknown
- {
- public:
- virtual HRESULT STDMETHODCALLTYPE InterfaceSupportsErrorInfo(
- /* [in] */ REFIID riid) = 0;
-
- };
-
-#endif //__OAIDL_H__
#include "objidl.h"
#include "servprov.h"
-#include "oaidl.h"
#ifndef _OLEAUTO_H_
#define _OLEAUTO_H_
-#include "oaidl.h"
#ifndef BEGIN_INTERFACE
#define BEGIN_INTERFACE
#include "pal.h"
-#ifndef PAL_STDCPP_COMPAT
-#ifdef __cplusplus
-#ifndef __PLACEMENT_NEW_INLINE
-#define __PLACEMENT_NEW_INLINE
-inline void *__cdecl operator new(size_t, void *_P)
-{
- return (_P);
-}
-#endif // __PLACEMENT_NEW_INLINE
-#endif // __cplusplus
-#endif // !PAL_STDCPP_COMPAT
-
#include <pal_assert.h>
#define NTAPI __cdecl
#define _WINNT_
-// C++ standard, 18.1.5 - offsetof requires a POD (plain old data) struct or
-// union. Since offsetof is a macro, gcc doesn't actually check for improper
-// use of offsetof, it keys off of the -> from NULL (which is also invalid for
-// non-POD types by 18.1.5)
-//
-// As we have numerous examples of this behavior in our codebase,
-// making an offsetof which doesn't use 0.
-
-// PAL_safe_offsetof is a version of offsetof that protects against an
-// overridden operator&
-
-#define FIELD_OFFSET(type, field) __builtin_offsetof(type, field)
#ifndef offsetof
#define offsetof(type, field) __builtin_offsetof(type, field)
#endif
-#define PAL_safe_offsetof(type, field) __builtin_offsetof(type, field)
#define CONTAINING_RECORD(address, type, field) \
- ((type *)((LONG_PTR)(address) - FIELD_OFFSET(type, field)))
+ ((type *)((LONG_PTR)(address) - offsetof(type, field)))
#define ARGUMENT_PRESENT(ArgumentPointer) (\
(CHAR *)(ArgumentPointer) != (CHAR *)(NULL) )
DWORD HighPart;
#endif
}
-#ifndef PAL_STDCPP_COMPAT
u
-#endif // PAL_STDCPP_COMPAT
;
ULONGLONG QuadPart;
} ULARGE_INTEGER, *PULARGE_INTEGER;
#define STGM_NOSNAPSHOT 0x00200000L
-STDAPI IIDFromString(LPOLESTR lpsz, IID* lpiid);
-STDAPI_(int) StringFromGUID2(REFGUID rguid, LPOLESTR lpsz, int cchMax);
-
/******************* CRYPT **************************************/
#define PUBLICKEYBLOB 0x6
// 1 null termination
#define LOCALE_NAME_MAX_LENGTH 85
-#define CSTR_LESS_THAN 1
-#define CSTR_EQUAL 2
-#define CSTR_GREATER_THAN 3
-
-/******************* shlwapi ************************************/
-
-// note: diff in NULL handing and calling convetion
-#define StrCpyW PAL_wcscpy
-#define StrCatW PAL_wcscat
-#define StrChrW (WCHAR*)PAL_wcschr
-#define StrCmpW PAL_wcscmp
-#define StrCmpIW _wcsicmp
-#define StrCmpNW PAL_wcsncmp
-#define StrCmpNIW _wcsnicmp
-
-STDAPI_(LPWSTR) StrNCatW(LPWSTR lpFront, LPCWSTR lpBack, int cchMax);
-STDAPI_(int) StrToIntW(LPCWSTR lpSrc);
-STDAPI_(LPWSTR) StrStrIW(LPCWSTR lpFirst, LPCWSTR lpSrch);
-STDAPI_(LPWSTR) StrRChrW(LPCWSTR lpStart, LPCWSTR lpEnd, WCHAR wMatch);
-STDAPI_(LPWSTR) StrCatBuffW(LPWSTR pszDest, LPCWSTR pszSrc, int cchDestBuffSize);
-
-#define lstrcmpW PAL_wcscmp
-#define lstrcmpiW _wcsicmp
-
-#ifdef UNICODE
-#define StrCpy StrCpyW
-#define StrCat StrCatW
-#define StrNCat StrNCatW
-#define StrChr StrChrW
-#define StrCmp StrCmpW
-#define StrCmpN StrCmpNW
-#define StrCmpI StrCmpIW
-#define StrCmpNI StrCmpNIW
-
-#define StrToInt StrToIntW
-#define StrStrI StrStrIW
-#define StrRChr StrRChrW
-#define StrCatBuff StrCatBuffW
-
-#define lstrcmp lstrcmpW
-#define lstrcmpi lstrcmpiW
-#endif
-
#ifdef __cplusplus
/*
/*
The wrappers below are simple implementations that may not be as robust as complete functions in the Secure CRT library.
-Remember to fix the errcode defintion in safecrt.h.
+Remember to fix the errcode definition in safecrt.h.
*/
-#define swscanf_s swscanf
-
#define _wfopen_s _wfopen_unsafe
#define fopen_s _fopen_unsafe
}
}
-inline errno_t __cdecl _wfopen_unsafe(PAL_FILE * *ff, const WCHAR *fileName, const WCHAR *mode)
+inline errno_t __cdecl _wfopen_unsafe(FILE * *ff, const WCHAR *fileName, const WCHAR *mode)
{
- PAL_FILE *result = _wfopen(fileName, mode);
+ FILE *result = _wfopen(fileName, mode);
if(result == 0) {
return 1;
} else {
}
}
-inline errno_t __cdecl _fopen_unsafe(PAL_FILE * *ff, const char *fileName, const char *mode)
+inline errno_t __cdecl _fopen_unsafe(FILE * *ff, const char *fileName, const char *mode)
{
- PAL_FILE *result = PAL_fopen(fileName, mode);
+ FILE *result = fopen(fileName, mode);
if(result == 0) {
return 1;
} else {
}
#endif /* __cplusplus */
-STDAPI_(BOOL) PathAppendW(LPWSTR pszPath, LPCWSTR pszMore);
-STDAPI_(int) PathCommonPrefixW(LPCWSTR pszFile1, LPCWSTR pszFile2, LPWSTR pszPath);
-PALIMPORT LPWSTR PALAPI PathFindFileNameW(LPCWSTR pPath);
-STDAPI_(int) PathGetDriveNumberW(LPCWSTR lpsz);
-STDAPI_(BOOL) PathIsRelativeW(LPCWSTR lpszPath);
-STDAPI_(BOOL) PathIsUNCW(LPCWSTR pszPath);
-STDAPI_(LPWSTR) PathAddBackslashW(LPWSTR lpszPath);
-STDAPI_(LPWSTR) PathRemoveBackslashW(LPWSTR lpszPath);
-STDAPI_(void) PathRemoveExtensionW(LPWSTR pszPath);
-STDAPI_(LPWSTR) PathCombineW(LPWSTR lpszDest, LPCWSTR lpszDir, LPCWSTR lpszFile);
-STDAPI_(BOOL) PathCanonicalizeW(LPWSTR lpszDst, LPCWSTR lpszSrc);
-STDAPI_(BOOL) PathRelativePathToW(LPWSTR pszPath, LPCWSTR pszFrom, DWORD dwAttrFrom, LPCWSTR pszTo, DWORD dwAttrTo);
-STDAPI_(BOOL) PathRenameExtensionW(LPWSTR pszPath, LPCWSTR pszExt);
-STDAPI_(BOOL) PathRemoveFileSpecW(LPWSTR pFile);
-STDAPI_(void) PathStripPathW (LPWSTR pszPath);
-
-#ifdef UNICODE
-#define PathAppend PathAppendW
-#define PathCommonPrefix PathCommonPrefixW
-#define PathFindFileName PathFindFileNameW
-#define PathIsRelative PathIsRelativeW
-#define PathGetDriveNumber PathGetDriveNumberW
-#define PathIsUNC PathIsUNCW
-#define PathAddBackslash PathAddBackslashW
-#define PathRemoveBackslash PathRemoveBackslashW
-#define PathRemoveExtension PathRemoveExtensionW
-#define PathCombine PathCombineW
-#define PathSkipRoot PathSkipRootW
-#define PathFindExtension PathFindExtensionW
-#define PathCanonicalize PathCanonicalizeW
-#define PathRelativePathTo PathRelativePathToW
-#define PathRemoveFileSpec PathRemoveFileSpecW
-#define PathRenameExtension PathRenameExtensionW
-#define PathStripPath PathStripPathW
-
-
-#endif // UNICODE
-
/******************* misc ***************************************/
#ifdef __cplusplus
typedef DWORD OLE_COLOR;
-#define PF_COMPARE_EXCHANGE_DOUBLE 2
-
-typedef VOID (NTAPI * WAITORTIMERCALLBACKFUNC) (PVOID, BOOLEAN );
-
typedef HANDLE HWND;
-#define IS_TEXT_UNICODE_SIGNATURE 0x0008
-#define IS_TEXT_UNICODE_UNICODE_MASK 0x000F
-
typedef struct _LIST_ENTRY {
struct _LIST_ENTRY *Flink;
struct _LIST_ENTRY *Blink;
} LIST_ENTRY, *PLIST_ENTRY;
-typedef VOID (NTAPI *WAITORTIMERCALLBACK)(PVOID, BOOLEAN);
-
// PORTABILITY_ASSERT and PORTABILITY_WARNING macros are meant to be used to
// mark places in the code that needs attention for portability. The usual
// usage pattern is:
#define IMAGE_COR20_HEADER_FIELD(obj, f) ((obj).f)
#endif
-// copied from winnt.h
-#define PROCESSOR_ARCHITECTURE_INTEL 0
-#define PROCESSOR_ARCHITECTURE_MIPS 1
-#define PROCESSOR_ARCHITECTURE_ALPHA 2
-#define PROCESSOR_ARCHITECTURE_PPC 3
-#define PROCESSOR_ARCHITECTURE_SHX 4
-#define PROCESSOR_ARCHITECTURE_ARM 5
-#define PROCESSOR_ARCHITECTURE_IA64 6
-#define PROCESSOR_ARCHITECTURE_ALPHA64 7
-#define PROCESSOR_ARCHITECTURE_MSIL 8
-#define PROCESSOR_ARCHITECTURE_AMD64 9
-#define PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 10
-#define PROCESSOR_ARCHITECTURE_NEUTRAL 11
-#define PROCESSOR_ARCHITECTURE_ARM64 12
-
-#define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF
-
//
// JIT Debugging Info. This structure is defined to have constant size in
// both the emulated and native environment.
typedef struct _JIT_DEBUG_INFO {
DWORD dwSize;
- DWORD dwProcessorArchitecture;
DWORD dwThreadID;
DWORD dwReserved0;
ULONG64 lpExceptionAddress;
#define RT_RCDATA MAKEINTRESOURCE(10)
#define RT_VERSION MAKEINTRESOURCE(16)
-/******************* SAFEARRAY ************************/
-
-#define FADF_VARIANT ( 0x800 )
-
-typedef struct tagSAFEARRAYBOUND
- {
- ULONG cElements;
- LONG lLbound;
- } SAFEARRAYBOUND;
-
-typedef struct tagSAFEARRAYBOUND *LPSAFEARRAYBOUND;
-
-typedef struct tagSAFEARRAY
- {
- USHORT cDims;
- USHORT fFeatures;
- ULONG cbElements;
- ULONG cLocks;
- PVOID pvData;
- SAFEARRAYBOUND rgsabound[ 1 ];
- } SAFEARRAY;
-
-typedef SAFEARRAY *LPSAFEARRAY;
-
-
-STDAPI_(SAFEARRAY *) SafeArrayCreateVector(VARTYPE vt, LONG lLbound, ULONG cElements);
-STDAPI_(UINT) SafeArrayGetDim(SAFEARRAY * psa);
-STDAPI SafeArrayGetElement(SAFEARRAY * psa, LONG * rgIndices, void * pv);
-STDAPI SafeArrayGetLBound(SAFEARRAY * psa, UINT nDim, LONG * plLbound);
-STDAPI SafeArrayGetUBound(SAFEARRAY * psa, UINT nDim, LONG * plUbound);
-STDAPI SafeArrayGetVartype(SAFEARRAY * psa, VARTYPE * pvt);
-STDAPI SafeArrayPutElement(SAFEARRAY * psa, LONG * rgIndices, void * pv);
-STDAPI SafeArrayDestroy(SAFEARRAY * psa);
-
-EXTERN_C void * _stdcall _lfind(const void *, const void *, unsigned int *, unsigned int,
- int (__cdecl *)(const void *, const void *));
-
-
/*<TODO>****************** clean this up ***********************</TODO>*/
interface ITypeLib;
interface IMoniker;
-typedef VOID (WINAPI *LPOVERLAPPED_COMPLETION_ROUTINE)(
- DWORD dwErrorCode,
- DWORD dwNumberOfBytesTransfered,
- LPOVERLAPPED lpOverlapped);
-
//
// Debug APIs
//
DWORD Reserved;
} DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT;
+#elif defined(HOST_POWERPC64)
+
+typedef struct _DISPATCHER_CONTEXT {
+ // PPC64LE does not build the VM or JIT at this point,
+ // so we only provide a dummy definition.
+ DWORD Reserved;
+} DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT;
+
#else
#error Unknown architecture for defining DISPATCHER_CONTEXT.
#endif
-// #endif // !defined(TARGET_OSX)
-
typedef DISPATCHER_CONTEXT *PDISPATCHER_CONTEXT;
#define ExceptionContinueSearch EXCEPTION_CONTINUE_SEARCH
);
typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
-/******************* ntdef ************************************/
-
-#ifndef ANYSIZE_ARRAY
-#define ANYSIZE_ARRAY 1 // winnt
-#endif
-
-/******************* winnt ************************************/
-
-typedef struct LIST_ENTRY32 {
- ULONG Flink;
- ULONG Blink;
-} LIST_ENTRY32;
-typedef LIST_ENTRY32 *PLIST_ENTRY32;
-
-typedef struct LIST_ENTRY64 {
- ULONGLONG Flink;
- ULONGLONG Blink;
-} LIST_ENTRY64;
-typedef LIST_ENTRY64 *PLIST_ENTRY64;
-
/******************** PAL RT APIs *******************************/
typedef struct _HSATELLITE *HSATELLITE;
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: process.h
-//
-// ===========================================================================
-// dummy process.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: richedit.h
-//
-// ===========================================================================
-// dummy richedit.h for PAL
-
-#include "palrt.h"
#endif
#endif
-/* NULL */
-#if !defined(NULL)
-#if !defined(__cplusplus)
-#define NULL 0
-#else
-#define NULL ((void *)0)
-#endif
-#endif
-
/* _W64 */
#if !defined(_W64)
#if !defined(__midl) && (defined(HOST_X86) || defined(_M_IX86)) && _MSC_VER >= 1300
#endif
#endif
-/* uintptr_t */
-#if !defined(_UINTPTR_T_DEFINED)
-#if defined(HOST_64BIT)
-typedef unsigned __int64 uintptr_t;
-#else
-typedef _W64 unsigned int uintptr_t;
-#endif
-#define _UINTPTR_T_DEFINED
-#endif
-
#ifdef __GNUC__
#define SAFECRT_DEPRECATED __attribute__((deprecated))
#else
#define _tcsncat_s strncat_s
#define _tcsset_s _strset_s
#define _tcsnset_s _strnset_s
-#define _tcstok_s strtok_s
#define _vsntprintf_s _vsnprintf_s
#elif defined(_UNICODE) || defined(UNICODE)
#define _tcsncat_s wcsncat_s
#define _tcsset_s _wcsset_s
#define _tcsnset_s _wcsnset_s
-#define _tcstok_s wcstok_s
#define _tmakepath_s _wmakepath_s
-#define _tsplitpath_s _wsplitpath_s
#define _stprintf_s swprintf_s
-#define _vsntprintf_s _vsnwprintf_s
#define _tscanf_s wscanf_s
#define _tsscanf_s swscanf_s
#endif
-/* strtok_s */
-/*
- * strtok_s, wcstok_s ;
- * uses _Context to keep track of the position in the string.
- */
-_SAFECRT__EXTERN_C
-char * __cdecl strtok_s(char *_String, const char *_Control, char **_Context);
-
-#if _SAFECRT_USE_INLINES || _SAFECRT_IMPL
-
-_SAFECRT__INLINE
-char * __cdecl strtok_s(char *_String, const char *_Control, char **_Context)
-{
- unsigned char *str;
- const unsigned char *ctl = (const unsigned char *)_Control;
- unsigned char map[32];
- int count;
-
- /* validation section */
- _SAFECRT__VALIDATE_POINTER_ERROR_RETURN(_Context, EINVAL, nullptr);
- _SAFECRT__VALIDATE_POINTER_ERROR_RETURN(_Control, EINVAL, nullptr);
- _SAFECRT__VALIDATE_CONDITION_ERROR_RETURN(_String != nullptr || *_Context != nullptr, EINVAL, nullptr);
-
- /* Clear control map */
- for (count = 0; count < 32; count++)
- {
- map[count] = 0;
- }
-
- /* Set bits in delimiter table */
- do {
- map[*ctl >> 3] |= (1 << (*ctl & 7));
- } while (*ctl++);
-
- /* If string is nullptr, set str to the saved
- * pointer (i.e., continue breaking tokens out of the string
- * from the last strtok call) */
- if (_String != nullptr)
- {
- str = (unsigned char *)_String;
- }
- else
- {
- str = (unsigned char *)*_Context;
- }
-
- /* Find beginning of token (skip over leading delimiters). Note that
- * there is no token iff this loop sets str to point to the terminal
- * null (*str == 0) */
- while ((map[*str >> 3] & (1 << (*str & 7))) && *str != 0)
- {
- str++;
- }
-
- _String = (char *)str;
-
- /* Find the end of the token. If it is not the end of the string,
- * put a null there. */
- for ( ; *str != 0 ; str++ )
- {
- if (map[*str >> 3] & (1 << (*str & 7)))
- {
- *str++ = 0;
- break;
- }
- }
-
- /* Update context */
- *_Context = (char *)str;
-
- /* Determine if a token has been found. */
- if (_String == (char *)str)
- {
- return nullptr;
- }
- else
- {
- return _String;
- }
-}
-#endif
-
-/* wcstok_s */
-_SAFECRT__EXTERN_C
-WCHAR * __cdecl wcstok_s(WCHAR *_String, const WCHAR *_Control, WCHAR **_Context);
-
-#if _SAFECRT_USE_INLINES || _SAFECRT_IMPL
-
-_SAFECRT__INLINE
-WCHAR * __cdecl wcstok_s(WCHAR *_String, const WCHAR *_Control, WCHAR **_Context)
-{
- WCHAR *token;
- const WCHAR *ctl;
-
- /* validation section */
- _SAFECRT__VALIDATE_POINTER_ERROR_RETURN(_Context, EINVAL, nullptr);
- _SAFECRT__VALIDATE_POINTER_ERROR_RETURN(_Control, EINVAL, nullptr);
- _SAFECRT__VALIDATE_CONDITION_ERROR_RETURN(_String != nullptr || *_Context != nullptr, EINVAL, nullptr);
-
- /* If string==nullptr, continue with previous string */
- if (!_String)
- {
- _String = *_Context;
- }
-
- /* Find beginning of token (skip over leading delimiters). Note that
- * there is no token iff this loop sets string to point to the terminal null. */
- for ( ; *_String != 0 ; _String++)
- {
- for (ctl = _Control; *ctl != 0 && *ctl != *_String; ctl++)
- ;
- if (*ctl == 0)
- {
- break;
- }
- }
-
- token = _String;
-
- /* Find the end of the token. If it is not the end of the string,
- * put a null there. */
- for ( ; *_String != 0 ; _String++)
- {
- for (ctl = _Control; *ctl != 0 && *ctl != *_String; ctl++)
- ;
- if (*ctl != 0)
- {
- *_String++ = 0;
- break;
- }
- }
-
- /* Update the context */
- *_Context = _String;
-
- /* Determine if a token has been found. */
- if (token == _String)
- {
- return nullptr;
- }
- else
- {
- return token;
- }
-}
-#endif
-
-#ifndef PAL_STDCPP_COMPAT
-/* strnlen */
-/*
- * strnlen, wcsnlen ;
- * returns inMaxSize if the null character is not found.
- */
-_SAFECRT__EXTERN_C
-size_t __cdecl strnlen(const char* inString, size_t inMaxSize);
-
-#if _SAFECRT_USE_INLINES || _SAFECRT_IMPL
-
-_SAFECRT__INLINE
-size_t __cdecl strnlen(const char* inString, size_t inMaxSize)
-{
- size_t n;
-
- /* Note that we do not check if s == nullptr, because we do not
- * return errno_t...
- */
-
- for (n = 0; n < inMaxSize && *inString; n++, inString++)
- ;
-
- return n;
-}
-
-#endif
-
-/* wcsnlen */
-_SAFECRT__EXTERN_C
-size_t __cdecl wcsnlen(const WCHAR *inString, size_t inMaxSize);
-
-#if _SAFECRT_USE_INLINES || _SAFECRT_IMPL
-
-_SAFECRT__INLINE
-size_t __cdecl wcsnlen(const WCHAR *inString, size_t inMaxSize)
-{
- size_t n;
-
- /* Note that we do not check if s == nullptr, because we do not
- * return errno_t...
- */
-
- for (n = 0; n < inMaxSize && *inString; n++, inString++)
- ;
-
- return n;
-}
-
-#endif
-#endif // PAL_STDCPP_COMPAT
-
/* _wmakepath_s */
_SAFECRT__EXTERN_C
errno_t __cdecl _wmakepath_s(WCHAR *_Dst, size_t _SizeInWords, const WCHAR *_Drive, const WCHAR *_Dir, const WCHAR *_Filename, const WCHAR *_Ext);
} while (*p != 0);
p = p - 1;
- if (*p != L'/' && *p != L'\\')
+ if (*p != L'/')
{
if(++written >= _SizeInWords)
{
goto error_return;
}
- *d++ = L'\\';
+ *d++ = L'/';
}
}
}
#endif
-/* _wsplitpath_s */
-_SAFECRT__EXTERN_C
-errno_t __cdecl _wsplitpath_s(
- const WCHAR *_Path,
- WCHAR *_Drive, size_t _DriveSize,
- WCHAR *_Dir, size_t _DirSize,
- WCHAR *_Filename, size_t _FilenameSize,
- WCHAR *_Ext, size_t _ExtSize
-);
-
-/* no C++ overload for _wsplitpath_s */
-
-#if _SAFECRT_USE_INLINES || _SAFECRT_IMPL
-
-_SAFECRT__INLINE
-errno_t __cdecl _wsplitpath_s(
- const WCHAR *_Path,
- WCHAR *_Drive, size_t _DriveSize,
- WCHAR *_Dir, size_t _DirSize,
- WCHAR *_Filename, size_t _FilenameSize,
- WCHAR *_Ext, size_t _ExtSize
-)
-{
- const WCHAR *tmp;
- const WCHAR *last_slash;
- const WCHAR *dot;
- int drive_set = 0;
- size_t length = 0;
- int bEinval = 0;
-
- /* validation section */
- _SAFECRT__VALIDATE_POINTER(_Path);
- if ((_Drive == nullptr && _DriveSize != 0) || (_Drive != nullptr && _DriveSize == 0))
- {
- goto error_einval;
- }
- if ((_Dir == nullptr && _DirSize != 0) || (_Dir != nullptr && _DirSize == 0))
- {
- goto error_einval;
- }
- if ((_Filename == nullptr && _FilenameSize != 0) || (_Filename != nullptr && _FilenameSize == 0))
- {
- goto error_einval;
- }
- if ((_Ext == nullptr && _ExtSize != 0) || (_Ext != nullptr && _ExtSize == 0))
- {
- goto error_einval;
- }
-
- /* check if _Path begins with the longpath prefix */
- if (_Path[0] == L'\\' && _Path[1] == L'\\' && _Path[2] == L'?' && _Path[3] == L'\\')
- {
- _Path += 4;
- }
-
- /* extract drive letter and ':', if any */
- if (!drive_set)
- {
- size_t skip = _MAX_DRIVE - 2;
- tmp = _Path;
- while (skip > 0 && *tmp != 0)
- {
- skip--;
- tmp++;
- }
- if (*tmp == L':')
- {
- if (_Drive != nullptr)
- {
- if (_DriveSize < _MAX_DRIVE)
- {
- goto error_erange;
- }
- wcsncpy_s(_Drive, _DriveSize, _Path, _MAX_DRIVE - 1);
- }
- _Path = tmp + 1;
- }
- else
- {
- if (_Drive != nullptr)
- {
- _SAFECRT__RESET_STRING(_Drive, _DriveSize);
- }
- }
- }
-
- /* extract path string, if any. _Path now points to the first character
- * of the path, if any, or the filename or extension, if no path was
- * specified. Scan ahead for the last occurrence, if any, of a '/' or
- * '\' path separator character. If none is found, there is no path.
- * We will also note the last '.' character found, if any, to aid in
- * handling the extension.
- */
- last_slash = nullptr;
- dot = nullptr;
- tmp = _Path;
- for (; *tmp != 0; ++tmp)
- {
- {
- if (*tmp == L'/' || *tmp == L'\\')
- {
- /* point to one beyond for later copy */
- last_slash = tmp + 1;
- }
- else if (*tmp == L'.')
- {
- dot = tmp;
- }
- }
- }
-
- if (last_slash != nullptr)
- {
- /* found a path - copy up through last_slash or max characters
- * allowed, whichever is smaller
- */
- if (_Dir != nullptr) {
- length = (size_t)(last_slash - _Path);
- if (_DirSize <= length)
- {
- goto error_erange;
- }
- wcsncpy_s(_Dir, _DirSize, _Path, length);
- }
- _Path = last_slash;
- }
- else
- {
- /* there is no path */
- if (_Dir != nullptr)
- {
- _SAFECRT__RESET_STRING(_Dir, _DirSize);
- }
- }
-
- /* extract file name and extension, if any. Path now points to the
- * first character of the file name, if any, or the extension if no
- * file name was given. Dot points to the '.' beginning the extension,
- * if any.
- */
- if (dot != nullptr && (dot >= _Path))
- {
- /* found the marker for an extension - copy the file name up to the '.' */
- if (_Filename)
- {
- length = (size_t)(dot - _Path);
- if (_FilenameSize <= length)
- {
- goto error_erange;
- }
- wcsncpy_s(_Filename, _FilenameSize, _Path, length);
- }
- /* now we can get the extension - remember that tmp still points
- * to the terminating nullptr character of path.
- */
- if (_Ext)
- {
- length = (size_t)(tmp - dot);
- if (_ExtSize <= length)
- {
- goto error_erange;
- }
- wcsncpy_s(_Ext, _ExtSize, dot, length);
- }
- }
- else
- {
- /* found no extension, give empty extension and copy rest of
- * string into fname.
- */
- if (_Filename)
- {
- length = (size_t)(tmp - _Path);
- if (_FilenameSize <= length)
- {
- goto error_erange;
- }
- wcsncpy_s(_Filename, _FilenameSize, _Path, length);
- }
- if (_Ext)
- {
- _SAFECRT__RESET_STRING(_Ext, _ExtSize);
- }
- }
-
- return 0;
-
-error_einval:
- bEinval = 1;
-
-error_erange:
- if (_Drive != nullptr && _DriveSize > 0)
- {
- _SAFECRT__RESET_STRING(_Drive, _DriveSize);
- }
- if (_Dir != nullptr && _DirSize > 0)
- {
- _SAFECRT__RESET_STRING(_Dir, _DirSize);
- }
- if (_Filename != nullptr && _FilenameSize > 0)
- {
- _SAFECRT__RESET_STRING(_Filename, _FilenameSize);
- }
- if (_Ext != nullptr && _ExtSize > 0)
- {
- _SAFECRT__RESET_STRING(_Ext, _ExtSize);
- }
-
- if (bEinval)
- {
- _SAFECRT__RETURN_EINVAL;
- }
-
- _SAFECRT__RETURN_BUFFER_TOO_SMALL(_Strings, _StringSizes);
- /* should never happen, but compiler can't tell */
- return EINVAL;
-}
-#endif
/* vsprintf_s */
/*
- * swprintf_s, vsprintf_s, vswprintf_s format a string and copy it into _Dst;
+ * swprintf_s, vsprintf_s format a string and copy it into _Dst;
* need safecrt.lib and msvcrt.dll;
* will call _SAFECRT_INVALID_PARAMETER if there is not enough space in _Dst;
* will call _SAFECRT_INVALID_PARAMETER if the format string is malformed;
/* _vsnprintf_s */
/*
- * _snwprintf_s, _vsnprintf_s, _vsnwprintf_s format a string and copy at max _Count characters into _Dst;
+ * _vsnprintf_s formats a string and copy at max _Count characters into _Dst;
* need safecrt.lib and msvcrt.dll;
* string _Dst will always be null-terminated;
* will call _SAFECRT_INVALID_PARAMETER if there is not enough space in _Dst;
_Success_(return != FALSE) BOOL
PathCanonicalizeA(_Out_writes_(MAX_PATH) LPSTR pszBuf, LPCSTR pszPath) :
pszBuf is only guaranteed to be NULL-terminated when TRUE is returned,
- and FALSE indiates failure. In common practice, callers check for zero
+ and FALSE indicates failure. In common practice, callers check for zero
vs. non-zero returns, so it is preferable to express the success
criteria in terms of zero/non-zero, not checked for exactly TRUE.
// Only applicable with functions that have _Success_ or _Return_type_succss_.
#define _Always_(annos) _Always_impl_(annos _SAL_nop_impl_)
-// Usable on a function defintion. Asserts that a function declaration is
+// Usable on a function definition. Asserts that a function declaration is
// in scope, and its annotations are to be used. There are no other annotations
// allowed on the function definition.
#define _Use_decl_annotations_ _Use_decl_anno_impl_
// 'out' with buffer size
-// e.g. void GetIndeces( _Out_cap_(cIndeces) int* rgIndeces, size_t cIndices );
+// e.g. void GetIndices( _Out_cap_(cIndices) int* rgIndices, size_t cIndices );
// buffer capacity is described by another parameter
#define _Out_cap_(size) _SAL1_1_Source_(_Out_cap_, (size), _Pre_cap_(size) _Post_valid_impl_)
#define _Out_opt_cap_(size) _SAL1_1_Source_(_Out_opt_cap_, (size), _Pre_opt_cap_(size) _Post_valid_impl_)
// 'inout' buffers with initialized elements before and after the call
-// e.g. void ModifyIndices( _Inout_count_(cIndices) int* rgIndeces, size_t cIndices );
+// e.g. void ModifyIndices( _Inout_count_(cIndices) int* rgIndices, size_t cIndices );
#define _Inout_count_(size) _SAL1_1_Source_(_Inout_count_, (size), _Prepost_count_(size))
#define _Inout_opt_count_(size) _SAL1_1_Source_(_Inout_opt_count_, (size), _Prepost_opt_count_(size))
#define _Inout_bytecount_(size) _SAL1_1_Source_(_Inout_bytecount_, (size), _Prepost_bytecount_(size))
#define _Inout_opt_bytecount_c_(size) _SAL1_1_Source_(_Inout_opt_bytecount_c_, (size), _Prepost_opt_bytecount_c_(size))
// nullterminated 'inout' buffers with initialized elements before and after the call
-// e.g. void ModifyIndices( _Inout_count_(cIndices) int* rgIndeces, size_t cIndices );
+// e.g. void ModifyIndices( _Inout_count_(cIndices) int* rgIndices, size_t cIndices );
#define _Inout_z_count_(size) _SAL1_1_Source_(_Inout_z_count_, (size), _Prepost_z_ _Prepost_count_(size))
#define _Inout_opt_z_count_(size) _SAL1_1_Source_(_Inout_opt_z_count_, (size), _Prepost_z_ _Prepost_opt_count_(size))
#define _Inout_z_bytecount_(size) _SAL1_1_Source_(_Inout_z_bytecount_, (size), _Prepost_z_ _Prepost_bytecount_(size))
#define _SA_SPECSTRIZE( x ) #x
/*
- __null p
__notnull p
__maybenull p
- Annotates a pointer p. States that pointer p is null. Commonly used
- in the negated form __notnull or the possibly null form __maybenull.
+ Annotates a pointer p. States that pointer p is never null or maybe null.
*/
-#ifndef PAL_STDCPP_COMPAT
- #define __null _Null_impl_
#define __notnull _Notnull_impl_
#define __maybenull _Maybenull_impl_
-#endif // !PAL_STDCPP_COMPAT
/*
__readonly l
__notreadonly l
- __mabyereadonly l
+ __maybereadonly l
Annotates a location l. States that location l is not modified after
this point. If the annotation is placed on the precondition state of
#else // ][
-#ifndef PAL_STDCPP_COMPAT
- #define __null
#define __notnull
#define __deref
-#endif // !PAL_STDCPP_COMPAT
#define __maybenull
#define __readonly
#define __notreadonly
#define __useHeader _Use_decl_anno_impl_
#define __on_failure(annotes) _On_failure_impl_(annotes _SAL_nop_impl_)
+#ifndef __has_cpp_attribute
+#define __has_cpp_attribute(x) (0)
+#endif
+
#ifndef __fallthrough // [
#if __has_cpp_attribute(fallthrough)
#define __fallthrough [[fallthrough]]
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: shellapi.h
-//
-// ===========================================================================
-// dummy shellapi.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: shlobj.h
-//
-// ===========================================================================
-// dummy shlobj.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: shlwapi.h
-//
-// ===========================================================================
-// dummy shlwapi.h for PAL
-
-#include "palrt.h"
#define __analysis_hint(hint) _SA_annotes1(SAL_analysisHint, hint)
// For "breakpoint": doesn't return as far as analysis is concerned.
#define __analysis_noreturn __declspec(noreturn)
-/* Internal defintions */
+/* Internal definitions */
#define __inner_data_source(src_raw) _SA_annotes1(SAL_untrusted_data_source,src_raw)
#define __inner_this_data_source(src_raw) _SA_annotes1(SAL_untrusted_data_source_this,src_raw)
#define __inner_out_validated(typ_raw) _Post_ _SA_annotes1(SAL_validated,typ_raw)
#define __analysis_assert(e)
#define __analysis_hint(hint)
#define __analysis_noreturn
-/* Internal defintions */
+/* Internal definitions */
#define __inner_data_source(src_raw)
#define __inner_this_data_source(src_raw)
#define __inner_out_validated(typ_raw)
__byte_readableTo((expr) ? (size) : (size) * 2)
#define __post_invalid _Post_ __notvalid
/* integer related macros */
-#ifndef PAL_STDCPP_COMPAT
#define __allocator __inner_allocator
#define __deallocate(kind) _Pre_ __notnull __post_invalid
#define __deallocate_opt(kind) _Pre_ __maybenull __post_invalid
-#endif
#define __bound __inner_bound
#define __range(lb,ub) __inner_range(lb,ub)
#define __in_bound _Pre_ __inner_bound
#ifdef _PREFIX_
/**************************************************************************
-* Defintion of __pfx_assume and __pfx_assert. Thse should be the only
-* defintions of these functions.
+* Definition of __pfx_assume and __pfx_assert. Thse should be the only
+* definitions of these functions.
***************************************************************************/
#if __cplusplus
extern "C" void __pfx_assert(bool, const char *);
void __pfx_assume(int, const char *);
#endif
/**************************************************************************
-* Redefintion of __analysis_assume and __analysis_assert for PREFIX build
+* Redefinition of __analysis_assume and __analysis_assert for PREFIX build
**************************************************************************/
#undef __analysis_assume
#undef __analysis_assert
#define __callback __allowed(on_function)
#define __format_string __allowed(on_parameter_or_return)
#define __blocksOn(resource) __allowed(on_function)
-#define __fallthrough __allowed(as_statement)
#define __range(lb,ub) __allowed(on_return)
#define __in_range(lb,ub) _SAL_VERSION_CHECK(__in_range)
#define __out_range(lb,ub) _SAL_VERSION_CHECK(__out_range)
/***************************************************************************
* Expert Macros
***************************************************************************/
-#define __null __allowed(on_typedecl)
#define __notnull __allowed(on_typedecl)
#define __maybenull __allowed(on_typedecl)
#define __exceptthat __allowed(on_typedecl)
* EMF - Windows Enhanced Metafile
* GIF - Graphics Interchange Format
* MIME_TYPE - MIME type from header tokens
-* MAIL_MONIKER - MAIL information refered by URL moniker
+* MAIL_MONIKER - MAIL information referred by URL moniker
* HTML - HyperText Markup Language
* WMPHOTO - Windows media photo
* OE_VCARD - Outlook Express virtual card
* Macros deprecated with strict level greater then 1.
**************************************************************************/
#if (__SPECSTRINGS_STRICT_LEVEL > 1)
-/* Must come before macro defintions */
+/* Must come before macro definitions */
#pragma deprecated(__in_nz)
#pragma deprecated(__in_ecount_nz)
#pragma deprecated(__in_bcount_nz)
/**************************************************************************
* This should go away. It's only for __success which we should split into.
-* __success and __typdecl_sucess
+* __success and __typdecl_success
***************************************************************************/
#define __$allowed_on_function_or_typedecl /* empty */
#if (__SPECSTRINGS_STRICT_LEVEL == 1) || (__SPECSTRINGS_STRICT_LEVEL == 2)
*/
-#ifndef PAL_STDCPP_COMPAT
#undef __in
#undef __out
-#endif // !PAL_STDCPP_COMPAT
#undef _At_
#undef _Deref_out_
#undef __encoded_array
#undef __encoded_pointer
#undef __exceptthat
-#undef __fallthrough
#undef __field_bcount
#undef __field_bcount_full
#undef __field_bcount_full_opt
#undef __notnull
#undef __notreadonly
#undef __notvalid
-#undef __null
#undef __nullnullterminated
#undef __nullterminated
#undef __out_awcount
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: tlhelp32.h
-//
-// ===========================================================================
-// dummy tlhelp32.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: urlmon.h
-//
-// ===========================================================================
-// dummy urlmon.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: verrsrc.h
-//
-// ===========================================================================
-// dummy verrsrc.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: windows.h
-//
-// ===========================================================================
-// dummy winapifamily.h for PAL
-
-#ifndef _INC_WINAPIFAMILY
-#define _INC_WINAPIFAMILY
-
-//
-// Windows APIs can be placed in a partition represented by one of the below bits. The
-// WINAPI_FAMILY value determines which partitions are available to the client code.
-//
-
-#define WINAPI_PARTITION_DESKTOP 0x00000001
-#define WINAPI_PARTITION_APP 0x00000002
-
-// A family may be defined as the union of multiple families. WINAPI_FAMILY should be set
-// to one of these values.
-#define WINAPI_FAMILY_APP WINAPI_PARTITION_APP
-#define WINAPI_FAMILY_DESKTOP_APP (WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_APP)
-
-// Provide a default for WINAPI_FAMILY if needed.
-#ifndef WINAPI_FAMILY
-#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
-#endif
-
-// Macro to determine if a partition is enabled
-#define WINAPI_FAMILY_PARTITION(Partition) ((WINAPI_FAMILY & Partition) == Partition)
-
-// Macro to determine if only one partition is enabled from a set
-#define WINAPI_FAMILY_ONE_PARTITION(PartitionSet, Partition) ((WINAPI_FAMILY & PartitionSet) == Partition)
-
-#endif
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: wininet.h
-//
-// ===========================================================================
-// dummy wininet.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: winnls.h
-//
-// ===========================================================================
-// dummy winnls.h for PAL
-
-#include "palrt.h"
// winresrc.h for PAL
// Included in .rc files.
-#include "winver.h"
#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: winternl.h
-//
-// ===========================================================================
-// dummy winternl.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: winuser.h
-//
-// ===========================================================================
-// dummy winuser.h for PAL
-
-#include "palrt.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: winver.h
-//
-// ===========================================================================
-// winver.h for PAL
-// Included in .rc files.
-
-#define VS_VERSION_INFO 1
-#define VS_FFI_FILEFLAGSMASK 0x0000003FL
-
-#define VS_FF_DEBUG 0x00000001L
-#define VS_FF_PRERELEASE 0x00000002L
-#define VS_FF_PATCHED 0x00000004L
-#define VS_FF_PRIVATEBUILD 0x00000008L
-#define VS_FF_INFOINFERRED 0x00000010L
-#define VS_FF_SPECIALBUILD 0x00000020L
-
-#define VFT_UNKNOWN 0x00000000L
-#define VFT_APP 0x00000001L
-#define VFT_DLL 0x00000002L
-
-#define VFT2_UNKNOWN 0x00000000L
-
-#define VOS__WINDOWS32 0x00000004L
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: wtsapi32.h
-//
-// ===========================================================================
-// dummy wtsapi32.h for PAL
-
-#include "palrt.h"
#include <string.h> // for memset
#include <stdarg.h> // for va_start, etc.
-#ifndef _SIZE_T_DEFINED
-#ifdef HOST_64BIT
-typedef unsigned __int64 size_t;
-#else
-typedef __w64 unsigned int size_t;
-#endif // !HOST_64BIT
-#define _SIZE_T_DEFINED
-#endif // !_SIZE_T_DEFINED
-
#ifndef SUCCEEDED
#define SUCCEEDED(hr) ((HRESULT)(hr) >= 0)
#endif
#ifdef STRSAFE_INLINE
STRSAFEAPI StringCopyWorkerA(char* pszDest, size_t cchDest, const char* pszSrc);
STRSAFEAPI StringCopyWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc);
-STRSAFEAPI StringCopyExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, const char* pszSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags);
-STRSAFEAPI StringCopyExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags);
-STRSAFEAPI StringCopyNWorkerA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchSrc);
-STRSAFEAPI StringCopyNWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchSrc);
-STRSAFEAPI StringCopyNExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, const char* pszSrc, size_t cchSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags);
-STRSAFEAPI StringCopyNExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, const WCHAR* pszSrc, size_t cchSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags);
-STRSAFEAPI StringCatWorkerA(char* pszDest, size_t cchDest, const char* pszSrc);
-STRSAFEAPI StringCatWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc);
-STRSAFEAPI StringCatExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, const char* pszSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags);
-STRSAFEAPI StringCatExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags);
-STRSAFEAPI StringCatNWorkerA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchMaxAppend);
-STRSAFEAPI StringCatNWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchMaxAppend);
-STRSAFEAPI StringCatNExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, const char* pszSrc, size_t cchMaxAppend, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags);
-STRSAFEAPI StringCatNExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, const WCHAR* pszSrc, size_t cchMaxAppend, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags);
-STRSAFEAPI StringLengthWorkerA(const char* psz, size_t cchMax, size_t* pcch);
-STRSAFEAPI StringLengthWorkerW(const WCHAR* psz, size_t cchMax, size_t* pcch);
#endif // STRSAFE_INLINE
#ifndef STRSAFE_NO_CCH_FUNCTIONS
resultant dest string was null terminated
failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all hresult falure cases
+ code for all hresult failure cases
STRSAFE_E_INSUFFICIENT_BUFFER /
HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER
#endif // STRSAFE_INLINE
#endif // !STRSAFE_NO_CCH_FUNCTIONS
-#ifndef STRSAFE_NO_CCH_FUNCTIONS
-/*++
-
-STDAPI StringCchCopyEx(TCHAR pszDest,
- size_t cchDest,
- LPCTSTR pszSrc,
- LPTSTR* ppszDestEnd,
- size_t* pcchRemaining,
- DWORD dwFlags);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'strcpy' with
- some additional parameters. In addition to functionality provided by
- StringCchCopy, this routine also returns a pointer to the end of the
- destination string and the number of characters left in the destination string
- including the null terminator. The flags parameter allows additional controls.
-
-Arguments:
-
- pszDest - destination string
-
- cchDest - size of destination buffer in characters.
- length must be = (_tcslen(pszSrc) + 1) to hold all of
- the source including the null terminator
-
- pszSrc - source string which must be null terminated
-
- ppszDestEnd - if ppszDestEnd is non-null, the function will return a
- pointer to the end of the destination string. If the
- function copied any data, the result will point to the
- null termination character
-
- pcchRemaining - if pcchRemaining is non-null, the function will return the
- number of characters left in the destination string,
- including the null terminator
-
- dwFlags - controls some details of the string copy:
-
- STRSAFE_FILL_BEHIND_NULL
- if the function succeeds, the low byte of dwFlags will be
- used to fill the uninitialize part of destination buffer
- behind the null terminator
-
- STRSAFE_IGNORE_NULLS
- treat NULL string pointers like empty strings (TEXT("")).
- this flag is useful for emulating functions like lstrcpy
-
- STRSAFE_FILL_ON_FAILURE
- if the function fails, the low byte of dwFlags will be
- used to fill all of the destination buffer, and it will
- be null terminated. This will overwrite any truncated
- string returned when the failure is
- STRSAFE_E_INSUFFICIENT_BUFFER
-
- STRSAFE_NO_TRUNCATION /
- STRSAFE_NULL_ON_FAILURE
- if the function fails, the destination buffer will be set
- to the empty string. This will overwrite any truncated string
- returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER.
-
-Notes:
- Behavior is undefined if source and destination strings overlap.
-
- pszDest and pszSrc should not be NULL unless the STRSAFE_IGNORE_NULLS flag
- is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszSrc
- may be NULL. An error may still be returned even though NULLS are ignored
- due to insufficient space.
-
-Return Value:
-
- S_OK - if there was source data and it was all copied and the
- resultant dest string was null terminated
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all falure cases
-
- STRSAFE_E_INSUFFICIENT_BUFFER /
- HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER
- - this return value is an indication that the copy operation
- failed due to insufficient space. When this error occurs,
- the destination buffer is modified to contain a truncated
- version of the ideal result and is null terminated. This
- is useful for situations where truncation is ok.
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function
-
---*/
-
-STRSAFEAPI StringCchCopyExA(char* pszDest, size_t cchDest, const char* pszSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags);
-STRSAFEAPI StringCchCopyExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags);
-#ifdef UNICODE
-#define StringCchCopyEx StringCchCopyExW
-#else
-#define StringCchCopyEx StringCchCopyExA
-#endif // !UNICODE
-
-#ifdef STRSAFE_INLINE
-STRSAFEAPI StringCchCopyExA(char* pszDest, size_t cchDest, const char* pszSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags)
-{
- HRESULT hr;
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- size_t cbDest;
-
- // safe to multiply cchDest * sizeof(char) since cchDest < STRSAFE_MAX_CCH and sizeof(char) is 1
- cbDest = cchDest * sizeof(char);
-
- hr = StringCopyExWorkerA(pszDest, cchDest, cbDest, pszSrc, ppszDestEnd, pcchRemaining, dwFlags);
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCchCopyExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags)
-{
- HRESULT hr;
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- size_t cbDest;
-
- // safe to multiply cchDest * sizeof(WCHAR) since cchDest < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2
- cbDest = cchDest * sizeof(WCHAR);
-
- hr = StringCopyExWorkerW(pszDest, cchDest, cbDest, pszSrc, ppszDestEnd, pcchRemaining, dwFlags);
- }
-
- return hr;
-}
-#endif // STRSAFE_INLINE
-#endif // !STRSAFE_NO_CCH_FUNCTIONS
-
-#ifndef STRSAFE_NO_CCH_FUNCTIONS
-/*++
-
-STDAPI StringCchCopyN(LPTSTR pszDest,
- size_t cchDest,
- LPCTSTR pszSrc,
- size_t cchSrc);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'strncpy'.
- The size of the destination buffer (in characters) is a parameter and
- this function will not write past the end of this buffer and it will
- ALWAYS null terminate the destination buffer (unless it is zero length).
-
- This routine is meant as a replacement for strncpy, but it does behave
- differently. This function will not pad the destination buffer with extra
- null termination characters if cchSrc is greater than the length of pszSrc.
-
- This function returns a hresult, and not a pointer. It returns a S_OK
- if the entire string or the first cchSrc characters were copied without
- truncation and the resultant destination string was null terminated, otherwise
- it will return a failure code. In failure cases as much of pszSrc will be
- copied to pszDest as possible, and pszDest will be null terminated.
-
-Arguments:
-
- pszDest - destination string
-
- cchDest - size of destination buffer in characters.
- length must be = (_tcslen(src) + 1) to hold all of the
- source including the null terminator
-
- pszSrc - source string
-
- cchSrc - maximum number of characters to copy from source string
-
-Notes:
- Behavior is undefined if source and destination strings overlap.
-
- pszDest and pszSrc should not be NULL. See StringCchCopyNEx if you require
- the handling of NULL values.
-
-Return Value:
-
- S_OK - if there was source data and it was all copied and the
- resultant dest string was null terminated
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all hresult falure cases
-
- STRSAFE_E_INSUFFICIENT_BUFFER /
- HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER
- - this return value is an indication that the copy operation
- failed due to insufficient space. When this error occurs,
- the destination buffer is modified to contain a truncated
- version of the ideal result and is null terminated. This
- is useful for situations where truncation is ok
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function.
-
---*/
-
-STRSAFEAPI StringCchCopyNA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchSrc);
-STRSAFEAPI StringCchCopyNW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchSrc);
-#ifdef UNICODE
-#define StringCchCopyN StringCchCopyNW
-#else
-#define StringCchCopyN StringCchCopyNA
-#endif // !UNICODE
-
-#ifdef STRSAFE_INLINE
-STRSAFEAPI StringCchCopyNA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchSrc)
-{
- HRESULT hr;
-
- if ((cchDest > STRSAFE_MAX_CCH) ||
- (cchSrc > STRSAFE_MAX_CCH))
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = StringCopyNWorkerA(pszDest, cchDest, pszSrc, cchSrc);
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCchCopyNW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchSrc)
-{
- HRESULT hr;
-
- if ((cchDest > STRSAFE_MAX_CCH) ||
- (cchSrc > STRSAFE_MAX_CCH))
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = StringCopyNWorkerW(pszDest, cchDest, pszSrc, cchSrc);
- }
-
- return hr;
-}
-#endif // STRSAFE_INLINE
-#endif // !STRSAFE_NO_CCH_FUNCTIONS
-
-#ifndef STRSAFE_NO_CCH_FUNCTIONS
-/*++
-
-STDAPI StringCchCopyNEx(TCHAR pszDest,
- size_t cchDest,
- LPCTSTR pszSrc,
- size_t cchSrc,
- LPTSTR* ppszDestEnd,
- size_t* pcchRemaining,
- DWORD dwFlags);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'strncpy' with
- some additional parameters. In addition to functionality provided by
- StringCchCopyN, this routine also returns a pointer to the end of the
- destination string and the number of characters left in the destination
- string including the null terminator. The flags parameter allows
- additional controls.
-
- This routine is meant as a replacement for strncpy, but it does behave
- differently. This function will not pad the destination buffer with extra
- null termination characters if cchSrc is greater than the length of pszSrc.
-
-Arguments:
-
- pszDest - destination string
-
- cchDest - size of destination buffer in characters.
- length must be = (_tcslen(pszSrc) + 1) to hold all of
- the source including the null terminator
-
- pszSrc - source string
-
- cchSrc - maximum number of characters to copy from the source
- string
-
- ppszDestEnd - if ppszDestEnd is non-null, the function will return a
- pointer to the end of the destination string. If the
- function copied any data, the result will point to the
- null termination character
-
- pcchRemaining - if pcchRemaining is non-null, the function will return the
- number of characters left in the destination string,
- including the null terminator
-
- dwFlags - controls some details of the string copy:
-
- STRSAFE_FILL_BEHIND_NULL
- if the function succeeds, the low byte of dwFlags will be
- used to fill the uninitialize part of destination buffer
- behind the null terminator
-
- STRSAFE_IGNORE_NULLS
- treat NULL string pointers like empty strings (TEXT("")).
- this flag is useful for emulating functions like lstrcpy
-
- STRSAFE_FILL_ON_FAILURE
- if the function fails, the low byte of dwFlags will be
- used to fill all of the destination buffer, and it will
- be null terminated. This will overwrite any truncated
- string returned when the failure is
- STRSAFE_E_INSUFFICIENT_BUFFER
-
- STRSAFE_NO_TRUNCATION /
- STRSAFE_NULL_ON_FAILURE
- if the function fails, the destination buffer will be set
- to the empty string. This will overwrite any truncated string
- returned when the failure is STRSAFE_E_INSUFFICIENT_BUFFER.
-
-Notes:
- Behavior is undefined if source and destination strings overlap.
-
- pszDest and pszSrc should not be NULL unless the STRSAFE_IGNORE_NULLS flag
- is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszSrc
- may be NULL. An error may still be returned even though NULLS are ignored
- due to insufficient space.
-
-Return Value:
-
- S_OK - if there was source data and it was all copied and the
- resultant dest string was null terminated
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all falure cases
-
- STRSAFE_E_INSUFFICIENT_BUFFER /
- HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER
- - this return value is an indication that the copy operation
- failed due to insufficient space. When this error occurs,
- the destination buffer is modified to contain a truncated
- version of the ideal result and is null terminated. This
- is useful for situations where truncation is ok.
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function
-
---*/
-
-STRSAFEAPI StringCchCopyNExA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags);
-STRSAFEAPI StringCchCopyNExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags);
-#ifdef UNICODE
-#define StringCchCopyNEx StringCchCopyNExW
-#else
-#define StringCchCopyNEx StringCchCopyNExA
-#endif // !UNICODE
-
+// these are the worker functions that actually do the work
#ifdef STRSAFE_INLINE
-STRSAFEAPI StringCchCopyNExA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags)
+STRSAFEAPI StringCopyWorkerA(char* pszDest, size_t cchDest, const char* pszSrc)
{
- HRESULT hr;
+ HRESULT hr = S_OK;
- if ((cchDest > STRSAFE_MAX_CCH) ||
- (cchSrc > STRSAFE_MAX_CCH))
+ if (cchDest == 0)
{
+ // can not null terminate a zero-byte dest buffer
hr = STRSAFE_E_INVALID_PARAMETER;
}
else
{
- size_t cbDest;
+ while (cchDest && (*pszSrc != '\0'))
+ {
+ *pszDest++ = *pszSrc++;
+ cchDest--;
+ }
- // safe to multiply cchDest * sizeof(char) since cchDest < STRSAFE_MAX_CCH and sizeof(char) is 1
- cbDest = cchDest * sizeof(char);
+ if (cchDest == 0)
+ {
+ // we are going to truncate pszDest
+ pszDest--;
+ hr = STRSAFE_E_INSUFFICIENT_BUFFER;
+ }
- hr = StringCopyNExWorkerA(pszDest, cchDest, cbDest, pszSrc, cchSrc, ppszDestEnd, pcchRemaining, dwFlags);
+ *pszDest= '\0';
}
return hr;
}
-STRSAFEAPI StringCchCopyNExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags)
+STRSAFEAPI StringCopyWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc)
{
- HRESULT hr;
+ HRESULT hr = S_OK;
- if ((cchDest > STRSAFE_MAX_CCH) ||
- (cchSrc > STRSAFE_MAX_CCH))
+ if (cchDest == 0)
{
+ // can not null terminate a zero-byte dest buffer
hr = STRSAFE_E_INVALID_PARAMETER;
}
else
{
- size_t cbDest;
-
- // safe to multiply cchDest * sizeof(WCHAR) since cchDest < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2
- cbDest = cchDest * sizeof(WCHAR);
-
- hr = StringCopyNExWorkerW(pszDest, cchDest, cbDest, pszSrc, cchSrc, ppszDestEnd, pcchRemaining, dwFlags);
- }
-
- return hr;
-}
-#endif // STRSAFE_INLINE
-#endif // !STRSAFE_NO_CCH_FUNCTIONS
+ while (cchDest && (*pszSrc != L'\0'))
+ {
+ *pszDest++ = *pszSrc++;
+ cchDest--;
+ }
+ if (cchDest == 0)
+ {
+ // we are going to truncate pszDest
+ pszDest--;
+ hr = STRSAFE_E_INSUFFICIENT_BUFFER;
+ }
-#ifndef STRSAFE_NO_CCH_FUNCTIONS
-/*++
-
-STDAPI StringCchCat(LPTSTR pszDest,
- size_t cchDest,
- LPCTSTR pszSrc);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'strcat'.
- The size of the destination buffer (in characters) is a parameter and this
- function will not write past the end of this buffer and it will ALWAYS
- null terminate the destination buffer (unless it is zero length).
-
- This function returns a hresult, and not a pointer. It returns a S_OK
- if the string was concatenated without truncation and null terminated, otherwise
- it will return a failure code. In failure cases as much of pszSrc will be
- appended to pszDest as possible, and pszDest will be null terminated.
-
-Arguments:
-
- pszDest - destination string which must be null terminated
-
- cchDest - size of destination buffer in characters.
- length must be = (_tcslen(pszDest) + _tcslen(pszSrc) + 1)
- to hold all of the combine string plus the null
- terminator
-
- pszSrc - source string which must be null terminated
-
-Notes:
- Behavior is undefined if source and destination strings overlap.
-
- pszDest and pszSrc should not be NULL. See StringCchCatEx if you require
- the handling of NULL values.
-
-Return Value:
-
- S_OK - if there was source data and it was all concatenated and the
- resultant dest string was null terminated
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all falure cases
-
- STRSAFE_E_INSUFFICIENT_BUFFER /
- HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER
- - this return value is an indication that the operation
- failed due to insufficient space. When this error occurs,
- the destination buffer is modified to contain a truncated
- version of the ideal result and is null terminated. This
- is useful for situations where truncation is ok.
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function
-
---*/
-
-STRSAFEAPI StringCchCatA(char* pszDest, size_t cchDest, const char* pszSrc);
-STRSAFEAPI StringCchCatW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc);
-#ifdef UNICODE
-#define StringCchCat StringCchCatW
-#else
-#define StringCchCat StringCchCatA
-#endif // !UNICODE
-
-#ifdef STRSAFE_INLINE
-STRSAFEAPI StringCchCatA(char* pszDest, size_t cchDest, const char* pszSrc)
-{
- HRESULT hr;
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = StringCatWorkerA(pszDest, cchDest, pszSrc);
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCchCatW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc)
-{
- HRESULT hr;
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = StringCatWorkerW(pszDest, cchDest, pszSrc);
- }
-
- return hr;
-}
-#endif // STRSAFE_INLINE
-#endif // !STRSAFE_NO_CCH_FUNCTIONS
-
-
-#ifndef STRSAFE_NO_CB_FUNCTIONS
-/*++
-
-STDAPI StringCbCat(LPTSTR pszDest,
- size_t cbDest,
- LPCTSTR pszSrc);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'strcat'.
- The size of the destination buffer (in bytes) is a parameter and this
- function will not write past the end of this buffer and it will ALWAYS
- null terminate the destination buffer (unless it is zero length).
-
- This function returns a hresult, and not a pointer. It returns a S_OK
- if the string was concatenated without truncation and null terminated, otherwise
- it will return a failure code. In failure cases as much of pszSrc will be
- appended to pszDest as possible, and pszDest will be null terminated.
-
-Arguments:
-
- pszDest - destination string which must be null terminated
-
- cbDest - size of destination buffer in bytes.
- length must be = ((_tcslen(pszDest) + _tcslen(pszSrc) + 1) * sizeof(TCHAR)
- to hold all of the combine string plus the null
- terminator
-
- pszSrc - source string which must be null terminated
-
-Notes:
- Behavior is undefined if source and destination strings overlap.
-
- pszDest and pszSrc should not be NULL. See StringCbCatEx if you require
- the handling of NULL values.
-
-Return Value:
-
- S_OK - if there was source data and it was all concatenated and the
- resultant dest string was null terminated
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all falure cases
-
- STRSAFE_E_INSUFFICIENT_BUFFER /
- HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER
- - this return value is an indication that the operation
- failed due to insufficient space. When this error occurs,
- the destination buffer is modified to contain a truncated
- version of the ideal result and is null terminated. This
- is useful for situations where truncation is ok.
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function
-
---*/
-
-STRSAFEAPI StringCbCatA(char* pszDest, size_t cbDest, const char* pszSrc);
-STRSAFEAPI StringCbCatW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc);
-#ifdef UNICODE
-#define StringCbCat StringCbCatW
-#else
-#define StringCbCat StringCbCatA
-#endif // !UNICODE
-
-#ifdef STRSAFE_INLINE
-STRSAFEAPI StringCbCatA(char* pszDest, size_t cbDest, const char* pszSrc)
-{
- HRESULT hr;
- size_t cchDest;
-
- cchDest = cbDest / sizeof(char);
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = StringCatWorkerA(pszDest, cchDest, pszSrc);
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCbCatW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc)
-{
- HRESULT hr;
- size_t cchDest;
-
- cchDest = cbDest / sizeof(WCHAR);
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = StringCatWorkerW(pszDest, cchDest, pszSrc);
- }
-
- return hr;
-}
-#endif // STRSAFE_INLINE
-#endif // !STRSAFE_NO_CB_FUNCTIONS
-
-
-#ifndef STRSAFE_NO_CCH_FUNCTIONS
-/*++
-
-STDAPI StringCchCatEx(LPTSTR pszDest,
- size_t cchDest,
- LPCTSTR pszSrc,
- LPTSTR* ppszDestEnd,
- size_t* pcchRemaining,
- DWORD dwFlags);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'strcat' with
- some additional parameters. In addition to functionality provided by
- StringCchCat, this routine also returns a pointer to the end of the
- destination string and the number of characters left in the destination string
- including the null terminator. The flags parameter allows additional controls.
-
-Arguments:
-
- pszDest - destination string which must be null terminated
-
- cchDest - size of destination buffer in characters
- length must be (_tcslen(pszDest) + _tcslen(pszSrc) + 1)
- to hold all of the combine string plus the null
- terminator.
-
- pszSrc - source string which must be null terminated
-
- ppszDestEnd - if ppszDestEnd is non-null, the function will return a
- pointer to the end of the destination string. If the
- function appended any data, the result will point to the
- null termination character
-
- pcchRemaining - if pcchRemaining is non-null, the function will return the
- number of characters left in the destination string,
- including the null terminator
-
- dwFlags - controls some details of the string copy:
-
- STRSAFE_FILL_BEHIND_NULL
- if the function succeeds, the low byte of dwFlags will be
- used to fill the uninitialize part of destination buffer
- behind the null terminator
-
- STRSAFE_IGNORE_NULLS
- treat NULL string pointers like empty strings (TEXT("")).
- this flag is useful for emulating functions like lstrcat
-
- STRSAFE_FILL_ON_FAILURE
- if the function fails, the low byte of dwFlags will be
- used to fill all of the destination buffer, and it will
- be null terminated. This will overwrite any pre-existing
- or truncated string
-
- STRSAFE_NULL_ON_FAILURE
- if the function fails, the destination buffer will be set
- to the empty string. This will overwrite any pre-existing or
- truncated string
-
- STRSAFE_NO_TRUNCATION
- if the function returns STRSAFE_E_INSUFFICIENT_BUFFER, pszDest
- will not contain a truncated string, it will remain unchanged.
-
-Notes:
- Behavior is undefined if source and destination strings overlap.
-
- pszDest and pszSrc should not be NULL unless the STRSAFE_IGNORE_NULLS flag
- is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszSrc
- may be NULL. An error may still be returned even though NULLS are ignored
- due to insufficient space.
-
-Return Value:
-
- S_OK - if there was source data and it was all concatenated and the
- resultant dest string was null terminated
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all falure cases
-
- STRSAFE_E_INSUFFICIENT_BUFFER /
- HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER
- - this return value is an indication that the operation
- failed due to insufficient space. When this error occurs,
- the destination buffer is modified to contain a truncated
- version of the ideal result and is null terminated. This
- is useful for situations where truncation is ok.
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function
-
---*/
-
-STRSAFEAPI StringCchCatExA(char* pszDest, size_t cchDest, const char* pszSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags);
-STRSAFEAPI StringCchCatExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags);
-#ifdef UNICODE
-#define StringCchCatEx StringCchCatExW
-#else
-#define StringCchCatEx StringCchCatExA
-#endif // !UNICODE
-
-#ifdef STRSAFE_INLINE
-STRSAFEAPI StringCchCatExA(char* pszDest, size_t cchDest, const char* pszSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags)
-{
- HRESULT hr;
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- size_t cbDest;
-
- // safe to multiply cchDest * sizeof(char) since cchDest < STRSAFE_MAX_CCH and sizeof(char) is 1
- cbDest = cchDest * sizeof(char);
-
- hr = StringCatExWorkerA(pszDest, cchDest, cbDest, pszSrc, ppszDestEnd, pcchRemaining, dwFlags);
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCchCatExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags)
-{
- HRESULT hr;
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- size_t cbDest;
-
- // safe to multiply cchDest * sizeof(WCHAR) since cchDest < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2
- cbDest = cchDest * sizeof(WCHAR);
-
- hr = StringCatExWorkerW(pszDest, cchDest, cbDest, pszSrc, ppszDestEnd, pcchRemaining, dwFlags);
- }
-
- return hr;
-}
-#endif // STRSAFE_INLINE
-#endif // !STRSAFE_NO_CCH_FUNCTIONS
-
-
-#ifndef STRSAFE_NO_CB_FUNCTIONS
-/*++
-
-STDAPI StringCbCatEx(LPTSTR pszDest,
- size_t cbDest,
- LPCTSTR pszSrc,
- LPTSTR* ppszDestEnd,
- size_t* pcbRemaining,
- DWORD dwFlags);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'strcat' with
- some additional parameters. In addition to functionality provided by
- StringCbCat, this routine also returns a pointer to the end of the
- destination string and the number of bytes left in the destination string
- including the null terminator. The flags parameter allows additional controls.
-
-Arguments:
-
- pszDest - destination string which must be null terminated
-
- cbDest - size of destination buffer in bytes.
- length must be ((_tcslen(pszDest) + _tcslen(pszSrc) + 1) * sizeof(TCHAR)
- to hold all of the combine string plus the null
- terminator.
-
- pszSrc - source string which must be null terminated
-
- ppszDestEnd - if ppszDestEnd is non-null, the function will return a
- pointer to the end of the destination string. If the
- function appended any data, the result will point to the
- null termination character
-
- pcbRemaining - if pcbRemaining is non-null, the function will return
- the number of bytes left in the destination string,
- including the null terminator
-
- dwFlags - controls some details of the string copy:
-
- STRSAFE_FILL_BEHIND_NULL
- if the function succeeds, the low byte of dwFlags will be
- used to fill the uninitialize part of destination buffer
- behind the null terminator
-
- STRSAFE_IGNORE_NULLS
- treat NULL string pointers like empty strings (TEXT("")).
- this flag is useful for emulating functions like lstrcat
-
- STRSAFE_FILL_ON_FAILURE
- if the function fails, the low byte of dwFlags will be
- used to fill all of the destination buffer, and it will
- be null terminated. This will overwrite any pre-existing
- or truncated string
-
- STRSAFE_NULL_ON_FAILURE
- if the function fails, the destination buffer will be set
- to the empty string. This will overwrite any pre-existing or
- truncated string
-
- STRSAFE_NO_TRUNCATION
- if the function returns STRSAFE_E_INSUFFICIENT_BUFFER, pszDest
- will not contain a truncated string, it will remain unchanged.
-
-Notes:
- Behavior is undefined if source and destination strings overlap.
-
- pszDest and pszSrc should not be NULL unless the STRSAFE_IGNORE_NULLS flag
- is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszSrc
- may be NULL. An error may still be returned even though NULLS are ignored
- due to insufficient space.
-
-Return Value:
-
- S_OK - if there was source data and it was all concatenated and the
- resultant dest string was null terminated
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all falure cases
-
- STRSAFE_E_INSUFFICIENT_BUFFER /
- HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER
- - this return value is an indication that the operation
- failed due to insufficient space. When this error occurs,
- the destination buffer is modified to contain a truncated
- version of the ideal result and is null terminated. This
- is useful for situations where truncation is ok.
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function
-
---*/
-
-STRSAFEAPI StringCbCatExA(char* pszDest, size_t cbDest, const char* pszSrc, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags);
-STRSAFEAPI StringCbCatExW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags);
-#ifdef UNICODE
-#define StringCbCatEx StringCbCatExW
-#else
-#define StringCbCatEx StringCbCatExA
-#endif // !UNICODE
-
-#ifdef STRSAFE_INLINE
-STRSAFEAPI StringCbCatExA(char* pszDest, size_t cbDest, const char* pszSrc, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags)
-{
- HRESULT hr;
- size_t cchDest;
- size_t cchRemaining = 0;
-
- cchDest = cbDest / sizeof(char);
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = StringCatExWorkerA(pszDest, cchDest, cbDest, pszSrc, ppszDestEnd, &cchRemaining, dwFlags);
- }
-
- if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER))
- {
- if (pcbRemaining)
- {
- // safe to multiply cchRemaining * sizeof(char) since cchRemaining < STRSAFE_MAX_CCH and sizeof(char) is 1
- *pcbRemaining = (cchRemaining * sizeof(char)) + (cbDest % sizeof(char));
- }
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCbCatExW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags)
-{
- HRESULT hr;
- size_t cchDest;
- size_t cchRemaining = 0;
-
- cchDest = cbDest / sizeof(WCHAR);
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = StringCatExWorkerW(pszDest, cchDest, cbDest, pszSrc, ppszDestEnd, &cchRemaining, dwFlags);
- }
-
- if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER))
- {
- if (pcbRemaining)
- {
- // safe to multiply cchRemaining * sizeof(WCHAR) since cchRemaining < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2
- *pcbRemaining = (cchRemaining * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR));
- }
- }
-
- return hr;
-}
-#endif // STRSAFE_INLINE
-#endif // !STRSAFE_NO_CB_FUNCTIONS
-
-
-#ifndef STRSAFE_NO_CCH_FUNCTIONS
-/*++
-
-STDAPI StringCchCatN(LPTSTR pszDest,
- size_t cchDest,
- LPCTSTR pszSrc,
- size_t cchMaxAppend);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'strncat'.
- The size of the destination buffer (in characters) is a parameter as well as
- the maximum number of characters to append, excluding the null terminator.
- This function will not write past the end of the destination buffer and it will
- ALWAYS null terminate pszDest (unless it is zero length).
-
- This function returns a hresult, and not a pointer. It returns a S_OK
- if all of pszSrc or the first cchMaxAppend characters were appended to the
- destination string and it was null terminated, otherwise it will return a
- failure code. In failure cases as much of pszSrc will be appended to pszDest
- as possible, and pszDest will be null terminated.
-
-Arguments:
-
- pszDest - destination string which must be null terminated
-
- cchDest - size of destination buffer in characters.
- length must be (_tcslen(pszDest) + min(cchMaxAppend, _tcslen(pszSrc)) + 1)
- to hold all of the combine string plus the null
- terminator.
-
- pszSrc - source string
-
- cchMaxAppend - maximum number of characters to append
-
-Notes:
- Behavior is undefined if source and destination strings overlap.
-
- pszDest and pszSrc should not be NULL. See StringCchCatNEx if you require
- the handling of NULL values.
-
-Return Value:
-
- S_OK - if all of pszSrc or the first cchMaxAppend characters were
- concatenated to pszDest and the resultant dest string was
- null terminated
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all falure cases
-
- STRSAFE_E_INSUFFICIENT_BUFFER /
- HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER
- - this return value is an indication that the operation
- failed due to insufficient space. When this error occurs,
- the destination buffer is modified to contain a truncated
- version of the ideal result and is null terminated. This
- is useful for situations where truncation is ok.
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function
-
---*/
-
-STRSAFEAPI StringCchCatNA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchMaxAppend);
-STRSAFEAPI StringCchCatNW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchMaxAppend);
-#ifdef UNICODE
-#define StringCchCatN StringCchCatNW
-#else
-#define StringCchCatN StringCchCatNA
-#endif // !UNICODE
-
-#ifdef STRSAFE_INLINE
-STRSAFEAPI StringCchCatNA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchMaxAppend)
-{
- HRESULT hr;
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = StringCatNWorkerA(pszDest, cchDest, pszSrc, cchMaxAppend);
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCchCatNW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchMaxAppend)
-{
- HRESULT hr;
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = StringCatNWorkerW(pszDest, cchDest, pszSrc, cchMaxAppend);
- }
-
- return hr;
-}
-#endif // STRSAFE_INLINE
-#endif // !STRSAFE_NO_CCH_FUNCTIONS
-
-
-#ifndef STRSAFE_NO_CB_FUNCTIONS
-/*++
-
-STDAPI StringCbCatN(LPTSTR pszDest,
- size_t cbDest,
- LPCTSTR pszSrc,
- size_t cbMaxAppend);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'strncat'.
- The size of the destination buffer (in bytes) is a parameter as well as
- the maximum number of bytes to append, excluding the null terminator.
- This function will not write past the end of the destination buffer and it will
- ALWAYS null terminate pszDest (unless it is zero length).
-
- This function returns a hresult, and not a pointer. It returns a S_OK
- if all of pszSrc or the first cbMaxAppend bytes were appended to the
- destination string and it was null terminated, otherwise it will return a
- failure code. In failure cases as much of pszSrc will be appended to pszDest
- as possible, and pszDest will be null terminated.
-
-Arguments:
-
- pszDest - destination string which must be null terminated
-
- cbDest - size of destination buffer in bytes.
- length must be ((_tcslen(pszDest) + min(cbMaxAppend / sizeof(TCHAR), _tcslen(pszSrc)) + 1) * sizeof(TCHAR)
- to hold all of the combine string plus the null
- terminator.
-
- pszSrc - source string
-
- cbMaxAppend - maximum number of bytes to append
-
-Notes:
- Behavior is undefined if source and destination strings overlap.
-
- pszDest and pszSrc should not be NULL. See StringCbCatNEx if you require
- the handling of NULL values.
-
-Return Value:
-
- S_OK - if all of pszSrc or the first cbMaxAppend bytes were
- concatenated to pszDest and the resultant dest string was
- null terminated
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all falure cases
-
- STRSAFE_E_INSUFFICIENT_BUFFER /
- HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER
- - this return value is an indication that the operation
- failed due to insufficient space. When this error occurs,
- the destination buffer is modified to contain a truncated
- version of the ideal result and is null terminated. This
- is useful for situations where truncation is ok.
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function
-
---*/
-
-STRSAFEAPI StringCbCatNA(char* pszDest, size_t cbDest, const char* pszSrc, size_t cbMaxAppend);
-STRSAFEAPI StringCbCatNW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, size_t cbMaxAppend);
-#ifdef UNICODE
-#define StringCbCatN StringCbCatNW
-#else
-#define StringCbCatN StringCbCatNA
-#endif // !UNICODE
-
-#ifdef STRSAFE_INLINE
-STRSAFEAPI StringCbCatNA(char* pszDest, size_t cbDest, const char* pszSrc, size_t cbMaxAppend)
-{
- HRESULT hr;
- size_t cchDest;
-
- cchDest = cbDest / sizeof(char);
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- size_t cchMaxAppend;
-
- cchMaxAppend = cbMaxAppend / sizeof(char);
-
- hr = StringCatNWorkerA(pszDest, cchDest, pszSrc, cchMaxAppend);
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCbCatNW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, size_t cbMaxAppend)
-{
- HRESULT hr;
- size_t cchDest;
-
- cchDest = cbDest / sizeof(WCHAR);
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- size_t cchMaxAppend;
-
- cchMaxAppend = cbMaxAppend / sizeof(WCHAR);
-
- hr = StringCatNWorkerW(pszDest, cchDest, pszSrc, cchMaxAppend);
- }
-
- return hr;
-}
-#endif // STRSAFE_INLINE
-#endif // !STRSAFE_NO_CB_FUNCTIONS
-
-
-#ifndef STRSAFE_NO_CCH_FUNCTIONS
-/*++
-
-STDAPI StringCchCatNEx(LPTSTR pszDest,
- size_t cchDest,
- LPCTSTR pszSrc,
- size_t cchMaxAppend,
- LPTSTR* ppszDestEnd,
- size_t* pcchRemaining,
- DWORD dwFlags);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'strncat', with
- some additional parameters. In addition to functionality provided by
- StringCchCatN, this routine also returns a pointer to the end of the
- destination string and the number of characters left in the destination string
- including the null terminator. The flags parameter allows additional controls.
-
-Arguments:
-
- pszDest - destination string which must be null terminated
-
- cchDest - size of destination buffer in characters.
- length must be (_tcslen(pszDest) + min(cchMaxAppend, _tcslen(pszSrc)) + 1)
- to hold all of the combine string plus the null
- terminator.
-
- pszSrc - source string
-
- cchMaxAppend - maximum number of characters to append
-
- ppszDestEnd - if ppszDestEnd is non-null, the function will return a
- pointer to the end of the destination string. If the
- function appended any data, the result will point to the
- null termination character
-
- pcchRemaining - if pcchRemaining is non-null, the function will return the
- number of characters left in the destination string,
- including the null terminator
-
- dwFlags - controls some details of the string copy:
-
- STRSAFE_FILL_BEHIND_NULL
- if the function succeeds, the low byte of dwFlags will be
- used to fill the uninitialize part of destination buffer
- behind the null terminator
-
- STRSAFE_IGNORE_NULLS
- treat NULL string pointers like empty strings (TEXT(""))
-
- STRSAFE_FILL_ON_FAILURE
- if the function fails, the low byte of dwFlags will be
- used to fill all of the destination buffer, and it will
- be null terminated. This will overwrite any pre-existing
- or truncated string
-
- STRSAFE_NULL_ON_FAILURE
- if the function fails, the destination buffer will be set
- to the empty string. This will overwrite any pre-existing or
- truncated string
-
- STRSAFE_NO_TRUNCATION
- if the function returns STRSAFE_E_INSUFFICIENT_BUFFER, pszDest
- will not contain a truncated string, it will remain unchanged.
-
-Notes:
- Behavior is undefined if source and destination strings overlap.
-
- pszDest and pszSrc should not be NULL unless the STRSAFE_IGNORE_NULLS flag
- is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszSrc
- may be NULL. An error may still be returned even though NULLS are ignored
- due to insufficient space.
-
-Return Value:
-
- S_OK - if all of pszSrc or the first cchMaxAppend characters were
- concatenated to pszDest and the resultant dest string was
- null terminated
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all falure cases
-
- STRSAFE_E_INSUFFICIENT_BUFFER /
- HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER
- - this return value is an indication that the operation
- failed due to insufficient space. When this error occurs,
- the destination buffer is modified to contain a truncated
- version of the ideal result and is null terminated. This
- is useful for situations where truncation is ok.
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function
-
---*/
-
-STRSAFEAPI StringCchCatNExA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchMaxAppend, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags);
-STRSAFEAPI StringCchCatNExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchMaxAppend, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags);
-#ifdef UNICODE
-#define StringCchCatNEx StringCchCatNExW
-#else
-#define StringCchCatNEx StringCchCatNExA
-#endif // !UNICODE
-
-#ifdef STRSAFE_INLINE
-STRSAFEAPI StringCchCatNExA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchMaxAppend, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags)
-{
- HRESULT hr;
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- size_t cbDest;
-
- // safe to multiply cchDest * sizeof(char) since cchDest < STRSAFE_MAX_CCH and sizeof(char) is 1
- cbDest = cchDest * sizeof(char);
-
- hr = StringCatNExWorkerA(pszDest, cchDest, cbDest, pszSrc, cchMaxAppend, ppszDestEnd, pcchRemaining, dwFlags);
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCchCatNExW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchMaxAppend, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags)
-{
- HRESULT hr;
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- size_t cbDest;
-
- // safe to multiply cchDest * sizeof(WCHAR) since cchDest < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2
- cbDest = cchDest * sizeof(WCHAR);
-
- hr = StringCatNExWorkerW(pszDest, cchDest, cbDest, pszSrc, cchMaxAppend, ppszDestEnd, pcchRemaining, dwFlags);
- }
-
- return hr;
-}
-#endif // STRSAFE_INLINE
-#endif // !STRSAFE_NO_CCH_FUNCTIONS
-
-
-#ifndef STRSAFE_NO_CB_FUNCTIONS
-/*++
-
-STDAPI StringCbCatNEx(LPTSTR pszDest,
- size_t cbDest,
- LPCTSTR pszSrc,
- size_t cbMaxAppend
- LPTSTR* ppszDestEnd,
- size_t* pcchRemaining,
- DWORD dwFlags);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'strncat', with
- some additional parameters. In addition to functionality provided by
- StringCbCatN, this routine also returns a pointer to the end of the
- destination string and the number of bytes left in the destination string
- including the null terminator. The flags parameter allows additional controls.
-
-Arguments:
-
- pszDest - destination string which must be null terminated
-
- cbDest - size of destination buffer in bytes.
- length must be ((_tcslen(pszDest) + min(cbMaxAppend / sizeof(TCHAR), _tcslen(pszSrc)) + 1) * sizeof(TCHAR)
- to hold all of the combine string plus the null
- terminator.
-
- pszSrc - source string
-
- cbMaxAppend - maximum number of bytes to append
-
- ppszDestEnd - if ppszDestEnd is non-null, the function will return a
- pointer to the end of the destination string. If the
- function appended any data, the result will point to the
- null termination character
-
- pcbRemaining - if pcbRemaining is non-null, the function will return the
- number of bytes left in the destination string,
- including the null terminator
-
- dwFlags - controls some details of the string copy:
-
- STRSAFE_FILL_BEHIND_NULL
- if the function succeeds, the low byte of dwFlags will be
- used to fill the uninitialize part of destination buffer
- behind the null terminator
-
- STRSAFE_IGNORE_NULLS
- treat NULL string pointers like empty strings (TEXT(""))
-
- STRSAFE_FILL_ON_FAILURE
- if the function fails, the low byte of dwFlags will be
- used to fill all of the destination buffer, and it will
- be null terminated. This will overwrite any pre-existing
- or truncated string
-
- STRSAFE_NULL_ON_FAILURE
- if the function fails, the destination buffer will be set
- to the empty string. This will overwrite any pre-existing or
- truncated string
-
- STRSAFE_NO_TRUNCATION
- if the function returns STRSAFE_E_INSUFFICIENT_BUFFER, pszDest
- will not contain a truncated string, it will remain unchanged.
-
-Notes:
- Behavior is undefined if source and destination strings overlap.
-
- pszDest and pszSrc should not be NULL unless the STRSAFE_IGNORE_NULLS flag
- is specified. If STRSAFE_IGNORE_NULLS is passed, both pszDest and pszSrc
- may be NULL. An error may still be returned even though NULLS are ignored
- due to insufficient space.
-
-Return Value:
-
- S_OK - if all of pszSrc or the first cbMaxAppend bytes were
- concatenated to pszDest and the resultant dest string was
- null terminated
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all falure cases
-
- STRSAFE_E_INSUFFICIENT_BUFFER /
- HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER
- - this return value is an indication that the operation
- failed due to insufficient space. When this error occurs,
- the destination buffer is modified to contain a truncated
- version of the ideal result and is null terminated. This
- is useful for situations where truncation is ok.
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function
-
---*/
-
-STRSAFEAPI StringCbCatNExA(char* pszDest, size_t cbDest, const char* pszSrc, size_t cbMaxAppend, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags);
-STRSAFEAPI StringCbCatNExW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, size_t cbMaxAppend, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags);
-#ifdef UNICODE
-#define StringCbCatNEx StringCbCatNExW
-#else
-#define StringCbCatNEx StringCbCatNExA
-#endif // !UNICODE
-
-#ifdef STRSAFE_INLINE
-STRSAFEAPI StringCbCatNExA(char* pszDest, size_t cbDest, const char* pszSrc, size_t cbMaxAppend, char** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags)
-{
- HRESULT hr;
- size_t cchDest;
- size_t cchRemaining = 0;
-
- cchDest = cbDest / sizeof(char);
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- size_t cchMaxAppend;
-
- cchMaxAppend = cbMaxAppend / sizeof(char);
-
- hr = StringCatNExWorkerA(pszDest, cchDest, cbDest, pszSrc, cchMaxAppend, ppszDestEnd, &cchRemaining, dwFlags);
- }
-
- if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER))
- {
- if (pcbRemaining)
- {
- // safe to multiply cchRemaining * sizeof(char) since cchRemaining < STRSAFE_MAX_CCH and sizeof(char) is 1
- *pcbRemaining = (cchRemaining * sizeof(char)) + (cbDest % sizeof(char));
- }
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCbCatNExW(WCHAR* pszDest, size_t cbDest, const WCHAR* pszSrc, size_t cbMaxAppend, WCHAR** ppszDestEnd, size_t* pcbRemaining, unsigned long dwFlags)
-{
- HRESULT hr;
- size_t cchDest;
- size_t cchRemaining = 0;
-
- cchDest = cbDest / sizeof(WCHAR);
-
- if (cchDest > STRSAFE_MAX_CCH)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- size_t cchMaxAppend;
-
- cchMaxAppend = cbMaxAppend / sizeof(WCHAR);
-
- hr = StringCatNExWorkerW(pszDest, cchDest, cbDest, pszSrc, cchMaxAppend, ppszDestEnd, &cchRemaining, dwFlags);
- }
-
- if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER))
- {
- if (pcbRemaining)
- {
- // safe to multiply cchRemaining * sizeof(WCHAR) since cchRemaining < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2
- *pcbRemaining = (cchRemaining * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR));
- }
- }
-
- return hr;
-}
-#endif // STRSAFE_INLINE
-#endif // !STRSAFE_NO_CB_FUNCTIONS
-
-
-#ifndef STRSAFE_NO_CCH_FUNCTIONS
-/*++
-
-STDAPI StringCchGets(LPTSTR pszDest,
- size_t cchDest);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'gets'.
- The size of the destination buffer (in characters) is a parameter and
- this function will not write past the end of this buffer and it will
- ALWAYS null terminate the destination buffer (unless it is zero length).
-
- This routine is not a replacement for fgets. That function does not replace
- newline characters with a null terminator.
-
- This function returns a hresult, and not a pointer. It returns a S_OK
- if any characters were read from stdin and copied to pszDest and pszDest was
- null terminated, otherwise it will return a failure code.
-
-Arguments:
-
- pszDest - destination string
-
- cchDest - size of destination buffer in characters.
-
-Notes:
- pszDest should not be NULL. See StringCchGetsEx if you require the handling
- of NULL values.
-
- cchDest must be > 1 for this function to succeed.
-
-Return Value:
-
- S_OK - data was read from stdin and copied, and the resultant dest
- string was null terminated
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all hresult falure cases
-
- STRSAFE_E_END_OF_FILE
- - this return value indicates an error or end-of-file condition,
- use feof or ferror to determine which one has occurred.
-
- STRSAFE_E_INSUFFICIENT_BUFFER /
- HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER
- - this return value is an indication that there was insufficient
- space in the destination buffer to copy any data
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function.
-
---*/
-
-#endif // !STRSAFE_NO_CCH_FUNCTIONS
-
-#ifndef STRSAFE_NO_CB_FUNCTIONS
-/*++
-
-STDAPI StringCbGets(LPTSTR pszDest,
- size_t cbDest);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'gets'.
- The size of the destination buffer (in bytes) is a parameter and
- this function will not write past the end of this buffer and it will
- ALWAYS null terminate the destination buffer (unless it is zero length).
-
- This routine is not a replacement for fgets. That function does not replace
- newline characters with a null terminator.
-
- This function returns a hresult, and not a pointer. It returns a S_OK
- if any characters were read from stdin and copied to pszDest and pszDest was
- null terminated, otherwise it will return a failure code.
-
-Arguments:
-
- pszDest - destination string
-
- cbDest - size of destination buffer in bytes.
-
-Notes:
- pszDest should not be NULL. See StringCbGetsEx if you require the handling
- of NULL values.
-
- cbDest must be > sizeof(TCHAR) for this function to succeed.
-
-Return Value:
-
- S_OK - data was read from stdin and copied, and the resultant dest
- string was null terminated
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all hresult falure cases
-
- STRSAFE_E_END_OF_FILE
- - this return value indicates an error or end-of-file condition,
- use feof or ferror to determine which one has occurred.
-
- STRSAFE_E_INSUFFICIENT_BUFFER /
- HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER
- - this return value is an indication that there was insufficient
- space in the destination buffer to copy any data
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function.
-
---*/
-
-#endif // !STRSAFE_NO_CB_FUNCTIONS
-
-#ifndef STRSAFE_NO_CCH_FUNCTIONS
-/*++
-
-STDAPI StringCchGetsEx(LPTSTR pszDest,
- size_t cchDest,
- LPTSTR* ppszDestEnd,
- size_t* pcchRemaining,
- DWORD dwFlags);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'gets' with
- some additional parameters. In addition to functionality provided by
- StringCchGets, this routine also returns a pointer to the end of the
- destination string and the number of characters left in the destination string
- including the null terminator. The flags parameter allows additional controls.
-
-Arguments:
-
- pszDest - destination string
-
- cchDest - size of destination buffer in characters.
-
- ppszDestEnd - if ppszDestEnd is non-null, the function will return a
- pointer to the end of the destination string. If the
- function copied any data, the result will point to the
- null termination character
-
- pcchRemaining - if pcchRemaining is non-null, the function will return the
- number of characters left in the destination string,
- including the null terminator
-
- dwFlags - controls some details of the string copy:
-
- STRSAFE_FILL_BEHIND_NULL
- if the function succeeds, the low byte of dwFlags will be
- used to fill the uninitialize part of destination buffer
- behind the null terminator
-
- STRSAFE_IGNORE_NULLS
- treat NULL string pointers like empty strings (TEXT("")).
-
- STRSAFE_FILL_ON_FAILURE
- if the function fails, the low byte of dwFlags will be
- used to fill all of the destination buffer, and it will
- be null terminated.
-
- STRSAFE_NO_TRUNCATION /
- STRSAFE_NULL_ON_FAILURE
- if the function fails, the destination buffer will be set
- to the empty string.
-
-Notes:
- pszDest should not be NULL unless the STRSAFE_IGNORE_NULLS flag is specified.
- If STRSAFE_IGNORE_NULLS is passed and pszDest is NULL, an error may still be
- returned even though NULLS are ignored
-
- cchDest must be > 1 for this function to succeed.
-
-Return Value:
-
- S_OK - data was read from stdin and copied, and the resultant dest
- string was null terminated
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all hresult falure cases
-
- STRSAFE_E_END_OF_FILE
- - this return value indicates an error or end-of-file condition,
- use feof or ferror to determine which one has occurred.
-
- STRSAFE_E_INSUFFICIENT_BUFFER /
- HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER
- - this return value is an indication that there was insufficient
- space in the destination buffer to copy any data
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function.
-
---*/
-
-#endif // !STRSAFE_NO_CCH_FUNCTIONS
-
-#ifndef STRSAFE_NO_CB_FUNCTIONS
-/*++
-
-STDAPI StringCbGetsEx(LPTSTR pszDest,
- size_t cbDest,
- LPTSTR* ppszDestEnd,
- size_t* pcbRemaining,
- DWORD dwFlags);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'gets' with
- some additional parameters. In addition to functionality provided by
- StringCbGets, this routine also returns a pointer to the end of the
- destination string and the number of characters left in the destination string
- including the null terminator. The flags parameter allows additional controls.
-
-Arguments:
-
- pszDest - destination string
-
- cbDest - size of destination buffer in bytes.
-
- ppszDestEnd - if ppszDestEnd is non-null, the function will return a
- pointer to the end of the destination string. If the
- function copied any data, the result will point to the
- null termination character
-
- pcbRemaining - if pbRemaining is non-null, the function will return the
- number of bytes left in the destination string,
- including the null terminator
-
- dwFlags - controls some details of the string copy:
-
- STRSAFE_FILL_BEHIND_NULL
- if the function succeeds, the low byte of dwFlags will be
- used to fill the uninitialize part of destination buffer
- behind the null terminator
-
- STRSAFE_IGNORE_NULLS
- treat NULL string pointers like empty strings (TEXT("")).
-
- STRSAFE_FILL_ON_FAILURE
- if the function fails, the low byte of dwFlags will be
- used to fill all of the destination buffer, and it will
- be null terminated.
-
- STRSAFE_NO_TRUNCATION /
- STRSAFE_NULL_ON_FAILURE
- if the function fails, the destination buffer will be set
- to the empty string.
-
-Notes:
- pszDest should not be NULL unless the STRSAFE_IGNORE_NULLS flag is specified.
- If STRSAFE_IGNORE_NULLS is passed and pszDest is NULL, an error may still be
- returned even though NULLS are ignored
-
- cbDest must be > sizeof(TCHAR) for this function to succeed
-
-Return Value:
-
- S_OK - data was read from stdin and copied, and the resultant dest
- string was null terminated
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all hresult falure cases
-
- STRSAFE_E_END_OF_FILE
- - this return value indicates an error or end-of-file condition,
- use feof or ferror to determine which one has occurred.
-
- STRSAFE_E_INSUFFICIENT_BUFFER /
- HRESULT_CODE(hr) == ERROR_INSUFFICIENT_BUFFER
- - this return value is an indication that there was insufficient
- space in the destination buffer to copy any data
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function.
-
---*/
-
-#endif // !STRSAFE_NO_CB_FUNCTIONS
-
-#ifndef STRSAFE_NO_CCH_FUNCTIONS
-/*++
-
-STDAPI StringCchLength(LPCTSTR psz,
- size_t cchMax,
- size_t* pcch);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'strlen'.
- It is used to make sure a string is not larger than a given length, and
- it optionally returns the current length in characters not including
- the null terminator.
-
- This function returns a hresult, and not a pointer. It returns a S_OK
- if the string is non-null and the length including the null terminator is
- less than or equal to cchMax characters.
-
-Arguments:
-
- psz - string to check the length of
-
- cchMax - maximum number of characters including the null terminator
- that psz is allowed to contain
-
- pcch - if the function succeeds and pcch is non-null, the current length
- in characters of psz excluding the null terminator will be returned.
- This out parameter is equivalent to the return value of strlen(psz)
-
-Notes:
- psz can be null but the function will fail
-
- cchMax should be greater than zero or the function will fail
-
-Return Value:
-
- S_OK - psz is non-null and the length including the null terminator is
- less than or equal to cchMax characters
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all hresult falure cases
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function.
-
---*/
-
-STRSAFEAPI StringCchLengthA(const char* psz, size_t cchMax, size_t* pcch);
-STRSAFEAPI StringCchLengthW(const WCHAR* psz, size_t cchMax, size_t* pcch);
-#ifdef UNICODE
-#define StringCchLength StringCchLengthW
-#else
-#define StringCchLength StringCchLengthA
-#endif // !UNICODE
-
-#ifdef STRSAFE_INLINE
-STRSAFEAPI StringCchLengthA(const char* psz, size_t cchMax, size_t* pcch)
-{
- HRESULT hr;
-
- if ((psz == NULL) || (cchMax > STRSAFE_MAX_CCH))
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = StringLengthWorkerA(psz, cchMax, pcch);
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCchLengthW(const WCHAR* psz, size_t cchMax, size_t* pcch)
-{
- HRESULT hr;
-
- if ((psz == NULL) || (cchMax > STRSAFE_MAX_CCH))
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = StringLengthWorkerW(psz, cchMax, pcch);
- }
-
- return hr;
-}
-#endif // STRSAFE_INLINE
-#endif // !STRSAFE_NO_CCH_FUNCTIONS
-
-
-#ifndef STRSAFE_NO_CB_FUNCTIONS
-/*++
-
-STDAPI StringCbLength(LPCTSTR psz,
- size_t cbMax,
- size_t* pcb);
-
-Routine Description:
-
- This routine is a safer version of the C built-in function 'strlen'.
- It is used to make sure a string is not larger than a given length, and
- it optionally returns the current length in bytes not including
- the null terminator.
-
- This function returns a hresult, and not a pointer. It returns a S_OK
- if the string is non-null and the length including the null terminator is
- less than or equal to cbMax bytes.
-
-Arguments:
-
- psz - string to check the length of
-
- cbMax - maximum number of bytes including the null terminator
- that psz is allowed to contain
-
- pcb - if the function succeeds and pcb is non-null, the current length
- in bytes of psz excluding the null terminator will be returned.
- This out parameter is equivalent to the return value of strlen(psz) * sizeof(TCHAR)
-
-Notes:
- psz can be null but the function will fail
-
- cbMax should be greater than or equal to sizeof(TCHAR) or the function will fail
-
-Return Value:
-
- S_OK - psz is non-null and the length including the null terminator is
- less than or equal to cbMax bytes
-
- failure - you can use the macro HRESULT_CODE() to get a win32 error
- code for all hresult falure cases
-
- It is strongly recommended to use the SUCCEEDED() / FAILED() macros to test the
- return value of this function.
-
---*/
-
-STRSAFEAPI StringCbLengthA(const char* psz, size_t cchMax, size_t* pcch);
-STRSAFEAPI StringCbLengthW(const WCHAR* psz, size_t cchMax, size_t* pcch);
-#ifdef UNICODE
-#define StringCbLength StringCbLengthW
-#else
-#define StringCbLength StringCbLengthA
-#endif // !UNICODE
-
-#ifdef STRSAFE_INLINE
-STRSAFEAPI StringCbLengthA(const char* psz, size_t cbMax, size_t* pcb)
-{
- HRESULT hr;
- size_t cchMax;
- size_t cch = 0;
-
- cchMax = cbMax / sizeof(char);
-
- if ((psz == NULL) || (cchMax > STRSAFE_MAX_CCH))
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = StringLengthWorkerA(psz, cchMax, &cch);
- }
-
- if (SUCCEEDED(hr) && pcb)
- {
- // safe to multiply cch * sizeof(char) since cch < STRSAFE_MAX_CCH and sizeof(char) is 1
- *pcb = cch * sizeof(char);
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCbLengthW(const WCHAR* psz, size_t cbMax, size_t* pcb)
-{
- HRESULT hr;
- size_t cchMax;
- size_t cch = 0;
-
- cchMax = cbMax / sizeof(WCHAR);
-
- if ((psz == NULL) || (cchMax > STRSAFE_MAX_CCH))
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = StringLengthWorkerW(psz, cchMax, &cch);
- }
-
- if (SUCCEEDED(hr) && pcb)
- {
- // safe to multiply cch * sizeof(WCHAR) since cch < STRSAFE_MAX_CCH and sizeof(WCHAR) is 2
- *pcb = cch * sizeof(WCHAR);
- }
-
- return hr;
-}
-#endif // STRSAFE_INLINE
-#endif // !STRSAFE_NO_CB_FUNCTIONS
-
-
-// these are the worker functions that actually do the work
-#ifdef STRSAFE_INLINE
-STRSAFEAPI StringCopyWorkerA(char* pszDest, size_t cchDest, const char* pszSrc)
-{
- HRESULT hr = S_OK;
-
- if (cchDest == 0)
- {
- // can not null terminate a zero-byte dest buffer
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- while (cchDest && (*pszSrc != '\0'))
- {
- *pszDest++ = *pszSrc++;
- cchDest--;
- }
-
- if (cchDest == 0)
- {
- // we are going to truncate pszDest
- pszDest--;
- hr = STRSAFE_E_INSUFFICIENT_BUFFER;
- }
-
- *pszDest= '\0';
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCopyWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc)
-{
- HRESULT hr = S_OK;
-
- if (cchDest == 0)
- {
- // can not null terminate a zero-byte dest buffer
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- while (cchDest && (*pszSrc != L'\0'))
- {
- *pszDest++ = *pszSrc++;
- cchDest--;
- }
-
- if (cchDest == 0)
- {
- // we are going to truncate pszDest
- pszDest--;
- hr = STRSAFE_E_INSUFFICIENT_BUFFER;
- }
-
- *pszDest= L'\0';
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCopyExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, const char* pszSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags)
-{
- HRESULT hr = S_OK;
- char* pszDestEnd = pszDest;
- size_t cchRemaining = 0;
-
- // ASSERT(cbDest == (cchDest * sizeof(char)) ||
- // cbDest == (cchDest * sizeof(char)) + (cbDest % sizeof(char)));
-
- // only accept valid flags
- if (dwFlags & (~STRSAFE_VALID_FLAGS))
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- if (dwFlags & STRSAFE_IGNORE_NULLS)
- {
- if (pszDest == NULL)
- {
- if ((cchDest != 0) || (cbDest != 0))
- {
- // NULL pszDest and non-zero cchDest/cbDest is invalid
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- }
-
- if (pszSrc == NULL)
- {
- pszSrc = "";
- }
- }
-
- if (SUCCEEDED(hr))
- {
- if (cchDest == 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = 0;
-
- // only fail if there was actually src data to copy
- if (*pszSrc != '\0')
- {
- if (pszDest == NULL)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = STRSAFE_E_INSUFFICIENT_BUFFER;
- }
- }
- }
- else
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
-
- while (cchRemaining && (*pszSrc != '\0'))
- {
- *pszDestEnd++= *pszSrc++;
- cchRemaining--;
- }
-
- if (cchRemaining > 0)
- {
- if (dwFlags & STRSAFE_FILL_BEHIND_NULL)
- {
- memset(pszDestEnd + 1, STRSAFE_GET_FILL_PATTERN(dwFlags), ((cchRemaining - 1) * sizeof(char)) + (cbDest % sizeof(char)));
- }
- }
- else
- {
- // we are going to truncate pszDest
- pszDestEnd--;
- cchRemaining++;
-
- hr = STRSAFE_E_INSUFFICIENT_BUFFER;
- }
-
- *pszDestEnd = '\0';
- }
- }
- }
-
- if (FAILED(hr))
- {
- if (pszDest)
- {
- if (dwFlags & STRSAFE_FILL_ON_FAILURE)
- {
- memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest);
-
- if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
- }
- else if (cchDest > 0)
- {
- pszDestEnd = pszDest + cchDest - 1;
- cchRemaining = 1;
-
- // null terminate the end of the string
- *pszDestEnd = '\0';
- }
- }
-
- if (dwFlags & (STRSAFE_NULL_ON_FAILURE | STRSAFE_NO_TRUNCATION))
- {
- if (cchDest > 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
-
- // null terminate the beginning of the string
- *pszDestEnd = '\0';
- }
- }
- }
- }
-
- if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER))
- {
- if (ppszDestEnd)
- {
- *ppszDestEnd = pszDestEnd;
- }
-
- if (pcchRemaining)
- {
- *pcchRemaining = cchRemaining;
- }
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCopyExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags)
-{
- HRESULT hr = S_OK;
- WCHAR* pszDestEnd = pszDest;
- size_t cchRemaining = 0;
-
- // ASSERT(cbDest == (cchDest * sizeof(WCHAR)) ||
- // cbDest == (cchDest * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)));
-
- // only accept valid flags
- if (dwFlags & (~STRSAFE_VALID_FLAGS))
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- if (dwFlags & STRSAFE_IGNORE_NULLS)
- {
- if (pszDest == NULL)
- {
- if ((cchDest != 0) || (cbDest != 0))
- {
- // NULL pszDest and non-zero cchDest/cbDest is invalid
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- }
-
- if (pszSrc == NULL)
- {
- pszSrc = u"";
- }
- }
-
- if (SUCCEEDED(hr))
- {
- if (cchDest == 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = 0;
-
- // only fail if there was actually src data to copy
- if (*pszSrc != u'\0')
- {
- if (pszDest == NULL)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = STRSAFE_E_INSUFFICIENT_BUFFER;
- }
- }
- }
- else
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
-
- while (cchRemaining && (*pszSrc != u'\0'))
- {
- *pszDestEnd++= *pszSrc++;
- cchRemaining--;
- }
-
- if (cchRemaining > 0)
- {
- if (dwFlags & STRSAFE_FILL_BEHIND_NULL)
- {
- memset(pszDestEnd + 1, STRSAFE_GET_FILL_PATTERN(dwFlags), ((cchRemaining - 1) * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)));
- }
- }
- else
- {
- // we are going to truncate pszDest
- pszDestEnd--;
- cchRemaining++;
-
- hr = STRSAFE_E_INSUFFICIENT_BUFFER;
- }
-
- *pszDestEnd = u'\0';
- }
- }
- }
-
- if (FAILED(hr))
- {
- if (pszDest)
- {
- if (dwFlags & STRSAFE_FILL_ON_FAILURE)
- {
- memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest);
-
- if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
- }
- else if (cchDest > 0)
- {
- pszDestEnd = pszDest + cchDest - 1;
- cchRemaining = 1;
-
- // null terminate the end of the string
- *pszDestEnd = L'\0';
- }
- }
-
- if (dwFlags & (STRSAFE_NULL_ON_FAILURE | STRSAFE_NO_TRUNCATION))
- {
- if (cchDest > 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
-
- // null terminate the beginning of the string
- *pszDestEnd = L'\0';
- }
- }
- }
- }
-
- if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER))
- {
- if (ppszDestEnd)
- {
- *ppszDestEnd = pszDestEnd;
- }
-
- if (pcchRemaining)
- {
- *pcchRemaining = cchRemaining;
- }
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCopyNWorkerA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchSrc)
-{
- HRESULT hr = S_OK;
-
- if (cchDest == 0)
- {
- // can not null terminate a zero-byte dest buffer
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- while (cchDest && cchSrc && (*pszSrc != '\0'))
- {
- *pszDest++= *pszSrc++;
- cchDest--;
- cchSrc--;
- }
-
- if (cchDest == 0)
- {
- // we are going to truncate pszDest
- pszDest--;
- hr = STRSAFE_E_INSUFFICIENT_BUFFER;
- }
-
- *pszDest= '\0';
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCopyNWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchSrc)
-{
- HRESULT hr = S_OK;
-
- if (cchDest == 0)
- {
- // can not null terminate a zero-byte dest buffer
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- while (cchDest && cchSrc && (*pszSrc != L'\0'))
- {
- *pszDest++= *pszSrc++;
- cchDest--;
- cchSrc--;
- }
-
- if (cchDest == 0)
- {
- // we are going to truncate pszDest
- pszDest--;
- hr = STRSAFE_E_INSUFFICIENT_BUFFER;
- }
-
- *pszDest= L'\0';
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCopyNExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, const char* pszSrc, size_t cchSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags)
-{
- HRESULT hr = S_OK;
- char* pszDestEnd = pszDest;
- size_t cchRemaining = 0;
-
- // ASSERT(cbDest == (cchDest * sizeof(char)) ||
- // cbDest == (cchDest * sizeof(char)) + (cbDest % sizeof(char)));
-
- // only accept valid flags
- if (dwFlags & (~STRSAFE_VALID_FLAGS))
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- if (dwFlags & STRSAFE_IGNORE_NULLS)
- {
- if (pszDest == NULL)
- {
- if ((cchDest != 0) || (cbDest != 0))
- {
- // NULL pszDest and non-zero cchDest/cbDest is invalid
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- }
-
- if (pszSrc == NULL)
- {
- pszSrc = "";
- }
- }
-
- if (SUCCEEDED(hr))
- {
- if (cchDest == 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = 0;
-
- // only fail if there was actually src data to copy
- if (*pszSrc != '\0')
- {
- if (pszDest == NULL)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = STRSAFE_E_INSUFFICIENT_BUFFER;
- }
- }
- }
- else
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
-
- while (cchRemaining && cchSrc && (*pszSrc != '\0'))
- {
- *pszDestEnd++= *pszSrc++;
- cchRemaining--;
- cchSrc--;
- }
-
- if (cchRemaining > 0)
- {
- if (dwFlags & STRSAFE_FILL_BEHIND_NULL)
- {
- memset(pszDestEnd + 1, STRSAFE_GET_FILL_PATTERN(dwFlags), ((cchRemaining - 1) * sizeof(char)) + (cbDest % sizeof(char)));
- }
- }
- else
- {
- // we are going to truncate pszDest
- pszDestEnd--;
- cchRemaining++;
-
- hr = STRSAFE_E_INSUFFICIENT_BUFFER;
- }
-
- *pszDestEnd = '\0';
- }
- }
- }
-
- if (FAILED(hr))
- {
- if (pszDest)
- {
- if (dwFlags & STRSAFE_FILL_ON_FAILURE)
- {
- memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest);
-
- if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
- }
- else if (cchDest > 0)
- {
- pszDestEnd = pszDest + cchDest - 1;
- cchRemaining = 1;
-
- // null terminate the end of the string
- *pszDestEnd = '\0';
- }
- }
-
- if (dwFlags & (STRSAFE_NULL_ON_FAILURE | STRSAFE_NO_TRUNCATION))
- {
- if (cchDest > 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
-
- // null terminate the beginning of the string
- *pszDestEnd = '\0';
- }
- }
- }
- }
-
- if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER))
- {
- if (ppszDestEnd)
- {
- *ppszDestEnd = pszDestEnd;
- }
-
- if (pcchRemaining)
- {
- *pcchRemaining = cchRemaining;
- }
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCopyNExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, const WCHAR* pszSrc, size_t cchSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags)
-{
- HRESULT hr = S_OK;
- WCHAR* pszDestEnd = pszDest;
- size_t cchRemaining = 0;
-
- // ASSERT(cbDest == (cchDest * sizeof(WCHAR)) ||
- // cbDest == (cchDest * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)));
-
- // only accept valid flags
- if (dwFlags & (~STRSAFE_VALID_FLAGS))
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- if (dwFlags & STRSAFE_IGNORE_NULLS)
- {
- if (pszDest == NULL)
- {
- if ((cchDest != 0) || (cbDest != 0))
- {
- // NULL pszDest and non-zero cchDest/cbDest is invalid
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- }
-
- if (pszSrc == NULL)
- {
- pszSrc = u"";
- }
- }
-
- if (SUCCEEDED(hr))
- {
- if (cchDest == 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = 0;
-
- // only fail if there was actually src data to copy
- if (*pszSrc != L'\0')
- {
- if (pszDest == NULL)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = STRSAFE_E_INSUFFICIENT_BUFFER;
- }
- }
- }
- else
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
-
- while (cchRemaining && cchSrc && (*pszSrc != L'\0'))
- {
- *pszDestEnd++= *pszSrc++;
- cchRemaining--;
- cchSrc--;
- }
-
- if (cchRemaining > 0)
- {
- if (dwFlags & STRSAFE_FILL_BEHIND_NULL)
- {
- memset(pszDestEnd + 1, STRSAFE_GET_FILL_PATTERN(dwFlags), ((cchRemaining - 1) * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)));
- }
- }
- else
- {
- // we are going to truncate pszDest
- pszDestEnd--;
- cchRemaining++;
-
- hr = STRSAFE_E_INSUFFICIENT_BUFFER;
- }
-
- *pszDestEnd = L'\0';
- }
- }
- }
-
- if (FAILED(hr))
- {
- if (pszDest)
- {
- if (dwFlags & STRSAFE_FILL_ON_FAILURE)
- {
- memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest);
-
- if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
- }
- else if (cchDest > 0)
- {
- pszDestEnd = pszDest + cchDest - 1;
- cchRemaining = 1;
-
- // null terminate the end of the string
- *pszDestEnd = L'\0';
- }
- }
-
- if (dwFlags & (STRSAFE_NULL_ON_FAILURE | STRSAFE_NO_TRUNCATION))
- {
- if (cchDest > 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
-
- // null terminate the beginning of the string
- *pszDestEnd = L'\0';
- }
- }
- }
- }
-
- if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER))
- {
- if (ppszDestEnd)
- {
- *ppszDestEnd = pszDestEnd;
- }
-
- if (pcchRemaining)
- {
- *pcchRemaining = cchRemaining;
- }
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCatWorkerA(char* pszDest, size_t cchDest, const char* pszSrc)
-{
- HRESULT hr;
- size_t cchDestCurrent;
-
- hr = StringLengthWorkerA(pszDest, cchDest, &cchDestCurrent);
-
- if (SUCCEEDED(hr))
- {
- hr = StringCopyWorkerA(pszDest + cchDestCurrent,
- cchDest - cchDestCurrent,
- pszSrc);
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCatWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc)
-{
- HRESULT hr;
- size_t cchDestCurrent;
-
- hr = StringLengthWorkerW(pszDest, cchDest, &cchDestCurrent);
-
- if (SUCCEEDED(hr))
- {
- hr = StringCopyWorkerW(pszDest + cchDestCurrent,
- cchDest - cchDestCurrent,
- pszSrc);
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCatExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, const char* pszSrc, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags)
-{
- HRESULT hr = S_OK;
- char* pszDestEnd = pszDest;
- size_t cchRemaining = 0;
-
- // ASSERT(cbDest == (cchDest * sizeof(char)) ||
- // cbDest == (cchDest * sizeof(char)) + (cbDest % sizeof(char)));
-
- // only accept valid flags
- if (dwFlags & (~STRSAFE_VALID_FLAGS))
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- size_t cchDestCurrent;
-
- if (dwFlags & STRSAFE_IGNORE_NULLS)
- {
- if (pszDest == NULL)
- {
- if ((cchDest == 0) && (cbDest == 0))
- {
- cchDestCurrent = 0;
- }
- else
- {
- // NULL pszDest and non-zero cchDest/cbDest is invalid
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- }
- else
- {
- hr = StringLengthWorkerA(pszDest, cchDest, &cchDestCurrent);
-
- if (SUCCEEDED(hr))
- {
- pszDestEnd = pszDest + cchDestCurrent;
- cchRemaining = cchDest - cchDestCurrent;
- }
- }
-
- if (pszSrc == NULL)
- {
- pszSrc = "";
- }
- }
- else
- {
- hr = StringLengthWorkerA(pszDest, cchDest, &cchDestCurrent);
-
- if (SUCCEEDED(hr))
- {
- pszDestEnd = pszDest + cchDestCurrent;
- cchRemaining = cchDest - cchDestCurrent;
- }
- }
-
- if (SUCCEEDED(hr))
- {
- if (cchDest == 0)
- {
- // only fail if there was actually src data to append
- if (*pszSrc != '\0')
- {
- if (pszDest == NULL)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = STRSAFE_E_INSUFFICIENT_BUFFER;
- }
- }
- }
- else
- {
- // we handle the STRSAFE_FILL_ON_FAILURE and STRSAFE_NULL_ON_FAILURE cases below, so do not pass
- // those flags through
- hr = StringCopyExWorkerA(pszDestEnd,
- cchRemaining,
- (cchRemaining * sizeof(char)) + (cbDest % sizeof(char)),
- pszSrc,
- &pszDestEnd,
- &cchRemaining,
- dwFlags & (~(STRSAFE_FILL_ON_FAILURE | STRSAFE_NULL_ON_FAILURE)));
- }
- }
- }
-
- if (FAILED(hr))
- {
- if (pszDest)
- {
- // STRSAFE_NO_TRUNCATION is taken care of by StringCopyExWorkerA()
-
- if (dwFlags & STRSAFE_FILL_ON_FAILURE)
- {
- memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest);
-
- if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
- }
- else
- if (cchDest > 0)
- {
- pszDestEnd = pszDest + cchDest - 1;
- cchRemaining = 1;
-
- // null terminate the end of the string
- *pszDestEnd = '\0';
- }
- }
-
- if (dwFlags & STRSAFE_NULL_ON_FAILURE)
- {
- if (cchDest > 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
-
- // null terminate the beginning of the string
- *pszDestEnd = '\0';
- }
- }
- }
- }
-
- if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER))
- {
- if (ppszDestEnd)
- {
- *ppszDestEnd = pszDestEnd;
- }
-
- if (pcchRemaining)
- {
- *pcchRemaining = cchRemaining;
- }
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCatExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, const WCHAR* pszSrc, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags)
-{
- HRESULT hr = S_OK;
- WCHAR* pszDestEnd = pszDest;
- size_t cchRemaining = 0;
-
- // ASSERT(cbDest == (cchDest * sizeof(WCHAR)) ||
- // cbDest == (cchDest * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)));
-
- // only accept valid flags
- if (dwFlags & (~STRSAFE_VALID_FLAGS))
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- size_t cchDestCurrent;
-
- if (dwFlags & STRSAFE_IGNORE_NULLS)
- {
- if (pszDest == NULL)
- {
- if ((cchDest == 0) && (cbDest == 0))
- {
- cchDestCurrent = 0;
- }
- else
- {
- // NULL pszDest and non-zero cchDest/cbDest is invalid
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- }
- else
- {
- hr = StringLengthWorkerW(pszDest, cchDest, &cchDestCurrent);
-
- if (SUCCEEDED(hr))
- {
- pszDestEnd = pszDest + cchDestCurrent;
- cchRemaining = cchDest - cchDestCurrent;
- }
- }
-
- if (pszSrc == NULL)
- {
- pszSrc = u"";
- }
- }
- else
- {
- hr = StringLengthWorkerW(pszDest, cchDest, &cchDestCurrent);
-
- if (SUCCEEDED(hr))
- {
- pszDestEnd = pszDest + cchDestCurrent;
- cchRemaining = cchDest - cchDestCurrent;
- }
- }
-
- if (SUCCEEDED(hr))
- {
- if (cchDest == 0)
- {
- // only fail if there was actually src data to append
- if (*pszSrc != L'\0')
- {
- if (pszDest == NULL)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = STRSAFE_E_INSUFFICIENT_BUFFER;
- }
- }
- }
- else
- {
- // we handle the STRSAFE_FILL_ON_FAILURE and STRSAFE_NULL_ON_FAILURE cases below, so do not pass
- // those flags through
- hr = StringCopyExWorkerW(pszDestEnd,
- cchRemaining,
- (cchRemaining * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)),
- pszSrc,
- &pszDestEnd,
- &cchRemaining,
- dwFlags & (~(STRSAFE_FILL_ON_FAILURE | STRSAFE_NULL_ON_FAILURE)));
- }
- }
- }
-
- if (FAILED(hr))
- {
- if (pszDest)
- {
- // STRSAFE_NO_TRUNCATION is taken care of by StringCopyExWorkerW()
-
- if (dwFlags & STRSAFE_FILL_ON_FAILURE)
- {
- memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest);
-
- if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
- }
- else if (cchDest > 0)
- {
- pszDestEnd = pszDest + cchDest - 1;
- cchRemaining = 1;
-
- // null terminate the end of the string
- *pszDestEnd = L'\0';
- }
- }
-
- if (dwFlags & STRSAFE_NULL_ON_FAILURE)
- {
- if (cchDest > 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
-
- // null terminate the beginning of the string
- *pszDestEnd = L'\0';
- }
- }
- }
- }
-
- if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER))
- {
- if (ppszDestEnd)
- {
- *ppszDestEnd = pszDestEnd;
- }
-
- if (pcchRemaining)
- {
- *pcchRemaining = cchRemaining;
- }
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCatNWorkerA(char* pszDest, size_t cchDest, const char* pszSrc, size_t cchMaxAppend)
-{
- HRESULT hr;
- size_t cchDestCurrent;
-
- hr = StringLengthWorkerA(pszDest, cchDest, &cchDestCurrent);
-
- if (SUCCEEDED(hr))
- {
- hr = StringCopyNWorkerA(pszDest + cchDestCurrent,
- cchDest - cchDestCurrent,
- pszSrc,
- cchMaxAppend);
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCatNWorkerW(WCHAR* pszDest, size_t cchDest, const WCHAR* pszSrc, size_t cchMaxAppend)
-{
- HRESULT hr;
- size_t cchDestCurrent;
-
- hr = StringLengthWorkerW(pszDest, cchDest, &cchDestCurrent);
-
- if (SUCCEEDED(hr))
- {
- hr = StringCopyNWorkerW(pszDest + cchDestCurrent,
- cchDest - cchDestCurrent,
- pszSrc,
- cchMaxAppend);
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCatNExWorkerA(char* pszDest, size_t cchDest, size_t cbDest, const char* pszSrc, size_t cchMaxAppend, char** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags)
-{
- HRESULT hr = S_OK;
- char* pszDestEnd = pszDest;
- size_t cchRemaining = 0;
- size_t cchDestCurrent = 0;
-
- // ASSERT(cbDest == (cchDest * sizeof(char)) ||
- // cbDest == (cchDest * sizeof(char)) + (cbDest % sizeof(char)));
-
- // only accept valid flags
- if (dwFlags & (~STRSAFE_VALID_FLAGS))
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- if (dwFlags & STRSAFE_IGNORE_NULLS)
- {
- if (pszDest == NULL)
- {
- if ((cchDest == 0) && (cbDest == 0))
- {
- cchDestCurrent = 0;
- }
- else
- {
- // NULL pszDest and non-zero cchDest/cbDest is invalid
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- }
- else
- {
- hr = StringLengthWorkerA(pszDest, cchDest, &cchDestCurrent);
-
- if (SUCCEEDED(hr))
- {
- pszDestEnd = pszDest + cchDestCurrent;
- cchRemaining = cchDest - cchDestCurrent;
- }
- }
-
- if (pszSrc == NULL)
- {
- pszSrc = "";
- }
- }
- else
- {
- hr = StringLengthWorkerA(pszDest, cchDest, &cchDestCurrent);
-
- if (SUCCEEDED(hr))
- {
- pszDestEnd = pszDest + cchDestCurrent;
- cchRemaining = cchDest - cchDestCurrent;
- }
- }
-
- if (SUCCEEDED(hr))
- {
- if (cchDest == 0)
- {
- // only fail if there was actually src data to append
- if (*pszSrc != '\0')
- {
- if (pszDest == NULL)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = STRSAFE_E_INSUFFICIENT_BUFFER;
- }
- }
- }
- else
- {
- // we handle the STRSAFE_FILL_ON_FAILURE and STRSAFE_NULL_ON_FAILURE cases below, so do not pass
- // those flags through
- hr = StringCopyNExWorkerA(pszDestEnd,
- cchRemaining,
- (cchRemaining * sizeof(char)) + (cbDest % sizeof(char)),
- pszSrc,
- cchMaxAppend,
- &pszDestEnd,
- &cchRemaining,
- dwFlags & (~(STRSAFE_FILL_ON_FAILURE | STRSAFE_NULL_ON_FAILURE)));
- }
- }
- }
-
- if (FAILED(hr))
- {
- if (pszDest)
- {
- // STRSAFE_NO_TRUNCATION is taken care of by StringCopyNExWorkerA()
-
- if (dwFlags & STRSAFE_FILL_ON_FAILURE)
- {
- memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest);
-
- if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
- }
- else if (cchDest > 0)
- {
- pszDestEnd = pszDest + cchDest - 1;
- cchRemaining = 1;
-
- // null terminate the end of the string
- *pszDestEnd = '\0';
- }
- }
-
- if (dwFlags & (STRSAFE_NULL_ON_FAILURE))
- {
- if (cchDest > 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
-
- // null terminate the beginning of the string
- *pszDestEnd = '\0';
- }
- }
- }
- }
-
- if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER))
- {
- if (ppszDestEnd)
- {
- *ppszDestEnd = pszDestEnd;
- }
-
- if (pcchRemaining)
- {
- *pcchRemaining = cchRemaining;
- }
- }
-
- return hr;
-}
-
-STRSAFEAPI StringCatNExWorkerW(WCHAR* pszDest, size_t cchDest, size_t cbDest, const WCHAR* pszSrc, size_t cchMaxAppend, WCHAR** ppszDestEnd, size_t* pcchRemaining, unsigned long dwFlags)
-{
- HRESULT hr = S_OK;
- WCHAR* pszDestEnd = pszDest;
- size_t cchRemaining = 0;
- size_t cchDestCurrent = 0;
-
-
- // ASSERT(cbDest == (cchDest * sizeof(WCHAR)) ||
- // cbDest == (cchDest * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)));
-
- // only accept valid flags
- if (dwFlags & (~STRSAFE_VALID_FLAGS))
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- if (dwFlags & STRSAFE_IGNORE_NULLS)
- {
- if (pszDest == NULL)
- {
- if ((cchDest == 0) && (cbDest == 0))
- {
- cchDestCurrent = 0;
- }
- else
- {
- // NULL pszDest and non-zero cchDest/cbDest is invalid
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- }
- else
- {
- hr = StringLengthWorkerW(pszDest, cchDest, &cchDestCurrent);
-
- if (SUCCEEDED(hr))
- {
- pszDestEnd = pszDest + cchDestCurrent;
- cchRemaining = cchDest - cchDestCurrent;
- }
- }
-
- if (pszSrc == NULL)
- {
- pszSrc = u"";
- }
- }
- else
- {
- hr = StringLengthWorkerW(pszDest, cchDest, &cchDestCurrent);
-
- if (SUCCEEDED(hr))
- {
- pszDestEnd = pszDest + cchDestCurrent;
- cchRemaining = cchDest - cchDestCurrent;
- }
- }
-
- if (SUCCEEDED(hr))
- {
- if (cchDest == 0)
- {
- // only fail if there was actually src data to append
- if (*pszSrc != L'\0')
- {
- if (pszDest == NULL)
- {
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
- else
- {
- hr = STRSAFE_E_INSUFFICIENT_BUFFER;
- }
- }
- }
- else
- {
- // we handle the STRSAFE_FILL_ON_FAILURE and STRSAFE_NULL_ON_FAILURE cases below, so do not pass
- // those flags through
- hr = StringCopyNExWorkerW(pszDestEnd,
- cchRemaining,
- (cchRemaining * sizeof(WCHAR)) + (cbDest % sizeof(WCHAR)),
- pszSrc,
- cchMaxAppend,
- &pszDestEnd,
- &cchRemaining,
- dwFlags & (~(STRSAFE_FILL_ON_FAILURE | STRSAFE_NULL_ON_FAILURE)));
- }
- }
- }
-
- if (FAILED(hr))
- {
- if (pszDest)
- {
- // STRSAFE_NO_TRUNCATION is taken care of by StringCopyNExWorkerW()
-
- if (dwFlags & STRSAFE_FILL_ON_FAILURE)
- {
- memset(pszDest, STRSAFE_GET_FILL_PATTERN(dwFlags), cbDest);
-
- if (STRSAFE_GET_FILL_PATTERN(dwFlags) == 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
- }
- else if (cchDest > 0)
- {
- pszDestEnd = pszDest + cchDest - 1;
- cchRemaining = 1;
-
- // null terminate the end of the string
- *pszDestEnd = L'\0';
- }
- }
-
- if (dwFlags & (STRSAFE_NULL_ON_FAILURE))
- {
- if (cchDest > 0)
- {
- pszDestEnd = pszDest;
- cchRemaining = cchDest;
-
- // null terminate the beginning of the string
- *pszDestEnd = L'\0';
- }
- }
- }
- }
-
- if (SUCCEEDED(hr) || (hr == STRSAFE_E_INSUFFICIENT_BUFFER))
- {
- if (ppszDestEnd)
- {
- *ppszDestEnd = pszDestEnd;
- }
-
- if (pcchRemaining)
- {
- *pcchRemaining = cchRemaining;
- }
- }
-
- return hr;
-}
-
-STRSAFEAPI StringLengthWorkerA(const char* psz, size_t cchMax, size_t* pcch)
-{
- HRESULT hr = S_OK;
- size_t cchMaxPrev = cchMax;
-
- while (cchMax && (*psz != '\0'))
- {
- psz++;
- cchMax--;
- }
-
- if (cchMax == 0)
- {
- // the string is longer than cchMax
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
-
- if (SUCCEEDED(hr) && pcch)
- {
- *pcch = cchMaxPrev - cchMax;
- }
-
- return hr;
-}
-
-STRSAFEAPI StringLengthWorkerW(const WCHAR* psz, size_t cchMax, size_t* pcch)
-{
- HRESULT hr = S_OK;
- size_t cchMaxPrev = cchMax;
-
- while (cchMax && (*psz != L'\0'))
- {
- psz++;
- cchMax--;
- }
-
- if (cchMax == 0)
- {
- // the string is longer than cchMax
- hr = STRSAFE_E_INVALID_PARAMETER;
- }
-
- if (SUCCEEDED(hr) && pcch)
- {
- *pcch = cchMaxPrev - cchMax;
+ *pszDest= L'\0';
}
return hr;
#define INVALIDGCVALUE 0xCCCCCCCD
+// Enforce subsections via symbols to workaround bugs in Xcode 15 linker.
+#if defined(__APPLE__)
+.subsections_via_symbols
+#endif
+
#if defined(__APPLE__)
#define C_FUNC(name) _##name
#define EXTERNAL_C_FUNC(name) C_FUNC(name)
#if defined(__APPLE__)
#define C_PLTFUNC(name) _##name
-#elif defined(HOST_ARM64)
+#elif defined(HOST_ARM64) || defined(HOST_POWERPC64)
#define C_PLTFUNC(name) name
#else
#define C_PLTFUNC(name) name@PLT
#include "unixasmmacrosarm.inc"
#elif defined(HOST_ARM64)
#include "unixasmmacrosarm64.inc"
+#elif defined(HOST_S390X)
+#include "unixasmmacross390x.inc"
#elif defined(HOST_LOONGARCH64)
#include "unixasmmacrosloongarch64.inc"
#elif defined(HOST_RISCV64)
#include "unixasmmacrosriscv64.inc"
-#elif defined(HOST_S390X)
-#include "unixasmmacross390x.inc"
+#elif defined(HOST_POWERPC64)
+#include "unixasmmacrosppc64le.inc"
#endif
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+#define C_VAR(Name) rip + C_FUNC(Name)
+
.macro NESTED_ENTRY Name, Section, Handler
LEAF_ENTRY \Name, \Section
.ifnc \Handler, NoHandler
.macro PATCH_LABEL Name
.global C_FUNC(\Name)
-C_FUNC(\Name):
+ C_FUNC(\Name) = .
.endm
.macro LEAF_ENTRY Name, Section
C_FUNC(\Name\()_End):
.global C_FUNC(\Name\()_End)
LEAF_END \Name, \Section
+ // make sure this symbol gets its own address
+ nop
.endm
.macro NOP_6_BYTE
.global C_FUNC(\Name\()_End)
C_FUNC(\Name\()_End):
LEAF_END \Name, \Section
+ // make sure this symbol gets its own address
+ nop
.endm
.macro PREPARE_EXTERNAL_VAR Name, HelperReg
C_FUNC(\Name\()_End):
.global C_FUNC(\Name\()_End)
LEAF_END \Name, \Section
+ // make sure this symbol gets its own address
+ nop
.endm
.macro PREPARE_EXTERNAL_VAR Name, HelperReg
#endif
.endm
+
+//-----------------------------------------------------------------------------
+// Macro used to check (in debug builds only) whether the stack is 16-bytes aligned (a requirement before calling
+// out into C++/OS code). Invoke this directly after your prolog (if the stack frame size is fixed) or directly
+// before a call (if you have a frame pointer and a dynamic stack). A breakpoint will be invoked if the stack
+// is misaligned.
+//
+.macro CHECK_STACK_ALIGNMENT
+
+#ifdef _DEBUG
+ add x9, sp, xzr
+ tst x9, #15
+ beq 0f
+ EMIT_BREAKPOINT
+0:
+#endif
+.endm
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+.macro NESTED_ENTRY Name, Section, Handler
+ LEAF_ENTRY \Name, \Section
+ .ifnc \Handler, NoHandler
+ .personality C_FUNC(\Handler)
+ .endif
+.endm
+
+.macro NESTED_END Name, Section
+ LEAF_END \Name, \Section
+.endm
+
+.macro PATCH_LABEL Name
+ .global C_FUNC(\Name)
+C_FUNC(\Name):
+.endm
+
+.macro LEAF_ENTRY Name, Section
+ .global C_FUNC(\Name)
+ .type \Name, %function
+C_FUNC(\Name):
+ .cfi_startproc
+.endm
+
+.macro LEAF_END Name, Section
+ .size \Name, .-\Name
+ .cfi_endproc
+.endm
+
+.macro LEAF_END_MARKED Name, Section
+C_FUNC(\Name\()_End):
+ .global C_FUNC(\Name\()_End)
+ LEAF_END \Name, \Section
+.endm
__PWTB_FloatArgumentRegisters = \extraLocals
- .if ((__PWTB_FloatArgumentRegisters % 16) != 0)
+ // Note, stack (see __PWTB_StackAlloc variable) must be 16 byte aligned,
+ // SIZEOF__FloatArgumentRegisters (0x40) is 16 byte aligned, that mean initial
+ // __PWTB_FloatArgumentRegisters value must be not 16 byte aligned and
+ // after add (120 + 64) provide 16 byte aligned result.
+ .if ((__PWTB_FloatArgumentRegisters % 16) == 0)
__PWTB_FloatArgumentRegisters = __PWTB_FloatArgumentRegisters + 8
.endif
.endm
.macro EPILOG_WITH_TRANSITION_BLOCK_RETURN
-// TODO RISCV NYI
- sw ra, 0(zero)
+
+ RESTORE_CALLEESAVED_REGISTERS sp, __PWTB_CalleeSavedRegisters
+
+ EPILOG_RESTORE_REG_PAIR fp, ra, __PWTB_CalleeSavedRegisters
+
+ EPILOG_STACK_FREE __PWTB_StackAlloc
+
+ ret
.endm
.global C_FUNC(\Name\()_End)
LEAF_END \Name, \Section
.endm
-
C_FUNC(\Name\()_End):
.global C_FUNC(\Name\()_End)
LEAF_END \Name, \Section
+ // make sure this symbol gets its own address
+ nop
.endm
.macro PROLOG_BEG
MIDL_DEFINE_GUID(IID, IID_ICorDebugFunction4,0x72965963,0x34fd,0x46e9,0x94,0x34,0xb8,0x17,0xfe,0x6e,0x7f,0x43);
+MIDL_DEFINE_GUID(IID, IID_ICorDebugFunction5,0x9D4DAB7B,0x3401,0x4F37,0xBD,0x08,0xCA,0x09,0xF3,0xFD,0xF1,0x0F);
+
MIDL_DEFINE_GUID(IID, IID_ICorDebugCode,0xCC7BCAF4,0x8A68,0x11d2,0x98,0x3C,0x00,0x00,0xF8,0x08,0x34,0x2D);
MIDL_DEFINE_GUID(IID, IID_ICorDebugExceptionObjectValue,0xAE4CA65D,0x59DD,0x42A2,0x83,0xA5,0x57,0xE8,0xA0,0x8D,0x87,0x19);
+MIDL_DEFINE_GUID(IID, IID_ICorDebugExceptionObjectValue2,0xe3b2f332,0xcc46,0x4f1e,0xab,0x4e,0x54,0x00,0xe3,0x32,0x19,0x5e);
+
+
MIDL_DEFINE_GUID(IID, LIBID_CORDBLib,0x53D13620,0xF417,0x11d1,0x97,0x62,0xA6,0x38,0x26,0xA4,0xF2,0x55);
MIDL_DEFINE_GUID(IID, IID_ICorProfilerInfo12,0x27b24ccd,0x1cb1,0x47c5,0x96,0xee,0x98,0x19,0x0d,0xc3,0x09,0x59);
-MIDL_DEFINE_GUID(IID, IID_ICorProfilerInfo13,0x19C4179D,0xF92C,0x4D25,0x9F,0x20,0x5F,0xEB,0xFB,0xBD,0x29,0x78);
+MIDL_DEFINE_GUID(IID, IID_ICorProfilerInfo13,0x6E6C7EE2,0x0701,0x4EC2,0x9D,0x29,0x2E,0x87,0x33,0xB6,0x69,0x34);
+
+
+MIDL_DEFINE_GUID(IID, IID_ICorProfilerInfo14,0xF460E352,0xD76D,0x4FE9,0x83,0x5F,0xF6,0xAF,0x9D,0x6E,0x86,0x2D);
+
+
+MIDL_DEFINE_GUID(IID, IID_ICorProfilerInfo15,0xB446462D,0xBD22,0x41DD,0x87,0x2D,0xDC,0x71,0x4C,0x49,0xEB,0x56);
MIDL_DEFINE_GUID(IID, IID_ICorProfilerMethodEnum,0xFCCEE788,0x0088,0x454B,0xA8,0x11,0xC9,0x9F,0x29,0x8D,0x19,0x42);
/* link this file in with the server and any clients */
- /* File created by MIDL compiler version 8.01.0622 */
+ /* File created by MIDL compiler version 8.01.0628 */
/* Compiler settings for metahost.idl:
- Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.01.0622
+ Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0628
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
+
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
- /* File created by MIDL compiler version 8.01.0622 */
+ /* File created by MIDL compiler version 8.01.0628 */
/* Compiler settings for cordebug.idl:
- Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0622
+ Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0628
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
#pragma once
#endif
+#ifndef DECLSPEC_XFGVIRT
+#if defined(_CONTROL_FLOW_GUARD_XFG)
+#define DECLSPEC_XFGVIRT(base, func) __declspec(xfg_virtual(base, func))
+#else
+#define DECLSPEC_XFGVIRT(base, func)
+#endif
+#endif
+
/* Forward Declarations */
#ifndef __ICorDebugDataTarget_FWD_DEFINED__
#define __ICorDebugDataTarget_FWD_DEFINED__
typedef interface ICorDebugDataTarget ICorDebugDataTarget;
-#endif /* __ICorDebugDataTarget_FWD_DEFINED__ */
+#endif /* __ICorDebugDataTarget_FWD_DEFINED__ */
#ifndef __ICorDebugStaticFieldSymbol_FWD_DEFINED__
#define __ICorDebugStaticFieldSymbol_FWD_DEFINED__
typedef interface ICorDebugStaticFieldSymbol ICorDebugStaticFieldSymbol;
-#endif /* __ICorDebugStaticFieldSymbol_FWD_DEFINED__ */
+#endif /* __ICorDebugStaticFieldSymbol_FWD_DEFINED__ */
#ifndef __ICorDebugInstanceFieldSymbol_FWD_DEFINED__
#define __ICorDebugInstanceFieldSymbol_FWD_DEFINED__
typedef interface ICorDebugInstanceFieldSymbol ICorDebugInstanceFieldSymbol;
-#endif /* __ICorDebugInstanceFieldSymbol_FWD_DEFINED__ */
+#endif /* __ICorDebugInstanceFieldSymbol_FWD_DEFINED__ */
#ifndef __ICorDebugVariableSymbol_FWD_DEFINED__
#define __ICorDebugVariableSymbol_FWD_DEFINED__
typedef interface ICorDebugVariableSymbol ICorDebugVariableSymbol;
-#endif /* __ICorDebugVariableSymbol_FWD_DEFINED__ */
+#endif /* __ICorDebugVariableSymbol_FWD_DEFINED__ */
#ifndef __ICorDebugMemoryBuffer_FWD_DEFINED__
#define __ICorDebugMemoryBuffer_FWD_DEFINED__
typedef interface ICorDebugMemoryBuffer ICorDebugMemoryBuffer;
-#endif /* __ICorDebugMemoryBuffer_FWD_DEFINED__ */
+#endif /* __ICorDebugMemoryBuffer_FWD_DEFINED__ */
#ifndef __ICorDebugMergedAssemblyRecord_FWD_DEFINED__
#define __ICorDebugMergedAssemblyRecord_FWD_DEFINED__
typedef interface ICorDebugMergedAssemblyRecord ICorDebugMergedAssemblyRecord;
-#endif /* __ICorDebugMergedAssemblyRecord_FWD_DEFINED__ */
+#endif /* __ICorDebugMergedAssemblyRecord_FWD_DEFINED__ */
#ifndef __ICorDebugSymbolProvider_FWD_DEFINED__
#define __ICorDebugSymbolProvider_FWD_DEFINED__
typedef interface ICorDebugSymbolProvider ICorDebugSymbolProvider;
-#endif /* __ICorDebugSymbolProvider_FWD_DEFINED__ */
+#endif /* __ICorDebugSymbolProvider_FWD_DEFINED__ */
#ifndef __ICorDebugSymbolProvider2_FWD_DEFINED__
#define __ICorDebugSymbolProvider2_FWD_DEFINED__
typedef interface ICorDebugSymbolProvider2 ICorDebugSymbolProvider2;
-#endif /* __ICorDebugSymbolProvider2_FWD_DEFINED__ */
+#endif /* __ICorDebugSymbolProvider2_FWD_DEFINED__ */
#ifndef __ICorDebugVirtualUnwinder_FWD_DEFINED__
#define __ICorDebugVirtualUnwinder_FWD_DEFINED__
typedef interface ICorDebugVirtualUnwinder ICorDebugVirtualUnwinder;
-#endif /* __ICorDebugVirtualUnwinder_FWD_DEFINED__ */
+#endif /* __ICorDebugVirtualUnwinder_FWD_DEFINED__ */
#ifndef __ICorDebugDataTarget2_FWD_DEFINED__
#define __ICorDebugDataTarget2_FWD_DEFINED__
typedef interface ICorDebugDataTarget2 ICorDebugDataTarget2;
-#endif /* __ICorDebugDataTarget2_FWD_DEFINED__ */
+#endif /* __ICorDebugDataTarget2_FWD_DEFINED__ */
#ifndef __ICorDebugLoadedModule_FWD_DEFINED__
#define __ICorDebugLoadedModule_FWD_DEFINED__
typedef interface ICorDebugLoadedModule ICorDebugLoadedModule;
-#endif /* __ICorDebugLoadedModule_FWD_DEFINED__ */
+#endif /* __ICorDebugLoadedModule_FWD_DEFINED__ */
#ifndef __ICorDebugDataTarget3_FWD_DEFINED__
#define __ICorDebugDataTarget3_FWD_DEFINED__
typedef interface ICorDebugDataTarget3 ICorDebugDataTarget3;
-#endif /* __ICorDebugDataTarget3_FWD_DEFINED__ */
+#endif /* __ICorDebugDataTarget3_FWD_DEFINED__ */
#ifndef __ICorDebugDataTarget4_FWD_DEFINED__
#define __ICorDebugDataTarget4_FWD_DEFINED__
typedef interface ICorDebugDataTarget4 ICorDebugDataTarget4;
-#endif /* __ICorDebugDataTarget4_FWD_DEFINED__ */
+#endif /* __ICorDebugDataTarget4_FWD_DEFINED__ */
#ifndef __ICorDebugMutableDataTarget_FWD_DEFINED__
#define __ICorDebugMutableDataTarget_FWD_DEFINED__
typedef interface ICorDebugMutableDataTarget ICorDebugMutableDataTarget;
-#endif /* __ICorDebugMutableDataTarget_FWD_DEFINED__ */
+#endif /* __ICorDebugMutableDataTarget_FWD_DEFINED__ */
#ifndef __ICorDebugMetaDataLocator_FWD_DEFINED__
#define __ICorDebugMetaDataLocator_FWD_DEFINED__
typedef interface ICorDebugMetaDataLocator ICorDebugMetaDataLocator;
-#endif /* __ICorDebugMetaDataLocator_FWD_DEFINED__ */
+#endif /* __ICorDebugMetaDataLocator_FWD_DEFINED__ */
#ifndef __ICorDebugManagedCallback_FWD_DEFINED__
#define __ICorDebugManagedCallback_FWD_DEFINED__
typedef interface ICorDebugManagedCallback ICorDebugManagedCallback;
-#endif /* __ICorDebugManagedCallback_FWD_DEFINED__ */
+#endif /* __ICorDebugManagedCallback_FWD_DEFINED__ */
#ifndef __ICorDebugManagedCallback3_FWD_DEFINED__
#define __ICorDebugManagedCallback3_FWD_DEFINED__
typedef interface ICorDebugManagedCallback3 ICorDebugManagedCallback3;
-#endif /* __ICorDebugManagedCallback3_FWD_DEFINED__ */
+#endif /* __ICorDebugManagedCallback3_FWD_DEFINED__ */
#ifndef __ICorDebugManagedCallback4_FWD_DEFINED__
#define __ICorDebugManagedCallback4_FWD_DEFINED__
typedef interface ICorDebugManagedCallback4 ICorDebugManagedCallback4;
-#endif /* __ICorDebugManagedCallback4_FWD_DEFINED__ */
+#endif /* __ICorDebugManagedCallback4_FWD_DEFINED__ */
#ifndef __ICorDebugManagedCallback2_FWD_DEFINED__
#define __ICorDebugManagedCallback2_FWD_DEFINED__
typedef interface ICorDebugManagedCallback2 ICorDebugManagedCallback2;
-#endif /* __ICorDebugManagedCallback2_FWD_DEFINED__ */
+#endif /* __ICorDebugManagedCallback2_FWD_DEFINED__ */
#ifndef __ICorDebugUnmanagedCallback_FWD_DEFINED__
#define __ICorDebugUnmanagedCallback_FWD_DEFINED__
typedef interface ICorDebugUnmanagedCallback ICorDebugUnmanagedCallback;
-#endif /* __ICorDebugUnmanagedCallback_FWD_DEFINED__ */
+#endif /* __ICorDebugUnmanagedCallback_FWD_DEFINED__ */
#ifndef __ICorDebug_FWD_DEFINED__
#define __ICorDebug_FWD_DEFINED__
typedef interface ICorDebug ICorDebug;
-#endif /* __ICorDebug_FWD_DEFINED__ */
+#endif /* __ICorDebug_FWD_DEFINED__ */
#ifndef __ICorDebugRemoteTarget_FWD_DEFINED__
#define __ICorDebugRemoteTarget_FWD_DEFINED__
typedef interface ICorDebugRemoteTarget ICorDebugRemoteTarget;
-#endif /* __ICorDebugRemoteTarget_FWD_DEFINED__ */
+#endif /* __ICorDebugRemoteTarget_FWD_DEFINED__ */
#ifndef __ICorDebugRemote_FWD_DEFINED__
#define __ICorDebugRemote_FWD_DEFINED__
typedef interface ICorDebugRemote ICorDebugRemote;
-#endif /* __ICorDebugRemote_FWD_DEFINED__ */
+#endif /* __ICorDebugRemote_FWD_DEFINED__ */
#ifndef __ICorDebug2_FWD_DEFINED__
#define __ICorDebug2_FWD_DEFINED__
typedef interface ICorDebug2 ICorDebug2;
-#endif /* __ICorDebug2_FWD_DEFINED__ */
+#endif /* __ICorDebug2_FWD_DEFINED__ */
#ifndef __ICorDebugController_FWD_DEFINED__
#define __ICorDebugController_FWD_DEFINED__
typedef interface ICorDebugController ICorDebugController;
-#endif /* __ICorDebugController_FWD_DEFINED__ */
+#endif /* __ICorDebugController_FWD_DEFINED__ */
#ifndef __ICorDebugAppDomain_FWD_DEFINED__
#define __ICorDebugAppDomain_FWD_DEFINED__
typedef interface ICorDebugAppDomain ICorDebugAppDomain;
-#endif /* __ICorDebugAppDomain_FWD_DEFINED__ */
+#endif /* __ICorDebugAppDomain_FWD_DEFINED__ */
#ifndef __ICorDebugAppDomain2_FWD_DEFINED__
#define __ICorDebugAppDomain2_FWD_DEFINED__
typedef interface ICorDebugAppDomain2 ICorDebugAppDomain2;
-#endif /* __ICorDebugAppDomain2_FWD_DEFINED__ */
+#endif /* __ICorDebugAppDomain2_FWD_DEFINED__ */
#ifndef __ICorDebugEnum_FWD_DEFINED__
#define __ICorDebugEnum_FWD_DEFINED__
typedef interface ICorDebugEnum ICorDebugEnum;
-#endif /* __ICorDebugEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugEnum_FWD_DEFINED__ */
#ifndef __ICorDebugGuidToTypeEnum_FWD_DEFINED__
#define __ICorDebugGuidToTypeEnum_FWD_DEFINED__
typedef interface ICorDebugGuidToTypeEnum ICorDebugGuidToTypeEnum;
-#endif /* __ICorDebugGuidToTypeEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugGuidToTypeEnum_FWD_DEFINED__ */
#ifndef __ICorDebugAppDomain3_FWD_DEFINED__
#define __ICorDebugAppDomain3_FWD_DEFINED__
typedef interface ICorDebugAppDomain3 ICorDebugAppDomain3;
-#endif /* __ICorDebugAppDomain3_FWD_DEFINED__ */
+#endif /* __ICorDebugAppDomain3_FWD_DEFINED__ */
#ifndef __ICorDebugAppDomain4_FWD_DEFINED__
#define __ICorDebugAppDomain4_FWD_DEFINED__
typedef interface ICorDebugAppDomain4 ICorDebugAppDomain4;
-#endif /* __ICorDebugAppDomain4_FWD_DEFINED__ */
+#endif /* __ICorDebugAppDomain4_FWD_DEFINED__ */
#ifndef __ICorDebugAssembly_FWD_DEFINED__
#define __ICorDebugAssembly_FWD_DEFINED__
typedef interface ICorDebugAssembly ICorDebugAssembly;
-#endif /* __ICorDebugAssembly_FWD_DEFINED__ */
+#endif /* __ICorDebugAssembly_FWD_DEFINED__ */
#ifndef __ICorDebugAssembly2_FWD_DEFINED__
#define __ICorDebugAssembly2_FWD_DEFINED__
typedef interface ICorDebugAssembly2 ICorDebugAssembly2;
-#endif /* __ICorDebugAssembly2_FWD_DEFINED__ */
+#endif /* __ICorDebugAssembly2_FWD_DEFINED__ */
#ifndef __ICorDebugAssembly3_FWD_DEFINED__
#define __ICorDebugAssembly3_FWD_DEFINED__
typedef interface ICorDebugAssembly3 ICorDebugAssembly3;
-#endif /* __ICorDebugAssembly3_FWD_DEFINED__ */
+#endif /* __ICorDebugAssembly3_FWD_DEFINED__ */
#ifndef __ICorDebugHeapEnum_FWD_DEFINED__
#define __ICorDebugHeapEnum_FWD_DEFINED__
typedef interface ICorDebugHeapEnum ICorDebugHeapEnum;
-#endif /* __ICorDebugHeapEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugHeapEnum_FWD_DEFINED__ */
#ifndef __ICorDebugHeapSegmentEnum_FWD_DEFINED__
#define __ICorDebugHeapSegmentEnum_FWD_DEFINED__
typedef interface ICorDebugHeapSegmentEnum ICorDebugHeapSegmentEnum;
-#endif /* __ICorDebugHeapSegmentEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugHeapSegmentEnum_FWD_DEFINED__ */
#ifndef __ICorDebugGCReferenceEnum_FWD_DEFINED__
#define __ICorDebugGCReferenceEnum_FWD_DEFINED__
typedef interface ICorDebugGCReferenceEnum ICorDebugGCReferenceEnum;
-#endif /* __ICorDebugGCReferenceEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugGCReferenceEnum_FWD_DEFINED__ */
#ifndef __ICorDebugProcess_FWD_DEFINED__
#define __ICorDebugProcess_FWD_DEFINED__
typedef interface ICorDebugProcess ICorDebugProcess;
-#endif /* __ICorDebugProcess_FWD_DEFINED__ */
+#endif /* __ICorDebugProcess_FWD_DEFINED__ */
#ifndef __ICorDebugProcess2_FWD_DEFINED__
#define __ICorDebugProcess2_FWD_DEFINED__
typedef interface ICorDebugProcess2 ICorDebugProcess2;
-#endif /* __ICorDebugProcess2_FWD_DEFINED__ */
+#endif /* __ICorDebugProcess2_FWD_DEFINED__ */
#ifndef __ICorDebugProcess3_FWD_DEFINED__
#define __ICorDebugProcess3_FWD_DEFINED__
typedef interface ICorDebugProcess3 ICorDebugProcess3;
-#endif /* __ICorDebugProcess3_FWD_DEFINED__ */
+#endif /* __ICorDebugProcess3_FWD_DEFINED__ */
#ifndef __ICorDebugProcess5_FWD_DEFINED__
#define __ICorDebugProcess5_FWD_DEFINED__
typedef interface ICorDebugProcess5 ICorDebugProcess5;
-#endif /* __ICorDebugProcess5_FWD_DEFINED__ */
+#endif /* __ICorDebugProcess5_FWD_DEFINED__ */
#ifndef __ICorDebugDebugEvent_FWD_DEFINED__
#define __ICorDebugDebugEvent_FWD_DEFINED__
typedef interface ICorDebugDebugEvent ICorDebugDebugEvent;
-#endif /* __ICorDebugDebugEvent_FWD_DEFINED__ */
+#endif /* __ICorDebugDebugEvent_FWD_DEFINED__ */
#ifndef __ICorDebugProcess6_FWD_DEFINED__
#define __ICorDebugProcess6_FWD_DEFINED__
typedef interface ICorDebugProcess6 ICorDebugProcess6;
-#endif /* __ICorDebugProcess6_FWD_DEFINED__ */
+#endif /* __ICorDebugProcess6_FWD_DEFINED__ */
#ifndef __ICorDebugProcess7_FWD_DEFINED__
#define __ICorDebugProcess7_FWD_DEFINED__
typedef interface ICorDebugProcess7 ICorDebugProcess7;
-#endif /* __ICorDebugProcess7_FWD_DEFINED__ */
+#endif /* __ICorDebugProcess7_FWD_DEFINED__ */
#ifndef __ICorDebugProcess8_FWD_DEFINED__
#define __ICorDebugProcess8_FWD_DEFINED__
typedef interface ICorDebugProcess8 ICorDebugProcess8;
-#endif /* __ICorDebugProcess8_FWD_DEFINED__ */
+#endif /* __ICorDebugProcess8_FWD_DEFINED__ */
#ifndef __ICorDebugProcess10_FWD_DEFINED__
#define __ICorDebugProcess10_FWD_DEFINED__
typedef interface ICorDebugProcess10 ICorDebugProcess10;
-#endif /* __ICorDebugProcess10_FWD_DEFINED__ */
+#endif /* __ICorDebugProcess10_FWD_DEFINED__ */
#ifndef __ICorDebugMemoryRangeEnum_FWD_DEFINED__
#define __ICorDebugMemoryRangeEnum_FWD_DEFINED__
typedef interface ICorDebugMemoryRangeEnum ICorDebugMemoryRangeEnum;
-#endif /* __ICorDebugMemoryRangeEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugMemoryRangeEnum_FWD_DEFINED__ */
#ifndef __ICorDebugProcess11_FWD_DEFINED__
#define __ICorDebugProcess11_FWD_DEFINED__
typedef interface ICorDebugProcess11 ICorDebugProcess11;
-#endif /* __ICorDebugProcess11_FWD_DEFINED__ */
+#endif /* __ICorDebugProcess11_FWD_DEFINED__ */
#ifndef __ICorDebugModuleDebugEvent_FWD_DEFINED__
#define __ICorDebugModuleDebugEvent_FWD_DEFINED__
typedef interface ICorDebugModuleDebugEvent ICorDebugModuleDebugEvent;
-#endif /* __ICorDebugModuleDebugEvent_FWD_DEFINED__ */
+#endif /* __ICorDebugModuleDebugEvent_FWD_DEFINED__ */
#ifndef __ICorDebugExceptionDebugEvent_FWD_DEFINED__
#define __ICorDebugExceptionDebugEvent_FWD_DEFINED__
typedef interface ICorDebugExceptionDebugEvent ICorDebugExceptionDebugEvent;
-#endif /* __ICorDebugExceptionDebugEvent_FWD_DEFINED__ */
+#endif /* __ICorDebugExceptionDebugEvent_FWD_DEFINED__ */
#ifndef __ICorDebugBreakpoint_FWD_DEFINED__
#define __ICorDebugBreakpoint_FWD_DEFINED__
typedef interface ICorDebugBreakpoint ICorDebugBreakpoint;
-#endif /* __ICorDebugBreakpoint_FWD_DEFINED__ */
+#endif /* __ICorDebugBreakpoint_FWD_DEFINED__ */
#ifndef __ICorDebugFunctionBreakpoint_FWD_DEFINED__
#define __ICorDebugFunctionBreakpoint_FWD_DEFINED__
typedef interface ICorDebugFunctionBreakpoint ICorDebugFunctionBreakpoint;
-#endif /* __ICorDebugFunctionBreakpoint_FWD_DEFINED__ */
+#endif /* __ICorDebugFunctionBreakpoint_FWD_DEFINED__ */
#ifndef __ICorDebugModuleBreakpoint_FWD_DEFINED__
#define __ICorDebugModuleBreakpoint_FWD_DEFINED__
typedef interface ICorDebugModuleBreakpoint ICorDebugModuleBreakpoint;
-#endif /* __ICorDebugModuleBreakpoint_FWD_DEFINED__ */
+#endif /* __ICorDebugModuleBreakpoint_FWD_DEFINED__ */
#ifndef __ICorDebugValueBreakpoint_FWD_DEFINED__
#define __ICorDebugValueBreakpoint_FWD_DEFINED__
typedef interface ICorDebugValueBreakpoint ICorDebugValueBreakpoint;
-#endif /* __ICorDebugValueBreakpoint_FWD_DEFINED__ */
+#endif /* __ICorDebugValueBreakpoint_FWD_DEFINED__ */
#ifndef __ICorDebugStepper_FWD_DEFINED__
#define __ICorDebugStepper_FWD_DEFINED__
typedef interface ICorDebugStepper ICorDebugStepper;
-#endif /* __ICorDebugStepper_FWD_DEFINED__ */
+#endif /* __ICorDebugStepper_FWD_DEFINED__ */
#ifndef __ICorDebugStepper2_FWD_DEFINED__
#define __ICorDebugStepper2_FWD_DEFINED__
typedef interface ICorDebugStepper2 ICorDebugStepper2;
-#endif /* __ICorDebugStepper2_FWD_DEFINED__ */
+#endif /* __ICorDebugStepper2_FWD_DEFINED__ */
#ifndef __ICorDebugRegisterSet_FWD_DEFINED__
#define __ICorDebugRegisterSet_FWD_DEFINED__
typedef interface ICorDebugRegisterSet ICorDebugRegisterSet;
-#endif /* __ICorDebugRegisterSet_FWD_DEFINED__ */
+#endif /* __ICorDebugRegisterSet_FWD_DEFINED__ */
#ifndef __ICorDebugRegisterSet2_FWD_DEFINED__
#define __ICorDebugRegisterSet2_FWD_DEFINED__
typedef interface ICorDebugRegisterSet2 ICorDebugRegisterSet2;
-#endif /* __ICorDebugRegisterSet2_FWD_DEFINED__ */
+#endif /* __ICorDebugRegisterSet2_FWD_DEFINED__ */
#ifndef __ICorDebugThread_FWD_DEFINED__
#define __ICorDebugThread_FWD_DEFINED__
typedef interface ICorDebugThread ICorDebugThread;
-#endif /* __ICorDebugThread_FWD_DEFINED__ */
+#endif /* __ICorDebugThread_FWD_DEFINED__ */
#ifndef __ICorDebugThread2_FWD_DEFINED__
#define __ICorDebugThread2_FWD_DEFINED__
typedef interface ICorDebugThread2 ICorDebugThread2;
-#endif /* __ICorDebugThread2_FWD_DEFINED__ */
+#endif /* __ICorDebugThread2_FWD_DEFINED__ */
#ifndef __ICorDebugThread3_FWD_DEFINED__
#define __ICorDebugThread3_FWD_DEFINED__
typedef interface ICorDebugThread3 ICorDebugThread3;
-#endif /* __ICorDebugThread3_FWD_DEFINED__ */
+#endif /* __ICorDebugThread3_FWD_DEFINED__ */
#ifndef __ICorDebugThread4_FWD_DEFINED__
#define __ICorDebugThread4_FWD_DEFINED__
typedef interface ICorDebugThread4 ICorDebugThread4;
-#endif /* __ICorDebugThread4_FWD_DEFINED__ */
+#endif /* __ICorDebugThread4_FWD_DEFINED__ */
#ifndef __ICorDebugThread5_FWD_DEFINED__
#define __ICorDebugThread5_FWD_DEFINED__
typedef interface ICorDebugThread5 ICorDebugThread5;
-#endif /* __ICorDebugThread5_FWD_DEFINED__ */
+#endif /* __ICorDebugThread5_FWD_DEFINED__ */
#ifndef __ICorDebugStackWalk_FWD_DEFINED__
#define __ICorDebugStackWalk_FWD_DEFINED__
typedef interface ICorDebugStackWalk ICorDebugStackWalk;
-#endif /* __ICorDebugStackWalk_FWD_DEFINED__ */
+#endif /* __ICorDebugStackWalk_FWD_DEFINED__ */
#ifndef __ICorDebugChain_FWD_DEFINED__
#define __ICorDebugChain_FWD_DEFINED__
typedef interface ICorDebugChain ICorDebugChain;
-#endif /* __ICorDebugChain_FWD_DEFINED__ */
+#endif /* __ICorDebugChain_FWD_DEFINED__ */
#ifndef __ICorDebugFrame_FWD_DEFINED__
#define __ICorDebugFrame_FWD_DEFINED__
typedef interface ICorDebugFrame ICorDebugFrame;
-#endif /* __ICorDebugFrame_FWD_DEFINED__ */
+#endif /* __ICorDebugFrame_FWD_DEFINED__ */
#ifndef __ICorDebugInternalFrame_FWD_DEFINED__
#define __ICorDebugInternalFrame_FWD_DEFINED__
typedef interface ICorDebugInternalFrame ICorDebugInternalFrame;
-#endif /* __ICorDebugInternalFrame_FWD_DEFINED__ */
+#endif /* __ICorDebugInternalFrame_FWD_DEFINED__ */
#ifndef __ICorDebugInternalFrame2_FWD_DEFINED__
#define __ICorDebugInternalFrame2_FWD_DEFINED__
typedef interface ICorDebugInternalFrame2 ICorDebugInternalFrame2;
-#endif /* __ICorDebugInternalFrame2_FWD_DEFINED__ */
+#endif /* __ICorDebugInternalFrame2_FWD_DEFINED__ */
#ifndef __ICorDebugILFrame_FWD_DEFINED__
#define __ICorDebugILFrame_FWD_DEFINED__
typedef interface ICorDebugILFrame ICorDebugILFrame;
-#endif /* __ICorDebugILFrame_FWD_DEFINED__ */
+#endif /* __ICorDebugILFrame_FWD_DEFINED__ */
#ifndef __ICorDebugILFrame2_FWD_DEFINED__
#define __ICorDebugILFrame2_FWD_DEFINED__
typedef interface ICorDebugILFrame2 ICorDebugILFrame2;
-#endif /* __ICorDebugILFrame2_FWD_DEFINED__ */
+#endif /* __ICorDebugILFrame2_FWD_DEFINED__ */
#ifndef __ICorDebugILFrame3_FWD_DEFINED__
#define __ICorDebugILFrame3_FWD_DEFINED__
typedef interface ICorDebugILFrame3 ICorDebugILFrame3;
-#endif /* __ICorDebugILFrame3_FWD_DEFINED__ */
+#endif /* __ICorDebugILFrame3_FWD_DEFINED__ */
#ifndef __ICorDebugILFrame4_FWD_DEFINED__
#define __ICorDebugILFrame4_FWD_DEFINED__
typedef interface ICorDebugILFrame4 ICorDebugILFrame4;
-#endif /* __ICorDebugILFrame4_FWD_DEFINED__ */
+#endif /* __ICorDebugILFrame4_FWD_DEFINED__ */
#ifndef __ICorDebugNativeFrame_FWD_DEFINED__
#define __ICorDebugNativeFrame_FWD_DEFINED__
typedef interface ICorDebugNativeFrame ICorDebugNativeFrame;
-#endif /* __ICorDebugNativeFrame_FWD_DEFINED__ */
+#endif /* __ICorDebugNativeFrame_FWD_DEFINED__ */
#ifndef __ICorDebugNativeFrame2_FWD_DEFINED__
#define __ICorDebugNativeFrame2_FWD_DEFINED__
typedef interface ICorDebugNativeFrame2 ICorDebugNativeFrame2;
-#endif /* __ICorDebugNativeFrame2_FWD_DEFINED__ */
+#endif /* __ICorDebugNativeFrame2_FWD_DEFINED__ */
#ifndef __ICorDebugModule3_FWD_DEFINED__
#define __ICorDebugModule3_FWD_DEFINED__
typedef interface ICorDebugModule3 ICorDebugModule3;
-#endif /* __ICorDebugModule3_FWD_DEFINED__ */
+#endif /* __ICorDebugModule3_FWD_DEFINED__ */
#ifndef __ICorDebugModule4_FWD_DEFINED__
#define __ICorDebugModule4_FWD_DEFINED__
typedef interface ICorDebugModule4 ICorDebugModule4;
-#endif /* __ICorDebugModule4_FWD_DEFINED__ */
+#endif /* __ICorDebugModule4_FWD_DEFINED__ */
#ifndef __ICorDebugRuntimeUnwindableFrame_FWD_DEFINED__
#define __ICorDebugRuntimeUnwindableFrame_FWD_DEFINED__
typedef interface ICorDebugRuntimeUnwindableFrame ICorDebugRuntimeUnwindableFrame;
-#endif /* __ICorDebugRuntimeUnwindableFrame_FWD_DEFINED__ */
+#endif /* __ICorDebugRuntimeUnwindableFrame_FWD_DEFINED__ */
#ifndef __ICorDebugModule_FWD_DEFINED__
#define __ICorDebugModule_FWD_DEFINED__
typedef interface ICorDebugModule ICorDebugModule;
-#endif /* __ICorDebugModule_FWD_DEFINED__ */
+#endif /* __ICorDebugModule_FWD_DEFINED__ */
#ifndef __ICorDebugModule2_FWD_DEFINED__
#define __ICorDebugModule2_FWD_DEFINED__
typedef interface ICorDebugModule2 ICorDebugModule2;
-#endif /* __ICorDebugModule2_FWD_DEFINED__ */
+#endif /* __ICorDebugModule2_FWD_DEFINED__ */
#ifndef __ICorDebugFunction_FWD_DEFINED__
#define __ICorDebugFunction_FWD_DEFINED__
typedef interface ICorDebugFunction ICorDebugFunction;
-#endif /* __ICorDebugFunction_FWD_DEFINED__ */
+#endif /* __ICorDebugFunction_FWD_DEFINED__ */
#ifndef __ICorDebugFunction2_FWD_DEFINED__
#define __ICorDebugFunction2_FWD_DEFINED__
typedef interface ICorDebugFunction2 ICorDebugFunction2;
-#endif /* __ICorDebugFunction2_FWD_DEFINED__ */
+#endif /* __ICorDebugFunction2_FWD_DEFINED__ */
#ifndef __ICorDebugFunction3_FWD_DEFINED__
#define __ICorDebugFunction3_FWD_DEFINED__
typedef interface ICorDebugFunction3 ICorDebugFunction3;
-#endif /* __ICorDebugFunction3_FWD_DEFINED__ */
+#endif /* __ICorDebugFunction3_FWD_DEFINED__ */
#ifndef __ICorDebugFunction4_FWD_DEFINED__
#define __ICorDebugFunction4_FWD_DEFINED__
typedef interface ICorDebugFunction4 ICorDebugFunction4;
-#endif /* __ICorDebugFunction4_FWD_DEFINED__ */
+#endif /* __ICorDebugFunction4_FWD_DEFINED__ */
+
+
+#ifndef __ICorDebugFunction5_FWD_DEFINED__
+#define __ICorDebugFunction5_FWD_DEFINED__
+typedef interface ICorDebugFunction5 ICorDebugFunction5;
+
+#endif /* __ICorDebugFunction5_FWD_DEFINED__ */
#ifndef __ICorDebugCode_FWD_DEFINED__
#define __ICorDebugCode_FWD_DEFINED__
typedef interface ICorDebugCode ICorDebugCode;
-#endif /* __ICorDebugCode_FWD_DEFINED__ */
+#endif /* __ICorDebugCode_FWD_DEFINED__ */
#ifndef __ICorDebugCode2_FWD_DEFINED__
#define __ICorDebugCode2_FWD_DEFINED__
typedef interface ICorDebugCode2 ICorDebugCode2;
-#endif /* __ICorDebugCode2_FWD_DEFINED__ */
+#endif /* __ICorDebugCode2_FWD_DEFINED__ */
#ifndef __ICorDebugCode3_FWD_DEFINED__
#define __ICorDebugCode3_FWD_DEFINED__
typedef interface ICorDebugCode3 ICorDebugCode3;
-#endif /* __ICorDebugCode3_FWD_DEFINED__ */
+#endif /* __ICorDebugCode3_FWD_DEFINED__ */
#ifndef __ICorDebugCode4_FWD_DEFINED__
#define __ICorDebugCode4_FWD_DEFINED__
typedef interface ICorDebugCode4 ICorDebugCode4;
-#endif /* __ICorDebugCode4_FWD_DEFINED__ */
+#endif /* __ICorDebugCode4_FWD_DEFINED__ */
#ifndef __ICorDebugILCode_FWD_DEFINED__
#define __ICorDebugILCode_FWD_DEFINED__
typedef interface ICorDebugILCode ICorDebugILCode;
-#endif /* __ICorDebugILCode_FWD_DEFINED__ */
+#endif /* __ICorDebugILCode_FWD_DEFINED__ */
#ifndef __ICorDebugILCode2_FWD_DEFINED__
#define __ICorDebugILCode2_FWD_DEFINED__
typedef interface ICorDebugILCode2 ICorDebugILCode2;
-#endif /* __ICorDebugILCode2_FWD_DEFINED__ */
+#endif /* __ICorDebugILCode2_FWD_DEFINED__ */
#ifndef __ICorDebugClass_FWD_DEFINED__
#define __ICorDebugClass_FWD_DEFINED__
typedef interface ICorDebugClass ICorDebugClass;
-#endif /* __ICorDebugClass_FWD_DEFINED__ */
+#endif /* __ICorDebugClass_FWD_DEFINED__ */
#ifndef __ICorDebugClass2_FWD_DEFINED__
#define __ICorDebugClass2_FWD_DEFINED__
typedef interface ICorDebugClass2 ICorDebugClass2;
-#endif /* __ICorDebugClass2_FWD_DEFINED__ */
+#endif /* __ICorDebugClass2_FWD_DEFINED__ */
#ifndef __ICorDebugEval_FWD_DEFINED__
#define __ICorDebugEval_FWD_DEFINED__
typedef interface ICorDebugEval ICorDebugEval;
-#endif /* __ICorDebugEval_FWD_DEFINED__ */
+#endif /* __ICorDebugEval_FWD_DEFINED__ */
#ifndef __ICorDebugEval2_FWD_DEFINED__
#define __ICorDebugEval2_FWD_DEFINED__
typedef interface ICorDebugEval2 ICorDebugEval2;
-#endif /* __ICorDebugEval2_FWD_DEFINED__ */
+#endif /* __ICorDebugEval2_FWD_DEFINED__ */
#ifndef __ICorDebugValue_FWD_DEFINED__
#define __ICorDebugValue_FWD_DEFINED__
typedef interface ICorDebugValue ICorDebugValue;
-#endif /* __ICorDebugValue_FWD_DEFINED__ */
+#endif /* __ICorDebugValue_FWD_DEFINED__ */
#ifndef __ICorDebugValue2_FWD_DEFINED__
#define __ICorDebugValue2_FWD_DEFINED__
typedef interface ICorDebugValue2 ICorDebugValue2;
-#endif /* __ICorDebugValue2_FWD_DEFINED__ */
+#endif /* __ICorDebugValue2_FWD_DEFINED__ */
#ifndef __ICorDebugValue3_FWD_DEFINED__
#define __ICorDebugValue3_FWD_DEFINED__
typedef interface ICorDebugValue3 ICorDebugValue3;
-#endif /* __ICorDebugValue3_FWD_DEFINED__ */
+#endif /* __ICorDebugValue3_FWD_DEFINED__ */
#ifndef __ICorDebugGenericValue_FWD_DEFINED__
#define __ICorDebugGenericValue_FWD_DEFINED__
typedef interface ICorDebugGenericValue ICorDebugGenericValue;
-#endif /* __ICorDebugGenericValue_FWD_DEFINED__ */
+#endif /* __ICorDebugGenericValue_FWD_DEFINED__ */
#ifndef __ICorDebugReferenceValue_FWD_DEFINED__
#define __ICorDebugReferenceValue_FWD_DEFINED__
typedef interface ICorDebugReferenceValue ICorDebugReferenceValue;
-#endif /* __ICorDebugReferenceValue_FWD_DEFINED__ */
+#endif /* __ICorDebugReferenceValue_FWD_DEFINED__ */
#ifndef __ICorDebugHeapValue_FWD_DEFINED__
#define __ICorDebugHeapValue_FWD_DEFINED__
typedef interface ICorDebugHeapValue ICorDebugHeapValue;
-#endif /* __ICorDebugHeapValue_FWD_DEFINED__ */
+#endif /* __ICorDebugHeapValue_FWD_DEFINED__ */
#ifndef __ICorDebugHeapValue2_FWD_DEFINED__
#define __ICorDebugHeapValue2_FWD_DEFINED__
typedef interface ICorDebugHeapValue2 ICorDebugHeapValue2;
-#endif /* __ICorDebugHeapValue2_FWD_DEFINED__ */
+#endif /* __ICorDebugHeapValue2_FWD_DEFINED__ */
#ifndef __ICorDebugHeapValue3_FWD_DEFINED__
#define __ICorDebugHeapValue3_FWD_DEFINED__
typedef interface ICorDebugHeapValue3 ICorDebugHeapValue3;
-#endif /* __ICorDebugHeapValue3_FWD_DEFINED__ */
+#endif /* __ICorDebugHeapValue3_FWD_DEFINED__ */
#ifndef __ICorDebugHeapValue4_FWD_DEFINED__
#define __ICorDebugHeapValue4_FWD_DEFINED__
typedef interface ICorDebugHeapValue4 ICorDebugHeapValue4;
-#endif /* __ICorDebugHeapValue4_FWD_DEFINED__ */
+#endif /* __ICorDebugHeapValue4_FWD_DEFINED__ */
#ifndef __ICorDebugObjectValue_FWD_DEFINED__
#define __ICorDebugObjectValue_FWD_DEFINED__
typedef interface ICorDebugObjectValue ICorDebugObjectValue;
-#endif /* __ICorDebugObjectValue_FWD_DEFINED__ */
+#endif /* __ICorDebugObjectValue_FWD_DEFINED__ */
#ifndef __ICorDebugObjectValue2_FWD_DEFINED__
#define __ICorDebugObjectValue2_FWD_DEFINED__
typedef interface ICorDebugObjectValue2 ICorDebugObjectValue2;
-#endif /* __ICorDebugObjectValue2_FWD_DEFINED__ */
+#endif /* __ICorDebugObjectValue2_FWD_DEFINED__ */
#ifndef __ICorDebugDelegateObjectValue_FWD_DEFINED__
#define __ICorDebugDelegateObjectValue_FWD_DEFINED__
typedef interface ICorDebugDelegateObjectValue ICorDebugDelegateObjectValue;
-#endif /* __ICorDebugDelegateObjectValue_FWD_DEFINED__ */
+#endif /* __ICorDebugDelegateObjectValue_FWD_DEFINED__ */
#ifndef __ICorDebugBoxValue_FWD_DEFINED__
#define __ICorDebugBoxValue_FWD_DEFINED__
typedef interface ICorDebugBoxValue ICorDebugBoxValue;
-#endif /* __ICorDebugBoxValue_FWD_DEFINED__ */
+#endif /* __ICorDebugBoxValue_FWD_DEFINED__ */
#ifndef __ICorDebugStringValue_FWD_DEFINED__
#define __ICorDebugStringValue_FWD_DEFINED__
typedef interface ICorDebugStringValue ICorDebugStringValue;
-#endif /* __ICorDebugStringValue_FWD_DEFINED__ */
+#endif /* __ICorDebugStringValue_FWD_DEFINED__ */
#ifndef __ICorDebugArrayValue_FWD_DEFINED__
#define __ICorDebugArrayValue_FWD_DEFINED__
typedef interface ICorDebugArrayValue ICorDebugArrayValue;
-#endif /* __ICorDebugArrayValue_FWD_DEFINED__ */
+#endif /* __ICorDebugArrayValue_FWD_DEFINED__ */
#ifndef __ICorDebugVariableHome_FWD_DEFINED__
#define __ICorDebugVariableHome_FWD_DEFINED__
typedef interface ICorDebugVariableHome ICorDebugVariableHome;
-#endif /* __ICorDebugVariableHome_FWD_DEFINED__ */
+#endif /* __ICorDebugVariableHome_FWD_DEFINED__ */
#ifndef __ICorDebugHandleValue_FWD_DEFINED__
#define __ICorDebugHandleValue_FWD_DEFINED__
typedef interface ICorDebugHandleValue ICorDebugHandleValue;
-#endif /* __ICorDebugHandleValue_FWD_DEFINED__ */
+#endif /* __ICorDebugHandleValue_FWD_DEFINED__ */
#ifndef __ICorDebugContext_FWD_DEFINED__
#define __ICorDebugContext_FWD_DEFINED__
typedef interface ICorDebugContext ICorDebugContext;
-#endif /* __ICorDebugContext_FWD_DEFINED__ */
+#endif /* __ICorDebugContext_FWD_DEFINED__ */
#ifndef __ICorDebugComObjectValue_FWD_DEFINED__
#define __ICorDebugComObjectValue_FWD_DEFINED__
typedef interface ICorDebugComObjectValue ICorDebugComObjectValue;
-#endif /* __ICorDebugComObjectValue_FWD_DEFINED__ */
+#endif /* __ICorDebugComObjectValue_FWD_DEFINED__ */
#ifndef __ICorDebugObjectEnum_FWD_DEFINED__
#define __ICorDebugObjectEnum_FWD_DEFINED__
typedef interface ICorDebugObjectEnum ICorDebugObjectEnum;
-#endif /* __ICorDebugObjectEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugObjectEnum_FWD_DEFINED__ */
#ifndef __ICorDebugBreakpointEnum_FWD_DEFINED__
#define __ICorDebugBreakpointEnum_FWD_DEFINED__
typedef interface ICorDebugBreakpointEnum ICorDebugBreakpointEnum;
-#endif /* __ICorDebugBreakpointEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugBreakpointEnum_FWD_DEFINED__ */
#ifndef __ICorDebugStepperEnum_FWD_DEFINED__
#define __ICorDebugStepperEnum_FWD_DEFINED__
typedef interface ICorDebugStepperEnum ICorDebugStepperEnum;
-#endif /* __ICorDebugStepperEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugStepperEnum_FWD_DEFINED__ */
#ifndef __ICorDebugProcessEnum_FWD_DEFINED__
#define __ICorDebugProcessEnum_FWD_DEFINED__
typedef interface ICorDebugProcessEnum ICorDebugProcessEnum;
-#endif /* __ICorDebugProcessEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugProcessEnum_FWD_DEFINED__ */
#ifndef __ICorDebugThreadEnum_FWD_DEFINED__
#define __ICorDebugThreadEnum_FWD_DEFINED__
typedef interface ICorDebugThreadEnum ICorDebugThreadEnum;
-#endif /* __ICorDebugThreadEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugThreadEnum_FWD_DEFINED__ */
#ifndef __ICorDebugFrameEnum_FWD_DEFINED__
#define __ICorDebugFrameEnum_FWD_DEFINED__
typedef interface ICorDebugFrameEnum ICorDebugFrameEnum;
-#endif /* __ICorDebugFrameEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugFrameEnum_FWD_DEFINED__ */
#ifndef __ICorDebugChainEnum_FWD_DEFINED__
#define __ICorDebugChainEnum_FWD_DEFINED__
typedef interface ICorDebugChainEnum ICorDebugChainEnum;
-#endif /* __ICorDebugChainEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugChainEnum_FWD_DEFINED__ */
#ifndef __ICorDebugModuleEnum_FWD_DEFINED__
#define __ICorDebugModuleEnum_FWD_DEFINED__
typedef interface ICorDebugModuleEnum ICorDebugModuleEnum;
-#endif /* __ICorDebugModuleEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugModuleEnum_FWD_DEFINED__ */
#ifndef __ICorDebugValueEnum_FWD_DEFINED__
#define __ICorDebugValueEnum_FWD_DEFINED__
typedef interface ICorDebugValueEnum ICorDebugValueEnum;
-#endif /* __ICorDebugValueEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugValueEnum_FWD_DEFINED__ */
#ifndef __ICorDebugVariableHomeEnum_FWD_DEFINED__
#define __ICorDebugVariableHomeEnum_FWD_DEFINED__
typedef interface ICorDebugVariableHomeEnum ICorDebugVariableHomeEnum;
-#endif /* __ICorDebugVariableHomeEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugVariableHomeEnum_FWD_DEFINED__ */
#ifndef __ICorDebugCodeEnum_FWD_DEFINED__
#define __ICorDebugCodeEnum_FWD_DEFINED__
typedef interface ICorDebugCodeEnum ICorDebugCodeEnum;
-#endif /* __ICorDebugCodeEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugCodeEnum_FWD_DEFINED__ */
#ifndef __ICorDebugTypeEnum_FWD_DEFINED__
#define __ICorDebugTypeEnum_FWD_DEFINED__
typedef interface ICorDebugTypeEnum ICorDebugTypeEnum;
-#endif /* __ICorDebugTypeEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugTypeEnum_FWD_DEFINED__ */
#ifndef __ICorDebugType_FWD_DEFINED__
#define __ICorDebugType_FWD_DEFINED__
typedef interface ICorDebugType ICorDebugType;
-#endif /* __ICorDebugType_FWD_DEFINED__ */
+#endif /* __ICorDebugType_FWD_DEFINED__ */
#ifndef __ICorDebugType2_FWD_DEFINED__
#define __ICorDebugType2_FWD_DEFINED__
typedef interface ICorDebugType2 ICorDebugType2;
-#endif /* __ICorDebugType2_FWD_DEFINED__ */
+#endif /* __ICorDebugType2_FWD_DEFINED__ */
#ifndef __ICorDebugErrorInfoEnum_FWD_DEFINED__
#define __ICorDebugErrorInfoEnum_FWD_DEFINED__
typedef interface ICorDebugErrorInfoEnum ICorDebugErrorInfoEnum;
-#endif /* __ICorDebugErrorInfoEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugErrorInfoEnum_FWD_DEFINED__ */
#ifndef __ICorDebugAppDomainEnum_FWD_DEFINED__
#define __ICorDebugAppDomainEnum_FWD_DEFINED__
typedef interface ICorDebugAppDomainEnum ICorDebugAppDomainEnum;
-#endif /* __ICorDebugAppDomainEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugAppDomainEnum_FWD_DEFINED__ */
#ifndef __ICorDebugAssemblyEnum_FWD_DEFINED__
#define __ICorDebugAssemblyEnum_FWD_DEFINED__
typedef interface ICorDebugAssemblyEnum ICorDebugAssemblyEnum;
-#endif /* __ICorDebugAssemblyEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugAssemblyEnum_FWD_DEFINED__ */
#ifndef __ICorDebugBlockingObjectEnum_FWD_DEFINED__
#define __ICorDebugBlockingObjectEnum_FWD_DEFINED__
typedef interface ICorDebugBlockingObjectEnum ICorDebugBlockingObjectEnum;
-#endif /* __ICorDebugBlockingObjectEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugBlockingObjectEnum_FWD_DEFINED__ */
#ifndef __ICorDebugMDA_FWD_DEFINED__
#define __ICorDebugMDA_FWD_DEFINED__
typedef interface ICorDebugMDA ICorDebugMDA;
-#endif /* __ICorDebugMDA_FWD_DEFINED__ */
+#endif /* __ICorDebugMDA_FWD_DEFINED__ */
#ifndef __ICorDebugEditAndContinueErrorInfo_FWD_DEFINED__
#define __ICorDebugEditAndContinueErrorInfo_FWD_DEFINED__
typedef interface ICorDebugEditAndContinueErrorInfo ICorDebugEditAndContinueErrorInfo;
-#endif /* __ICorDebugEditAndContinueErrorInfo_FWD_DEFINED__ */
+#endif /* __ICorDebugEditAndContinueErrorInfo_FWD_DEFINED__ */
#ifndef __ICorDebugEditAndContinueSnapshot_FWD_DEFINED__
#define __ICorDebugEditAndContinueSnapshot_FWD_DEFINED__
typedef interface ICorDebugEditAndContinueSnapshot ICorDebugEditAndContinueSnapshot;
-#endif /* __ICorDebugEditAndContinueSnapshot_FWD_DEFINED__ */
+#endif /* __ICorDebugEditAndContinueSnapshot_FWD_DEFINED__ */
#ifndef __ICorDebugExceptionObjectCallStackEnum_FWD_DEFINED__
#define __ICorDebugExceptionObjectCallStackEnum_FWD_DEFINED__
typedef interface ICorDebugExceptionObjectCallStackEnum ICorDebugExceptionObjectCallStackEnum;
-#endif /* __ICorDebugExceptionObjectCallStackEnum_FWD_DEFINED__ */
+#endif /* __ICorDebugExceptionObjectCallStackEnum_FWD_DEFINED__ */
#ifndef __ICorDebugExceptionObjectValue_FWD_DEFINED__
#define __ICorDebugExceptionObjectValue_FWD_DEFINED__
typedef interface ICorDebugExceptionObjectValue ICorDebugExceptionObjectValue;
-#endif /* __ICorDebugExceptionObjectValue_FWD_DEFINED__ */
+#endif /* __ICorDebugExceptionObjectValue_FWD_DEFINED__ */
+
+
+#ifndef __ICorDebugExceptionObjectValue2_FWD_DEFINED__
+#define __ICorDebugExceptionObjectValue2_FWD_DEFINED__
+typedef interface ICorDebugExceptionObjectValue2 ICorDebugExceptionObjectValue2;
+
+#endif /* __ICorDebugExceptionObjectValue2_FWD_DEFINED__ */
#ifndef __CorDebug_FWD_DEFINED__
typedef struct CorDebug CorDebug;
#endif /* __cplusplus */
-#endif /* __CorDebug_FWD_DEFINED__ */
+#endif /* __CorDebug_FWD_DEFINED__ */
#ifndef __EmbeddedCLRCorDebug_FWD_DEFINED__
typedef struct EmbeddedCLRCorDebug EmbeddedCLRCorDebug;
#endif /* __cplusplus */
-#endif /* __EmbeddedCLRCorDebug_FWD_DEFINED__ */
+#endif /* __EmbeddedCLRCorDebug_FWD_DEFINED__ */
#ifndef __ICorDebugValue_FWD_DEFINED__
#define __ICorDebugValue_FWD_DEFINED__
typedef interface ICorDebugValue ICorDebugValue;
-#endif /* __ICorDebugValue_FWD_DEFINED__ */
+#endif /* __ICorDebugValue_FWD_DEFINED__ */
#ifndef __ICorDebugReferenceValue_FWD_DEFINED__
#define __ICorDebugReferenceValue_FWD_DEFINED__
typedef interface ICorDebugReferenceValue ICorDebugReferenceValue;
-#endif /* __ICorDebugReferenceValue_FWD_DEFINED__ */
+#endif /* __ICorDebugReferenceValue_FWD_DEFINED__ */
#ifndef __ICorDebugHeapValue_FWD_DEFINED__
#define __ICorDebugHeapValue_FWD_DEFINED__
typedef interface ICorDebugHeapValue ICorDebugHeapValue;
-#endif /* __ICorDebugHeapValue_FWD_DEFINED__ */
+#endif /* __ICorDebugHeapValue_FWD_DEFINED__ */
#ifndef __ICorDebugStringValue_FWD_DEFINED__
#define __ICorDebugStringValue_FWD_DEFINED__
typedef interface ICorDebugStringValue ICorDebugStringValue;
-#endif /* __ICorDebugStringValue_FWD_DEFINED__ */
+#endif /* __ICorDebugStringValue_FWD_DEFINED__ */
#ifndef __ICorDebugGenericValue_FWD_DEFINED__
#define __ICorDebugGenericValue_FWD_DEFINED__
typedef interface ICorDebugGenericValue ICorDebugGenericValue;
-#endif /* __ICorDebugGenericValue_FWD_DEFINED__ */
+#endif /* __ICorDebugGenericValue_FWD_DEFINED__ */
#ifndef __ICorDebugBoxValue_FWD_DEFINED__
#define __ICorDebugBoxValue_FWD_DEFINED__
typedef interface ICorDebugBoxValue ICorDebugBoxValue;
-#endif /* __ICorDebugBoxValue_FWD_DEFINED__ */
+#endif /* __ICorDebugBoxValue_FWD_DEFINED__ */
#ifndef __ICorDebugArrayValue_FWD_DEFINED__
#define __ICorDebugArrayValue_FWD_DEFINED__
typedef interface ICorDebugArrayValue ICorDebugArrayValue;
-#endif /* __ICorDebugArrayValue_FWD_DEFINED__ */
+#endif /* __ICorDebugArrayValue_FWD_DEFINED__ */
#ifndef __ICorDebugFrame_FWD_DEFINED__
#define __ICorDebugFrame_FWD_DEFINED__
typedef interface ICorDebugFrame ICorDebugFrame;
-#endif /* __ICorDebugFrame_FWD_DEFINED__ */
+#endif /* __ICorDebugFrame_FWD_DEFINED__ */
#ifndef __ICorDebugILFrame_FWD_DEFINED__
#define __ICorDebugILFrame_FWD_DEFINED__
typedef interface ICorDebugILFrame ICorDebugILFrame;
-#endif /* __ICorDebugILFrame_FWD_DEFINED__ */
+#endif /* __ICorDebugILFrame_FWD_DEFINED__ */
#ifndef __ICorDebugInternalFrame_FWD_DEFINED__
#define __ICorDebugInternalFrame_FWD_DEFINED__
typedef interface ICorDebugInternalFrame ICorDebugInternalFrame;
-#endif /* __ICorDebugInternalFrame_FWD_DEFINED__ */
+#endif /* __ICorDebugInternalFrame_FWD_DEFINED__ */
#ifndef __ICorDebugInternalFrame2_FWD_DEFINED__
#define __ICorDebugInternalFrame2_FWD_DEFINED__
typedef interface ICorDebugInternalFrame2 ICorDebugInternalFrame2;
-#endif /* __ICorDebugInternalFrame2_FWD_DEFINED__ */
+#endif /* __ICorDebugInternalFrame2_FWD_DEFINED__ */
#ifndef __ICorDebugNativeFrame_FWD_DEFINED__
#define __ICorDebugNativeFrame_FWD_DEFINED__
typedef interface ICorDebugNativeFrame ICorDebugNativeFrame;
-#endif /* __ICorDebugNativeFrame_FWD_DEFINED__ */
+#endif /* __ICorDebugNativeFrame_FWD_DEFINED__ */
#ifndef __ICorDebugNativeFrame2_FWD_DEFINED__
#define __ICorDebugNativeFrame2_FWD_DEFINED__
typedef interface ICorDebugNativeFrame2 ICorDebugNativeFrame2;
-#endif /* __ICorDebugNativeFrame2_FWD_DEFINED__ */
+#endif /* __ICorDebugNativeFrame2_FWD_DEFINED__ */
#ifndef __ICorDebugRuntimeUnwindableFrame_FWD_DEFINED__
#define __ICorDebugRuntimeUnwindableFrame_FWD_DEFINED__
typedef interface ICorDebugRuntimeUnwindableFrame ICorDebugRuntimeUnwindableFrame;
-#endif /* __ICorDebugRuntimeUnwindableFrame_FWD_DEFINED__ */
+#endif /* __ICorDebugRuntimeUnwindableFrame_FWD_DEFINED__ */
#ifndef __ICorDebugManagedCallback2_FWD_DEFINED__
#define __ICorDebugManagedCallback2_FWD_DEFINED__
typedef interface ICorDebugManagedCallback2 ICorDebugManagedCallback2;
-#endif /* __ICorDebugManagedCallback2_FWD_DEFINED__ */
+#endif /* __ICorDebugManagedCallback2_FWD_DEFINED__ */
#ifndef __ICorDebugAppDomain2_FWD_DEFINED__
#define __ICorDebugAppDomain2_FWD_DEFINED__
typedef interface ICorDebugAppDomain2 ICorDebugAppDomain2;
-#endif /* __ICorDebugAppDomain2_FWD_DEFINED__ */
+#endif /* __ICorDebugAppDomain2_FWD_DEFINED__ */
#ifndef __ICorDebugAppDomain3_FWD_DEFINED__
#define __ICorDebugAppDomain3_FWD_DEFINED__
typedef interface ICorDebugAppDomain3 ICorDebugAppDomain3;
-#endif /* __ICorDebugAppDomain3_FWD_DEFINED__ */
+#endif /* __ICorDebugAppDomain3_FWD_DEFINED__ */
#ifndef __ICorDebugAssembly2_FWD_DEFINED__
#define __ICorDebugAssembly2_FWD_DEFINED__
typedef interface ICorDebugAssembly2 ICorDebugAssembly2;
-#endif /* __ICorDebugAssembly2_FWD_DEFINED__ */
+#endif /* __ICorDebugAssembly2_FWD_DEFINED__ */
#ifndef __ICorDebugProcess2_FWD_DEFINED__
#define __ICorDebugProcess2_FWD_DEFINED__
typedef interface ICorDebugProcess2 ICorDebugProcess2;
-#endif /* __ICorDebugProcess2_FWD_DEFINED__ */
+#endif /* __ICorDebugProcess2_FWD_DEFINED__ */
#ifndef __ICorDebugStepper2_FWD_DEFINED__
#define __ICorDebugStepper2_FWD_DEFINED__
typedef interface ICorDebugStepper2 ICorDebugStepper2;
-#endif /* __ICorDebugStepper2_FWD_DEFINED__ */
+#endif /* __ICorDebugStepper2_FWD_DEFINED__ */
#ifndef __ICorDebugThread2_FWD_DEFINED__
#define __ICorDebugThread2_FWD_DEFINED__
typedef interface ICorDebugThread2 ICorDebugThread2;
-#endif /* __ICorDebugThread2_FWD_DEFINED__ */
+#endif /* __ICorDebugThread2_FWD_DEFINED__ */
#ifndef __ICorDebugThread3_FWD_DEFINED__
#define __ICorDebugThread3_FWD_DEFINED__
typedef interface ICorDebugThread3 ICorDebugThread3;
-#endif /* __ICorDebugThread3_FWD_DEFINED__ */
+#endif /* __ICorDebugThread3_FWD_DEFINED__ */
#ifndef __ICorDebugILFrame2_FWD_DEFINED__
#define __ICorDebugILFrame2_FWD_DEFINED__
typedef interface ICorDebugILFrame2 ICorDebugILFrame2;
-#endif /* __ICorDebugILFrame2_FWD_DEFINED__ */
+#endif /* __ICorDebugILFrame2_FWD_DEFINED__ */
#ifndef __ICorDebugModule2_FWD_DEFINED__
#define __ICorDebugModule2_FWD_DEFINED__
typedef interface ICorDebugModule2 ICorDebugModule2;
-#endif /* __ICorDebugModule2_FWD_DEFINED__ */
+#endif /* __ICorDebugModule2_FWD_DEFINED__ */
#ifndef __ICorDebugFunction2_FWD_DEFINED__
#define __ICorDebugFunction2_FWD_DEFINED__
typedef interface ICorDebugFunction2 ICorDebugFunction2;
-#endif /* __ICorDebugFunction2_FWD_DEFINED__ */
+#endif /* __ICorDebugFunction2_FWD_DEFINED__ */
#ifndef __ICorDebugClass2_FWD_DEFINED__
#define __ICorDebugClass2_FWD_DEFINED__
typedef interface ICorDebugClass2 ICorDebugClass2;
-#endif /* __ICorDebugClass2_FWD_DEFINED__ */
+#endif /* __ICorDebugClass2_FWD_DEFINED__ */
#ifndef __ICorDebugEval2_FWD_DEFINED__
#define __ICorDebugEval2_FWD_DEFINED__
typedef interface ICorDebugEval2 ICorDebugEval2;
-#endif /* __ICorDebugEval2_FWD_DEFINED__ */
+#endif /* __ICorDebugEval2_FWD_DEFINED__ */
#ifndef __ICorDebugValue2_FWD_DEFINED__
#define __ICorDebugValue2_FWD_DEFINED__
typedef interface ICorDebugValue2 ICorDebugValue2;
-#endif /* __ICorDebugValue2_FWD_DEFINED__ */
+#endif /* __ICorDebugValue2_FWD_DEFINED__ */
#ifndef __ICorDebugObjectValue2_FWD_DEFINED__
#define __ICorDebugObjectValue2_FWD_DEFINED__
typedef interface ICorDebugObjectValue2 ICorDebugObjectValue2;
-#endif /* __ICorDebugObjectValue2_FWD_DEFINED__ */
+#endif /* __ICorDebugObjectValue2_FWD_DEFINED__ */
#ifndef __ICorDebugHandleValue_FWD_DEFINED__
#define __ICorDebugHandleValue_FWD_DEFINED__
typedef interface ICorDebugHandleValue ICorDebugHandleValue;
-#endif /* __ICorDebugHandleValue_FWD_DEFINED__ */
+#endif /* __ICorDebugHandleValue_FWD_DEFINED__ */
#ifndef __ICorDebugHeapValue2_FWD_DEFINED__
#define __ICorDebugHeapValue2_FWD_DEFINED__
typedef interface ICorDebugHeapValue2 ICorDebugHeapValue2;
-#endif /* __ICorDebugHeapValue2_FWD_DEFINED__ */
+#endif /* __ICorDebugHeapValue2_FWD_DEFINED__ */
#ifndef __ICorDebugComObjectValue_FWD_DEFINED__
#define __ICorDebugComObjectValue_FWD_DEFINED__
typedef interface ICorDebugComObjectValue ICorDebugComObjectValue;
-#endif /* __ICorDebugComObjectValue_FWD_DEFINED__ */
+#endif /* __ICorDebugComObjectValue_FWD_DEFINED__ */
#ifndef __ICorDebugModule3_FWD_DEFINED__
#define __ICorDebugModule3_FWD_DEFINED__
typedef interface ICorDebugModule3 ICorDebugModule3;
-#endif /* __ICorDebugModule3_FWD_DEFINED__ */
+#endif /* __ICorDebugModule3_FWD_DEFINED__ */
/* header files for imported files */
ULONG32 oldOffset;
ULONG32 newOffset;
BOOL fAccurate;
- } COR_IL_MAP;
+ } COR_IL_MAP;
#endif //_COR_IL_MAP
#ifndef _COR_DEBUG_IL_TO_NATIVE_MAP_
typedef
enum CorDebugIlToNativeMappingTypes
{
- NO_MAPPING = -1,
- PROLOG = -2,
- EPILOG = -3
- } CorDebugIlToNativeMappingTypes;
+ NO_MAPPING = -1,
+ PROLOG = -2,
+ EPILOG = -3
+ } CorDebugIlToNativeMappingTypes;
typedef struct COR_DEBUG_IL_TO_NATIVE_MAP
{
ULONG32 ilOffset;
ULONG32 nativeStartOffset;
ULONG32 nativeEndOffset;
- } COR_DEBUG_IL_TO_NATIVE_MAP;
+ } COR_DEBUG_IL_TO_NATIVE_MAP;
#endif // _COR_DEBUG_IL_TO_NATIVE_MAP_
#define REMOTE_DEBUGGING_DLL_ENTRY L"Software\\Microsoft\\.NETFramework\\Debugger\\ActivateRemoteDebugging"
typedef
enum CorDebugJITCompilerFlags
{
- CORDEBUG_JIT_DEFAULT = 0x1,
- CORDEBUG_JIT_DISABLE_OPTIMIZATION = 0x3,
- CORDEBUG_JIT_ENABLE_ENC = 0x7
- } CorDebugJITCompilerFlags;
+ CORDEBUG_JIT_DEFAULT = 0x1,
+ CORDEBUG_JIT_DISABLE_OPTIMIZATION = 0x3,
+ CORDEBUG_JIT_ENABLE_ENC = 0x7
+ } CorDebugJITCompilerFlags;
typedef
enum CorDebugJITCompilerFlagsDecprecated
{
- CORDEBUG_JIT_TRACK_DEBUG_INFO = 0x1
- } CorDebugJITCompilerFlagsDeprecated;
+ CORDEBUG_JIT_TRACK_DEBUG_INFO = 0x1
+ } CorDebugJITCompilerFlagsDeprecated;
typedef
enum CorDebugNGENPolicy
{
- DISABLE_LOCAL_NIC = 1
- } CorDebugNGENPolicy;
+ DISABLE_LOCAL_NIC = 1
+ } CorDebugNGENPolicy;
#pragma warning(push)
#pragma warning(disable:28718)
typedef
enum CorDebugBlockingReason
{
- BLOCKING_NONE = 0,
- BLOCKING_MONITOR_CRITICAL_SECTION = 0x1,
- BLOCKING_MONITOR_EVENT = 0x2
- } CorDebugBlockingReason;
+ BLOCKING_NONE = 0,
+ BLOCKING_MONITOR_CRITICAL_SECTION = 0x1,
+ BLOCKING_MONITOR_EVENT = 0x2
+ } CorDebugBlockingReason;
typedef struct CorDebugBlockingObject
{
ICorDebugValue *pBlockingObject;
DWORD dwTimeout;
CorDebugBlockingReason blockingReason;
- } CorDebugBlockingObject;
+ } CorDebugBlockingObject;
typedef struct CorDebugExceptionObjectStackFrame
{
CORDB_ADDRESS ip;
mdMethodDef methodDef;
BOOL isLastForeignExceptionFrame;
- } CorDebugExceptionObjectStackFrame;
+ } CorDebugExceptionObjectStackFrame;
typedef struct CorDebugGuidToTypeMapping
{
GUID iid;
ICorDebugType *pType;
- } CorDebugGuidToTypeMapping;
+ } CorDebugGuidToTypeMapping;
typedef
enum CorDebugPlatform
{
- CORDB_PLATFORM_WINDOWS_X86 = 0,
- CORDB_PLATFORM_WINDOWS_AMD64 = ( CORDB_PLATFORM_WINDOWS_X86 + 1 ) ,
- CORDB_PLATFORM_WINDOWS_IA64 = ( CORDB_PLATFORM_WINDOWS_AMD64 + 1 ) ,
- CORDB_PLATFORM_MAC_PPC = ( CORDB_PLATFORM_WINDOWS_IA64 + 1 ) ,
- CORDB_PLATFORM_MAC_X86 = ( CORDB_PLATFORM_MAC_PPC + 1 ) ,
- CORDB_PLATFORM_WINDOWS_ARM = ( CORDB_PLATFORM_MAC_X86 + 1 ) ,
- CORDB_PLATFORM_MAC_AMD64 = ( CORDB_PLATFORM_WINDOWS_ARM + 1 ) ,
- CORDB_PLATFORM_WINDOWS_ARM64 = ( CORDB_PLATFORM_MAC_AMD64 + 1 ) ,
- CORDB_PLATFORM_POSIX_AMD64 = ( CORDB_PLATFORM_WINDOWS_ARM64 + 1 ) ,
- CORDB_PLATFORM_POSIX_X86 = ( CORDB_PLATFORM_POSIX_AMD64 + 1 ) ,
- CORDB_PLATFORM_POSIX_ARM = ( CORDB_PLATFORM_POSIX_X86 + 1 ) ,
- CORDB_PLATFORM_POSIX_ARM64 = ( CORDB_PLATFORM_POSIX_ARM + 1 ) ,
- CORDB_PLATFORM_POSIX_LOONGARCH64 = ( CORDB_PLATFORM_POSIX_ARM64 + 1 ) ,
- CORDB_PLATFORM_POSIX_RISCV64 = ( CORDB_PLATFORM_POSIX_LOONGARCH64 + 1 )
- } CorDebugPlatform;
+ CORDB_PLATFORM_WINDOWS_X86 = 0,
+ CORDB_PLATFORM_WINDOWS_AMD64 = ( CORDB_PLATFORM_WINDOWS_X86 + 1 ) ,
+ CORDB_PLATFORM_WINDOWS_IA64 = ( CORDB_PLATFORM_WINDOWS_AMD64 + 1 ) ,
+ CORDB_PLATFORM_MAC_PPC = ( CORDB_PLATFORM_WINDOWS_IA64 + 1 ) ,
+ CORDB_PLATFORM_MAC_X86 = ( CORDB_PLATFORM_MAC_PPC + 1 ) ,
+ CORDB_PLATFORM_WINDOWS_ARM = ( CORDB_PLATFORM_MAC_X86 + 1 ) ,
+ CORDB_PLATFORM_MAC_AMD64 = ( CORDB_PLATFORM_WINDOWS_ARM + 1 ) ,
+ CORDB_PLATFORM_WINDOWS_ARM64 = ( CORDB_PLATFORM_MAC_AMD64 + 1 ) ,
+ CORDB_PLATFORM_POSIX_AMD64 = ( CORDB_PLATFORM_WINDOWS_ARM64 + 1 ) ,
+ CORDB_PLATFORM_POSIX_X86 = ( CORDB_PLATFORM_POSIX_AMD64 + 1 ) ,
+ CORDB_PLATFORM_POSIX_ARM = ( CORDB_PLATFORM_POSIX_X86 + 1 ) ,
+ CORDB_PLATFORM_POSIX_ARM64 = ( CORDB_PLATFORM_POSIX_ARM + 1 ) ,
+ CORDB_PLATFORM_POSIX_LOONGARCH64 = ( CORDB_PLATFORM_POSIX_ARM64 + 1 ) ,
+ CORDB_PLATFORM_POSIX_RISCV64 = ( CORDB_PLATFORM_POSIX_LOONGARCH64 + 1 )
+ } CorDebugPlatform;
EXTERN_C const IID IID_ICorDebugDataTarget;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugDataTargetVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugDataTarget * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugDataTarget * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugDataTarget * This);
+ DECLSPEC_XFGVIRT(ICorDebugDataTarget, GetPlatform)
HRESULT ( STDMETHODCALLTYPE *GetPlatform )(
ICorDebugDataTarget * This,
/* [out] */ CorDebugPlatform *pTargetPlatform);
+ DECLSPEC_XFGVIRT(ICorDebugDataTarget, ReadVirtual)
HRESULT ( STDMETHODCALLTYPE *ReadVirtual )(
ICorDebugDataTarget * This,
/* [in] */ CORDB_ADDRESS address,
/* [in] */ ULONG32 bytesRequested,
/* [out] */ ULONG32 *pBytesRead);
+ DECLSPEC_XFGVIRT(ICorDebugDataTarget, GetThreadContext)
HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
ICorDebugDataTarget * This,
/* [in] */ DWORD dwThreadID,
#ifdef COBJMACROS
-#define ICorDebugDataTarget_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugDataTarget_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugDataTarget_AddRef(This) \
+#define ICorDebugDataTarget_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugDataTarget_Release(This) \
+#define ICorDebugDataTarget_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugDataTarget_GetPlatform(This,pTargetPlatform) \
+#define ICorDebugDataTarget_GetPlatform(This,pTargetPlatform) \
( (This)->lpVtbl -> GetPlatform(This,pTargetPlatform) )
-#define ICorDebugDataTarget_ReadVirtual(This,address,pBuffer,bytesRequested,pBytesRead) \
+#define ICorDebugDataTarget_ReadVirtual(This,address,pBuffer,bytesRequested,pBytesRead) \
( (This)->lpVtbl -> ReadVirtual(This,address,pBuffer,bytesRequested,pBytesRead) )
-#define ICorDebugDataTarget_GetThreadContext(This,dwThreadID,contextFlags,contextSize,pContext) \
+#define ICorDebugDataTarget_GetThreadContext(This,dwThreadID,contextFlags,contextSize,pContext) \
( (This)->lpVtbl -> GetThreadContext(This,dwThreadID,contextFlags,contextSize,pContext) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugDataTarget_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugDataTarget_INTERFACE_DEFINED__ */
#ifndef __ICorDebugStaticFieldSymbol_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugStaticFieldSymbolVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugStaticFieldSymbol * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugStaticFieldSymbol * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugStaticFieldSymbol * This);
+ DECLSPEC_XFGVIRT(ICorDebugStaticFieldSymbol, GetName)
HRESULT ( STDMETHODCALLTYPE *GetName )(
ICorDebugStaticFieldSymbol * This,
/* [in] */ ULONG32 cchName,
/* [out] */ ULONG32 *pcchName,
/* [length_is][size_is][out] */ WCHAR szName[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugStaticFieldSymbol, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugStaticFieldSymbol * This,
/* [out] */ ULONG32 *pcbSize);
+ DECLSPEC_XFGVIRT(ICorDebugStaticFieldSymbol, GetAddress)
HRESULT ( STDMETHODCALLTYPE *GetAddress )(
ICorDebugStaticFieldSymbol * This,
/* [out] */ CORDB_ADDRESS *pRVA);
#ifdef COBJMACROS
-#define ICorDebugStaticFieldSymbol_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugStaticFieldSymbol_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugStaticFieldSymbol_AddRef(This) \
+#define ICorDebugStaticFieldSymbol_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugStaticFieldSymbol_Release(This) \
+#define ICorDebugStaticFieldSymbol_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugStaticFieldSymbol_GetName(This,cchName,pcchName,szName) \
+#define ICorDebugStaticFieldSymbol_GetName(This,cchName,pcchName,szName) \
( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) )
-#define ICorDebugStaticFieldSymbol_GetSize(This,pcbSize) \
+#define ICorDebugStaticFieldSymbol_GetSize(This,pcbSize) \
( (This)->lpVtbl -> GetSize(This,pcbSize) )
-#define ICorDebugStaticFieldSymbol_GetAddress(This,pRVA) \
+#define ICorDebugStaticFieldSymbol_GetAddress(This,pRVA) \
( (This)->lpVtbl -> GetAddress(This,pRVA) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugStaticFieldSymbol_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugStaticFieldSymbol_INTERFACE_DEFINED__ */
#ifndef __ICorDebugInstanceFieldSymbol_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugInstanceFieldSymbolVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugInstanceFieldSymbol * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugInstanceFieldSymbol * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugInstanceFieldSymbol * This);
+ DECLSPEC_XFGVIRT(ICorDebugInstanceFieldSymbol, GetName)
HRESULT ( STDMETHODCALLTYPE *GetName )(
ICorDebugInstanceFieldSymbol * This,
/* [in] */ ULONG32 cchName,
/* [out] */ ULONG32 *pcchName,
/* [length_is][size_is][out] */ WCHAR szName[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugInstanceFieldSymbol, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugInstanceFieldSymbol * This,
/* [out] */ ULONG32 *pcbSize);
+ DECLSPEC_XFGVIRT(ICorDebugInstanceFieldSymbol, GetOffset)
HRESULT ( STDMETHODCALLTYPE *GetOffset )(
ICorDebugInstanceFieldSymbol * This,
/* [out] */ ULONG32 *pcbOffset);
#ifdef COBJMACROS
-#define ICorDebugInstanceFieldSymbol_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugInstanceFieldSymbol_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugInstanceFieldSymbol_AddRef(This) \
+#define ICorDebugInstanceFieldSymbol_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugInstanceFieldSymbol_Release(This) \
+#define ICorDebugInstanceFieldSymbol_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugInstanceFieldSymbol_GetName(This,cchName,pcchName,szName) \
+#define ICorDebugInstanceFieldSymbol_GetName(This,cchName,pcchName,szName) \
( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) )
-#define ICorDebugInstanceFieldSymbol_GetSize(This,pcbSize) \
+#define ICorDebugInstanceFieldSymbol_GetSize(This,pcbSize) \
( (This)->lpVtbl -> GetSize(This,pcbSize) )
-#define ICorDebugInstanceFieldSymbol_GetOffset(This,pcbOffset) \
+#define ICorDebugInstanceFieldSymbol_GetOffset(This,pcbOffset) \
( (This)->lpVtbl -> GetOffset(This,pcbOffset) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugInstanceFieldSymbol_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugInstanceFieldSymbol_INTERFACE_DEFINED__ */
#ifndef __ICorDebugVariableSymbol_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugVariableSymbolVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugVariableSymbol * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugVariableSymbol * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugVariableSymbol * This);
+ DECLSPEC_XFGVIRT(ICorDebugVariableSymbol, GetName)
HRESULT ( STDMETHODCALLTYPE *GetName )(
ICorDebugVariableSymbol * This,
/* [in] */ ULONG32 cchName,
/* [out] */ ULONG32 *pcchName,
/* [length_is][size_is][out] */ WCHAR szName[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugVariableSymbol, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugVariableSymbol * This,
/* [out] */ ULONG32 *pcbValue);
+ DECLSPEC_XFGVIRT(ICorDebugVariableSymbol, GetValue)
HRESULT ( STDMETHODCALLTYPE *GetValue )(
ICorDebugVariableSymbol * This,
/* [in] */ ULONG32 offset,
/* [out] */ ULONG32 *pcbValue,
/* [length_is][size_is][out] */ BYTE pValue[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugVariableSymbol, SetValue)
HRESULT ( STDMETHODCALLTYPE *SetValue )(
ICorDebugVariableSymbol * This,
/* [in] */ ULONG32 offset,
/* [in] */ ULONG32 cbValue,
/* [size_is][in] */ BYTE pValue[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugVariableSymbol, GetSlotIndex)
HRESULT ( STDMETHODCALLTYPE *GetSlotIndex )(
ICorDebugVariableSymbol * This,
/* [out] */ ULONG32 *pSlotIndex);
#ifdef COBJMACROS
-#define ICorDebugVariableSymbol_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugVariableSymbol_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugVariableSymbol_AddRef(This) \
+#define ICorDebugVariableSymbol_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugVariableSymbol_Release(This) \
+#define ICorDebugVariableSymbol_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugVariableSymbol_GetName(This,cchName,pcchName,szName) \
+#define ICorDebugVariableSymbol_GetName(This,cchName,pcchName,szName) \
( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) )
-#define ICorDebugVariableSymbol_GetSize(This,pcbValue) \
+#define ICorDebugVariableSymbol_GetSize(This,pcbValue) \
( (This)->lpVtbl -> GetSize(This,pcbValue) )
-#define ICorDebugVariableSymbol_GetValue(This,offset,cbContext,context,cbValue,pcbValue,pValue) \
+#define ICorDebugVariableSymbol_GetValue(This,offset,cbContext,context,cbValue,pcbValue,pValue) \
( (This)->lpVtbl -> GetValue(This,offset,cbContext,context,cbValue,pcbValue,pValue) )
-#define ICorDebugVariableSymbol_SetValue(This,offset,threadID,cbContext,context,cbValue,pValue) \
+#define ICorDebugVariableSymbol_SetValue(This,offset,threadID,cbContext,context,cbValue,pValue) \
( (This)->lpVtbl -> SetValue(This,offset,threadID,cbContext,context,cbValue,pValue) )
-#define ICorDebugVariableSymbol_GetSlotIndex(This,pSlotIndex) \
+#define ICorDebugVariableSymbol_GetSlotIndex(This,pSlotIndex) \
( (This)->lpVtbl -> GetSlotIndex(This,pSlotIndex) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugVariableSymbol_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugVariableSymbol_INTERFACE_DEFINED__ */
#ifndef __ICorDebugMemoryBuffer_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugMemoryBufferVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugMemoryBuffer * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugMemoryBuffer * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugMemoryBuffer * This);
+ DECLSPEC_XFGVIRT(ICorDebugMemoryBuffer, GetStartAddress)
HRESULT ( STDMETHODCALLTYPE *GetStartAddress )(
ICorDebugMemoryBuffer * This,
/* [out] */ LPCVOID *address);
+ DECLSPEC_XFGVIRT(ICorDebugMemoryBuffer, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugMemoryBuffer * This,
/* [out] */ ULONG32 *pcbBufferLength);
#ifdef COBJMACROS
-#define ICorDebugMemoryBuffer_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugMemoryBuffer_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugMemoryBuffer_AddRef(This) \
+#define ICorDebugMemoryBuffer_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugMemoryBuffer_Release(This) \
+#define ICorDebugMemoryBuffer_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugMemoryBuffer_GetStartAddress(This,address) \
+#define ICorDebugMemoryBuffer_GetStartAddress(This,address) \
( (This)->lpVtbl -> GetStartAddress(This,address) )
-#define ICorDebugMemoryBuffer_GetSize(This,pcbBufferLength) \
+#define ICorDebugMemoryBuffer_GetSize(This,pcbBufferLength) \
( (This)->lpVtbl -> GetSize(This,pcbBufferLength) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugMemoryBuffer_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugMemoryBuffer_INTERFACE_DEFINED__ */
#ifndef __ICorDebugMergedAssemblyRecord_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugMergedAssemblyRecordVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugMergedAssemblyRecord * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugMergedAssemblyRecord * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugMergedAssemblyRecord * This);
+ DECLSPEC_XFGVIRT(ICorDebugMergedAssemblyRecord, GetSimpleName)
HRESULT ( STDMETHODCALLTYPE *GetSimpleName )(
ICorDebugMergedAssemblyRecord * This,
/* [in] */ ULONG32 cchName,
/* [out] */ ULONG32 *pcchName,
/* [length_is][size_is][out] */ WCHAR szName[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugMergedAssemblyRecord, GetVersion)
HRESULT ( STDMETHODCALLTYPE *GetVersion )(
ICorDebugMergedAssemblyRecord * This,
/* [out] */ USHORT *pMajor,
/* [out] */ USHORT *pBuild,
/* [out] */ USHORT *pRevision);
+ DECLSPEC_XFGVIRT(ICorDebugMergedAssemblyRecord, GetCulture)
HRESULT ( STDMETHODCALLTYPE *GetCulture )(
ICorDebugMergedAssemblyRecord * This,
/* [in] */ ULONG32 cchCulture,
/* [out] */ ULONG32 *pcchCulture,
/* [length_is][size_is][out] */ WCHAR szCulture[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugMergedAssemblyRecord, GetPublicKey)
HRESULT ( STDMETHODCALLTYPE *GetPublicKey )(
ICorDebugMergedAssemblyRecord * This,
/* [in] */ ULONG32 cbPublicKey,
/* [out] */ ULONG32 *pcbPublicKey,
/* [length_is][size_is][out] */ BYTE pbPublicKey[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugMergedAssemblyRecord, GetPublicKeyToken)
HRESULT ( STDMETHODCALLTYPE *GetPublicKeyToken )(
ICorDebugMergedAssemblyRecord * This,
/* [in] */ ULONG32 cbPublicKeyToken,
/* [out] */ ULONG32 *pcbPublicKeyToken,
/* [length_is][size_is][out] */ BYTE pbPublicKeyToken[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugMergedAssemblyRecord, GetIndex)
HRESULT ( STDMETHODCALLTYPE *GetIndex )(
ICorDebugMergedAssemblyRecord * This,
/* [out] */ ULONG32 *pIndex);
#ifdef COBJMACROS
-#define ICorDebugMergedAssemblyRecord_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugMergedAssemblyRecord_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugMergedAssemblyRecord_AddRef(This) \
+#define ICorDebugMergedAssemblyRecord_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugMergedAssemblyRecord_Release(This) \
+#define ICorDebugMergedAssemblyRecord_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugMergedAssemblyRecord_GetSimpleName(This,cchName,pcchName,szName) \
+#define ICorDebugMergedAssemblyRecord_GetSimpleName(This,cchName,pcchName,szName) \
( (This)->lpVtbl -> GetSimpleName(This,cchName,pcchName,szName) )
-#define ICorDebugMergedAssemblyRecord_GetVersion(This,pMajor,pMinor,pBuild,pRevision) \
+#define ICorDebugMergedAssemblyRecord_GetVersion(This,pMajor,pMinor,pBuild,pRevision) \
( (This)->lpVtbl -> GetVersion(This,pMajor,pMinor,pBuild,pRevision) )
-#define ICorDebugMergedAssemblyRecord_GetCulture(This,cchCulture,pcchCulture,szCulture) \
+#define ICorDebugMergedAssemblyRecord_GetCulture(This,cchCulture,pcchCulture,szCulture) \
( (This)->lpVtbl -> GetCulture(This,cchCulture,pcchCulture,szCulture) )
-#define ICorDebugMergedAssemblyRecord_GetPublicKey(This,cbPublicKey,pcbPublicKey,pbPublicKey) \
+#define ICorDebugMergedAssemblyRecord_GetPublicKey(This,cbPublicKey,pcbPublicKey,pbPublicKey) \
( (This)->lpVtbl -> GetPublicKey(This,cbPublicKey,pcbPublicKey,pbPublicKey) )
-#define ICorDebugMergedAssemblyRecord_GetPublicKeyToken(This,cbPublicKeyToken,pcbPublicKeyToken,pbPublicKeyToken) \
+#define ICorDebugMergedAssemblyRecord_GetPublicKeyToken(This,cbPublicKeyToken,pcbPublicKeyToken,pbPublicKeyToken) \
( (This)->lpVtbl -> GetPublicKeyToken(This,cbPublicKeyToken,pcbPublicKeyToken,pbPublicKeyToken) )
-#define ICorDebugMergedAssemblyRecord_GetIndex(This,pIndex) \
+#define ICorDebugMergedAssemblyRecord_GetIndex(This,pIndex) \
( (This)->lpVtbl -> GetIndex(This,pIndex) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugMergedAssemblyRecord_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugMergedAssemblyRecord_INTERFACE_DEFINED__ */
#ifndef __ICorDebugSymbolProvider_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugSymbolProviderVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugSymbolProvider * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugSymbolProvider * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugSymbolProvider * This);
+ DECLSPEC_XFGVIRT(ICorDebugSymbolProvider, GetStaticFieldSymbols)
HRESULT ( STDMETHODCALLTYPE *GetStaticFieldSymbols )(
ICorDebugSymbolProvider * This,
/* [in] */ ULONG32 cbSignature,
/* [out] */ ULONG32 *pcFetchedSymbols,
/* [length_is][size_is][out] */ ICorDebugStaticFieldSymbol *pSymbols[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugSymbolProvider, GetInstanceFieldSymbols)
HRESULT ( STDMETHODCALLTYPE *GetInstanceFieldSymbols )(
ICorDebugSymbolProvider * This,
/* [in] */ ULONG32 cbSignature,
/* [out] */ ULONG32 *pcFetchedSymbols,
/* [length_is][size_is][out] */ ICorDebugInstanceFieldSymbol *pSymbols[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugSymbolProvider, GetMethodLocalSymbols)
HRESULT ( STDMETHODCALLTYPE *GetMethodLocalSymbols )(
ICorDebugSymbolProvider * This,
/* [in] */ ULONG32 nativeRVA,
/* [out] */ ULONG32 *pcFetchedSymbols,
/* [length_is][size_is][out] */ ICorDebugVariableSymbol *pSymbols[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugSymbolProvider, GetMethodParameterSymbols)
HRESULT ( STDMETHODCALLTYPE *GetMethodParameterSymbols )(
ICorDebugSymbolProvider * This,
/* [in] */ ULONG32 nativeRVA,
/* [out] */ ULONG32 *pcFetchedSymbols,
/* [length_is][size_is][out] */ ICorDebugVariableSymbol *pSymbols[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugSymbolProvider, GetMergedAssemblyRecords)
HRESULT ( STDMETHODCALLTYPE *GetMergedAssemblyRecords )(
ICorDebugSymbolProvider * This,
/* [in] */ ULONG32 cRequestedRecords,
/* [out] */ ULONG32 *pcFetchedRecords,
/* [length_is][size_is][out] */ ICorDebugMergedAssemblyRecord *pRecords[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugSymbolProvider, GetMethodProps)
HRESULT ( STDMETHODCALLTYPE *GetMethodProps )(
ICorDebugSymbolProvider * This,
/* [in] */ ULONG32 codeRva,
/* [out] */ ULONG32 *pcbSignature,
/* [length_is][size_is][out] */ BYTE signature[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugSymbolProvider, GetTypeProps)
HRESULT ( STDMETHODCALLTYPE *GetTypeProps )(
ICorDebugSymbolProvider * This,
/* [in] */ ULONG32 vtableRva,
/* [out] */ ULONG32 *pcbSignature,
/* [length_is][size_is][out] */ BYTE signature[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugSymbolProvider, GetCodeRange)
HRESULT ( STDMETHODCALLTYPE *GetCodeRange )(
ICorDebugSymbolProvider * This,
/* [in] */ ULONG32 codeRva,
/* [out] */ ULONG32 *pCodeStartAddress,
ULONG32 *pCodeSize);
+ DECLSPEC_XFGVIRT(ICorDebugSymbolProvider, GetAssemblyImageBytes)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyImageBytes )(
ICorDebugSymbolProvider * This,
/* [in] */ CORDB_ADDRESS rva,
/* [in] */ ULONG32 length,
/* [out] */ ICorDebugMemoryBuffer **ppMemoryBuffer);
+ DECLSPEC_XFGVIRT(ICorDebugSymbolProvider, GetObjectSize)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize )(
ICorDebugSymbolProvider * This,
/* [in] */ ULONG32 cbSignature,
/* [size_is][in] */ BYTE typeSig[ ],
/* [out] */ ULONG32 *pObjectSize);
+ DECLSPEC_XFGVIRT(ICorDebugSymbolProvider, GetAssemblyImageMetadata)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyImageMetadata )(
ICorDebugSymbolProvider * This,
/* [out] */ ICorDebugMemoryBuffer **ppMemoryBuffer);
#ifdef COBJMACROS
-#define ICorDebugSymbolProvider_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugSymbolProvider_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugSymbolProvider_AddRef(This) \
+#define ICorDebugSymbolProvider_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugSymbolProvider_Release(This) \
+#define ICorDebugSymbolProvider_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugSymbolProvider_GetStaticFieldSymbols(This,cbSignature,typeSig,cRequestedSymbols,pcFetchedSymbols,pSymbols) \
+#define ICorDebugSymbolProvider_GetStaticFieldSymbols(This,cbSignature,typeSig,cRequestedSymbols,pcFetchedSymbols,pSymbols) \
( (This)->lpVtbl -> GetStaticFieldSymbols(This,cbSignature,typeSig,cRequestedSymbols,pcFetchedSymbols,pSymbols) )
-#define ICorDebugSymbolProvider_GetInstanceFieldSymbols(This,cbSignature,typeSig,cRequestedSymbols,pcFetchedSymbols,pSymbols) \
+#define ICorDebugSymbolProvider_GetInstanceFieldSymbols(This,cbSignature,typeSig,cRequestedSymbols,pcFetchedSymbols,pSymbols) \
( (This)->lpVtbl -> GetInstanceFieldSymbols(This,cbSignature,typeSig,cRequestedSymbols,pcFetchedSymbols,pSymbols) )
-#define ICorDebugSymbolProvider_GetMethodLocalSymbols(This,nativeRVA,cRequestedSymbols,pcFetchedSymbols,pSymbols) \
+#define ICorDebugSymbolProvider_GetMethodLocalSymbols(This,nativeRVA,cRequestedSymbols,pcFetchedSymbols,pSymbols) \
( (This)->lpVtbl -> GetMethodLocalSymbols(This,nativeRVA,cRequestedSymbols,pcFetchedSymbols,pSymbols) )
-#define ICorDebugSymbolProvider_GetMethodParameterSymbols(This,nativeRVA,cRequestedSymbols,pcFetchedSymbols,pSymbols) \
+#define ICorDebugSymbolProvider_GetMethodParameterSymbols(This,nativeRVA,cRequestedSymbols,pcFetchedSymbols,pSymbols) \
( (This)->lpVtbl -> GetMethodParameterSymbols(This,nativeRVA,cRequestedSymbols,pcFetchedSymbols,pSymbols) )
-#define ICorDebugSymbolProvider_GetMergedAssemblyRecords(This,cRequestedRecords,pcFetchedRecords,pRecords) \
+#define ICorDebugSymbolProvider_GetMergedAssemblyRecords(This,cRequestedRecords,pcFetchedRecords,pRecords) \
( (This)->lpVtbl -> GetMergedAssemblyRecords(This,cRequestedRecords,pcFetchedRecords,pRecords) )
-#define ICorDebugSymbolProvider_GetMethodProps(This,codeRva,pMethodToken,pcGenericParams,cbSignature,pcbSignature,signature) \
+#define ICorDebugSymbolProvider_GetMethodProps(This,codeRva,pMethodToken,pcGenericParams,cbSignature,pcbSignature,signature) \
( (This)->lpVtbl -> GetMethodProps(This,codeRva,pMethodToken,pcGenericParams,cbSignature,pcbSignature,signature) )
-#define ICorDebugSymbolProvider_GetTypeProps(This,vtableRva,cbSignature,pcbSignature,signature) \
+#define ICorDebugSymbolProvider_GetTypeProps(This,vtableRva,cbSignature,pcbSignature,signature) \
( (This)->lpVtbl -> GetTypeProps(This,vtableRva,cbSignature,pcbSignature,signature) )
-#define ICorDebugSymbolProvider_GetCodeRange(This,codeRva,pCodeStartAddress,pCodeSize) \
+#define ICorDebugSymbolProvider_GetCodeRange(This,codeRva,pCodeStartAddress,pCodeSize) \
( (This)->lpVtbl -> GetCodeRange(This,codeRva,pCodeStartAddress,pCodeSize) )
-#define ICorDebugSymbolProvider_GetAssemblyImageBytes(This,rva,length,ppMemoryBuffer) \
+#define ICorDebugSymbolProvider_GetAssemblyImageBytes(This,rva,length,ppMemoryBuffer) \
( (This)->lpVtbl -> GetAssemblyImageBytes(This,rva,length,ppMemoryBuffer) )
-#define ICorDebugSymbolProvider_GetObjectSize(This,cbSignature,typeSig,pObjectSize) \
+#define ICorDebugSymbolProvider_GetObjectSize(This,cbSignature,typeSig,pObjectSize) \
( (This)->lpVtbl -> GetObjectSize(This,cbSignature,typeSig,pObjectSize) )
-#define ICorDebugSymbolProvider_GetAssemblyImageMetadata(This,ppMemoryBuffer) \
+#define ICorDebugSymbolProvider_GetAssemblyImageMetadata(This,ppMemoryBuffer) \
( (This)->lpVtbl -> GetAssemblyImageMetadata(This,ppMemoryBuffer) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugSymbolProvider_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugSymbolProvider_INTERFACE_DEFINED__ */
#ifndef __ICorDebugSymbolProvider2_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugSymbolProvider2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugSymbolProvider2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugSymbolProvider2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugSymbolProvider2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugSymbolProvider2, GetGenericDictionaryInfo)
HRESULT ( STDMETHODCALLTYPE *GetGenericDictionaryInfo )(
ICorDebugSymbolProvider2 * This,
/* [out] */ ICorDebugMemoryBuffer **ppMemoryBuffer);
+ DECLSPEC_XFGVIRT(ICorDebugSymbolProvider2, GetFrameProps)
HRESULT ( STDMETHODCALLTYPE *GetFrameProps )(
ICorDebugSymbolProvider2 * This,
/* [in] */ ULONG32 codeRva,
#ifdef COBJMACROS
-#define ICorDebugSymbolProvider2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugSymbolProvider2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugSymbolProvider2_AddRef(This) \
+#define ICorDebugSymbolProvider2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugSymbolProvider2_Release(This) \
+#define ICorDebugSymbolProvider2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugSymbolProvider2_GetGenericDictionaryInfo(This,ppMemoryBuffer) \
+#define ICorDebugSymbolProvider2_GetGenericDictionaryInfo(This,ppMemoryBuffer) \
( (This)->lpVtbl -> GetGenericDictionaryInfo(This,ppMemoryBuffer) )
-#define ICorDebugSymbolProvider2_GetFrameProps(This,codeRva,pCodeStartRva,pParentFrameStartRva) \
+#define ICorDebugSymbolProvider2_GetFrameProps(This,codeRva,pCodeStartRva,pParentFrameStartRva) \
( (This)->lpVtbl -> GetFrameProps(This,codeRva,pCodeStartRva,pParentFrameStartRva) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugSymbolProvider2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugSymbolProvider2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugVirtualUnwinder_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugVirtualUnwinderVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugVirtualUnwinder * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugVirtualUnwinder * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugVirtualUnwinder * This);
+ DECLSPEC_XFGVIRT(ICorDebugVirtualUnwinder, GetContext)
HRESULT ( STDMETHODCALLTYPE *GetContext )(
ICorDebugVirtualUnwinder * This,
/* [in] */ ULONG32 contextFlags,
/* [out] */ ULONG32 *contextSize,
/* [size_is][out] */ BYTE contextBuf[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugVirtualUnwinder, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugVirtualUnwinder * This);
#ifdef COBJMACROS
-#define ICorDebugVirtualUnwinder_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugVirtualUnwinder_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugVirtualUnwinder_AddRef(This) \
+#define ICorDebugVirtualUnwinder_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugVirtualUnwinder_Release(This) \
+#define ICorDebugVirtualUnwinder_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugVirtualUnwinder_GetContext(This,contextFlags,cbContextBuf,contextSize,contextBuf) \
+#define ICorDebugVirtualUnwinder_GetContext(This,contextFlags,cbContextBuf,contextSize,contextBuf) \
( (This)->lpVtbl -> GetContext(This,contextFlags,cbContextBuf,contextSize,contextBuf) )
-#define ICorDebugVirtualUnwinder_Next(This) \
+#define ICorDebugVirtualUnwinder_Next(This) \
( (This)->lpVtbl -> Next(This) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugVirtualUnwinder_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugVirtualUnwinder_INTERFACE_DEFINED__ */
#ifndef __ICorDebugDataTarget2_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugDataTarget2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugDataTarget2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugDataTarget2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugDataTarget2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugDataTarget2, GetImageFromPointer)
HRESULT ( STDMETHODCALLTYPE *GetImageFromPointer )(
ICorDebugDataTarget2 * This,
/* [in] */ CORDB_ADDRESS addr,
/* [out] */ CORDB_ADDRESS *pImageBase,
/* [out] */ ULONG32 *pSize);
+ DECLSPEC_XFGVIRT(ICorDebugDataTarget2, GetImageLocation)
HRESULT ( STDMETHODCALLTYPE *GetImageLocation )(
ICorDebugDataTarget2 * This,
/* [in] */ CORDB_ADDRESS baseAddress,
/* [out] */ ULONG32 *pcchName,
/* [length_is][size_is][out] */ WCHAR szName[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugDataTarget2, GetSymbolProviderForImage)
HRESULT ( STDMETHODCALLTYPE *GetSymbolProviderForImage )(
ICorDebugDataTarget2 * This,
/* [in] */ CORDB_ADDRESS imageBaseAddress,
/* [out] */ ICorDebugSymbolProvider **ppSymProvider);
+ DECLSPEC_XFGVIRT(ICorDebugDataTarget2, EnumerateThreadIDs)
HRESULT ( STDMETHODCALLTYPE *EnumerateThreadIDs )(
ICorDebugDataTarget2 * This,
/* [in] */ ULONG32 cThreadIds,
/* [out] */ ULONG32 *pcThreadIds,
/* [length_is][size_is][out] */ ULONG32 pThreadIds[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugDataTarget2, CreateVirtualUnwinder)
HRESULT ( STDMETHODCALLTYPE *CreateVirtualUnwinder )(
ICorDebugDataTarget2 * This,
/* [in] */ DWORD nativeThreadID,
#ifdef COBJMACROS
-#define ICorDebugDataTarget2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugDataTarget2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugDataTarget2_AddRef(This) \
+#define ICorDebugDataTarget2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugDataTarget2_Release(This) \
+#define ICorDebugDataTarget2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugDataTarget2_GetImageFromPointer(This,addr,pImageBase,pSize) \
+#define ICorDebugDataTarget2_GetImageFromPointer(This,addr,pImageBase,pSize) \
( (This)->lpVtbl -> GetImageFromPointer(This,addr,pImageBase,pSize) )
-#define ICorDebugDataTarget2_GetImageLocation(This,baseAddress,cchName,pcchName,szName) \
+#define ICorDebugDataTarget2_GetImageLocation(This,baseAddress,cchName,pcchName,szName) \
( (This)->lpVtbl -> GetImageLocation(This,baseAddress,cchName,pcchName,szName) )
-#define ICorDebugDataTarget2_GetSymbolProviderForImage(This,imageBaseAddress,ppSymProvider) \
+#define ICorDebugDataTarget2_GetSymbolProviderForImage(This,imageBaseAddress,ppSymProvider) \
( (This)->lpVtbl -> GetSymbolProviderForImage(This,imageBaseAddress,ppSymProvider) )
-#define ICorDebugDataTarget2_EnumerateThreadIDs(This,cThreadIds,pcThreadIds,pThreadIds) \
+#define ICorDebugDataTarget2_EnumerateThreadIDs(This,cThreadIds,pcThreadIds,pThreadIds) \
( (This)->lpVtbl -> EnumerateThreadIDs(This,cThreadIds,pcThreadIds,pThreadIds) )
-#define ICorDebugDataTarget2_CreateVirtualUnwinder(This,nativeThreadID,contextFlags,cbContext,initialContext,ppUnwinder) \
+#define ICorDebugDataTarget2_CreateVirtualUnwinder(This,nativeThreadID,contextFlags,cbContext,initialContext,ppUnwinder) \
( (This)->lpVtbl -> CreateVirtualUnwinder(This,nativeThreadID,contextFlags,cbContext,initialContext,ppUnwinder) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugDataTarget2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugDataTarget2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugLoadedModule_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugLoadedModuleVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugLoadedModule * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugLoadedModule * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugLoadedModule * This);
+ DECLSPEC_XFGVIRT(ICorDebugLoadedModule, GetBaseAddress)
HRESULT ( STDMETHODCALLTYPE *GetBaseAddress )(
ICorDebugLoadedModule * This,
/* [out] */ CORDB_ADDRESS *pAddress);
+ DECLSPEC_XFGVIRT(ICorDebugLoadedModule, GetName)
HRESULT ( STDMETHODCALLTYPE *GetName )(
ICorDebugLoadedModule * This,
/* [in] */ ULONG32 cchName,
/* [out] */ ULONG32 *pcchName,
/* [length_is][size_is][out] */ WCHAR szName[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugLoadedModule, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugLoadedModule * This,
/* [out] */ ULONG32 *pcBytes);
#ifdef COBJMACROS
-#define ICorDebugLoadedModule_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugLoadedModule_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugLoadedModule_AddRef(This) \
+#define ICorDebugLoadedModule_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugLoadedModule_Release(This) \
+#define ICorDebugLoadedModule_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugLoadedModule_GetBaseAddress(This,pAddress) \
+#define ICorDebugLoadedModule_GetBaseAddress(This,pAddress) \
( (This)->lpVtbl -> GetBaseAddress(This,pAddress) )
-#define ICorDebugLoadedModule_GetName(This,cchName,pcchName,szName) \
+#define ICorDebugLoadedModule_GetName(This,cchName,pcchName,szName) \
( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) )
-#define ICorDebugLoadedModule_GetSize(This,pcBytes) \
+#define ICorDebugLoadedModule_GetSize(This,pcBytes) \
( (This)->lpVtbl -> GetSize(This,pcBytes) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugLoadedModule_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugLoadedModule_INTERFACE_DEFINED__ */
#ifndef __ICorDebugDataTarget3_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugDataTarget3Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugDataTarget3 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugDataTarget3 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugDataTarget3 * This);
+ DECLSPEC_XFGVIRT(ICorDebugDataTarget3, GetLoadedModules)
HRESULT ( STDMETHODCALLTYPE *GetLoadedModules )(
ICorDebugDataTarget3 * This,
/* [in] */ ULONG32 cRequestedModules,
#ifdef COBJMACROS
-#define ICorDebugDataTarget3_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugDataTarget3_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugDataTarget3_AddRef(This) \
+#define ICorDebugDataTarget3_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugDataTarget3_Release(This) \
+#define ICorDebugDataTarget3_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugDataTarget3_GetLoadedModules(This,cRequestedModules,pcFetchedModules,pLoadedModules) \
+#define ICorDebugDataTarget3_GetLoadedModules(This,cRequestedModules,pcFetchedModules,pLoadedModules) \
( (This)->lpVtbl -> GetLoadedModules(This,cRequestedModules,pcFetchedModules,pLoadedModules) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugDataTarget3_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugDataTarget3_INTERFACE_DEFINED__ */
#ifndef __ICorDebugDataTarget4_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugDataTarget4Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugDataTarget4 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugDataTarget4 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugDataTarget4 * This);
+ DECLSPEC_XFGVIRT(ICorDebugDataTarget4, VirtualUnwind)
HRESULT ( STDMETHODCALLTYPE *VirtualUnwind )(
ICorDebugDataTarget4 * This,
/* [in] */ DWORD threadId,
#ifdef COBJMACROS
-#define ICorDebugDataTarget4_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugDataTarget4_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugDataTarget4_AddRef(This) \
+#define ICorDebugDataTarget4_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugDataTarget4_Release(This) \
+#define ICorDebugDataTarget4_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugDataTarget4_VirtualUnwind(This,threadId,contextSize,context) \
+#define ICorDebugDataTarget4_VirtualUnwind(This,threadId,contextSize,context) \
( (This)->lpVtbl -> VirtualUnwind(This,threadId,contextSize,context) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugDataTarget4_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugDataTarget4_INTERFACE_DEFINED__ */
#ifndef __ICorDebugMutableDataTarget_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugMutableDataTargetVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugMutableDataTarget * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugMutableDataTarget * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugMutableDataTarget * This);
+ DECLSPEC_XFGVIRT(ICorDebugDataTarget, GetPlatform)
HRESULT ( STDMETHODCALLTYPE *GetPlatform )(
ICorDebugMutableDataTarget * This,
/* [out] */ CorDebugPlatform *pTargetPlatform);
+ DECLSPEC_XFGVIRT(ICorDebugDataTarget, ReadVirtual)
HRESULT ( STDMETHODCALLTYPE *ReadVirtual )(
ICorDebugMutableDataTarget * This,
/* [in] */ CORDB_ADDRESS address,
/* [in] */ ULONG32 bytesRequested,
/* [out] */ ULONG32 *pBytesRead);
+ DECLSPEC_XFGVIRT(ICorDebugDataTarget, GetThreadContext)
HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
ICorDebugMutableDataTarget * This,
/* [in] */ DWORD dwThreadID,
/* [in] */ ULONG32 contextSize,
/* [size_is][out] */ BYTE *pContext);
+ DECLSPEC_XFGVIRT(ICorDebugMutableDataTarget, WriteVirtual)
HRESULT ( STDMETHODCALLTYPE *WriteVirtual )(
ICorDebugMutableDataTarget * This,
/* [in] */ CORDB_ADDRESS address,
/* [size_is][in] */ const BYTE *pBuffer,
/* [in] */ ULONG32 bytesRequested);
+ DECLSPEC_XFGVIRT(ICorDebugMutableDataTarget, SetThreadContext)
HRESULT ( STDMETHODCALLTYPE *SetThreadContext )(
ICorDebugMutableDataTarget * This,
/* [in] */ DWORD dwThreadID,
/* [in] */ ULONG32 contextSize,
/* [size_is][in] */ const BYTE *pContext);
+ DECLSPEC_XFGVIRT(ICorDebugMutableDataTarget, ContinueStatusChanged)
HRESULT ( STDMETHODCALLTYPE *ContinueStatusChanged )(
ICorDebugMutableDataTarget * This,
/* [in] */ DWORD dwThreadId,
#ifdef COBJMACROS
-#define ICorDebugMutableDataTarget_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugMutableDataTarget_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugMutableDataTarget_AddRef(This) \
+#define ICorDebugMutableDataTarget_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugMutableDataTarget_Release(This) \
+#define ICorDebugMutableDataTarget_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugMutableDataTarget_GetPlatform(This,pTargetPlatform) \
+#define ICorDebugMutableDataTarget_GetPlatform(This,pTargetPlatform) \
( (This)->lpVtbl -> GetPlatform(This,pTargetPlatform) )
-#define ICorDebugMutableDataTarget_ReadVirtual(This,address,pBuffer,bytesRequested,pBytesRead) \
+#define ICorDebugMutableDataTarget_ReadVirtual(This,address,pBuffer,bytesRequested,pBytesRead) \
( (This)->lpVtbl -> ReadVirtual(This,address,pBuffer,bytesRequested,pBytesRead) )
-#define ICorDebugMutableDataTarget_GetThreadContext(This,dwThreadID,contextFlags,contextSize,pContext) \
+#define ICorDebugMutableDataTarget_GetThreadContext(This,dwThreadID,contextFlags,contextSize,pContext) \
( (This)->lpVtbl -> GetThreadContext(This,dwThreadID,contextFlags,contextSize,pContext) )
-#define ICorDebugMutableDataTarget_WriteVirtual(This,address,pBuffer,bytesRequested) \
+#define ICorDebugMutableDataTarget_WriteVirtual(This,address,pBuffer,bytesRequested) \
( (This)->lpVtbl -> WriteVirtual(This,address,pBuffer,bytesRequested) )
-#define ICorDebugMutableDataTarget_SetThreadContext(This,dwThreadID,contextSize,pContext) \
+#define ICorDebugMutableDataTarget_SetThreadContext(This,dwThreadID,contextSize,pContext) \
( (This)->lpVtbl -> SetThreadContext(This,dwThreadID,contextSize,pContext) )
-#define ICorDebugMutableDataTarget_ContinueStatusChanged(This,dwThreadId,continueStatus) \
+#define ICorDebugMutableDataTarget_ContinueStatusChanged(This,dwThreadId,continueStatus) \
( (This)->lpVtbl -> ContinueStatusChanged(This,dwThreadId,continueStatus) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugMutableDataTarget_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugMutableDataTarget_INTERFACE_DEFINED__ */
#ifndef __ICorDebugMetaDataLocator_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugMetaDataLocatorVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugMetaDataLocator * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugMetaDataLocator * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugMetaDataLocator * This);
+ DECLSPEC_XFGVIRT(ICorDebugMetaDataLocator, GetMetaData)
HRESULT ( STDMETHODCALLTYPE *GetMetaData )(
ICorDebugMetaDataLocator * This,
/* [in] */ LPCWSTR wszImagePath,
#ifdef COBJMACROS
-#define ICorDebugMetaDataLocator_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugMetaDataLocator_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugMetaDataLocator_AddRef(This) \
+#define ICorDebugMetaDataLocator_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugMetaDataLocator_Release(This) \
+#define ICorDebugMetaDataLocator_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugMetaDataLocator_GetMetaData(This,wszImagePath,dwImageTimeStamp,dwImageSize,cchPathBuffer,pcchPathBuffer,wszPathBuffer) \
+#define ICorDebugMetaDataLocator_GetMetaData(This,wszImagePath,dwImageTimeStamp,dwImageSize,cchPathBuffer,pcchPathBuffer,wszPathBuffer) \
( (This)->lpVtbl -> GetMetaData(This,wszImagePath,dwImageTimeStamp,dwImageSize,cchPathBuffer,pcchPathBuffer,wszPathBuffer) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugMetaDataLocator_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugMetaDataLocator_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0015 */
typedef
enum CorDebugStepReason
{
- STEP_NORMAL = 0,
- STEP_RETURN = ( STEP_NORMAL + 1 ) ,
- STEP_CALL = ( STEP_RETURN + 1 ) ,
- STEP_EXCEPTION_FILTER = ( STEP_CALL + 1 ) ,
- STEP_EXCEPTION_HANDLER = ( STEP_EXCEPTION_FILTER + 1 ) ,
- STEP_INTERCEPT = ( STEP_EXCEPTION_HANDLER + 1 ) ,
- STEP_EXIT = ( STEP_INTERCEPT + 1 )
- } CorDebugStepReason;
+ STEP_NORMAL = 0,
+ STEP_RETURN = ( STEP_NORMAL + 1 ) ,
+ STEP_CALL = ( STEP_RETURN + 1 ) ,
+ STEP_EXCEPTION_FILTER = ( STEP_CALL + 1 ) ,
+ STEP_EXCEPTION_HANDLER = ( STEP_EXCEPTION_FILTER + 1 ) ,
+ STEP_INTERCEPT = ( STEP_EXCEPTION_HANDLER + 1 ) ,
+ STEP_EXIT = ( STEP_INTERCEPT + 1 )
+ } CorDebugStepReason;
typedef
enum LoggingLevelEnum
{
- LTraceLevel0 = 0,
- LTraceLevel1 = ( LTraceLevel0 + 1 ) ,
- LTraceLevel2 = ( LTraceLevel1 + 1 ) ,
- LTraceLevel3 = ( LTraceLevel2 + 1 ) ,
- LTraceLevel4 = ( LTraceLevel3 + 1 ) ,
- LStatusLevel0 = 20,
- LStatusLevel1 = ( LStatusLevel0 + 1 ) ,
- LStatusLevel2 = ( LStatusLevel1 + 1 ) ,
- LStatusLevel3 = ( LStatusLevel2 + 1 ) ,
- LStatusLevel4 = ( LStatusLevel3 + 1 ) ,
- LWarningLevel = 40,
- LErrorLevel = 50,
- LPanicLevel = 100
- } LoggingLevelEnum;
+ LTraceLevel0 = 0,
+ LTraceLevel1 = ( LTraceLevel0 + 1 ) ,
+ LTraceLevel2 = ( LTraceLevel1 + 1 ) ,
+ LTraceLevel3 = ( LTraceLevel2 + 1 ) ,
+ LTraceLevel4 = ( LTraceLevel3 + 1 ) ,
+ LStatusLevel0 = 20,
+ LStatusLevel1 = ( LStatusLevel0 + 1 ) ,
+ LStatusLevel2 = ( LStatusLevel1 + 1 ) ,
+ LStatusLevel3 = ( LStatusLevel2 + 1 ) ,
+ LStatusLevel4 = ( LStatusLevel3 + 1 ) ,
+ LWarningLevel = 40,
+ LErrorLevel = 50,
+ LPanicLevel = 100
+ } LoggingLevelEnum;
typedef
enum LogSwitchCallReason
{
- SWITCH_CREATE = 0,
- SWITCH_MODIFY = ( SWITCH_CREATE + 1 ) ,
- SWITCH_DELETE = ( SWITCH_MODIFY + 1 )
- } LogSwitchCallReason;
+ SWITCH_CREATE = 0,
+ SWITCH_MODIFY = ( SWITCH_CREATE + 1 ) ,
+ SWITCH_DELETE = ( SWITCH_MODIFY + 1 )
+ } LogSwitchCallReason;
EXTERN_C const IID IID_ICorDebugManagedCallback;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugManagedCallbackVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugManagedCallback * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugManagedCallback * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugManagedCallback * This);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, Breakpoint)
HRESULT ( STDMETHODCALLTYPE *Breakpoint )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugThread *pThread,
/* [in] */ ICorDebugBreakpoint *pBreakpoint);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, StepComplete)
HRESULT ( STDMETHODCALLTYPE *StepComplete )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugStepper *pStepper,
/* [in] */ CorDebugStepReason reason);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, Break)
HRESULT ( STDMETHODCALLTYPE *Break )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugThread *thread);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, Exception)
HRESULT ( STDMETHODCALLTYPE *Exception )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugThread *pThread,
/* [in] */ BOOL unhandled);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, EvalComplete)
HRESULT ( STDMETHODCALLTYPE *EvalComplete )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugThread *pThread,
/* [in] */ ICorDebugEval *pEval);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, EvalException)
HRESULT ( STDMETHODCALLTYPE *EvalException )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugThread *pThread,
/* [in] */ ICorDebugEval *pEval);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, CreateProcess)
HRESULT ( STDMETHODCALLTYPE *CreateProcess )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugProcess *pProcess);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, ExitProcess)
HRESULT ( STDMETHODCALLTYPE *ExitProcess )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugProcess *pProcess);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, CreateThread)
HRESULT ( STDMETHODCALLTYPE *CreateThread )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugThread *thread);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, ExitThread)
HRESULT ( STDMETHODCALLTYPE *ExitThread )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugThread *thread);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, LoadModule)
HRESULT ( STDMETHODCALLTYPE *LoadModule )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugModule *pModule);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, UnloadModule)
HRESULT ( STDMETHODCALLTYPE *UnloadModule )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugModule *pModule);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, LoadClass)
HRESULT ( STDMETHODCALLTYPE *LoadClass )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugClass *c);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, UnloadClass)
HRESULT ( STDMETHODCALLTYPE *UnloadClass )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugClass *c);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, DebuggerError)
HRESULT ( STDMETHODCALLTYPE *DebuggerError )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugProcess *pProcess,
/* [in] */ HRESULT errorHR,
/* [in] */ DWORD errorCode);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, LogMessage)
HRESULT ( STDMETHODCALLTYPE *LogMessage )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ WCHAR *pLogSwitchName,
/* [in] */ WCHAR *pMessage);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, LogSwitch)
HRESULT ( STDMETHODCALLTYPE *LogSwitch )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ WCHAR *pLogSwitchName,
/* [in] */ WCHAR *pParentName);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, CreateAppDomain)
HRESULT ( STDMETHODCALLTYPE *CreateAppDomain )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugProcess *pProcess,
/* [in] */ ICorDebugAppDomain *pAppDomain);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, ExitAppDomain)
HRESULT ( STDMETHODCALLTYPE *ExitAppDomain )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugProcess *pProcess,
/* [in] */ ICorDebugAppDomain *pAppDomain);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, LoadAssembly)
HRESULT ( STDMETHODCALLTYPE *LoadAssembly )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugAssembly *pAssembly);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, UnloadAssembly)
HRESULT ( STDMETHODCALLTYPE *UnloadAssembly )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugAssembly *pAssembly);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, ControlCTrap)
HRESULT ( STDMETHODCALLTYPE *ControlCTrap )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugProcess *pProcess);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, NameChange)
HRESULT ( STDMETHODCALLTYPE *NameChange )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugThread *pThread);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, UpdateModuleSymbols)
HRESULT ( STDMETHODCALLTYPE *UpdateModuleSymbols )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugModule *pModule,
/* [in] */ IStream *pSymbolStream);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, EditAndContinueRemap)
HRESULT ( STDMETHODCALLTYPE *EditAndContinueRemap )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugFunction *pFunction,
/* [in] */ BOOL fAccurate);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback, BreakpointSetError)
HRESULT ( STDMETHODCALLTYPE *BreakpointSetError )(
ICorDebugManagedCallback * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
#ifdef COBJMACROS
-#define ICorDebugManagedCallback_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugManagedCallback_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugManagedCallback_AddRef(This) \
+#define ICorDebugManagedCallback_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugManagedCallback_Release(This) \
+#define ICorDebugManagedCallback_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugManagedCallback_Breakpoint(This,pAppDomain,pThread,pBreakpoint) \
+#define ICorDebugManagedCallback_Breakpoint(This,pAppDomain,pThread,pBreakpoint) \
( (This)->lpVtbl -> Breakpoint(This,pAppDomain,pThread,pBreakpoint) )
-#define ICorDebugManagedCallback_StepComplete(This,pAppDomain,pThread,pStepper,reason) \
+#define ICorDebugManagedCallback_StepComplete(This,pAppDomain,pThread,pStepper,reason) \
( (This)->lpVtbl -> StepComplete(This,pAppDomain,pThread,pStepper,reason) )
-#define ICorDebugManagedCallback_Break(This,pAppDomain,thread) \
+#define ICorDebugManagedCallback_Break(This,pAppDomain,thread) \
( (This)->lpVtbl -> Break(This,pAppDomain,thread) )
-#define ICorDebugManagedCallback_Exception(This,pAppDomain,pThread,unhandled) \
+#define ICorDebugManagedCallback_Exception(This,pAppDomain,pThread,unhandled) \
( (This)->lpVtbl -> Exception(This,pAppDomain,pThread,unhandled) )
-#define ICorDebugManagedCallback_EvalComplete(This,pAppDomain,pThread,pEval) \
+#define ICorDebugManagedCallback_EvalComplete(This,pAppDomain,pThread,pEval) \
( (This)->lpVtbl -> EvalComplete(This,pAppDomain,pThread,pEval) )
-#define ICorDebugManagedCallback_EvalException(This,pAppDomain,pThread,pEval) \
+#define ICorDebugManagedCallback_EvalException(This,pAppDomain,pThread,pEval) \
( (This)->lpVtbl -> EvalException(This,pAppDomain,pThread,pEval) )
-#define ICorDebugManagedCallback_CreateProcess(This,pProcess) \
+#define ICorDebugManagedCallback_CreateProcess(This,pProcess) \
( (This)->lpVtbl -> CreateProcess(This,pProcess) )
-#define ICorDebugManagedCallback_ExitProcess(This,pProcess) \
+#define ICorDebugManagedCallback_ExitProcess(This,pProcess) \
( (This)->lpVtbl -> ExitProcess(This,pProcess) )
-#define ICorDebugManagedCallback_CreateThread(This,pAppDomain,thread) \
+#define ICorDebugManagedCallback_CreateThread(This,pAppDomain,thread) \
( (This)->lpVtbl -> CreateThread(This,pAppDomain,thread) )
-#define ICorDebugManagedCallback_ExitThread(This,pAppDomain,thread) \
+#define ICorDebugManagedCallback_ExitThread(This,pAppDomain,thread) \
( (This)->lpVtbl -> ExitThread(This,pAppDomain,thread) )
-#define ICorDebugManagedCallback_LoadModule(This,pAppDomain,pModule) \
+#define ICorDebugManagedCallback_LoadModule(This,pAppDomain,pModule) \
( (This)->lpVtbl -> LoadModule(This,pAppDomain,pModule) )
-#define ICorDebugManagedCallback_UnloadModule(This,pAppDomain,pModule) \
+#define ICorDebugManagedCallback_UnloadModule(This,pAppDomain,pModule) \
( (This)->lpVtbl -> UnloadModule(This,pAppDomain,pModule) )
-#define ICorDebugManagedCallback_LoadClass(This,pAppDomain,c) \
+#define ICorDebugManagedCallback_LoadClass(This,pAppDomain,c) \
( (This)->lpVtbl -> LoadClass(This,pAppDomain,c) )
-#define ICorDebugManagedCallback_UnloadClass(This,pAppDomain,c) \
+#define ICorDebugManagedCallback_UnloadClass(This,pAppDomain,c) \
( (This)->lpVtbl -> UnloadClass(This,pAppDomain,c) )
-#define ICorDebugManagedCallback_DebuggerError(This,pProcess,errorHR,errorCode) \
+#define ICorDebugManagedCallback_DebuggerError(This,pProcess,errorHR,errorCode) \
( (This)->lpVtbl -> DebuggerError(This,pProcess,errorHR,errorCode) )
-#define ICorDebugManagedCallback_LogMessage(This,pAppDomain,pThread,lLevel,pLogSwitchName,pMessage) \
+#define ICorDebugManagedCallback_LogMessage(This,pAppDomain,pThread,lLevel,pLogSwitchName,pMessage) \
( (This)->lpVtbl -> LogMessage(This,pAppDomain,pThread,lLevel,pLogSwitchName,pMessage) )
-#define ICorDebugManagedCallback_LogSwitch(This,pAppDomain,pThread,lLevel,ulReason,pLogSwitchName,pParentName) \
+#define ICorDebugManagedCallback_LogSwitch(This,pAppDomain,pThread,lLevel,ulReason,pLogSwitchName,pParentName) \
( (This)->lpVtbl -> LogSwitch(This,pAppDomain,pThread,lLevel,ulReason,pLogSwitchName,pParentName) )
-#define ICorDebugManagedCallback_CreateAppDomain(This,pProcess,pAppDomain) \
+#define ICorDebugManagedCallback_CreateAppDomain(This,pProcess,pAppDomain) \
( (This)->lpVtbl -> CreateAppDomain(This,pProcess,pAppDomain) )
-#define ICorDebugManagedCallback_ExitAppDomain(This,pProcess,pAppDomain) \
+#define ICorDebugManagedCallback_ExitAppDomain(This,pProcess,pAppDomain) \
( (This)->lpVtbl -> ExitAppDomain(This,pProcess,pAppDomain) )
-#define ICorDebugManagedCallback_LoadAssembly(This,pAppDomain,pAssembly) \
+#define ICorDebugManagedCallback_LoadAssembly(This,pAppDomain,pAssembly) \
( (This)->lpVtbl -> LoadAssembly(This,pAppDomain,pAssembly) )
-#define ICorDebugManagedCallback_UnloadAssembly(This,pAppDomain,pAssembly) \
+#define ICorDebugManagedCallback_UnloadAssembly(This,pAppDomain,pAssembly) \
( (This)->lpVtbl -> UnloadAssembly(This,pAppDomain,pAssembly) )
-#define ICorDebugManagedCallback_ControlCTrap(This,pProcess) \
+#define ICorDebugManagedCallback_ControlCTrap(This,pProcess) \
( (This)->lpVtbl -> ControlCTrap(This,pProcess) )
-#define ICorDebugManagedCallback_NameChange(This,pAppDomain,pThread) \
+#define ICorDebugManagedCallback_NameChange(This,pAppDomain,pThread) \
( (This)->lpVtbl -> NameChange(This,pAppDomain,pThread) )
-#define ICorDebugManagedCallback_UpdateModuleSymbols(This,pAppDomain,pModule,pSymbolStream) \
+#define ICorDebugManagedCallback_UpdateModuleSymbols(This,pAppDomain,pModule,pSymbolStream) \
( (This)->lpVtbl -> UpdateModuleSymbols(This,pAppDomain,pModule,pSymbolStream) )
-#define ICorDebugManagedCallback_EditAndContinueRemap(This,pAppDomain,pThread,pFunction,fAccurate) \
+#define ICorDebugManagedCallback_EditAndContinueRemap(This,pAppDomain,pThread,pFunction,fAccurate) \
( (This)->lpVtbl -> EditAndContinueRemap(This,pAppDomain,pThread,pFunction,fAccurate) )
-#define ICorDebugManagedCallback_BreakpointSetError(This,pAppDomain,pThread,pBreakpoint,dwError) \
+#define ICorDebugManagedCallback_BreakpointSetError(This,pAppDomain,pThread,pBreakpoint,dwError) \
( (This)->lpVtbl -> BreakpointSetError(This,pAppDomain,pThread,pBreakpoint,dwError) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugManagedCallback_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugManagedCallback_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0016 */
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugManagedCallback3Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugManagedCallback3 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugManagedCallback3 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugManagedCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback3, CustomNotification)
HRESULT ( STDMETHODCALLTYPE *CustomNotification )(
ICorDebugManagedCallback3 * This,
/* [in] */ ICorDebugThread *pThread,
#ifdef COBJMACROS
-#define ICorDebugManagedCallback3_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugManagedCallback3_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugManagedCallback3_AddRef(This) \
+#define ICorDebugManagedCallback3_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugManagedCallback3_Release(This) \
+#define ICorDebugManagedCallback3_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugManagedCallback3_CustomNotification(This,pThread,pAppDomain) \
+#define ICorDebugManagedCallback3_CustomNotification(This,pThread,pAppDomain) \
( (This)->lpVtbl -> CustomNotification(This,pThread,pAppDomain) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugManagedCallback3_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugManagedCallback3_INTERFACE_DEFINED__ */
#ifndef __ICorDebugManagedCallback4_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugManagedCallback4Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugManagedCallback4 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugManagedCallback4 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugManagedCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback4, BeforeGarbageCollection)
HRESULT ( STDMETHODCALLTYPE *BeforeGarbageCollection )(
ICorDebugManagedCallback4 * This,
/* [in] */ ICorDebugProcess *pProcess);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback4, AfterGarbageCollection)
HRESULT ( STDMETHODCALLTYPE *AfterGarbageCollection )(
ICorDebugManagedCallback4 * This,
/* [in] */ ICorDebugProcess *pProcess);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback4, DataBreakpoint)
HRESULT ( STDMETHODCALLTYPE *DataBreakpoint )(
ICorDebugManagedCallback4 * This,
/* [in] */ ICorDebugProcess *pProcess,
#ifdef COBJMACROS
-#define ICorDebugManagedCallback4_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugManagedCallback4_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugManagedCallback4_AddRef(This) \
+#define ICorDebugManagedCallback4_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugManagedCallback4_Release(This) \
+#define ICorDebugManagedCallback4_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugManagedCallback4_BeforeGarbageCollection(This,pProcess) \
+#define ICorDebugManagedCallback4_BeforeGarbageCollection(This,pProcess) \
( (This)->lpVtbl -> BeforeGarbageCollection(This,pProcess) )
-#define ICorDebugManagedCallback4_AfterGarbageCollection(This,pProcess) \
+#define ICorDebugManagedCallback4_AfterGarbageCollection(This,pProcess) \
( (This)->lpVtbl -> AfterGarbageCollection(This,pProcess) )
-#define ICorDebugManagedCallback4_DataBreakpoint(This,pProcess,pThread,pContext,contextSize) \
+#define ICorDebugManagedCallback4_DataBreakpoint(This,pProcess,pThread,pContext,contextSize) \
( (This)->lpVtbl -> DataBreakpoint(This,pProcess,pThread,pContext,contextSize) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugManagedCallback4_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugManagedCallback4_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0018 */
typedef
enum CorDebugExceptionCallbackType
{
- DEBUG_EXCEPTION_FIRST_CHANCE = 1,
- DEBUG_EXCEPTION_USER_FIRST_CHANCE = 2,
- DEBUG_EXCEPTION_CATCH_HANDLER_FOUND = 3,
- DEBUG_EXCEPTION_UNHANDLED = 4
- } CorDebugExceptionCallbackType;
+ DEBUG_EXCEPTION_FIRST_CHANCE = 1,
+ DEBUG_EXCEPTION_USER_FIRST_CHANCE = 2,
+ DEBUG_EXCEPTION_CATCH_HANDLER_FOUND = 3,
+ DEBUG_EXCEPTION_UNHANDLED = 4
+ } CorDebugExceptionCallbackType;
typedef
enum CorDebugExceptionFlags
{
- DEBUG_EXCEPTION_NONE = 0,
- DEBUG_EXCEPTION_CAN_BE_INTERCEPTED = 0x1
- } CorDebugExceptionFlags;
+ DEBUG_EXCEPTION_NONE = 0,
+ DEBUG_EXCEPTION_CAN_BE_INTERCEPTED = 0x1
+ } CorDebugExceptionFlags;
typedef
enum CorDebugExceptionUnwindCallbackType
{
- DEBUG_EXCEPTION_UNWIND_BEGIN = 1,
- DEBUG_EXCEPTION_INTERCEPTED = 2
- } CorDebugExceptionUnwindCallbackType;
+ DEBUG_EXCEPTION_UNWIND_BEGIN = 1,
+ DEBUG_EXCEPTION_INTERCEPTED = 2
+ } CorDebugExceptionUnwindCallbackType;
EXTERN_C const IID IID_ICorDebugManagedCallback2;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugManagedCallback2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugManagedCallback2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugManagedCallback2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugManagedCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback2, FunctionRemapOpportunity)
HRESULT ( STDMETHODCALLTYPE *FunctionRemapOpportunity )(
ICorDebugManagedCallback2 * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugFunction *pNewFunction,
/* [in] */ ULONG32 oldILOffset);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback2, CreateConnection)
HRESULT ( STDMETHODCALLTYPE *CreateConnection )(
ICorDebugManagedCallback2 * This,
/* [in] */ ICorDebugProcess *pProcess,
/* [in] */ CONNID dwConnectionId,
/* [in] */ WCHAR *pConnName);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback2, ChangeConnection)
HRESULT ( STDMETHODCALLTYPE *ChangeConnection )(
ICorDebugManagedCallback2 * This,
/* [in] */ ICorDebugProcess *pProcess,
/* [in] */ CONNID dwConnectionId);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback2, DestroyConnection)
HRESULT ( STDMETHODCALLTYPE *DestroyConnection )(
ICorDebugManagedCallback2 * This,
/* [in] */ ICorDebugProcess *pProcess,
/* [in] */ CONNID dwConnectionId);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback2, Exception)
HRESULT ( STDMETHODCALLTYPE *Exception )(
ICorDebugManagedCallback2 * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ CorDebugExceptionCallbackType dwEventType,
/* [in] */ DWORD dwFlags);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback2, ExceptionUnwind)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwind )(
ICorDebugManagedCallback2 * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ CorDebugExceptionUnwindCallbackType dwEventType,
/* [in] */ DWORD dwFlags);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback2, FunctionRemapComplete)
HRESULT ( STDMETHODCALLTYPE *FunctionRemapComplete )(
ICorDebugManagedCallback2 * This,
/* [in] */ ICorDebugAppDomain *pAppDomain,
/* [in] */ ICorDebugThread *pThread,
/* [in] */ ICorDebugFunction *pFunction);
+ DECLSPEC_XFGVIRT(ICorDebugManagedCallback2, MDANotification)
HRESULT ( STDMETHODCALLTYPE *MDANotification )(
ICorDebugManagedCallback2 * This,
/* [in] */ ICorDebugController *pController,
#ifdef COBJMACROS
-#define ICorDebugManagedCallback2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugManagedCallback2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugManagedCallback2_AddRef(This) \
+#define ICorDebugManagedCallback2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugManagedCallback2_Release(This) \
+#define ICorDebugManagedCallback2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugManagedCallback2_FunctionRemapOpportunity(This,pAppDomain,pThread,pOldFunction,pNewFunction,oldILOffset) \
+#define ICorDebugManagedCallback2_FunctionRemapOpportunity(This,pAppDomain,pThread,pOldFunction,pNewFunction,oldILOffset) \
( (This)->lpVtbl -> FunctionRemapOpportunity(This,pAppDomain,pThread,pOldFunction,pNewFunction,oldILOffset) )
-#define ICorDebugManagedCallback2_CreateConnection(This,pProcess,dwConnectionId,pConnName) \
+#define ICorDebugManagedCallback2_CreateConnection(This,pProcess,dwConnectionId,pConnName) \
( (This)->lpVtbl -> CreateConnection(This,pProcess,dwConnectionId,pConnName) )
-#define ICorDebugManagedCallback2_ChangeConnection(This,pProcess,dwConnectionId) \
+#define ICorDebugManagedCallback2_ChangeConnection(This,pProcess,dwConnectionId) \
( (This)->lpVtbl -> ChangeConnection(This,pProcess,dwConnectionId) )
-#define ICorDebugManagedCallback2_DestroyConnection(This,pProcess,dwConnectionId) \
+#define ICorDebugManagedCallback2_DestroyConnection(This,pProcess,dwConnectionId) \
( (This)->lpVtbl -> DestroyConnection(This,pProcess,dwConnectionId) )
-#define ICorDebugManagedCallback2_Exception(This,pAppDomain,pThread,pFrame,nOffset,dwEventType,dwFlags) \
+#define ICorDebugManagedCallback2_Exception(This,pAppDomain,pThread,pFrame,nOffset,dwEventType,dwFlags) \
( (This)->lpVtbl -> Exception(This,pAppDomain,pThread,pFrame,nOffset,dwEventType,dwFlags) )
-#define ICorDebugManagedCallback2_ExceptionUnwind(This,pAppDomain,pThread,dwEventType,dwFlags) \
+#define ICorDebugManagedCallback2_ExceptionUnwind(This,pAppDomain,pThread,dwEventType,dwFlags) \
( (This)->lpVtbl -> ExceptionUnwind(This,pAppDomain,pThread,dwEventType,dwFlags) )
-#define ICorDebugManagedCallback2_FunctionRemapComplete(This,pAppDomain,pThread,pFunction) \
+#define ICorDebugManagedCallback2_FunctionRemapComplete(This,pAppDomain,pThread,pFunction) \
( (This)->lpVtbl -> FunctionRemapComplete(This,pAppDomain,pThread,pFunction) )
-#define ICorDebugManagedCallback2_MDANotification(This,pController,pThread,pMDA) \
+#define ICorDebugManagedCallback2_MDANotification(This,pController,pThread,pMDA) \
( (This)->lpVtbl -> MDANotification(This,pController,pThread,pMDA) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugManagedCallback2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugManagedCallback2_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0019 */
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugUnmanagedCallbackVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugUnmanagedCallback * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugUnmanagedCallback * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugUnmanagedCallback * This);
+ DECLSPEC_XFGVIRT(ICorDebugUnmanagedCallback, DebugEvent)
HRESULT ( STDMETHODCALLTYPE *DebugEvent )(
ICorDebugUnmanagedCallback * This,
/* [in] */ LPDEBUG_EVENT pDebugEvent,
#ifdef COBJMACROS
-#define ICorDebugUnmanagedCallback_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugUnmanagedCallback_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugUnmanagedCallback_AddRef(This) \
+#define ICorDebugUnmanagedCallback_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugUnmanagedCallback_Release(This) \
+#define ICorDebugUnmanagedCallback_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugUnmanagedCallback_DebugEvent(This,pDebugEvent,fOutOfBand) \
+#define ICorDebugUnmanagedCallback_DebugEvent(This,pDebugEvent,fOutOfBand) \
( (This)->lpVtbl -> DebugEvent(This,pDebugEvent,fOutOfBand) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugUnmanagedCallback_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugUnmanagedCallback_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0020 */
typedef
enum CorDebugCreateProcessFlags
{
- DEBUG_NO_SPECIAL_OPTIONS = 0
- } CorDebugCreateProcessFlags;
+ DEBUG_NO_SPECIAL_OPTIONS = 0
+ } CorDebugCreateProcessFlags;
typedef
enum CorDebugHandleType
{
- HANDLE_STRONG = 1,
- HANDLE_WEAK_TRACK_RESURRECTION = 2,
- HANDLE_PINNED = 3
- } CorDebugHandleType;
+ HANDLE_STRONG = 1,
+ HANDLE_WEAK_TRACK_RESURRECTION = 2,
+ HANDLE_PINNED = 3
+ } CorDebugHandleType;
#pragma warning(push)
#pragma warning(disable:28718)
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebug * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebug * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebug * This);
+ DECLSPEC_XFGVIRT(ICorDebug, Initialize)
HRESULT ( STDMETHODCALLTYPE *Initialize )(
ICorDebug * This);
+ DECLSPEC_XFGVIRT(ICorDebug, Terminate)
HRESULT ( STDMETHODCALLTYPE *Terminate )(
ICorDebug * This);
+ DECLSPEC_XFGVIRT(ICorDebug, SetManagedHandler)
HRESULT ( STDMETHODCALLTYPE *SetManagedHandler )(
ICorDebug * This,
/* [in] */ ICorDebugManagedCallback *pCallback);
+ DECLSPEC_XFGVIRT(ICorDebug, SetUnmanagedHandler)
HRESULT ( STDMETHODCALLTYPE *SetUnmanagedHandler )(
ICorDebug * This,
/* [in] */ ICorDebugUnmanagedCallback *pCallback);
+ DECLSPEC_XFGVIRT(ICorDebug, CreateProcess)
HRESULT ( STDMETHODCALLTYPE *CreateProcess )(
ICorDebug * This,
/* [in] */ LPCWSTR lpApplicationName,
/* [in] */ CorDebugCreateProcessFlags debuggingFlags,
/* [out] */ ICorDebugProcess **ppProcess);
+ DECLSPEC_XFGVIRT(ICorDebug, DebugActiveProcess)
HRESULT ( STDMETHODCALLTYPE *DebugActiveProcess )(
ICorDebug * This,
/* [in] */ DWORD id,
/* [in] */ BOOL win32Attach,
/* [out] */ ICorDebugProcess **ppProcess);
+ DECLSPEC_XFGVIRT(ICorDebug, EnumerateProcesses)
HRESULT ( STDMETHODCALLTYPE *EnumerateProcesses )(
ICorDebug * This,
/* [out] */ ICorDebugProcessEnum **ppProcess);
+ DECLSPEC_XFGVIRT(ICorDebug, GetProcess)
HRESULT ( STDMETHODCALLTYPE *GetProcess )(
ICorDebug * This,
/* [in] */ DWORD dwProcessId,
/* [out] */ ICorDebugProcess **ppProcess);
+ DECLSPEC_XFGVIRT(ICorDebug, CanLaunchOrAttach)
HRESULT ( STDMETHODCALLTYPE *CanLaunchOrAttach )(
ICorDebug * This,
/* [in] */ DWORD dwProcessId,
#ifdef COBJMACROS
-#define ICorDebug_QueryInterface(This,riid,ppvObject) \
+#define ICorDebug_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebug_AddRef(This) \
+#define ICorDebug_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebug_Release(This) \
+#define ICorDebug_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebug_Initialize(This) \
+#define ICorDebug_Initialize(This) \
( (This)->lpVtbl -> Initialize(This) )
-#define ICorDebug_Terminate(This) \
+#define ICorDebug_Terminate(This) \
( (This)->lpVtbl -> Terminate(This) )
-#define ICorDebug_SetManagedHandler(This,pCallback) \
+#define ICorDebug_SetManagedHandler(This,pCallback) \
( (This)->lpVtbl -> SetManagedHandler(This,pCallback) )
-#define ICorDebug_SetUnmanagedHandler(This,pCallback) \
+#define ICorDebug_SetUnmanagedHandler(This,pCallback) \
( (This)->lpVtbl -> SetUnmanagedHandler(This,pCallback) )
-#define ICorDebug_CreateProcess(This,lpApplicationName,lpCommandLine,lpProcessAttributes,lpThreadAttributes,bInheritHandles,dwCreationFlags,lpEnvironment,lpCurrentDirectory,lpStartupInfo,lpProcessInformation,debuggingFlags,ppProcess) \
+#define ICorDebug_CreateProcess(This,lpApplicationName,lpCommandLine,lpProcessAttributes,lpThreadAttributes,bInheritHandles,dwCreationFlags,lpEnvironment,lpCurrentDirectory,lpStartupInfo,lpProcessInformation,debuggingFlags,ppProcess) \
( (This)->lpVtbl -> CreateProcess(This,lpApplicationName,lpCommandLine,lpProcessAttributes,lpThreadAttributes,bInheritHandles,dwCreationFlags,lpEnvironment,lpCurrentDirectory,lpStartupInfo,lpProcessInformation,debuggingFlags,ppProcess) )
-#define ICorDebug_DebugActiveProcess(This,id,win32Attach,ppProcess) \
+#define ICorDebug_DebugActiveProcess(This,id,win32Attach,ppProcess) \
( (This)->lpVtbl -> DebugActiveProcess(This,id,win32Attach,ppProcess) )
-#define ICorDebug_EnumerateProcesses(This,ppProcess) \
+#define ICorDebug_EnumerateProcesses(This,ppProcess) \
( (This)->lpVtbl -> EnumerateProcesses(This,ppProcess) )
-#define ICorDebug_GetProcess(This,dwProcessId,ppProcess) \
+#define ICorDebug_GetProcess(This,dwProcessId,ppProcess) \
( (This)->lpVtbl -> GetProcess(This,dwProcessId,ppProcess) )
-#define ICorDebug_CanLaunchOrAttach(This,dwProcessId,win32DebuggingEnabled) \
+#define ICorDebug_CanLaunchOrAttach(This,dwProcessId,win32DebuggingEnabled) \
( (This)->lpVtbl -> CanLaunchOrAttach(This,dwProcessId,win32DebuggingEnabled) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebug_INTERFACE_DEFINED__ */
+#endif /* __ICorDebug_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0021 */
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugRemoteTargetVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugRemoteTarget * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugRemoteTarget * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugRemoteTarget * This);
+ DECLSPEC_XFGVIRT(ICorDebugRemoteTarget, GetHostName)
HRESULT ( STDMETHODCALLTYPE *GetHostName )(
ICorDebugRemoteTarget * This,
/* [in] */ ULONG32 cchHostName,
#ifdef COBJMACROS
-#define ICorDebugRemoteTarget_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugRemoteTarget_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugRemoteTarget_AddRef(This) \
+#define ICorDebugRemoteTarget_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugRemoteTarget_Release(This) \
+#define ICorDebugRemoteTarget_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugRemoteTarget_GetHostName(This,cchHostName,pcchHostName,szHostName) \
+#define ICorDebugRemoteTarget_GetHostName(This,cchHostName,pcchHostName,szHostName) \
( (This)->lpVtbl -> GetHostName(This,cchHostName,pcchHostName,szHostName) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugRemoteTarget_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugRemoteTarget_INTERFACE_DEFINED__ */
#ifndef __ICorDebugRemote_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugRemoteVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugRemote * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugRemote * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugRemote * This);
+ DECLSPEC_XFGVIRT(ICorDebugRemote, CreateProcessEx)
HRESULT ( STDMETHODCALLTYPE *CreateProcessEx )(
ICorDebugRemote * This,
/* [in] */ ICorDebugRemoteTarget *pRemoteTarget,
/* [in] */ CorDebugCreateProcessFlags debuggingFlags,
/* [out] */ ICorDebugProcess **ppProcess);
+ DECLSPEC_XFGVIRT(ICorDebugRemote, DebugActiveProcessEx)
HRESULT ( STDMETHODCALLTYPE *DebugActiveProcessEx )(
ICorDebugRemote * This,
/* [in] */ ICorDebugRemoteTarget *pRemoteTarget,
#ifdef COBJMACROS
-#define ICorDebugRemote_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugRemote_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugRemote_AddRef(This) \
+#define ICorDebugRemote_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugRemote_Release(This) \
+#define ICorDebugRemote_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugRemote_CreateProcessEx(This,pRemoteTarget,lpApplicationName,lpCommandLine,lpProcessAttributes,lpThreadAttributes,bInheritHandles,dwCreationFlags,lpEnvironment,lpCurrentDirectory,lpStartupInfo,lpProcessInformation,debuggingFlags,ppProcess) \
+#define ICorDebugRemote_CreateProcessEx(This,pRemoteTarget,lpApplicationName,lpCommandLine,lpProcessAttributes,lpThreadAttributes,bInheritHandles,dwCreationFlags,lpEnvironment,lpCurrentDirectory,lpStartupInfo,lpProcessInformation,debuggingFlags,ppProcess) \
( (This)->lpVtbl -> CreateProcessEx(This,pRemoteTarget,lpApplicationName,lpCommandLine,lpProcessAttributes,lpThreadAttributes,bInheritHandles,dwCreationFlags,lpEnvironment,lpCurrentDirectory,lpStartupInfo,lpProcessInformation,debuggingFlags,ppProcess) )
-#define ICorDebugRemote_DebugActiveProcessEx(This,pRemoteTarget,dwProcessId,fWin32Attach,ppProcess) \
+#define ICorDebugRemote_DebugActiveProcessEx(This,pRemoteTarget,dwProcessId,fWin32Attach,ppProcess) \
( (This)->lpVtbl -> DebugActiveProcessEx(This,pRemoteTarget,dwProcessId,fWin32Attach,ppProcess) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugRemote_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugRemote_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0023 */
DWORD dwMinor;
DWORD dwBuild;
DWORD dwSubBuild;
- } COR_VERSION;
+ } COR_VERSION;
typedef
enum CorDebugInterfaceVersion
{
- CorDebugInvalidVersion = 0,
- CorDebugVersion_1_0 = ( CorDebugInvalidVersion + 1 ) ,
- ver_ICorDebugManagedCallback = CorDebugVersion_1_0,
- ver_ICorDebugUnmanagedCallback = CorDebugVersion_1_0,
- ver_ICorDebug = CorDebugVersion_1_0,
- ver_ICorDebugController = CorDebugVersion_1_0,
- ver_ICorDebugAppDomain = CorDebugVersion_1_0,
- ver_ICorDebugAssembly = CorDebugVersion_1_0,
- ver_ICorDebugProcess = CorDebugVersion_1_0,
- ver_ICorDebugBreakpoint = CorDebugVersion_1_0,
- ver_ICorDebugFunctionBreakpoint = CorDebugVersion_1_0,
- ver_ICorDebugModuleBreakpoint = CorDebugVersion_1_0,
- ver_ICorDebugValueBreakpoint = CorDebugVersion_1_0,
- ver_ICorDebugStepper = CorDebugVersion_1_0,
- ver_ICorDebugRegisterSet = CorDebugVersion_1_0,
- ver_ICorDebugThread = CorDebugVersion_1_0,
- ver_ICorDebugChain = CorDebugVersion_1_0,
- ver_ICorDebugFrame = CorDebugVersion_1_0,
- ver_ICorDebugILFrame = CorDebugVersion_1_0,
- ver_ICorDebugNativeFrame = CorDebugVersion_1_0,
- ver_ICorDebugModule = CorDebugVersion_1_0,
- ver_ICorDebugFunction = CorDebugVersion_1_0,
- ver_ICorDebugCode = CorDebugVersion_1_0,
- ver_ICorDebugClass = CorDebugVersion_1_0,
- ver_ICorDebugEval = CorDebugVersion_1_0,
- ver_ICorDebugValue = CorDebugVersion_1_0,
- ver_ICorDebugGenericValue = CorDebugVersion_1_0,
- ver_ICorDebugReferenceValue = CorDebugVersion_1_0,
- ver_ICorDebugHeapValue = CorDebugVersion_1_0,
- ver_ICorDebugObjectValue = CorDebugVersion_1_0,
- ver_ICorDebugBoxValue = CorDebugVersion_1_0,
- ver_ICorDebugStringValue = CorDebugVersion_1_0,
- ver_ICorDebugArrayValue = CorDebugVersion_1_0,
- ver_ICorDebugContext = CorDebugVersion_1_0,
- ver_ICorDebugEnum = CorDebugVersion_1_0,
- ver_ICorDebugObjectEnum = CorDebugVersion_1_0,
- ver_ICorDebugBreakpointEnum = CorDebugVersion_1_0,
- ver_ICorDebugStepperEnum = CorDebugVersion_1_0,
- ver_ICorDebugProcessEnum = CorDebugVersion_1_0,
- ver_ICorDebugThreadEnum = CorDebugVersion_1_0,
- ver_ICorDebugFrameEnum = CorDebugVersion_1_0,
- ver_ICorDebugChainEnum = CorDebugVersion_1_0,
- ver_ICorDebugModuleEnum = CorDebugVersion_1_0,
- ver_ICorDebugValueEnum = CorDebugVersion_1_0,
- ver_ICorDebugCodeEnum = CorDebugVersion_1_0,
- ver_ICorDebugTypeEnum = CorDebugVersion_1_0,
- ver_ICorDebugErrorInfoEnum = CorDebugVersion_1_0,
- ver_ICorDebugAppDomainEnum = CorDebugVersion_1_0,
- ver_ICorDebugAssemblyEnum = CorDebugVersion_1_0,
- ver_ICorDebugEditAndContinueErrorInfo = CorDebugVersion_1_0,
- ver_ICorDebugEditAndContinueSnapshot = CorDebugVersion_1_0,
- CorDebugVersion_1_1 = ( CorDebugVersion_1_0 + 1 ) ,
- CorDebugVersion_2_0 = ( CorDebugVersion_1_1 + 1 ) ,
- ver_ICorDebugManagedCallback2 = CorDebugVersion_2_0,
- ver_ICorDebugAppDomain2 = CorDebugVersion_2_0,
- ver_ICorDebugAssembly2 = CorDebugVersion_2_0,
- ver_ICorDebugProcess2 = CorDebugVersion_2_0,
- ver_ICorDebugStepper2 = CorDebugVersion_2_0,
- ver_ICorDebugRegisterSet2 = CorDebugVersion_2_0,
- ver_ICorDebugThread2 = CorDebugVersion_2_0,
- ver_ICorDebugILFrame2 = CorDebugVersion_2_0,
- ver_ICorDebugInternalFrame = CorDebugVersion_2_0,
- ver_ICorDebugModule2 = CorDebugVersion_2_0,
- ver_ICorDebugFunction2 = CorDebugVersion_2_0,
- ver_ICorDebugCode2 = CorDebugVersion_2_0,
- ver_ICorDebugClass2 = CorDebugVersion_2_0,
- ver_ICorDebugValue2 = CorDebugVersion_2_0,
- ver_ICorDebugEval2 = CorDebugVersion_2_0,
- ver_ICorDebugObjectValue2 = CorDebugVersion_2_0,
- CorDebugVersion_4_0 = ( CorDebugVersion_2_0 + 1 ) ,
- ver_ICorDebugThread3 = CorDebugVersion_4_0,
- ver_ICorDebugThread4 = CorDebugVersion_4_0,
- ver_ICorDebugStackWalk = CorDebugVersion_4_0,
- ver_ICorDebugNativeFrame2 = CorDebugVersion_4_0,
- ver_ICorDebugInternalFrame2 = CorDebugVersion_4_0,
- ver_ICorDebugRuntimeUnwindableFrame = CorDebugVersion_4_0,
- ver_ICorDebugHeapValue3 = CorDebugVersion_4_0,
- ver_ICorDebugBlockingObjectEnum = CorDebugVersion_4_0,
- ver_ICorDebugValue3 = CorDebugVersion_4_0,
- CorDebugVersion_4_5 = ( CorDebugVersion_4_0 + 1 ) ,
- ver_ICorDebugComObjectValue = CorDebugVersion_4_5,
- ver_ICorDebugAppDomain3 = CorDebugVersion_4_5,
- ver_ICorDebugCode3 = CorDebugVersion_4_5,
- ver_ICorDebugILFrame3 = CorDebugVersion_4_5,
- CorDebugLatestVersion = CorDebugVersion_4_5
- } CorDebugInterfaceVersion;
+ CorDebugInvalidVersion = 0,
+ CorDebugVersion_1_0 = ( CorDebugInvalidVersion + 1 ) ,
+ ver_ICorDebugManagedCallback = CorDebugVersion_1_0,
+ ver_ICorDebugUnmanagedCallback = CorDebugVersion_1_0,
+ ver_ICorDebug = CorDebugVersion_1_0,
+ ver_ICorDebugController = CorDebugVersion_1_0,
+ ver_ICorDebugAppDomain = CorDebugVersion_1_0,
+ ver_ICorDebugAssembly = CorDebugVersion_1_0,
+ ver_ICorDebugProcess = CorDebugVersion_1_0,
+ ver_ICorDebugBreakpoint = CorDebugVersion_1_0,
+ ver_ICorDebugFunctionBreakpoint = CorDebugVersion_1_0,
+ ver_ICorDebugModuleBreakpoint = CorDebugVersion_1_0,
+ ver_ICorDebugValueBreakpoint = CorDebugVersion_1_0,
+ ver_ICorDebugStepper = CorDebugVersion_1_0,
+ ver_ICorDebugRegisterSet = CorDebugVersion_1_0,
+ ver_ICorDebugThread = CorDebugVersion_1_0,
+ ver_ICorDebugChain = CorDebugVersion_1_0,
+ ver_ICorDebugFrame = CorDebugVersion_1_0,
+ ver_ICorDebugILFrame = CorDebugVersion_1_0,
+ ver_ICorDebugNativeFrame = CorDebugVersion_1_0,
+ ver_ICorDebugModule = CorDebugVersion_1_0,
+ ver_ICorDebugFunction = CorDebugVersion_1_0,
+ ver_ICorDebugCode = CorDebugVersion_1_0,
+ ver_ICorDebugClass = CorDebugVersion_1_0,
+ ver_ICorDebugEval = CorDebugVersion_1_0,
+ ver_ICorDebugValue = CorDebugVersion_1_0,
+ ver_ICorDebugGenericValue = CorDebugVersion_1_0,
+ ver_ICorDebugReferenceValue = CorDebugVersion_1_0,
+ ver_ICorDebugHeapValue = CorDebugVersion_1_0,
+ ver_ICorDebugObjectValue = CorDebugVersion_1_0,
+ ver_ICorDebugBoxValue = CorDebugVersion_1_0,
+ ver_ICorDebugStringValue = CorDebugVersion_1_0,
+ ver_ICorDebugArrayValue = CorDebugVersion_1_0,
+ ver_ICorDebugContext = CorDebugVersion_1_0,
+ ver_ICorDebugEnum = CorDebugVersion_1_0,
+ ver_ICorDebugObjectEnum = CorDebugVersion_1_0,
+ ver_ICorDebugBreakpointEnum = CorDebugVersion_1_0,
+ ver_ICorDebugStepperEnum = CorDebugVersion_1_0,
+ ver_ICorDebugProcessEnum = CorDebugVersion_1_0,
+ ver_ICorDebugThreadEnum = CorDebugVersion_1_0,
+ ver_ICorDebugFrameEnum = CorDebugVersion_1_0,
+ ver_ICorDebugChainEnum = CorDebugVersion_1_0,
+ ver_ICorDebugModuleEnum = CorDebugVersion_1_0,
+ ver_ICorDebugValueEnum = CorDebugVersion_1_0,
+ ver_ICorDebugCodeEnum = CorDebugVersion_1_0,
+ ver_ICorDebugTypeEnum = CorDebugVersion_1_0,
+ ver_ICorDebugErrorInfoEnum = CorDebugVersion_1_0,
+ ver_ICorDebugAppDomainEnum = CorDebugVersion_1_0,
+ ver_ICorDebugAssemblyEnum = CorDebugVersion_1_0,
+ ver_ICorDebugEditAndContinueErrorInfo = CorDebugVersion_1_0,
+ ver_ICorDebugEditAndContinueSnapshot = CorDebugVersion_1_0,
+ CorDebugVersion_1_1 = ( CorDebugVersion_1_0 + 1 ) ,
+ CorDebugVersion_2_0 = ( CorDebugVersion_1_1 + 1 ) ,
+ ver_ICorDebugManagedCallback2 = CorDebugVersion_2_0,
+ ver_ICorDebugAppDomain2 = CorDebugVersion_2_0,
+ ver_ICorDebugAssembly2 = CorDebugVersion_2_0,
+ ver_ICorDebugProcess2 = CorDebugVersion_2_0,
+ ver_ICorDebugStepper2 = CorDebugVersion_2_0,
+ ver_ICorDebugRegisterSet2 = CorDebugVersion_2_0,
+ ver_ICorDebugThread2 = CorDebugVersion_2_0,
+ ver_ICorDebugILFrame2 = CorDebugVersion_2_0,
+ ver_ICorDebugInternalFrame = CorDebugVersion_2_0,
+ ver_ICorDebugModule2 = CorDebugVersion_2_0,
+ ver_ICorDebugFunction2 = CorDebugVersion_2_0,
+ ver_ICorDebugCode2 = CorDebugVersion_2_0,
+ ver_ICorDebugClass2 = CorDebugVersion_2_0,
+ ver_ICorDebugValue2 = CorDebugVersion_2_0,
+ ver_ICorDebugEval2 = CorDebugVersion_2_0,
+ ver_ICorDebugObjectValue2 = CorDebugVersion_2_0,
+ CorDebugVersion_4_0 = ( CorDebugVersion_2_0 + 1 ) ,
+ ver_ICorDebugThread3 = CorDebugVersion_4_0,
+ ver_ICorDebugThread4 = CorDebugVersion_4_0,
+ ver_ICorDebugStackWalk = CorDebugVersion_4_0,
+ ver_ICorDebugNativeFrame2 = CorDebugVersion_4_0,
+ ver_ICorDebugInternalFrame2 = CorDebugVersion_4_0,
+ ver_ICorDebugRuntimeUnwindableFrame = CorDebugVersion_4_0,
+ ver_ICorDebugHeapValue3 = CorDebugVersion_4_0,
+ ver_ICorDebugBlockingObjectEnum = CorDebugVersion_4_0,
+ ver_ICorDebugValue3 = CorDebugVersion_4_0,
+ CorDebugVersion_4_5 = ( CorDebugVersion_4_0 + 1 ) ,
+ ver_ICorDebugComObjectValue = CorDebugVersion_4_5,
+ ver_ICorDebugAppDomain3 = CorDebugVersion_4_5,
+ ver_ICorDebugCode3 = CorDebugVersion_4_5,
+ ver_ICorDebugILFrame3 = CorDebugVersion_4_5,
+ CorDebugLatestVersion = CorDebugVersion_4_5
+ } CorDebugInterfaceVersion;
EXTERN_C const IID IID_ICorDebug2;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebug2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebug2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebug2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebug2 * This);
#ifdef COBJMACROS
-#define ICorDebug2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebug2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebug2_AddRef(This) \
+#define ICorDebug2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebug2_Release(This) \
+#define ICorDebug2_Release(This) \
( (This)->lpVtbl -> Release(This) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebug2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebug2_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0024 */
typedef
enum CorDebugThreadState
{
- THREAD_RUN = 0,
- THREAD_SUSPEND = ( THREAD_RUN + 1 )
- } CorDebugThreadState;
+ THREAD_RUN = 0,
+ THREAD_SUSPEND = ( THREAD_RUN + 1 )
+ } CorDebugThreadState;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugControllerVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugController * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugController * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugController * This);
+ DECLSPEC_XFGVIRT(ICorDebugController, Stop)
HRESULT ( STDMETHODCALLTYPE *Stop )(
ICorDebugController * This,
/* [in] */ DWORD dwTimeoutIgnored);
+ DECLSPEC_XFGVIRT(ICorDebugController, Continue)
HRESULT ( STDMETHODCALLTYPE *Continue )(
ICorDebugController * This,
/* [in] */ BOOL fIsOutOfBand);
+ DECLSPEC_XFGVIRT(ICorDebugController, IsRunning)
HRESULT ( STDMETHODCALLTYPE *IsRunning )(
ICorDebugController * This,
/* [out] */ BOOL *pbRunning);
+ DECLSPEC_XFGVIRT(ICorDebugController, HasQueuedCallbacks)
HRESULT ( STDMETHODCALLTYPE *HasQueuedCallbacks )(
ICorDebugController * This,
/* [in] */ ICorDebugThread *pThread,
/* [out] */ BOOL *pbQueued);
+ DECLSPEC_XFGVIRT(ICorDebugController, EnumerateThreads)
HRESULT ( STDMETHODCALLTYPE *EnumerateThreads )(
ICorDebugController * This,
/* [out] */ ICorDebugThreadEnum **ppThreads);
+ DECLSPEC_XFGVIRT(ICorDebugController, SetAllThreadsDebugState)
HRESULT ( STDMETHODCALLTYPE *SetAllThreadsDebugState )(
ICorDebugController * This,
/* [in] */ CorDebugThreadState state,
/* [in] */ ICorDebugThread *pExceptThisThread);
+ DECLSPEC_XFGVIRT(ICorDebugController, Detach)
HRESULT ( STDMETHODCALLTYPE *Detach )(
ICorDebugController * This);
+ DECLSPEC_XFGVIRT(ICorDebugController, Terminate)
HRESULT ( STDMETHODCALLTYPE *Terminate )(
ICorDebugController * This,
/* [in] */ UINT exitCode);
+ DECLSPEC_XFGVIRT(ICorDebugController, CanCommitChanges)
HRESULT ( STDMETHODCALLTYPE *CanCommitChanges )(
ICorDebugController * This,
/* [in] */ ULONG cSnapshots,
/* [size_is][in] */ ICorDebugEditAndContinueSnapshot *pSnapshots[ ],
/* [out] */ ICorDebugErrorInfoEnum **pError);
+ DECLSPEC_XFGVIRT(ICorDebugController, CommitChanges)
HRESULT ( STDMETHODCALLTYPE *CommitChanges )(
ICorDebugController * This,
/* [in] */ ULONG cSnapshots,
#ifdef COBJMACROS
-#define ICorDebugController_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugController_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugController_AddRef(This) \
+#define ICorDebugController_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugController_Release(This) \
+#define ICorDebugController_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugController_Stop(This,dwTimeoutIgnored) \
+#define ICorDebugController_Stop(This,dwTimeoutIgnored) \
( (This)->lpVtbl -> Stop(This,dwTimeoutIgnored) )
-#define ICorDebugController_Continue(This,fIsOutOfBand) \
+#define ICorDebugController_Continue(This,fIsOutOfBand) \
( (This)->lpVtbl -> Continue(This,fIsOutOfBand) )
-#define ICorDebugController_IsRunning(This,pbRunning) \
+#define ICorDebugController_IsRunning(This,pbRunning) \
( (This)->lpVtbl -> IsRunning(This,pbRunning) )
-#define ICorDebugController_HasQueuedCallbacks(This,pThread,pbQueued) \
+#define ICorDebugController_HasQueuedCallbacks(This,pThread,pbQueued) \
( (This)->lpVtbl -> HasQueuedCallbacks(This,pThread,pbQueued) )
-#define ICorDebugController_EnumerateThreads(This,ppThreads) \
+#define ICorDebugController_EnumerateThreads(This,ppThreads) \
( (This)->lpVtbl -> EnumerateThreads(This,ppThreads) )
-#define ICorDebugController_SetAllThreadsDebugState(This,state,pExceptThisThread) \
+#define ICorDebugController_SetAllThreadsDebugState(This,state,pExceptThisThread) \
( (This)->lpVtbl -> SetAllThreadsDebugState(This,state,pExceptThisThread) )
-#define ICorDebugController_Detach(This) \
+#define ICorDebugController_Detach(This) \
( (This)->lpVtbl -> Detach(This) )
-#define ICorDebugController_Terminate(This,exitCode) \
+#define ICorDebugController_Terminate(This,exitCode) \
( (This)->lpVtbl -> Terminate(This,exitCode) )
-#define ICorDebugController_CanCommitChanges(This,cSnapshots,pSnapshots,pError) \
+#define ICorDebugController_CanCommitChanges(This,cSnapshots,pSnapshots,pError) \
( (This)->lpVtbl -> CanCommitChanges(This,cSnapshots,pSnapshots,pError) )
-#define ICorDebugController_CommitChanges(This,cSnapshots,pSnapshots,pError) \
+#define ICorDebugController_CommitChanges(This,cSnapshots,pSnapshots,pError) \
( (This)->lpVtbl -> CommitChanges(This,cSnapshots,pSnapshots,pError) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugController_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugController_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0025 */
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugAppDomainVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugAppDomain * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugAppDomain * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugAppDomain * This);
+ DECLSPEC_XFGVIRT(ICorDebugController, Stop)
HRESULT ( STDMETHODCALLTYPE *Stop )(
ICorDebugAppDomain * This,
/* [in] */ DWORD dwTimeoutIgnored);
+ DECLSPEC_XFGVIRT(ICorDebugController, Continue)
HRESULT ( STDMETHODCALLTYPE *Continue )(
ICorDebugAppDomain * This,
/* [in] */ BOOL fIsOutOfBand);
+ DECLSPEC_XFGVIRT(ICorDebugController, IsRunning)
HRESULT ( STDMETHODCALLTYPE *IsRunning )(
ICorDebugAppDomain * This,
/* [out] */ BOOL *pbRunning);
+ DECLSPEC_XFGVIRT(ICorDebugController, HasQueuedCallbacks)
HRESULT ( STDMETHODCALLTYPE *HasQueuedCallbacks )(
ICorDebugAppDomain * This,
/* [in] */ ICorDebugThread *pThread,
/* [out] */ BOOL *pbQueued);
+ DECLSPEC_XFGVIRT(ICorDebugController, EnumerateThreads)
HRESULT ( STDMETHODCALLTYPE *EnumerateThreads )(
ICorDebugAppDomain * This,
/* [out] */ ICorDebugThreadEnum **ppThreads);
+ DECLSPEC_XFGVIRT(ICorDebugController, SetAllThreadsDebugState)
HRESULT ( STDMETHODCALLTYPE *SetAllThreadsDebugState )(
ICorDebugAppDomain * This,
/* [in] */ CorDebugThreadState state,
/* [in] */ ICorDebugThread *pExceptThisThread);
+ DECLSPEC_XFGVIRT(ICorDebugController, Detach)
HRESULT ( STDMETHODCALLTYPE *Detach )(
ICorDebugAppDomain * This);
+ DECLSPEC_XFGVIRT(ICorDebugController, Terminate)
HRESULT ( STDMETHODCALLTYPE *Terminate )(
ICorDebugAppDomain * This,
/* [in] */ UINT exitCode);
+ DECLSPEC_XFGVIRT(ICorDebugController, CanCommitChanges)
HRESULT ( STDMETHODCALLTYPE *CanCommitChanges )(
ICorDebugAppDomain * This,
/* [in] */ ULONG cSnapshots,
/* [size_is][in] */ ICorDebugEditAndContinueSnapshot *pSnapshots[ ],
/* [out] */ ICorDebugErrorInfoEnum **pError);
+ DECLSPEC_XFGVIRT(ICorDebugController, CommitChanges)
HRESULT ( STDMETHODCALLTYPE *CommitChanges )(
ICorDebugAppDomain * This,
/* [in] */ ULONG cSnapshots,
/* [size_is][in] */ ICorDebugEditAndContinueSnapshot *pSnapshots[ ],
/* [out] */ ICorDebugErrorInfoEnum **pError);
+ DECLSPEC_XFGVIRT(ICorDebugAppDomain, GetProcess)
HRESULT ( STDMETHODCALLTYPE *GetProcess )(
ICorDebugAppDomain * This,
/* [out] */ ICorDebugProcess **ppProcess);
+ DECLSPEC_XFGVIRT(ICorDebugAppDomain, EnumerateAssemblies)
HRESULT ( STDMETHODCALLTYPE *EnumerateAssemblies )(
ICorDebugAppDomain * This,
/* [out] */ ICorDebugAssemblyEnum **ppAssemblies);
+ DECLSPEC_XFGVIRT(ICorDebugAppDomain, GetModuleFromMetaDataInterface)
HRESULT ( STDMETHODCALLTYPE *GetModuleFromMetaDataInterface )(
ICorDebugAppDomain * This,
/* [in] */ IUnknown *pIMetaData,
/* [out] */ ICorDebugModule **ppModule);
+ DECLSPEC_XFGVIRT(ICorDebugAppDomain, EnumerateBreakpoints)
HRESULT ( STDMETHODCALLTYPE *EnumerateBreakpoints )(
ICorDebugAppDomain * This,
/* [out] */ ICorDebugBreakpointEnum **ppBreakpoints);
+ DECLSPEC_XFGVIRT(ICorDebugAppDomain, EnumerateSteppers)
HRESULT ( STDMETHODCALLTYPE *EnumerateSteppers )(
ICorDebugAppDomain * This,
/* [out] */ ICorDebugStepperEnum **ppSteppers);
+ DECLSPEC_XFGVIRT(ICorDebugAppDomain, IsAttached)
HRESULT ( STDMETHODCALLTYPE *IsAttached )(
ICorDebugAppDomain * This,
/* [out] */ BOOL *pbAttached);
+ DECLSPEC_XFGVIRT(ICorDebugAppDomain, GetName)
HRESULT ( STDMETHODCALLTYPE *GetName )(
ICorDebugAppDomain * This,
/* [in] */ ULONG32 cchName,
/* [out] */ ULONG32 *pcchName,
/* [length_is][size_is][out] */ WCHAR szName[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugAppDomain, GetObject)
HRESULT ( STDMETHODCALLTYPE *GetObject )(
ICorDebugAppDomain * This,
/* [out] */ ICorDebugValue **ppObject);
+ DECLSPEC_XFGVIRT(ICorDebugAppDomain, Attach)
HRESULT ( STDMETHODCALLTYPE *Attach )(
ICorDebugAppDomain * This);
+ DECLSPEC_XFGVIRT(ICorDebugAppDomain, GetID)
HRESULT ( STDMETHODCALLTYPE *GetID )(
ICorDebugAppDomain * This,
/* [out] */ ULONG32 *pId);
#ifdef COBJMACROS
-#define ICorDebugAppDomain_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugAppDomain_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugAppDomain_AddRef(This) \
+#define ICorDebugAppDomain_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugAppDomain_Release(This) \
+#define ICorDebugAppDomain_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugAppDomain_Stop(This,dwTimeoutIgnored) \
+#define ICorDebugAppDomain_Stop(This,dwTimeoutIgnored) \
( (This)->lpVtbl -> Stop(This,dwTimeoutIgnored) )
-#define ICorDebugAppDomain_Continue(This,fIsOutOfBand) \
+#define ICorDebugAppDomain_Continue(This,fIsOutOfBand) \
( (This)->lpVtbl -> Continue(This,fIsOutOfBand) )
-#define ICorDebugAppDomain_IsRunning(This,pbRunning) \
+#define ICorDebugAppDomain_IsRunning(This,pbRunning) \
( (This)->lpVtbl -> IsRunning(This,pbRunning) )
-#define ICorDebugAppDomain_HasQueuedCallbacks(This,pThread,pbQueued) \
+#define ICorDebugAppDomain_HasQueuedCallbacks(This,pThread,pbQueued) \
( (This)->lpVtbl -> HasQueuedCallbacks(This,pThread,pbQueued) )
-#define ICorDebugAppDomain_EnumerateThreads(This,ppThreads) \
+#define ICorDebugAppDomain_EnumerateThreads(This,ppThreads) \
( (This)->lpVtbl -> EnumerateThreads(This,ppThreads) )
-#define ICorDebugAppDomain_SetAllThreadsDebugState(This,state,pExceptThisThread) \
+#define ICorDebugAppDomain_SetAllThreadsDebugState(This,state,pExceptThisThread) \
( (This)->lpVtbl -> SetAllThreadsDebugState(This,state,pExceptThisThread) )
-#define ICorDebugAppDomain_Detach(This) \
+#define ICorDebugAppDomain_Detach(This) \
( (This)->lpVtbl -> Detach(This) )
-#define ICorDebugAppDomain_Terminate(This,exitCode) \
+#define ICorDebugAppDomain_Terminate(This,exitCode) \
( (This)->lpVtbl -> Terminate(This,exitCode) )
-#define ICorDebugAppDomain_CanCommitChanges(This,cSnapshots,pSnapshots,pError) \
+#define ICorDebugAppDomain_CanCommitChanges(This,cSnapshots,pSnapshots,pError) \
( (This)->lpVtbl -> CanCommitChanges(This,cSnapshots,pSnapshots,pError) )
-#define ICorDebugAppDomain_CommitChanges(This,cSnapshots,pSnapshots,pError) \
+#define ICorDebugAppDomain_CommitChanges(This,cSnapshots,pSnapshots,pError) \
( (This)->lpVtbl -> CommitChanges(This,cSnapshots,pSnapshots,pError) )
-#define ICorDebugAppDomain_GetProcess(This,ppProcess) \
+#define ICorDebugAppDomain_GetProcess(This,ppProcess) \
( (This)->lpVtbl -> GetProcess(This,ppProcess) )
-#define ICorDebugAppDomain_EnumerateAssemblies(This,ppAssemblies) \
+#define ICorDebugAppDomain_EnumerateAssemblies(This,ppAssemblies) \
( (This)->lpVtbl -> EnumerateAssemblies(This,ppAssemblies) )
-#define ICorDebugAppDomain_GetModuleFromMetaDataInterface(This,pIMetaData,ppModule) \
+#define ICorDebugAppDomain_GetModuleFromMetaDataInterface(This,pIMetaData,ppModule) \
( (This)->lpVtbl -> GetModuleFromMetaDataInterface(This,pIMetaData,ppModule) )
-#define ICorDebugAppDomain_EnumerateBreakpoints(This,ppBreakpoints) \
+#define ICorDebugAppDomain_EnumerateBreakpoints(This,ppBreakpoints) \
( (This)->lpVtbl -> EnumerateBreakpoints(This,ppBreakpoints) )
-#define ICorDebugAppDomain_EnumerateSteppers(This,ppSteppers) \
+#define ICorDebugAppDomain_EnumerateSteppers(This,ppSteppers) \
( (This)->lpVtbl -> EnumerateSteppers(This,ppSteppers) )
-#define ICorDebugAppDomain_IsAttached(This,pbAttached) \
+#define ICorDebugAppDomain_IsAttached(This,pbAttached) \
( (This)->lpVtbl -> IsAttached(This,pbAttached) )
-#define ICorDebugAppDomain_GetName(This,cchName,pcchName,szName) \
+#define ICorDebugAppDomain_GetName(This,cchName,pcchName,szName) \
( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) )
-#define ICorDebugAppDomain_GetObject(This,ppObject) \
+#define ICorDebugAppDomain_GetObject(This,ppObject) \
( (This)->lpVtbl -> GetObject(This,ppObject) )
-#define ICorDebugAppDomain_Attach(This) \
+#define ICorDebugAppDomain_Attach(This) \
( (This)->lpVtbl -> Attach(This) )
-#define ICorDebugAppDomain_GetID(This,pId) \
+#define ICorDebugAppDomain_GetID(This,pId) \
( (This)->lpVtbl -> GetID(This,pId) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugAppDomain_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugAppDomain_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0026 */
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugAppDomain2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugAppDomain2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugAppDomain2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugAppDomain2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugAppDomain2, GetArrayOrPointerType)
HRESULT ( STDMETHODCALLTYPE *GetArrayOrPointerType )(
ICorDebugAppDomain2 * This,
/* [in] */ CorElementType elementType,
/* [in] */ ICorDebugType *pTypeArg,
/* [out] */ ICorDebugType **ppType);
+ DECLSPEC_XFGVIRT(ICorDebugAppDomain2, GetFunctionPointerType)
HRESULT ( STDMETHODCALLTYPE *GetFunctionPointerType )(
ICorDebugAppDomain2 * This,
/* [in] */ ULONG32 nTypeArgs,
#ifdef COBJMACROS
-#define ICorDebugAppDomain2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugAppDomain2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugAppDomain2_AddRef(This) \
+#define ICorDebugAppDomain2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugAppDomain2_Release(This) \
+#define ICorDebugAppDomain2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugAppDomain2_GetArrayOrPointerType(This,elementType,nRank,pTypeArg,ppType) \
+#define ICorDebugAppDomain2_GetArrayOrPointerType(This,elementType,nRank,pTypeArg,ppType) \
( (This)->lpVtbl -> GetArrayOrPointerType(This,elementType,nRank,pTypeArg,ppType) )
-#define ICorDebugAppDomain2_GetFunctionPointerType(This,nTypeArgs,ppTypeArgs,ppType) \
+#define ICorDebugAppDomain2_GetFunctionPointerType(This,nTypeArgs,ppTypeArgs,ppType) \
( (This)->lpVtbl -> GetFunctionPointerType(This,nTypeArgs,ppTypeArgs,ppType) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugAppDomain2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugAppDomain2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugEnum * This,
/* [out] */ ULONG *pcelt);
#ifdef COBJMACROS
-#define ICorDebugEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugEnum_AddRef(This) \
+#define ICorDebugEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugEnum_Release(This) \
+#define ICorDebugEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugEnum_Skip(This,celt) \
+#define ICorDebugEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugEnum_Reset(This) \
+#define ICorDebugEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugEnum_Clone(This,ppEnum) \
+#define ICorDebugEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugEnum_GetCount(This,pcelt) \
+#define ICorDebugEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugGuidToTypeEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugGuidToTypeEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugGuidToTypeEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugGuidToTypeEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugGuidToTypeEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugGuidToTypeEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugGuidToTypeEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugGuidToTypeEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugGuidToTypeEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugGuidToTypeEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugGuidToTypeEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugGuidToTypeEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugGuidToTypeEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugGuidToTypeEnum_AddRef(This) \
+#define ICorDebugGuidToTypeEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugGuidToTypeEnum_Release(This) \
+#define ICorDebugGuidToTypeEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugGuidToTypeEnum_Skip(This,celt) \
+#define ICorDebugGuidToTypeEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugGuidToTypeEnum_Reset(This) \
+#define ICorDebugGuidToTypeEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugGuidToTypeEnum_Clone(This,ppEnum) \
+#define ICorDebugGuidToTypeEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugGuidToTypeEnum_GetCount(This,pcelt) \
+#define ICorDebugGuidToTypeEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugGuidToTypeEnum_Next(This,celt,values,pceltFetched) \
+#define ICorDebugGuidToTypeEnum_Next(This,celt,values,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugGuidToTypeEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugGuidToTypeEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugAppDomain3_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugAppDomain3Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugAppDomain3 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugAppDomain3 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugAppDomain3 * This);
+ DECLSPEC_XFGVIRT(ICorDebugAppDomain3, GetCachedWinRTTypesForIIDs)
HRESULT ( STDMETHODCALLTYPE *GetCachedWinRTTypesForIIDs )(
ICorDebugAppDomain3 * This,
/* [in] */ ULONG32 cReqTypes,
/* [size_is][in] */ GUID *iidsToResolve,
/* [out] */ ICorDebugTypeEnum **ppTypesEnum);
+ DECLSPEC_XFGVIRT(ICorDebugAppDomain3, GetCachedWinRTTypes)
HRESULT ( STDMETHODCALLTYPE *GetCachedWinRTTypes )(
ICorDebugAppDomain3 * This,
/* [out] */ ICorDebugGuidToTypeEnum **ppGuidToTypeEnum);
#ifdef COBJMACROS
-#define ICorDebugAppDomain3_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugAppDomain3_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugAppDomain3_AddRef(This) \
+#define ICorDebugAppDomain3_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugAppDomain3_Release(This) \
+#define ICorDebugAppDomain3_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugAppDomain3_GetCachedWinRTTypesForIIDs(This,cReqTypes,iidsToResolve,ppTypesEnum) \
+#define ICorDebugAppDomain3_GetCachedWinRTTypesForIIDs(This,cReqTypes,iidsToResolve,ppTypesEnum) \
( (This)->lpVtbl -> GetCachedWinRTTypesForIIDs(This,cReqTypes,iidsToResolve,ppTypesEnum) )
-#define ICorDebugAppDomain3_GetCachedWinRTTypes(This,ppGuidToTypeEnum) \
+#define ICorDebugAppDomain3_GetCachedWinRTTypes(This,ppGuidToTypeEnum) \
( (This)->lpVtbl -> GetCachedWinRTTypes(This,ppGuidToTypeEnum) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugAppDomain3_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugAppDomain3_INTERFACE_DEFINED__ */
#ifndef __ICorDebugAppDomain4_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugAppDomain4Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugAppDomain4 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugAppDomain4 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugAppDomain4 * This);
+ DECLSPEC_XFGVIRT(ICorDebugAppDomain4, GetObjectForCCW)
HRESULT ( STDMETHODCALLTYPE *GetObjectForCCW )(
ICorDebugAppDomain4 * This,
/* [in] */ CORDB_ADDRESS ccwPointer,
#ifdef COBJMACROS
-#define ICorDebugAppDomain4_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugAppDomain4_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugAppDomain4_AddRef(This) \
+#define ICorDebugAppDomain4_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugAppDomain4_Release(This) \
+#define ICorDebugAppDomain4_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugAppDomain4_GetObjectForCCW(This,ccwPointer,ppManagedObject) \
+#define ICorDebugAppDomain4_GetObjectForCCW(This,ccwPointer,ppManagedObject) \
( (This)->lpVtbl -> GetObjectForCCW(This,ccwPointer,ppManagedObject) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugAppDomain4_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugAppDomain4_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0030 */
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugAssemblyVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugAssembly * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugAssembly * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugAssembly * This);
+ DECLSPEC_XFGVIRT(ICorDebugAssembly, GetProcess)
HRESULT ( STDMETHODCALLTYPE *GetProcess )(
ICorDebugAssembly * This,
/* [out] */ ICorDebugProcess **ppProcess);
+ DECLSPEC_XFGVIRT(ICorDebugAssembly, GetAppDomain)
HRESULT ( STDMETHODCALLTYPE *GetAppDomain )(
ICorDebugAssembly * This,
/* [out] */ ICorDebugAppDomain **ppAppDomain);
+ DECLSPEC_XFGVIRT(ICorDebugAssembly, EnumerateModules)
HRESULT ( STDMETHODCALLTYPE *EnumerateModules )(
ICorDebugAssembly * This,
/* [out] */ ICorDebugModuleEnum **ppModules);
+ DECLSPEC_XFGVIRT(ICorDebugAssembly, GetCodeBase)
HRESULT ( STDMETHODCALLTYPE *GetCodeBase )(
ICorDebugAssembly * This,
/* [in] */ ULONG32 cchName,
/* [out] */ ULONG32 *pcchName,
/* [length_is][size_is][out] */ WCHAR szName[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugAssembly, GetName)
HRESULT ( STDMETHODCALLTYPE *GetName )(
ICorDebugAssembly * This,
/* [in] */ ULONG32 cchName,
#ifdef COBJMACROS
-#define ICorDebugAssembly_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugAssembly_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugAssembly_AddRef(This) \
+#define ICorDebugAssembly_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugAssembly_Release(This) \
+#define ICorDebugAssembly_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugAssembly_GetProcess(This,ppProcess) \
+#define ICorDebugAssembly_GetProcess(This,ppProcess) \
( (This)->lpVtbl -> GetProcess(This,ppProcess) )
-#define ICorDebugAssembly_GetAppDomain(This,ppAppDomain) \
+#define ICorDebugAssembly_GetAppDomain(This,ppAppDomain) \
( (This)->lpVtbl -> GetAppDomain(This,ppAppDomain) )
-#define ICorDebugAssembly_EnumerateModules(This,ppModules) \
+#define ICorDebugAssembly_EnumerateModules(This,ppModules) \
( (This)->lpVtbl -> EnumerateModules(This,ppModules) )
-#define ICorDebugAssembly_GetCodeBase(This,cchName,pcchName,szName) \
+#define ICorDebugAssembly_GetCodeBase(This,cchName,pcchName,szName) \
( (This)->lpVtbl -> GetCodeBase(This,cchName,pcchName,szName) )
-#define ICorDebugAssembly_GetName(This,cchName,pcchName,szName) \
+#define ICorDebugAssembly_GetName(This,cchName,pcchName,szName) \
( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugAssembly_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugAssembly_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0031 */
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugAssembly2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugAssembly2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugAssembly2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugAssembly2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugAssembly2, IsFullyTrusted)
HRESULT ( STDMETHODCALLTYPE *IsFullyTrusted )(
ICorDebugAssembly2 * This,
/* [out] */ BOOL *pbFullyTrusted);
#ifdef COBJMACROS
-#define ICorDebugAssembly2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugAssembly2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugAssembly2_AddRef(This) \
+#define ICorDebugAssembly2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugAssembly2_Release(This) \
+#define ICorDebugAssembly2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugAssembly2_IsFullyTrusted(This,pbFullyTrusted) \
+#define ICorDebugAssembly2_IsFullyTrusted(This,pbFullyTrusted) \
( (This)->lpVtbl -> IsFullyTrusted(This,pbFullyTrusted) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugAssembly2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugAssembly2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugAssembly3_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugAssembly3Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugAssembly3 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugAssembly3 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugAssembly3 * This);
+ DECLSPEC_XFGVIRT(ICorDebugAssembly3, GetContainerAssembly)
HRESULT ( STDMETHODCALLTYPE *GetContainerAssembly )(
ICorDebugAssembly3 * This,
ICorDebugAssembly **ppAssembly);
+ DECLSPEC_XFGVIRT(ICorDebugAssembly3, EnumerateContainedAssemblies)
HRESULT ( STDMETHODCALLTYPE *EnumerateContainedAssemblies )(
ICorDebugAssembly3 * This,
ICorDebugAssemblyEnum **ppAssemblies);
#ifdef COBJMACROS
-#define ICorDebugAssembly3_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugAssembly3_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugAssembly3_AddRef(This) \
+#define ICorDebugAssembly3_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugAssembly3_Release(This) \
+#define ICorDebugAssembly3_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugAssembly3_GetContainerAssembly(This,ppAssembly) \
+#define ICorDebugAssembly3_GetContainerAssembly(This,ppAssembly) \
( (This)->lpVtbl -> GetContainerAssembly(This,ppAssembly) )
-#define ICorDebugAssembly3_EnumerateContainedAssemblies(This,ppAssemblies) \
+#define ICorDebugAssembly3_EnumerateContainedAssemblies(This,ppAssemblies) \
( (This)->lpVtbl -> EnumerateContainedAssemblies(This,ppAssemblies) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugAssembly3_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugAssembly3_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0033 */
{
UINT64 token1;
UINT64 token2;
- } COR_TYPEID;
+ } COR_TYPEID;
#endif // _DEF_COR_TYPEID_
typedef struct _COR_HEAPOBJECT
CORDB_ADDRESS address;
ULONG64 size;
COR_TYPEID type;
- } COR_HEAPOBJECT;
+ } COR_HEAPOBJECT;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugHeapEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugHeapEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugHeapEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugHeapEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugHeapEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugHeapEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugHeapEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugHeapEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugHeapEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugHeapEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugHeapEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugHeapEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugHeapEnum_AddRef(This) \
+#define ICorDebugHeapEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugHeapEnum_Release(This) \
+#define ICorDebugHeapEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugHeapEnum_Skip(This,celt) \
+#define ICorDebugHeapEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugHeapEnum_Reset(This) \
+#define ICorDebugHeapEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugHeapEnum_Clone(This,ppEnum) \
+#define ICorDebugHeapEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugHeapEnum_GetCount(This,pcelt) \
+#define ICorDebugHeapEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugHeapEnum_Next(This,celt,objects,pceltFetched) \
+#define ICorDebugHeapEnum_Next(This,celt,objects,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,objects,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugHeapEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugHeapEnum_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0034 */
typedef
enum CorDebugGenerationTypes
{
- CorDebug_Gen0 = 0,
- CorDebug_Gen1 = 1,
- CorDebug_Gen2 = 2,
- CorDebug_LOH = 3,
- CorDebug_POH = 4
- } CorDebugGenerationTypes;
+ CorDebug_Gen0 = 0,
+ CorDebug_Gen1 = 1,
+ CorDebug_Gen2 = 2,
+ CorDebug_LOH = 3,
+ CorDebug_POH = 4,
+ CorDebug_NonGC = 0x7FFFFFFF
+ } CorDebugGenerationTypes;
typedef struct _COR_SEGMENT
{
CORDB_ADDRESS end;
CorDebugGenerationTypes type;
ULONG heap;
- } COR_SEGMENT;
+ } COR_SEGMENT;
typedef
enum CorDebugGCType
{
- CorDebugWorkstationGC = 0,
- CorDebugServerGC = ( CorDebugWorkstationGC + 1 )
- } CorDebugGCType;
+ CorDebugWorkstationGC = 0,
+ CorDebugServerGC = ( CorDebugWorkstationGC + 1 )
+ } CorDebugGCType;
typedef struct _COR_HEAPINFO
{
DWORD numHeaps;
BOOL concurrent;
CorDebugGCType gcType;
- } COR_HEAPINFO;
+ } COR_HEAPINFO;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugHeapSegmentEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugHeapSegmentEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugHeapSegmentEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugHeapSegmentEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugHeapSegmentEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugHeapSegmentEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugHeapSegmentEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugHeapSegmentEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugHeapSegmentEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugHeapSegmentEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugHeapSegmentEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugHeapSegmentEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugHeapSegmentEnum_AddRef(This) \
+#define ICorDebugHeapSegmentEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugHeapSegmentEnum_Release(This) \
+#define ICorDebugHeapSegmentEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugHeapSegmentEnum_Skip(This,celt) \
+#define ICorDebugHeapSegmentEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugHeapSegmentEnum_Reset(This) \
+#define ICorDebugHeapSegmentEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugHeapSegmentEnum_Clone(This,ppEnum) \
+#define ICorDebugHeapSegmentEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugHeapSegmentEnum_GetCount(This,pcelt) \
+#define ICorDebugHeapSegmentEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugHeapSegmentEnum_Next(This,celt,segments,pceltFetched) \
+#define ICorDebugHeapSegmentEnum_Next(This,celt,segments,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,segments,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugHeapSegmentEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugHeapSegmentEnum_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0035 */
typedef
enum CorGCReferenceType
{
- CorHandleStrong = ( 1 << 0 ) ,
- CorHandleStrongPinning = ( 1 << 1 ) ,
- CorHandleWeakShort = ( 1 << 2 ) ,
- CorHandleWeakLong = ( 1 << 3 ) ,
- CorHandleWeakRefCount = ( 1 << 4 ) ,
- CorHandleStrongRefCount = ( 1 << 5 ) ,
- CorHandleStrongDependent = ( 1 << 6 ) ,
- CorHandleStrongAsyncPinned = ( 1 << 7 ) ,
- CorHandleStrongSizedByref = ( 1 << 8 ) ,
- CorHandleWeakNativeCom = ( 1 << 9 ) ,
- CorHandleWeakWinRT = CorHandleWeakNativeCom,
- CorReferenceStack = 0x80000001,
- CorReferenceFinalizer = 80000002,
- CorHandleStrongOnly = 0x1e3,
- CorHandleWeakOnly = 0x21c,
- CorHandleAll = 0x7fffffff
- } CorGCReferenceType;
+ CorHandleStrong = ( 1 << 0 ) ,
+ CorHandleStrongPinning = ( 1 << 1 ) ,
+ CorHandleWeakShort = ( 1 << 2 ) ,
+ CorHandleWeakLong = ( 1 << 3 ) ,
+ CorHandleWeakRefCount = ( 1 << 4 ) ,
+ CorHandleStrongRefCount = ( 1 << 5 ) ,
+ CorHandleStrongDependent = ( 1 << 6 ) ,
+ CorHandleStrongAsyncPinned = ( 1 << 7 ) ,
+ CorHandleStrongSizedByref = ( 1 << 8 ) ,
+ CorHandleWeakNativeCom = ( 1 << 9 ) ,
+ CorHandleWeakWinRT = CorHandleWeakNativeCom,
+ CorReferenceStack = 0x80000001,
+ CorReferenceFinalizer = 80000002,
+ CorHandleStrongOnly = 0x1e3,
+ CorHandleWeakOnly = 0x21c,
+ CorHandleAll = 0x7fffffff
+ } CorGCReferenceType;
#ifndef _DEF_COR_GC_REFERENCE_
#define _DEF_COR_GC_REFERENCE_
ICorDebugValue *Location;
CorGCReferenceType Type;
UINT64 ExtraData;
- } COR_GC_REFERENCE;
+ } COR_GC_REFERENCE;
#endif // _DEF_COR_GC_REFERENCE_
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugGCReferenceEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugGCReferenceEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugGCReferenceEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugGCReferenceEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugGCReferenceEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugGCReferenceEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugGCReferenceEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugGCReferenceEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugGCReferenceEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugGCReferenceEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugGCReferenceEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugGCReferenceEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugGCReferenceEnum_AddRef(This) \
+#define ICorDebugGCReferenceEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugGCReferenceEnum_Release(This) \
+#define ICorDebugGCReferenceEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugGCReferenceEnum_Skip(This,celt) \
+#define ICorDebugGCReferenceEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugGCReferenceEnum_Reset(This) \
+#define ICorDebugGCReferenceEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugGCReferenceEnum_Clone(This,ppEnum) \
+#define ICorDebugGCReferenceEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugGCReferenceEnum_GetCount(This,pcelt) \
+#define ICorDebugGCReferenceEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugGCReferenceEnum_Next(This,celt,roots,pceltFetched) \
+#define ICorDebugGCReferenceEnum_Next(This,celt,roots,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,roots,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugGCReferenceEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugGCReferenceEnum_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0036 */
ULONG32 rankSize;
ULONG32 numRanks;
ULONG32 rankOffset;
- } COR_ARRAY_LAYOUT;
+ } COR_ARRAY_LAYOUT;
#endif // _DEF_COR_ARRAY_LAYOUT_
#ifndef _DEF_COR_TYPE_LAYOUT_
ULONG32 numFields;
ULONG32 boxOffset;
CorElementType type;
- } COR_TYPE_LAYOUT;
+ } COR_TYPE_LAYOUT;
#endif // _DEF_COR_TYPE_LAYOUT_
#ifndef _DEF_COR_FIELD_
ULONG32 offset;
COR_TYPEID id;
CorElementType fieldType;
- } COR_FIELD;
+ } COR_FIELD;
#endif // _DEF_COR_FIELD_
#pragma warning(push)
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugProcessVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugProcess * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugProcess * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugProcess * This);
+ DECLSPEC_XFGVIRT(ICorDebugController, Stop)
HRESULT ( STDMETHODCALLTYPE *Stop )(
ICorDebugProcess * This,
/* [in] */ DWORD dwTimeoutIgnored);
+ DECLSPEC_XFGVIRT(ICorDebugController, Continue)
HRESULT ( STDMETHODCALLTYPE *Continue )(
ICorDebugProcess * This,
/* [in] */ BOOL fIsOutOfBand);
+ DECLSPEC_XFGVIRT(ICorDebugController, IsRunning)
HRESULT ( STDMETHODCALLTYPE *IsRunning )(
ICorDebugProcess * This,
/* [out] */ BOOL *pbRunning);
+ DECLSPEC_XFGVIRT(ICorDebugController, HasQueuedCallbacks)
HRESULT ( STDMETHODCALLTYPE *HasQueuedCallbacks )(
ICorDebugProcess * This,
/* [in] */ ICorDebugThread *pThread,
/* [out] */ BOOL *pbQueued);
+ DECLSPEC_XFGVIRT(ICorDebugController, EnumerateThreads)
HRESULT ( STDMETHODCALLTYPE *EnumerateThreads )(
ICorDebugProcess * This,
/* [out] */ ICorDebugThreadEnum **ppThreads);
+ DECLSPEC_XFGVIRT(ICorDebugController, SetAllThreadsDebugState)
HRESULT ( STDMETHODCALLTYPE *SetAllThreadsDebugState )(
ICorDebugProcess * This,
/* [in] */ CorDebugThreadState state,
/* [in] */ ICorDebugThread *pExceptThisThread);
+ DECLSPEC_XFGVIRT(ICorDebugController, Detach)
HRESULT ( STDMETHODCALLTYPE *Detach )(
ICorDebugProcess * This);
+ DECLSPEC_XFGVIRT(ICorDebugController, Terminate)
HRESULT ( STDMETHODCALLTYPE *Terminate )(
ICorDebugProcess * This,
/* [in] */ UINT exitCode);
+ DECLSPEC_XFGVIRT(ICorDebugController, CanCommitChanges)
HRESULT ( STDMETHODCALLTYPE *CanCommitChanges )(
ICorDebugProcess * This,
/* [in] */ ULONG cSnapshots,
/* [size_is][in] */ ICorDebugEditAndContinueSnapshot *pSnapshots[ ],
/* [out] */ ICorDebugErrorInfoEnum **pError);
+ DECLSPEC_XFGVIRT(ICorDebugController, CommitChanges)
HRESULT ( STDMETHODCALLTYPE *CommitChanges )(
ICorDebugProcess * This,
/* [in] */ ULONG cSnapshots,
/* [size_is][in] */ ICorDebugEditAndContinueSnapshot *pSnapshots[ ],
/* [out] */ ICorDebugErrorInfoEnum **pError);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, GetID)
HRESULT ( STDMETHODCALLTYPE *GetID )(
ICorDebugProcess * This,
/* [out] */ DWORD *pdwProcessId);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, GetHandle)
HRESULT ( STDMETHODCALLTYPE *GetHandle )(
ICorDebugProcess * This,
/* [out] */ HPROCESS *phProcessHandle);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, GetThread)
HRESULT ( STDMETHODCALLTYPE *GetThread )(
ICorDebugProcess * This,
/* [in] */ DWORD dwThreadId,
/* [out] */ ICorDebugThread **ppThread);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, EnumerateObjects)
HRESULT ( STDMETHODCALLTYPE *EnumerateObjects )(
ICorDebugProcess * This,
/* [out] */ ICorDebugObjectEnum **ppObjects);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, IsTransitionStub)
HRESULT ( STDMETHODCALLTYPE *IsTransitionStub )(
ICorDebugProcess * This,
/* [in] */ CORDB_ADDRESS address,
/* [out] */ BOOL *pbTransitionStub);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, IsOSSuspended)
HRESULT ( STDMETHODCALLTYPE *IsOSSuspended )(
ICorDebugProcess * This,
/* [in] */ DWORD threadID,
/* [out] */ BOOL *pbSuspended);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, GetThreadContext)
HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
ICorDebugProcess * This,
/* [in] */ DWORD threadID,
/* [in] */ ULONG32 contextSize,
/* [size_is][length_is][out][in] */ BYTE context[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, SetThreadContext)
HRESULT ( STDMETHODCALLTYPE *SetThreadContext )(
ICorDebugProcess * This,
/* [in] */ DWORD threadID,
/* [in] */ ULONG32 contextSize,
/* [size_is][length_is][in] */ BYTE context[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, ReadMemory)
HRESULT ( STDMETHODCALLTYPE *ReadMemory )(
ICorDebugProcess * This,
/* [in] */ CORDB_ADDRESS address,
/* [length_is][size_is][out] */ BYTE buffer[ ],
/* [out] */ SIZE_T *read);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, WriteMemory)
HRESULT ( STDMETHODCALLTYPE *WriteMemory )(
ICorDebugProcess * This,
/* [in] */ CORDB_ADDRESS address,
/* [size_is][in] */ BYTE buffer[ ],
/* [out] */ SIZE_T *written);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, ClearCurrentException)
HRESULT ( STDMETHODCALLTYPE *ClearCurrentException )(
ICorDebugProcess * This,
/* [in] */ DWORD threadID);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, EnableLogMessages)
HRESULT ( STDMETHODCALLTYPE *EnableLogMessages )(
ICorDebugProcess * This,
/* [in] */ BOOL fOnOff);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, ModifyLogSwitch)
HRESULT ( STDMETHODCALLTYPE *ModifyLogSwitch )(
ICorDebugProcess * This,
/* [annotation][in] */
_In_ WCHAR *pLogSwitchName,
/* [in] */ LONG lLevel);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, EnumerateAppDomains)
HRESULT ( STDMETHODCALLTYPE *EnumerateAppDomains )(
ICorDebugProcess * This,
/* [out] */ ICorDebugAppDomainEnum **ppAppDomains);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, GetObject)
HRESULT ( STDMETHODCALLTYPE *GetObject )(
ICorDebugProcess * This,
/* [out] */ ICorDebugValue **ppObject);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, ThreadForFiberCookie)
HRESULT ( STDMETHODCALLTYPE *ThreadForFiberCookie )(
ICorDebugProcess * This,
/* [in] */ DWORD fiberCookie,
/* [out] */ ICorDebugThread **ppThread);
+ DECLSPEC_XFGVIRT(ICorDebugProcess, GetHelperThreadID)
HRESULT ( STDMETHODCALLTYPE *GetHelperThreadID )(
ICorDebugProcess * This,
/* [out] */ DWORD *pThreadID);
#ifdef COBJMACROS
-#define ICorDebugProcess_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugProcess_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugProcess_AddRef(This) \
+#define ICorDebugProcess_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugProcess_Release(This) \
+#define ICorDebugProcess_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugProcess_Stop(This,dwTimeoutIgnored) \
+#define ICorDebugProcess_Stop(This,dwTimeoutIgnored) \
( (This)->lpVtbl -> Stop(This,dwTimeoutIgnored) )
-#define ICorDebugProcess_Continue(This,fIsOutOfBand) \
+#define ICorDebugProcess_Continue(This,fIsOutOfBand) \
( (This)->lpVtbl -> Continue(This,fIsOutOfBand) )
-#define ICorDebugProcess_IsRunning(This,pbRunning) \
+#define ICorDebugProcess_IsRunning(This,pbRunning) \
( (This)->lpVtbl -> IsRunning(This,pbRunning) )
-#define ICorDebugProcess_HasQueuedCallbacks(This,pThread,pbQueued) \
+#define ICorDebugProcess_HasQueuedCallbacks(This,pThread,pbQueued) \
( (This)->lpVtbl -> HasQueuedCallbacks(This,pThread,pbQueued) )
-#define ICorDebugProcess_EnumerateThreads(This,ppThreads) \
+#define ICorDebugProcess_EnumerateThreads(This,ppThreads) \
( (This)->lpVtbl -> EnumerateThreads(This,ppThreads) )
-#define ICorDebugProcess_SetAllThreadsDebugState(This,state,pExceptThisThread) \
+#define ICorDebugProcess_SetAllThreadsDebugState(This,state,pExceptThisThread) \
( (This)->lpVtbl -> SetAllThreadsDebugState(This,state,pExceptThisThread) )
-#define ICorDebugProcess_Detach(This) \
+#define ICorDebugProcess_Detach(This) \
( (This)->lpVtbl -> Detach(This) )
-#define ICorDebugProcess_Terminate(This,exitCode) \
+#define ICorDebugProcess_Terminate(This,exitCode) \
( (This)->lpVtbl -> Terminate(This,exitCode) )
-#define ICorDebugProcess_CanCommitChanges(This,cSnapshots,pSnapshots,pError) \
+#define ICorDebugProcess_CanCommitChanges(This,cSnapshots,pSnapshots,pError) \
( (This)->lpVtbl -> CanCommitChanges(This,cSnapshots,pSnapshots,pError) )
-#define ICorDebugProcess_CommitChanges(This,cSnapshots,pSnapshots,pError) \
+#define ICorDebugProcess_CommitChanges(This,cSnapshots,pSnapshots,pError) \
( (This)->lpVtbl -> CommitChanges(This,cSnapshots,pSnapshots,pError) )
-#define ICorDebugProcess_GetID(This,pdwProcessId) \
+#define ICorDebugProcess_GetID(This,pdwProcessId) \
( (This)->lpVtbl -> GetID(This,pdwProcessId) )
-#define ICorDebugProcess_GetHandle(This,phProcessHandle) \
+#define ICorDebugProcess_GetHandle(This,phProcessHandle) \
( (This)->lpVtbl -> GetHandle(This,phProcessHandle) )
-#define ICorDebugProcess_GetThread(This,dwThreadId,ppThread) \
+#define ICorDebugProcess_GetThread(This,dwThreadId,ppThread) \
( (This)->lpVtbl -> GetThread(This,dwThreadId,ppThread) )
-#define ICorDebugProcess_EnumerateObjects(This,ppObjects) \
+#define ICorDebugProcess_EnumerateObjects(This,ppObjects) \
( (This)->lpVtbl -> EnumerateObjects(This,ppObjects) )
-#define ICorDebugProcess_IsTransitionStub(This,address,pbTransitionStub) \
+#define ICorDebugProcess_IsTransitionStub(This,address,pbTransitionStub) \
( (This)->lpVtbl -> IsTransitionStub(This,address,pbTransitionStub) )
-#define ICorDebugProcess_IsOSSuspended(This,threadID,pbSuspended) \
+#define ICorDebugProcess_IsOSSuspended(This,threadID,pbSuspended) \
( (This)->lpVtbl -> IsOSSuspended(This,threadID,pbSuspended) )
-#define ICorDebugProcess_GetThreadContext(This,threadID,contextSize,context) \
+#define ICorDebugProcess_GetThreadContext(This,threadID,contextSize,context) \
( (This)->lpVtbl -> GetThreadContext(This,threadID,contextSize,context) )
-#define ICorDebugProcess_SetThreadContext(This,threadID,contextSize,context) \
+#define ICorDebugProcess_SetThreadContext(This,threadID,contextSize,context) \
( (This)->lpVtbl -> SetThreadContext(This,threadID,contextSize,context) )
-#define ICorDebugProcess_ReadMemory(This,address,size,buffer,read) \
+#define ICorDebugProcess_ReadMemory(This,address,size,buffer,read) \
( (This)->lpVtbl -> ReadMemory(This,address,size,buffer,read) )
-#define ICorDebugProcess_WriteMemory(This,address,size,buffer,written) \
+#define ICorDebugProcess_WriteMemory(This,address,size,buffer,written) \
( (This)->lpVtbl -> WriteMemory(This,address,size,buffer,written) )
-#define ICorDebugProcess_ClearCurrentException(This,threadID) \
+#define ICorDebugProcess_ClearCurrentException(This,threadID) \
( (This)->lpVtbl -> ClearCurrentException(This,threadID) )
-#define ICorDebugProcess_EnableLogMessages(This,fOnOff) \
+#define ICorDebugProcess_EnableLogMessages(This,fOnOff) \
( (This)->lpVtbl -> EnableLogMessages(This,fOnOff) )
-#define ICorDebugProcess_ModifyLogSwitch(This,pLogSwitchName,lLevel) \
+#define ICorDebugProcess_ModifyLogSwitch(This,pLogSwitchName,lLevel) \
( (This)->lpVtbl -> ModifyLogSwitch(This,pLogSwitchName,lLevel) )
-#define ICorDebugProcess_EnumerateAppDomains(This,ppAppDomains) \
+#define ICorDebugProcess_EnumerateAppDomains(This,ppAppDomains) \
( (This)->lpVtbl -> EnumerateAppDomains(This,ppAppDomains) )
-#define ICorDebugProcess_GetObject(This,ppObject) \
+#define ICorDebugProcess_GetObject(This,ppObject) \
( (This)->lpVtbl -> GetObject(This,ppObject) )
-#define ICorDebugProcess_ThreadForFiberCookie(This,fiberCookie,ppThread) \
+#define ICorDebugProcess_ThreadForFiberCookie(This,fiberCookie,ppThread) \
( (This)->lpVtbl -> ThreadForFiberCookie(This,fiberCookie,ppThread) )
-#define ICorDebugProcess_GetHelperThreadID(This,pThreadID) \
+#define ICorDebugProcess_GetHelperThreadID(This,pThreadID) \
( (This)->lpVtbl -> GetHelperThreadID(This,pThreadID) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugProcess_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugProcess_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0037 */
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugProcess2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugProcess2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugProcess2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugProcess2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugProcess2, GetThreadForTaskID)
HRESULT ( STDMETHODCALLTYPE *GetThreadForTaskID )(
ICorDebugProcess2 * This,
/* [in] */ TASKID taskid,
/* [out] */ ICorDebugThread2 **ppThread);
+ DECLSPEC_XFGVIRT(ICorDebugProcess2, GetVersion)
HRESULT ( STDMETHODCALLTYPE *GetVersion )(
ICorDebugProcess2 * This,
/* [out] */ COR_VERSION *version);
+ DECLSPEC_XFGVIRT(ICorDebugProcess2, SetUnmanagedBreakpoint)
HRESULT ( STDMETHODCALLTYPE *SetUnmanagedBreakpoint )(
ICorDebugProcess2 * This,
/* [in] */ CORDB_ADDRESS address,
/* [length_is][size_is][out] */ BYTE buffer[ ],
/* [out] */ ULONG32 *bufLen);
+ DECLSPEC_XFGVIRT(ICorDebugProcess2, ClearUnmanagedBreakpoint)
HRESULT ( STDMETHODCALLTYPE *ClearUnmanagedBreakpoint )(
ICorDebugProcess2 * This,
/* [in] */ CORDB_ADDRESS address);
+ DECLSPEC_XFGVIRT(ICorDebugProcess2, SetDesiredNGENCompilerFlags)
HRESULT ( STDMETHODCALLTYPE *SetDesiredNGENCompilerFlags )(
ICorDebugProcess2 * This,
/* [in] */ DWORD pdwFlags);
+ DECLSPEC_XFGVIRT(ICorDebugProcess2, GetDesiredNGENCompilerFlags)
HRESULT ( STDMETHODCALLTYPE *GetDesiredNGENCompilerFlags )(
ICorDebugProcess2 * This,
/* [out] */ DWORD *pdwFlags);
+ DECLSPEC_XFGVIRT(ICorDebugProcess2, GetReferenceValueFromGCHandle)
HRESULT ( STDMETHODCALLTYPE *GetReferenceValueFromGCHandle )(
ICorDebugProcess2 * This,
/* [in] */ UINT_PTR handle,
#ifdef COBJMACROS
-#define ICorDebugProcess2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugProcess2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugProcess2_AddRef(This) \
+#define ICorDebugProcess2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugProcess2_Release(This) \
+#define ICorDebugProcess2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugProcess2_GetThreadForTaskID(This,taskid,ppThread) \
+#define ICorDebugProcess2_GetThreadForTaskID(This,taskid,ppThread) \
( (This)->lpVtbl -> GetThreadForTaskID(This,taskid,ppThread) )
-#define ICorDebugProcess2_GetVersion(This,version) \
+#define ICorDebugProcess2_GetVersion(This,version) \
( (This)->lpVtbl -> GetVersion(This,version) )
-#define ICorDebugProcess2_SetUnmanagedBreakpoint(This,address,bufsize,buffer,bufLen) \
+#define ICorDebugProcess2_SetUnmanagedBreakpoint(This,address,bufsize,buffer,bufLen) \
( (This)->lpVtbl -> SetUnmanagedBreakpoint(This,address,bufsize,buffer,bufLen) )
-#define ICorDebugProcess2_ClearUnmanagedBreakpoint(This,address) \
+#define ICorDebugProcess2_ClearUnmanagedBreakpoint(This,address) \
( (This)->lpVtbl -> ClearUnmanagedBreakpoint(This,address) )
-#define ICorDebugProcess2_SetDesiredNGENCompilerFlags(This,pdwFlags) \
+#define ICorDebugProcess2_SetDesiredNGENCompilerFlags(This,pdwFlags) \
( (This)->lpVtbl -> SetDesiredNGENCompilerFlags(This,pdwFlags) )
-#define ICorDebugProcess2_GetDesiredNGENCompilerFlags(This,pdwFlags) \
+#define ICorDebugProcess2_GetDesiredNGENCompilerFlags(This,pdwFlags) \
( (This)->lpVtbl -> GetDesiredNGENCompilerFlags(This,pdwFlags) )
-#define ICorDebugProcess2_GetReferenceValueFromGCHandle(This,handle,pOutValue) \
+#define ICorDebugProcess2_GetReferenceValueFromGCHandle(This,handle,pOutValue) \
( (This)->lpVtbl -> GetReferenceValueFromGCHandle(This,handle,pOutValue) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugProcess2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugProcess2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugProcess3_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugProcess3Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugProcess3 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugProcess3 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugProcess3 * This);
+ DECLSPEC_XFGVIRT(ICorDebugProcess3, SetEnableCustomNotification)
HRESULT ( STDMETHODCALLTYPE *SetEnableCustomNotification )(
ICorDebugProcess3 * This,
ICorDebugClass *pClass,
#ifdef COBJMACROS
-#define ICorDebugProcess3_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugProcess3_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugProcess3_AddRef(This) \
+#define ICorDebugProcess3_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugProcess3_Release(This) \
+#define ICorDebugProcess3_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugProcess3_SetEnableCustomNotification(This,pClass,fEnable) \
+#define ICorDebugProcess3_SetEnableCustomNotification(This,pClass,fEnable) \
( (This)->lpVtbl -> SetEnableCustomNotification(This,pClass,fEnable) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugProcess3_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugProcess3_INTERFACE_DEFINED__ */
#ifndef __ICorDebugProcess5_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugProcess5Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugProcess5 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugProcess5 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugProcess5 * This);
+ DECLSPEC_XFGVIRT(ICorDebugProcess5, GetGCHeapInformation)
HRESULT ( STDMETHODCALLTYPE *GetGCHeapInformation )(
ICorDebugProcess5 * This,
/* [out] */ COR_HEAPINFO *pHeapInfo);
+ DECLSPEC_XFGVIRT(ICorDebugProcess5, EnumerateHeap)
HRESULT ( STDMETHODCALLTYPE *EnumerateHeap )(
ICorDebugProcess5 * This,
/* [out] */ ICorDebugHeapEnum **ppObjects);
+ DECLSPEC_XFGVIRT(ICorDebugProcess5, EnumerateHeapRegions)
HRESULT ( STDMETHODCALLTYPE *EnumerateHeapRegions )(
ICorDebugProcess5 * This,
/* [out] */ ICorDebugHeapSegmentEnum **ppRegions);
+ DECLSPEC_XFGVIRT(ICorDebugProcess5, GetObject)
HRESULT ( STDMETHODCALLTYPE *GetObject )(
ICorDebugProcess5 * This,
/* [in] */ CORDB_ADDRESS addr,
/* [out] */ ICorDebugObjectValue **pObject);
+ DECLSPEC_XFGVIRT(ICorDebugProcess5, EnumerateGCReferences)
HRESULT ( STDMETHODCALLTYPE *EnumerateGCReferences )(
ICorDebugProcess5 * This,
/* [in] */ BOOL enumerateWeakReferences,
/* [out] */ ICorDebugGCReferenceEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugProcess5, EnumerateHandles)
HRESULT ( STDMETHODCALLTYPE *EnumerateHandles )(
ICorDebugProcess5 * This,
/* [in] */ CorGCReferenceType types,
/* [out] */ ICorDebugGCReferenceEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugProcess5, GetTypeID)
HRESULT ( STDMETHODCALLTYPE *GetTypeID )(
ICorDebugProcess5 * This,
/* [in] */ CORDB_ADDRESS obj,
/* [out] */ COR_TYPEID *pId);
+ DECLSPEC_XFGVIRT(ICorDebugProcess5, GetTypeForTypeID)
HRESULT ( STDMETHODCALLTYPE *GetTypeForTypeID )(
ICorDebugProcess5 * This,
/* [in] */ COR_TYPEID id,
/* [out] */ ICorDebugType **ppType);
+ DECLSPEC_XFGVIRT(ICorDebugProcess5, GetArrayLayout)
HRESULT ( STDMETHODCALLTYPE *GetArrayLayout )(
ICorDebugProcess5 * This,
/* [in] */ COR_TYPEID id,
/* [out] */ COR_ARRAY_LAYOUT *pLayout);
+ DECLSPEC_XFGVIRT(ICorDebugProcess5, GetTypeLayout)
HRESULT ( STDMETHODCALLTYPE *GetTypeLayout )(
ICorDebugProcess5 * This,
/* [in] */ COR_TYPEID id,
/* [out] */ COR_TYPE_LAYOUT *pLayout);
+ DECLSPEC_XFGVIRT(ICorDebugProcess5, GetTypeFields)
HRESULT ( STDMETHODCALLTYPE *GetTypeFields )(
ICorDebugProcess5 * This,
/* [in] */ COR_TYPEID id,
COR_FIELD fields[ ],
ULONG32 *pceltNeeded);
+ DECLSPEC_XFGVIRT(ICorDebugProcess5, EnableNGENPolicy)
HRESULT ( STDMETHODCALLTYPE *EnableNGENPolicy )(
ICorDebugProcess5 * This,
/* [in] */ CorDebugNGENPolicy ePolicy);
#ifdef COBJMACROS
-#define ICorDebugProcess5_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugProcess5_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugProcess5_AddRef(This) \
+#define ICorDebugProcess5_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugProcess5_Release(This) \
+#define ICorDebugProcess5_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugProcess5_GetGCHeapInformation(This,pHeapInfo) \
+#define ICorDebugProcess5_GetGCHeapInformation(This,pHeapInfo) \
( (This)->lpVtbl -> GetGCHeapInformation(This,pHeapInfo) )
-#define ICorDebugProcess5_EnumerateHeap(This,ppObjects) \
+#define ICorDebugProcess5_EnumerateHeap(This,ppObjects) \
( (This)->lpVtbl -> EnumerateHeap(This,ppObjects) )
-#define ICorDebugProcess5_EnumerateHeapRegions(This,ppRegions) \
+#define ICorDebugProcess5_EnumerateHeapRegions(This,ppRegions) \
( (This)->lpVtbl -> EnumerateHeapRegions(This,ppRegions) )
-#define ICorDebugProcess5_GetObject(This,addr,pObject) \
+#define ICorDebugProcess5_GetObject(This,addr,pObject) \
( (This)->lpVtbl -> GetObject(This,addr,pObject) )
-#define ICorDebugProcess5_EnumerateGCReferences(This,enumerateWeakReferences,ppEnum) \
+#define ICorDebugProcess5_EnumerateGCReferences(This,enumerateWeakReferences,ppEnum) \
( (This)->lpVtbl -> EnumerateGCReferences(This,enumerateWeakReferences,ppEnum) )
-#define ICorDebugProcess5_EnumerateHandles(This,types,ppEnum) \
+#define ICorDebugProcess5_EnumerateHandles(This,types,ppEnum) \
( (This)->lpVtbl -> EnumerateHandles(This,types,ppEnum) )
-#define ICorDebugProcess5_GetTypeID(This,obj,pId) \
+#define ICorDebugProcess5_GetTypeID(This,obj,pId) \
( (This)->lpVtbl -> GetTypeID(This,obj,pId) )
-#define ICorDebugProcess5_GetTypeForTypeID(This,id,ppType) \
+#define ICorDebugProcess5_GetTypeForTypeID(This,id,ppType) \
( (This)->lpVtbl -> GetTypeForTypeID(This,id,ppType) )
-#define ICorDebugProcess5_GetArrayLayout(This,id,pLayout) \
+#define ICorDebugProcess5_GetArrayLayout(This,id,pLayout) \
( (This)->lpVtbl -> GetArrayLayout(This,id,pLayout) )
-#define ICorDebugProcess5_GetTypeLayout(This,id,pLayout) \
+#define ICorDebugProcess5_GetTypeLayout(This,id,pLayout) \
( (This)->lpVtbl -> GetTypeLayout(This,id,pLayout) )
-#define ICorDebugProcess5_GetTypeFields(This,id,celt,fields,pceltNeeded) \
+#define ICorDebugProcess5_GetTypeFields(This,id,celt,fields,pceltNeeded) \
( (This)->lpVtbl -> GetTypeFields(This,id,celt,fields,pceltNeeded) )
-#define ICorDebugProcess5_EnableNGENPolicy(This,ePolicy) \
+#define ICorDebugProcess5_EnableNGENPolicy(This,ePolicy) \
( (This)->lpVtbl -> EnableNGENPolicy(This,ePolicy) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugProcess5_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugProcess5_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0040 */
typedef
enum CorDebugRecordFormat
{
- FORMAT_WINDOWS_EXCEPTIONRECORD32 = 1,
- FORMAT_WINDOWS_EXCEPTIONRECORD64 = 2
- } CorDebugRecordFormat;
+ FORMAT_WINDOWS_EXCEPTIONRECORD32 = 1,
+ FORMAT_WINDOWS_EXCEPTIONRECORD64 = 2
+ } CorDebugRecordFormat;
typedef
enum CorDebugDecodeEventFlagsWindows
{
- IS_FIRST_CHANCE = 1
- } CorDebugDecodeEventFlagsWindows;
+ IS_FIRST_CHANCE = 1
+ } CorDebugDecodeEventFlagsWindows;
typedef
enum CorDebugDebugEventKind
{
- DEBUG_EVENT_KIND_MODULE_LOADED = 1,
- DEBUG_EVENT_KIND_MODULE_UNLOADED = 2,
- DEBUG_EVENT_KIND_MANAGED_EXCEPTION_FIRST_CHANCE = 3,
- DEBUG_EVENT_KIND_MANAGED_EXCEPTION_USER_FIRST_CHANCE = 4,
- DEBUG_EVENT_KIND_MANAGED_EXCEPTION_CATCH_HANDLER_FOUND = 5,
- DEBUG_EVENT_KIND_MANAGED_EXCEPTION_UNHANDLED = 6
- } CorDebugDebugEventKind;
+ DEBUG_EVENT_KIND_MODULE_LOADED = 1,
+ DEBUG_EVENT_KIND_MODULE_UNLOADED = 2,
+ DEBUG_EVENT_KIND_MANAGED_EXCEPTION_FIRST_CHANCE = 3,
+ DEBUG_EVENT_KIND_MANAGED_EXCEPTION_USER_FIRST_CHANCE = 4,
+ DEBUG_EVENT_KIND_MANAGED_EXCEPTION_CATCH_HANDLER_FOUND = 5,
+ DEBUG_EVENT_KIND_MANAGED_EXCEPTION_UNHANDLED = 6
+ } CorDebugDebugEventKind;
typedef
enum CorDebugStateChange
{
- PROCESS_RUNNING = 0x1,
- FLUSH_ALL = 0x2
- } CorDebugStateChange;
+ PROCESS_RUNNING = 0x1,
+ FLUSH_ALL = 0x2
+ } CorDebugStateChange;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugDebugEventVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugDebugEvent * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugDebugEvent * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugDebugEvent * This);
+ DECLSPEC_XFGVIRT(ICorDebugDebugEvent, GetEventKind)
HRESULT ( STDMETHODCALLTYPE *GetEventKind )(
ICorDebugDebugEvent * This,
/* [out] */ CorDebugDebugEventKind *pDebugEventKind);
+ DECLSPEC_XFGVIRT(ICorDebugDebugEvent, GetThread)
HRESULT ( STDMETHODCALLTYPE *GetThread )(
ICorDebugDebugEvent * This,
/* [out] */ ICorDebugThread **ppThread);
#ifdef COBJMACROS
-#define ICorDebugDebugEvent_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugDebugEvent_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugDebugEvent_AddRef(This) \
+#define ICorDebugDebugEvent_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugDebugEvent_Release(This) \
+#define ICorDebugDebugEvent_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugDebugEvent_GetEventKind(This,pDebugEventKind) \
+#define ICorDebugDebugEvent_GetEventKind(This,pDebugEventKind) \
( (This)->lpVtbl -> GetEventKind(This,pDebugEventKind) )
-#define ICorDebugDebugEvent_GetThread(This,ppThread) \
+#define ICorDebugDebugEvent_GetThread(This,ppThread) \
( (This)->lpVtbl -> GetThread(This,ppThread) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugDebugEvent_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugDebugEvent_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0041 */
typedef
enum CorDebugCodeInvokeKind
{
- CODE_INVOKE_KIND_NONE = 0,
- CODE_INVOKE_KIND_RETURN = ( CODE_INVOKE_KIND_NONE + 1 ) ,
- CODE_INVOKE_KIND_TAILCALL = ( CODE_INVOKE_KIND_RETURN + 1 )
- } CorDebugCodeInvokeKind;
+ CODE_INVOKE_KIND_NONE = 0,
+ CODE_INVOKE_KIND_RETURN = ( CODE_INVOKE_KIND_NONE + 1 ) ,
+ CODE_INVOKE_KIND_TAILCALL = ( CODE_INVOKE_KIND_RETURN + 1 )
+ } CorDebugCodeInvokeKind;
typedef
enum CorDebugCodeInvokePurpose
{
- CODE_INVOKE_PURPOSE_NONE = 0,
- CODE_INVOKE_PURPOSE_NATIVE_TO_MANAGED_TRANSITION = ( CODE_INVOKE_PURPOSE_NONE + 1 ) ,
- CODE_INVOKE_PURPOSE_CLASS_INIT = ( CODE_INVOKE_PURPOSE_NATIVE_TO_MANAGED_TRANSITION + 1 ) ,
- CODE_INVOKE_PURPOSE_INTERFACE_DISPATCH = ( CODE_INVOKE_PURPOSE_CLASS_INIT + 1 )
- } CorDebugCodeInvokePurpose;
+ CODE_INVOKE_PURPOSE_NONE = 0,
+ CODE_INVOKE_PURPOSE_NATIVE_TO_MANAGED_TRANSITION = ( CODE_INVOKE_PURPOSE_NONE + 1 ) ,
+ CODE_INVOKE_PURPOSE_CLASS_INIT = ( CODE_INVOKE_PURPOSE_NATIVE_TO_MANAGED_TRANSITION + 1 ) ,
+ CODE_INVOKE_PURPOSE_INTERFACE_DISPATCH = ( CODE_INVOKE_PURPOSE_CLASS_INIT + 1 )
+ } CorDebugCodeInvokePurpose;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugProcess6Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugProcess6 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugProcess6 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugProcess6 * This);
+ DECLSPEC_XFGVIRT(ICorDebugProcess6, DecodeEvent)
HRESULT ( STDMETHODCALLTYPE *DecodeEvent )(
ICorDebugProcess6 * This,
/* [size_is][length_is][in] */ const BYTE pRecord[ ],
/* [in] */ DWORD dwThreadId,
/* [out] */ ICorDebugDebugEvent **ppEvent);
+ DECLSPEC_XFGVIRT(ICorDebugProcess6, ProcessStateChanged)
HRESULT ( STDMETHODCALLTYPE *ProcessStateChanged )(
ICorDebugProcess6 * This,
/* [in] */ CorDebugStateChange change);
+ DECLSPEC_XFGVIRT(ICorDebugProcess6, GetCode)
HRESULT ( STDMETHODCALLTYPE *GetCode )(
ICorDebugProcess6 * This,
/* [in] */ CORDB_ADDRESS codeAddress,
/* [out] */ ICorDebugCode **ppCode);
+ DECLSPEC_XFGVIRT(ICorDebugProcess6, EnableVirtualModuleSplitting)
HRESULT ( STDMETHODCALLTYPE *EnableVirtualModuleSplitting )(
ICorDebugProcess6 * This,
BOOL enableSplitting);
+ DECLSPEC_XFGVIRT(ICorDebugProcess6, MarkDebuggerAttached)
HRESULT ( STDMETHODCALLTYPE *MarkDebuggerAttached )(
ICorDebugProcess6 * This,
BOOL fIsAttached);
+ DECLSPEC_XFGVIRT(ICorDebugProcess6, GetExportStepInfo)
HRESULT ( STDMETHODCALLTYPE *GetExportStepInfo )(
ICorDebugProcess6 * This,
/* [in] */ LPCWSTR pszExportName,
#ifdef COBJMACROS
-#define ICorDebugProcess6_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugProcess6_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugProcess6_AddRef(This) \
+#define ICorDebugProcess6_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugProcess6_Release(This) \
+#define ICorDebugProcess6_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugProcess6_DecodeEvent(This,pRecord,countBytes,format,dwFlags,dwThreadId,ppEvent) \
+#define ICorDebugProcess6_DecodeEvent(This,pRecord,countBytes,format,dwFlags,dwThreadId,ppEvent) \
( (This)->lpVtbl -> DecodeEvent(This,pRecord,countBytes,format,dwFlags,dwThreadId,ppEvent) )
-#define ICorDebugProcess6_ProcessStateChanged(This,change) \
+#define ICorDebugProcess6_ProcessStateChanged(This,change) \
( (This)->lpVtbl -> ProcessStateChanged(This,change) )
-#define ICorDebugProcess6_GetCode(This,codeAddress,ppCode) \
+#define ICorDebugProcess6_GetCode(This,codeAddress,ppCode) \
( (This)->lpVtbl -> GetCode(This,codeAddress,ppCode) )
-#define ICorDebugProcess6_EnableVirtualModuleSplitting(This,enableSplitting) \
+#define ICorDebugProcess6_EnableVirtualModuleSplitting(This,enableSplitting) \
( (This)->lpVtbl -> EnableVirtualModuleSplitting(This,enableSplitting) )
-#define ICorDebugProcess6_MarkDebuggerAttached(This,fIsAttached) \
+#define ICorDebugProcess6_MarkDebuggerAttached(This,fIsAttached) \
( (This)->lpVtbl -> MarkDebuggerAttached(This,fIsAttached) )
-#define ICorDebugProcess6_GetExportStepInfo(This,pszExportName,pInvokeKind,pInvokePurpose) \
+#define ICorDebugProcess6_GetExportStepInfo(This,pszExportName,pInvokeKind,pInvokePurpose) \
( (This)->lpVtbl -> GetExportStepInfo(This,pszExportName,pInvokeKind,pInvokePurpose) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugProcess6_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugProcess6_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0042 */
typedef
enum WriteableMetadataUpdateMode
{
- LegacyCompatPolicy = 0,
- AlwaysShowUpdates = ( LegacyCompatPolicy + 1 )
- } WriteableMetadataUpdateMode;
+ LegacyCompatPolicy = 0,
+ AlwaysShowUpdates = ( LegacyCompatPolicy + 1 )
+ } WriteableMetadataUpdateMode;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugProcess7Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugProcess7 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugProcess7 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugProcess7 * This);
+ DECLSPEC_XFGVIRT(ICorDebugProcess7, SetWriteableMetadataUpdateMode)
HRESULT ( STDMETHODCALLTYPE *SetWriteableMetadataUpdateMode )(
ICorDebugProcess7 * This,
WriteableMetadataUpdateMode flags);
#ifdef COBJMACROS
-#define ICorDebugProcess7_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugProcess7_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugProcess7_AddRef(This) \
+#define ICorDebugProcess7_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugProcess7_Release(This) \
+#define ICorDebugProcess7_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugProcess7_SetWriteableMetadataUpdateMode(This,flags) \
+#define ICorDebugProcess7_SetWriteableMetadataUpdateMode(This,flags) \
( (This)->lpVtbl -> SetWriteableMetadataUpdateMode(This,flags) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugProcess7_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugProcess7_INTERFACE_DEFINED__ */
#ifndef __ICorDebugProcess8_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugProcess8Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugProcess8 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugProcess8 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugProcess8 * This);
+ DECLSPEC_XFGVIRT(ICorDebugProcess8, EnableExceptionCallbacksOutsideOfMyCode)
HRESULT ( STDMETHODCALLTYPE *EnableExceptionCallbacksOutsideOfMyCode )(
ICorDebugProcess8 * This,
/* [in] */ BOOL enableExceptionsOutsideOfJMC);
#ifdef COBJMACROS
-#define ICorDebugProcess8_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugProcess8_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugProcess8_AddRef(This) \
+#define ICorDebugProcess8_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugProcess8_Release(This) \
+#define ICorDebugProcess8_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugProcess8_EnableExceptionCallbacksOutsideOfMyCode(This,enableExceptionsOutsideOfJMC) \
+#define ICorDebugProcess8_EnableExceptionCallbacksOutsideOfMyCode(This,enableExceptionsOutsideOfJMC) \
( (This)->lpVtbl -> EnableExceptionCallbacksOutsideOfMyCode(This,enableExceptionsOutsideOfJMC) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugProcess8_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugProcess8_INTERFACE_DEFINED__ */
#ifndef __ICorDebugProcess10_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugProcess10Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugProcess10 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugProcess10 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugProcess10 * This);
+ DECLSPEC_XFGVIRT(ICorDebugProcess10, EnableGCNotificationEvents)
HRESULT ( STDMETHODCALLTYPE *EnableGCNotificationEvents )(
ICorDebugProcess10 * This,
BOOL fEnable);
#ifdef COBJMACROS
-#define ICorDebugProcess10_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugProcess10_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugProcess10_AddRef(This) \
+#define ICorDebugProcess10_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugProcess10_Release(This) \
+#define ICorDebugProcess10_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugProcess10_EnableGCNotificationEvents(This,fEnable) \
+#define ICorDebugProcess10_EnableGCNotificationEvents(This,fEnable) \
( (This)->lpVtbl -> EnableGCNotificationEvents(This,fEnable) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugProcess10_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugProcess10_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0045 */
{
CORDB_ADDRESS start;
CORDB_ADDRESS end;
- } COR_MEMORY_RANGE;
+ } COR_MEMORY_RANGE;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugMemoryRangeEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugMemoryRangeEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugMemoryRangeEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugMemoryRangeEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugMemoryRangeEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugMemoryRangeEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugMemoryRangeEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugMemoryRangeEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugMemoryRangeEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugMemoryRangeEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugMemoryRangeEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugMemoryRangeEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugMemoryRangeEnum_AddRef(This) \
+#define ICorDebugMemoryRangeEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugMemoryRangeEnum_Release(This) \
+#define ICorDebugMemoryRangeEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugMemoryRangeEnum_Skip(This,celt) \
+#define ICorDebugMemoryRangeEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugMemoryRangeEnum_Reset(This) \
+#define ICorDebugMemoryRangeEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugMemoryRangeEnum_Clone(This,ppEnum) \
+#define ICorDebugMemoryRangeEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugMemoryRangeEnum_GetCount(This,pcelt) \
+#define ICorDebugMemoryRangeEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugMemoryRangeEnum_Next(This,celt,objects,pceltFetched) \
+#define ICorDebugMemoryRangeEnum_Next(This,celt,objects,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,objects,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugMemoryRangeEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugMemoryRangeEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugProcess11_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugProcess11Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugProcess11 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugProcess11 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugProcess11 * This);
+ DECLSPEC_XFGVIRT(ICorDebugProcess11, EnumerateLoaderHeapMemoryRegions)
HRESULT ( STDMETHODCALLTYPE *EnumerateLoaderHeapMemoryRegions )(
ICorDebugProcess11 * This,
/* [out] */ ICorDebugMemoryRangeEnum **ppRanges);
#ifdef COBJMACROS
-#define ICorDebugProcess11_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugProcess11_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugProcess11_AddRef(This) \
+#define ICorDebugProcess11_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugProcess11_Release(This) \
+#define ICorDebugProcess11_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugProcess11_EnumerateLoaderHeapMemoryRegions(This,ppRanges) \
+#define ICorDebugProcess11_EnumerateLoaderHeapMemoryRegions(This,ppRanges) \
( (This)->lpVtbl -> EnumerateLoaderHeapMemoryRegions(This,ppRanges) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugProcess11_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugProcess11_INTERFACE_DEFINED__ */
#ifndef __ICorDebugModuleDebugEvent_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugModuleDebugEventVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugModuleDebugEvent * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugModuleDebugEvent * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugModuleDebugEvent * This);
+ DECLSPEC_XFGVIRT(ICorDebugDebugEvent, GetEventKind)
HRESULT ( STDMETHODCALLTYPE *GetEventKind )(
ICorDebugModuleDebugEvent * This,
/* [out] */ CorDebugDebugEventKind *pDebugEventKind);
+ DECLSPEC_XFGVIRT(ICorDebugDebugEvent, GetThread)
HRESULT ( STDMETHODCALLTYPE *GetThread )(
ICorDebugModuleDebugEvent * This,
/* [out] */ ICorDebugThread **ppThread);
+ DECLSPEC_XFGVIRT(ICorDebugModuleDebugEvent, GetModule)
HRESULT ( STDMETHODCALLTYPE *GetModule )(
ICorDebugModuleDebugEvent * This,
/* [out] */ ICorDebugModule **ppModule);
#ifdef COBJMACROS
-#define ICorDebugModuleDebugEvent_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugModuleDebugEvent_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugModuleDebugEvent_AddRef(This) \
+#define ICorDebugModuleDebugEvent_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugModuleDebugEvent_Release(This) \
+#define ICorDebugModuleDebugEvent_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugModuleDebugEvent_GetEventKind(This,pDebugEventKind) \
+#define ICorDebugModuleDebugEvent_GetEventKind(This,pDebugEventKind) \
( (This)->lpVtbl -> GetEventKind(This,pDebugEventKind) )
-#define ICorDebugModuleDebugEvent_GetThread(This,ppThread) \
+#define ICorDebugModuleDebugEvent_GetThread(This,ppThread) \
( (This)->lpVtbl -> GetThread(This,ppThread) )
-#define ICorDebugModuleDebugEvent_GetModule(This,ppModule) \
+#define ICorDebugModuleDebugEvent_GetModule(This,ppModule) \
( (This)->lpVtbl -> GetModule(This,ppModule) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugModuleDebugEvent_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugModuleDebugEvent_INTERFACE_DEFINED__ */
#ifndef __ICorDebugExceptionDebugEvent_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugExceptionDebugEventVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugExceptionDebugEvent * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugExceptionDebugEvent * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugExceptionDebugEvent * This);
+ DECLSPEC_XFGVIRT(ICorDebugDebugEvent, GetEventKind)
HRESULT ( STDMETHODCALLTYPE *GetEventKind )(
ICorDebugExceptionDebugEvent * This,
/* [out] */ CorDebugDebugEventKind *pDebugEventKind);
+ DECLSPEC_XFGVIRT(ICorDebugDebugEvent, GetThread)
HRESULT ( STDMETHODCALLTYPE *GetThread )(
ICorDebugExceptionDebugEvent * This,
/* [out] */ ICorDebugThread **ppThread);
+ DECLSPEC_XFGVIRT(ICorDebugExceptionDebugEvent, GetStackPointer)
HRESULT ( STDMETHODCALLTYPE *GetStackPointer )(
ICorDebugExceptionDebugEvent * This,
/* [out] */ CORDB_ADDRESS *pStackPointer);
+ DECLSPEC_XFGVIRT(ICorDebugExceptionDebugEvent, GetNativeIP)
HRESULT ( STDMETHODCALLTYPE *GetNativeIP )(
ICorDebugExceptionDebugEvent * This,
/* [out] */ CORDB_ADDRESS *pIP);
+ DECLSPEC_XFGVIRT(ICorDebugExceptionDebugEvent, GetFlags)
HRESULT ( STDMETHODCALLTYPE *GetFlags )(
ICorDebugExceptionDebugEvent * This,
/* [out] */ CorDebugExceptionFlags *pdwFlags);
#ifdef COBJMACROS
-#define ICorDebugExceptionDebugEvent_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugExceptionDebugEvent_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugExceptionDebugEvent_AddRef(This) \
+#define ICorDebugExceptionDebugEvent_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugExceptionDebugEvent_Release(This) \
+#define ICorDebugExceptionDebugEvent_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugExceptionDebugEvent_GetEventKind(This,pDebugEventKind) \
+#define ICorDebugExceptionDebugEvent_GetEventKind(This,pDebugEventKind) \
( (This)->lpVtbl -> GetEventKind(This,pDebugEventKind) )
-#define ICorDebugExceptionDebugEvent_GetThread(This,ppThread) \
+#define ICorDebugExceptionDebugEvent_GetThread(This,ppThread) \
( (This)->lpVtbl -> GetThread(This,ppThread) )
-#define ICorDebugExceptionDebugEvent_GetStackPointer(This,pStackPointer) \
+#define ICorDebugExceptionDebugEvent_GetStackPointer(This,pStackPointer) \
( (This)->lpVtbl -> GetStackPointer(This,pStackPointer) )
-#define ICorDebugExceptionDebugEvent_GetNativeIP(This,pIP) \
+#define ICorDebugExceptionDebugEvent_GetNativeIP(This,pIP) \
( (This)->lpVtbl -> GetNativeIP(This,pIP) )
-#define ICorDebugExceptionDebugEvent_GetFlags(This,pdwFlags) \
+#define ICorDebugExceptionDebugEvent_GetFlags(This,pdwFlags) \
( (This)->lpVtbl -> GetFlags(This,pdwFlags) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugExceptionDebugEvent_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugExceptionDebugEvent_INTERFACE_DEFINED__ */
#ifndef __ICorDebugBreakpoint_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugBreakpointVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugBreakpoint * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugBreakpoint * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugBreakpoint * This);
+ DECLSPEC_XFGVIRT(ICorDebugBreakpoint, Activate)
HRESULT ( STDMETHODCALLTYPE *Activate )(
ICorDebugBreakpoint * This,
/* [in] */ BOOL bActive);
+ DECLSPEC_XFGVIRT(ICorDebugBreakpoint, IsActive)
HRESULT ( STDMETHODCALLTYPE *IsActive )(
ICorDebugBreakpoint * This,
/* [out] */ BOOL *pbActive);
#ifdef COBJMACROS
-#define ICorDebugBreakpoint_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugBreakpoint_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugBreakpoint_AddRef(This) \
+#define ICorDebugBreakpoint_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugBreakpoint_Release(This) \
+#define ICorDebugBreakpoint_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugBreakpoint_Activate(This,bActive) \
+#define ICorDebugBreakpoint_Activate(This,bActive) \
( (This)->lpVtbl -> Activate(This,bActive) )
-#define ICorDebugBreakpoint_IsActive(This,pbActive) \
+#define ICorDebugBreakpoint_IsActive(This,pbActive) \
( (This)->lpVtbl -> IsActive(This,pbActive) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugBreakpoint_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugBreakpoint_INTERFACE_DEFINED__ */
#ifndef __ICorDebugFunctionBreakpoint_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugFunctionBreakpointVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugFunctionBreakpoint * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugFunctionBreakpoint * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugFunctionBreakpoint * This);
+ DECLSPEC_XFGVIRT(ICorDebugBreakpoint, Activate)
HRESULT ( STDMETHODCALLTYPE *Activate )(
ICorDebugFunctionBreakpoint * This,
/* [in] */ BOOL bActive);
+ DECLSPEC_XFGVIRT(ICorDebugBreakpoint, IsActive)
HRESULT ( STDMETHODCALLTYPE *IsActive )(
ICorDebugFunctionBreakpoint * This,
/* [out] */ BOOL *pbActive);
+ DECLSPEC_XFGVIRT(ICorDebugFunctionBreakpoint, GetFunction)
HRESULT ( STDMETHODCALLTYPE *GetFunction )(
ICorDebugFunctionBreakpoint * This,
/* [out] */ ICorDebugFunction **ppFunction);
+ DECLSPEC_XFGVIRT(ICorDebugFunctionBreakpoint, GetOffset)
HRESULT ( STDMETHODCALLTYPE *GetOffset )(
ICorDebugFunctionBreakpoint * This,
/* [out] */ ULONG32 *pnOffset);
#ifdef COBJMACROS
-#define ICorDebugFunctionBreakpoint_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugFunctionBreakpoint_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugFunctionBreakpoint_AddRef(This) \
+#define ICorDebugFunctionBreakpoint_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugFunctionBreakpoint_Release(This) \
+#define ICorDebugFunctionBreakpoint_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugFunctionBreakpoint_Activate(This,bActive) \
+#define ICorDebugFunctionBreakpoint_Activate(This,bActive) \
( (This)->lpVtbl -> Activate(This,bActive) )
-#define ICorDebugFunctionBreakpoint_IsActive(This,pbActive) \
+#define ICorDebugFunctionBreakpoint_IsActive(This,pbActive) \
( (This)->lpVtbl -> IsActive(This,pbActive) )
-#define ICorDebugFunctionBreakpoint_GetFunction(This,ppFunction) \
+#define ICorDebugFunctionBreakpoint_GetFunction(This,ppFunction) \
( (This)->lpVtbl -> GetFunction(This,ppFunction) )
-#define ICorDebugFunctionBreakpoint_GetOffset(This,pnOffset) \
+#define ICorDebugFunctionBreakpoint_GetOffset(This,pnOffset) \
( (This)->lpVtbl -> GetOffset(This,pnOffset) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugFunctionBreakpoint_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugFunctionBreakpoint_INTERFACE_DEFINED__ */
#ifndef __ICorDebugModuleBreakpoint_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugModuleBreakpointVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugModuleBreakpoint * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugModuleBreakpoint * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugModuleBreakpoint * This);
+ DECLSPEC_XFGVIRT(ICorDebugBreakpoint, Activate)
HRESULT ( STDMETHODCALLTYPE *Activate )(
ICorDebugModuleBreakpoint * This,
/* [in] */ BOOL bActive);
+ DECLSPEC_XFGVIRT(ICorDebugBreakpoint, IsActive)
HRESULT ( STDMETHODCALLTYPE *IsActive )(
ICorDebugModuleBreakpoint * This,
/* [out] */ BOOL *pbActive);
+ DECLSPEC_XFGVIRT(ICorDebugModuleBreakpoint, GetModule)
HRESULT ( STDMETHODCALLTYPE *GetModule )(
ICorDebugModuleBreakpoint * This,
/* [out] */ ICorDebugModule **ppModule);
#ifdef COBJMACROS
-#define ICorDebugModuleBreakpoint_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugModuleBreakpoint_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugModuleBreakpoint_AddRef(This) \
+#define ICorDebugModuleBreakpoint_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugModuleBreakpoint_Release(This) \
+#define ICorDebugModuleBreakpoint_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugModuleBreakpoint_Activate(This,bActive) \
+#define ICorDebugModuleBreakpoint_Activate(This,bActive) \
( (This)->lpVtbl -> Activate(This,bActive) )
-#define ICorDebugModuleBreakpoint_IsActive(This,pbActive) \
+#define ICorDebugModuleBreakpoint_IsActive(This,pbActive) \
( (This)->lpVtbl -> IsActive(This,pbActive) )
-#define ICorDebugModuleBreakpoint_GetModule(This,ppModule) \
+#define ICorDebugModuleBreakpoint_GetModule(This,ppModule) \
( (This)->lpVtbl -> GetModule(This,ppModule) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugModuleBreakpoint_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugModuleBreakpoint_INTERFACE_DEFINED__ */
#ifndef __ICorDebugValueBreakpoint_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugValueBreakpointVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugValueBreakpoint * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugValueBreakpoint * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugValueBreakpoint * This);
+ DECLSPEC_XFGVIRT(ICorDebugBreakpoint, Activate)
HRESULT ( STDMETHODCALLTYPE *Activate )(
ICorDebugValueBreakpoint * This,
/* [in] */ BOOL bActive);
+ DECLSPEC_XFGVIRT(ICorDebugBreakpoint, IsActive)
HRESULT ( STDMETHODCALLTYPE *IsActive )(
ICorDebugValueBreakpoint * This,
/* [out] */ BOOL *pbActive);
+ DECLSPEC_XFGVIRT(ICorDebugValueBreakpoint, GetValue)
HRESULT ( STDMETHODCALLTYPE *GetValue )(
ICorDebugValueBreakpoint * This,
/* [out] */ ICorDebugValue **ppValue);
#ifdef COBJMACROS
-#define ICorDebugValueBreakpoint_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugValueBreakpoint_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugValueBreakpoint_AddRef(This) \
+#define ICorDebugValueBreakpoint_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugValueBreakpoint_Release(This) \
+#define ICorDebugValueBreakpoint_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugValueBreakpoint_Activate(This,bActive) \
+#define ICorDebugValueBreakpoint_Activate(This,bActive) \
( (This)->lpVtbl -> Activate(This,bActive) )
-#define ICorDebugValueBreakpoint_IsActive(This,pbActive) \
+#define ICorDebugValueBreakpoint_IsActive(This,pbActive) \
( (This)->lpVtbl -> IsActive(This,pbActive) )
-#define ICorDebugValueBreakpoint_GetValue(This,ppValue) \
+#define ICorDebugValueBreakpoint_GetValue(This,ppValue) \
( (This)->lpVtbl -> GetValue(This,ppValue) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugValueBreakpoint_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugValueBreakpoint_INTERFACE_DEFINED__ */
#ifndef __ICorDebugStepper_INTERFACE_DEFINED__
typedef
enum CorDebugIntercept
{
- INTERCEPT_NONE = 0,
- INTERCEPT_CLASS_INIT = 0x1,
- INTERCEPT_EXCEPTION_FILTER = 0x2,
- INTERCEPT_SECURITY = 0x4,
- INTERCEPT_CONTEXT_POLICY = 0x8,
- INTERCEPT_INTERCEPTION = 0x10,
- INTERCEPT_ALL = 0xffff
- } CorDebugIntercept;
+ INTERCEPT_NONE = 0,
+ INTERCEPT_CLASS_INIT = 0x1,
+ INTERCEPT_EXCEPTION_FILTER = 0x2,
+ INTERCEPT_SECURITY = 0x4,
+ INTERCEPT_CONTEXT_POLICY = 0x8,
+ INTERCEPT_INTERCEPTION = 0x10,
+ INTERCEPT_ALL = 0xffff
+ } CorDebugIntercept;
typedef
enum CorDebugUnmappedStop
{
- STOP_NONE = 0,
- STOP_PROLOG = 0x1,
- STOP_EPILOG = 0x2,
- STOP_NO_MAPPING_INFO = 0x4,
- STOP_OTHER_UNMAPPED = 0x8,
- STOP_UNMANAGED = 0x10,
- STOP_ALL = 0xffff
- } CorDebugUnmappedStop;
+ STOP_NONE = 0,
+ STOP_PROLOG = 0x1,
+ STOP_EPILOG = 0x2,
+ STOP_NO_MAPPING_INFO = 0x4,
+ STOP_OTHER_UNMAPPED = 0x8,
+ STOP_UNMANAGED = 0x10,
+ STOP_ALL = 0xffff
+ } CorDebugUnmappedStop;
typedef struct COR_DEBUG_STEP_RANGE
{
ULONG32 startOffset;
ULONG32 endOffset;
- } COR_DEBUG_STEP_RANGE;
+ } COR_DEBUG_STEP_RANGE;
EXTERN_C const IID IID_ICorDebugStepper;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugStepperVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugStepper * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugStepper * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugStepper * This);
+ DECLSPEC_XFGVIRT(ICorDebugStepper, IsActive)
HRESULT ( STDMETHODCALLTYPE *IsActive )(
ICorDebugStepper * This,
/* [out] */ BOOL *pbActive);
+ DECLSPEC_XFGVIRT(ICorDebugStepper, Deactivate)
HRESULT ( STDMETHODCALLTYPE *Deactivate )(
ICorDebugStepper * This);
+ DECLSPEC_XFGVIRT(ICorDebugStepper, SetInterceptMask)
HRESULT ( STDMETHODCALLTYPE *SetInterceptMask )(
ICorDebugStepper * This,
/* [in] */ CorDebugIntercept mask);
+ DECLSPEC_XFGVIRT(ICorDebugStepper, SetUnmappedStopMask)
HRESULT ( STDMETHODCALLTYPE *SetUnmappedStopMask )(
ICorDebugStepper * This,
/* [in] */ CorDebugUnmappedStop mask);
+ DECLSPEC_XFGVIRT(ICorDebugStepper, Step)
HRESULT ( STDMETHODCALLTYPE *Step )(
ICorDebugStepper * This,
/* [in] */ BOOL bStepIn);
+ DECLSPEC_XFGVIRT(ICorDebugStepper, StepRange)
HRESULT ( STDMETHODCALLTYPE *StepRange )(
ICorDebugStepper * This,
/* [in] */ BOOL bStepIn,
/* [size_is][in] */ COR_DEBUG_STEP_RANGE ranges[ ],
/* [in] */ ULONG32 cRangeCount);
+ DECLSPEC_XFGVIRT(ICorDebugStepper, StepOut)
HRESULT ( STDMETHODCALLTYPE *StepOut )(
ICorDebugStepper * This);
+ DECLSPEC_XFGVIRT(ICorDebugStepper, SetRangeIL)
HRESULT ( STDMETHODCALLTYPE *SetRangeIL )(
ICorDebugStepper * This,
/* [in] */ BOOL bIL);
#ifdef COBJMACROS
-#define ICorDebugStepper_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugStepper_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugStepper_AddRef(This) \
+#define ICorDebugStepper_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugStepper_Release(This) \
+#define ICorDebugStepper_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugStepper_IsActive(This,pbActive) \
+#define ICorDebugStepper_IsActive(This,pbActive) \
( (This)->lpVtbl -> IsActive(This,pbActive) )
-#define ICorDebugStepper_Deactivate(This) \
+#define ICorDebugStepper_Deactivate(This) \
( (This)->lpVtbl -> Deactivate(This) )
-#define ICorDebugStepper_SetInterceptMask(This,mask) \
+#define ICorDebugStepper_SetInterceptMask(This,mask) \
( (This)->lpVtbl -> SetInterceptMask(This,mask) )
-#define ICorDebugStepper_SetUnmappedStopMask(This,mask) \
+#define ICorDebugStepper_SetUnmappedStopMask(This,mask) \
( (This)->lpVtbl -> SetUnmappedStopMask(This,mask) )
-#define ICorDebugStepper_Step(This,bStepIn) \
+#define ICorDebugStepper_Step(This,bStepIn) \
( (This)->lpVtbl -> Step(This,bStepIn) )
-#define ICorDebugStepper_StepRange(This,bStepIn,ranges,cRangeCount) \
+#define ICorDebugStepper_StepRange(This,bStepIn,ranges,cRangeCount) \
( (This)->lpVtbl -> StepRange(This,bStepIn,ranges,cRangeCount) )
-#define ICorDebugStepper_StepOut(This) \
+#define ICorDebugStepper_StepOut(This) \
( (This)->lpVtbl -> StepOut(This) )
-#define ICorDebugStepper_SetRangeIL(This,bIL) \
+#define ICorDebugStepper_SetRangeIL(This,bIL) \
( (This)->lpVtbl -> SetRangeIL(This,bIL) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugStepper_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugStepper_INTERFACE_DEFINED__ */
#ifndef __ICorDebugStepper2_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugStepper2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugStepper2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugStepper2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugStepper2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugStepper2, SetJMC)
HRESULT ( STDMETHODCALLTYPE *SetJMC )(
ICorDebugStepper2 * This,
/* [in] */ BOOL fIsJMCStepper);
#ifdef COBJMACROS
-#define ICorDebugStepper2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugStepper2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugStepper2_AddRef(This) \
+#define ICorDebugStepper2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugStepper2_Release(This) \
+#define ICorDebugStepper2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugStepper2_SetJMC(This,fIsJMCStepper) \
+#define ICorDebugStepper2_SetJMC(This,fIsJMCStepper) \
( (This)->lpVtbl -> SetJMC(This,fIsJMCStepper) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugStepper2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugStepper2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugRegisterSet_INTERFACE_DEFINED__
typedef
enum CorDebugRegister
{
- REGISTER_INSTRUCTION_POINTER = 0,
- REGISTER_STACK_POINTER = ( REGISTER_INSTRUCTION_POINTER + 1 ) ,
- REGISTER_FRAME_POINTER = ( REGISTER_STACK_POINTER + 1 ) ,
- REGISTER_X86_EIP = 0,
- REGISTER_X86_ESP = ( REGISTER_X86_EIP + 1 ) ,
- REGISTER_X86_EBP = ( REGISTER_X86_ESP + 1 ) ,
- REGISTER_X86_EAX = ( REGISTER_X86_EBP + 1 ) ,
- REGISTER_X86_ECX = ( REGISTER_X86_EAX + 1 ) ,
- REGISTER_X86_EDX = ( REGISTER_X86_ECX + 1 ) ,
- REGISTER_X86_EBX = ( REGISTER_X86_EDX + 1 ) ,
- REGISTER_X86_ESI = ( REGISTER_X86_EBX + 1 ) ,
- REGISTER_X86_EDI = ( REGISTER_X86_ESI + 1 ) ,
- REGISTER_X86_FPSTACK_0 = ( REGISTER_X86_EDI + 1 ) ,
- REGISTER_X86_FPSTACK_1 = ( REGISTER_X86_FPSTACK_0 + 1 ) ,
- REGISTER_X86_FPSTACK_2 = ( REGISTER_X86_FPSTACK_1 + 1 ) ,
- REGISTER_X86_FPSTACK_3 = ( REGISTER_X86_FPSTACK_2 + 1 ) ,
- REGISTER_X86_FPSTACK_4 = ( REGISTER_X86_FPSTACK_3 + 1 ) ,
- REGISTER_X86_FPSTACK_5 = ( REGISTER_X86_FPSTACK_4 + 1 ) ,
- REGISTER_X86_FPSTACK_6 = ( REGISTER_X86_FPSTACK_5 + 1 ) ,
- REGISTER_X86_FPSTACK_7 = ( REGISTER_X86_FPSTACK_6 + 1 ) ,
- REGISTER_AMD64_RIP = 0,
- REGISTER_AMD64_RSP = ( REGISTER_AMD64_RIP + 1 ) ,
- REGISTER_AMD64_RBP = ( REGISTER_AMD64_RSP + 1 ) ,
- REGISTER_AMD64_RAX = ( REGISTER_AMD64_RBP + 1 ) ,
- REGISTER_AMD64_RCX = ( REGISTER_AMD64_RAX + 1 ) ,
- REGISTER_AMD64_RDX = ( REGISTER_AMD64_RCX + 1 ) ,
- REGISTER_AMD64_RBX = ( REGISTER_AMD64_RDX + 1 ) ,
- REGISTER_AMD64_RSI = ( REGISTER_AMD64_RBX + 1 ) ,
- REGISTER_AMD64_RDI = ( REGISTER_AMD64_RSI + 1 ) ,
- REGISTER_AMD64_R8 = ( REGISTER_AMD64_RDI + 1 ) ,
- REGISTER_AMD64_R9 = ( REGISTER_AMD64_R8 + 1 ) ,
- REGISTER_AMD64_R10 = ( REGISTER_AMD64_R9 + 1 ) ,
- REGISTER_AMD64_R11 = ( REGISTER_AMD64_R10 + 1 ) ,
- REGISTER_AMD64_R12 = ( REGISTER_AMD64_R11 + 1 ) ,
- REGISTER_AMD64_R13 = ( REGISTER_AMD64_R12 + 1 ) ,
- REGISTER_AMD64_R14 = ( REGISTER_AMD64_R13 + 1 ) ,
- REGISTER_AMD64_R15 = ( REGISTER_AMD64_R14 + 1 ) ,
- REGISTER_AMD64_XMM0 = ( REGISTER_AMD64_R15 + 1 ) ,
- REGISTER_AMD64_XMM1 = ( REGISTER_AMD64_XMM0 + 1 ) ,
- REGISTER_AMD64_XMM2 = ( REGISTER_AMD64_XMM1 + 1 ) ,
- REGISTER_AMD64_XMM3 = ( REGISTER_AMD64_XMM2 + 1 ) ,
- REGISTER_AMD64_XMM4 = ( REGISTER_AMD64_XMM3 + 1 ) ,
- REGISTER_AMD64_XMM5 = ( REGISTER_AMD64_XMM4 + 1 ) ,
- REGISTER_AMD64_XMM6 = ( REGISTER_AMD64_XMM5 + 1 ) ,
- REGISTER_AMD64_XMM7 = ( REGISTER_AMD64_XMM6 + 1 ) ,
- REGISTER_AMD64_XMM8 = ( REGISTER_AMD64_XMM7 + 1 ) ,
- REGISTER_AMD64_XMM9 = ( REGISTER_AMD64_XMM8 + 1 ) ,
- REGISTER_AMD64_XMM10 = ( REGISTER_AMD64_XMM9 + 1 ) ,
- REGISTER_AMD64_XMM11 = ( REGISTER_AMD64_XMM10 + 1 ) ,
- REGISTER_AMD64_XMM12 = ( REGISTER_AMD64_XMM11 + 1 ) ,
- REGISTER_AMD64_XMM13 = ( REGISTER_AMD64_XMM12 + 1 ) ,
- REGISTER_AMD64_XMM14 = ( REGISTER_AMD64_XMM13 + 1 ) ,
- REGISTER_AMD64_XMM15 = ( REGISTER_AMD64_XMM14 + 1 ) ,
- REGISTER_IA64_BSP = REGISTER_FRAME_POINTER,
- REGISTER_IA64_R0 = ( REGISTER_IA64_BSP + 1 ) ,
- REGISTER_IA64_F0 = ( REGISTER_IA64_R0 + 128 ) ,
- REGISTER_ARM_PC = 0,
- REGISTER_ARM_SP = ( REGISTER_ARM_PC + 1 ) ,
- REGISTER_ARM_R0 = ( REGISTER_ARM_SP + 1 ) ,
- REGISTER_ARM_R1 = ( REGISTER_ARM_R0 + 1 ) ,
- REGISTER_ARM_R2 = ( REGISTER_ARM_R1 + 1 ) ,
- REGISTER_ARM_R3 = ( REGISTER_ARM_R2 + 1 ) ,
- REGISTER_ARM_R4 = ( REGISTER_ARM_R3 + 1 ) ,
- REGISTER_ARM_R5 = ( REGISTER_ARM_R4 + 1 ) ,
- REGISTER_ARM_R6 = ( REGISTER_ARM_R5 + 1 ) ,
- REGISTER_ARM_R7 = ( REGISTER_ARM_R6 + 1 ) ,
- REGISTER_ARM_R8 = ( REGISTER_ARM_R7 + 1 ) ,
- REGISTER_ARM_R9 = ( REGISTER_ARM_R8 + 1 ) ,
- REGISTER_ARM_R10 = ( REGISTER_ARM_R9 + 1 ) ,
- REGISTER_ARM_R11 = ( REGISTER_ARM_R10 + 1 ) ,
- REGISTER_ARM_R12 = ( REGISTER_ARM_R11 + 1 ) ,
- REGISTER_ARM_LR = ( REGISTER_ARM_R12 + 1 ) ,
- REGISTER_ARM_D0 = ( REGISTER_ARM_LR + 1 ) ,
- REGISTER_ARM_D1 = ( REGISTER_ARM_D0 + 1 ) ,
- REGISTER_ARM_D2 = ( REGISTER_ARM_D1 + 1 ) ,
- REGISTER_ARM_D3 = ( REGISTER_ARM_D2 + 1 ) ,
- REGISTER_ARM_D4 = ( REGISTER_ARM_D3 + 1 ) ,
- REGISTER_ARM_D5 = ( REGISTER_ARM_D4 + 1 ) ,
- REGISTER_ARM_D6 = ( REGISTER_ARM_D5 + 1 ) ,
- REGISTER_ARM_D7 = ( REGISTER_ARM_D6 + 1 ) ,
- REGISTER_ARM_D8 = ( REGISTER_ARM_D7 + 1 ) ,
- REGISTER_ARM_D9 = ( REGISTER_ARM_D8 + 1 ) ,
- REGISTER_ARM_D10 = ( REGISTER_ARM_D9 + 1 ) ,
- REGISTER_ARM_D11 = ( REGISTER_ARM_D10 + 1 ) ,
- REGISTER_ARM_D12 = ( REGISTER_ARM_D11 + 1 ) ,
- REGISTER_ARM_D13 = ( REGISTER_ARM_D12 + 1 ) ,
- REGISTER_ARM_D14 = ( REGISTER_ARM_D13 + 1 ) ,
- REGISTER_ARM_D15 = ( REGISTER_ARM_D14 + 1 ) ,
- REGISTER_ARM_D16 = ( REGISTER_ARM_D15 + 1 ) ,
- REGISTER_ARM_D17 = ( REGISTER_ARM_D16 + 1 ) ,
- REGISTER_ARM_D18 = ( REGISTER_ARM_D17 + 1 ) ,
- REGISTER_ARM_D19 = ( REGISTER_ARM_D18 + 1 ) ,
- REGISTER_ARM_D20 = ( REGISTER_ARM_D19 + 1 ) ,
- REGISTER_ARM_D21 = ( REGISTER_ARM_D20 + 1 ) ,
- REGISTER_ARM_D22 = ( REGISTER_ARM_D21 + 1 ) ,
- REGISTER_ARM_D23 = ( REGISTER_ARM_D22 + 1 ) ,
- REGISTER_ARM_D24 = ( REGISTER_ARM_D23 + 1 ) ,
- REGISTER_ARM_D25 = ( REGISTER_ARM_D24 + 1 ) ,
- REGISTER_ARM_D26 = ( REGISTER_ARM_D25 + 1 ) ,
- REGISTER_ARM_D27 = ( REGISTER_ARM_D26 + 1 ) ,
- REGISTER_ARM_D28 = ( REGISTER_ARM_D27 + 1 ) ,
- REGISTER_ARM_D29 = ( REGISTER_ARM_D28 + 1 ) ,
- REGISTER_ARM_D30 = ( REGISTER_ARM_D29 + 1 ) ,
- REGISTER_ARM_D31 = ( REGISTER_ARM_D30 + 1 ) ,
- REGISTER_ARM64_PC = 0,
- REGISTER_ARM64_SP = ( REGISTER_ARM64_PC + 1 ) ,
- REGISTER_ARM64_FP = ( REGISTER_ARM64_SP + 1 ) ,
- REGISTER_ARM64_X0 = ( REGISTER_ARM64_FP + 1 ) ,
- REGISTER_ARM64_X1 = ( REGISTER_ARM64_X0 + 1 ) ,
- REGISTER_ARM64_X2 = ( REGISTER_ARM64_X1 + 1 ) ,
- REGISTER_ARM64_X3 = ( REGISTER_ARM64_X2 + 1 ) ,
- REGISTER_ARM64_X4 = ( REGISTER_ARM64_X3 + 1 ) ,
- REGISTER_ARM64_X5 = ( REGISTER_ARM64_X4 + 1 ) ,
- REGISTER_ARM64_X6 = ( REGISTER_ARM64_X5 + 1 ) ,
- REGISTER_ARM64_X7 = ( REGISTER_ARM64_X6 + 1 ) ,
- REGISTER_ARM64_X8 = ( REGISTER_ARM64_X7 + 1 ) ,
- REGISTER_ARM64_X9 = ( REGISTER_ARM64_X8 + 1 ) ,
- REGISTER_ARM64_X10 = ( REGISTER_ARM64_X9 + 1 ) ,
- REGISTER_ARM64_X11 = ( REGISTER_ARM64_X10 + 1 ) ,
- REGISTER_ARM64_X12 = ( REGISTER_ARM64_X11 + 1 ) ,
- REGISTER_ARM64_X13 = ( REGISTER_ARM64_X12 + 1 ) ,
- REGISTER_ARM64_X14 = ( REGISTER_ARM64_X13 + 1 ) ,
- REGISTER_ARM64_X15 = ( REGISTER_ARM64_X14 + 1 ) ,
- REGISTER_ARM64_X16 = ( REGISTER_ARM64_X15 + 1 ) ,
- REGISTER_ARM64_X17 = ( REGISTER_ARM64_X16 + 1 ) ,
- REGISTER_ARM64_X18 = ( REGISTER_ARM64_X17 + 1 ) ,
- REGISTER_ARM64_X19 = ( REGISTER_ARM64_X18 + 1 ) ,
- REGISTER_ARM64_X20 = ( REGISTER_ARM64_X19 + 1 ) ,
- REGISTER_ARM64_X21 = ( REGISTER_ARM64_X20 + 1 ) ,
- REGISTER_ARM64_X22 = ( REGISTER_ARM64_X21 + 1 ) ,
- REGISTER_ARM64_X23 = ( REGISTER_ARM64_X22 + 1 ) ,
- REGISTER_ARM64_X24 = ( REGISTER_ARM64_X23 + 1 ) ,
- REGISTER_ARM64_X25 = ( REGISTER_ARM64_X24 + 1 ) ,
- REGISTER_ARM64_X26 = ( REGISTER_ARM64_X25 + 1 ) ,
- REGISTER_ARM64_X27 = ( REGISTER_ARM64_X26 + 1 ) ,
- REGISTER_ARM64_X28 = ( REGISTER_ARM64_X27 + 1 ) ,
- REGISTER_ARM64_LR = ( REGISTER_ARM64_X28 + 1 ) ,
- REGISTER_ARM64_V0 = ( REGISTER_ARM64_LR + 1 ) ,
- REGISTER_ARM64_V1 = ( REGISTER_ARM64_V0 + 1 ) ,
- REGISTER_ARM64_V2 = ( REGISTER_ARM64_V1 + 1 ) ,
- REGISTER_ARM64_V3 = ( REGISTER_ARM64_V2 + 1 ) ,
- REGISTER_ARM64_V4 = ( REGISTER_ARM64_V3 + 1 ) ,
- REGISTER_ARM64_V5 = ( REGISTER_ARM64_V4 + 1 ) ,
- REGISTER_ARM64_V6 = ( REGISTER_ARM64_V5 + 1 ) ,
- REGISTER_ARM64_V7 = ( REGISTER_ARM64_V6 + 1 ) ,
- REGISTER_ARM64_V8 = ( REGISTER_ARM64_V7 + 1 ) ,
- REGISTER_ARM64_V9 = ( REGISTER_ARM64_V8 + 1 ) ,
- REGISTER_ARM64_V10 = ( REGISTER_ARM64_V9 + 1 ) ,
- REGISTER_ARM64_V11 = ( REGISTER_ARM64_V10 + 1 ) ,
- REGISTER_ARM64_V12 = ( REGISTER_ARM64_V11 + 1 ) ,
- REGISTER_ARM64_V13 = ( REGISTER_ARM64_V12 + 1 ) ,
- REGISTER_ARM64_V14 = ( REGISTER_ARM64_V13 + 1 ) ,
- REGISTER_ARM64_V15 = ( REGISTER_ARM64_V14 + 1 ) ,
- REGISTER_ARM64_V16 = ( REGISTER_ARM64_V15 + 1 ) ,
- REGISTER_ARM64_V17 = ( REGISTER_ARM64_V16 + 1 ) ,
- REGISTER_ARM64_V18 = ( REGISTER_ARM64_V17 + 1 ) ,
- REGISTER_ARM64_V19 = ( REGISTER_ARM64_V18 + 1 ) ,
- REGISTER_ARM64_V20 = ( REGISTER_ARM64_V19 + 1 ) ,
- REGISTER_ARM64_V21 = ( REGISTER_ARM64_V20 + 1 ) ,
- REGISTER_ARM64_V22 = ( REGISTER_ARM64_V21 + 1 ) ,
- REGISTER_ARM64_V23 = ( REGISTER_ARM64_V22 + 1 ) ,
- REGISTER_ARM64_V24 = ( REGISTER_ARM64_V23 + 1 ) ,
- REGISTER_ARM64_V25 = ( REGISTER_ARM64_V24 + 1 ) ,
- REGISTER_ARM64_V26 = ( REGISTER_ARM64_V25 + 1 ) ,
- REGISTER_ARM64_V27 = ( REGISTER_ARM64_V26 + 1 ) ,
- REGISTER_ARM64_V28 = ( REGISTER_ARM64_V27 + 1 ) ,
- REGISTER_ARM64_V29 = ( REGISTER_ARM64_V28 + 1 ) ,
- REGISTER_ARM64_V30 = ( REGISTER_ARM64_V29 + 1 ) ,
- REGISTER_ARM64_V31 = ( REGISTER_ARM64_V30 + 1 ) ,
+ REGISTER_INSTRUCTION_POINTER = 0,
+ REGISTER_STACK_POINTER = ( REGISTER_INSTRUCTION_POINTER + 1 ) ,
+ REGISTER_FRAME_POINTER = ( REGISTER_STACK_POINTER + 1 ) ,
+ REGISTER_X86_EIP = 0,
+ REGISTER_X86_ESP = ( REGISTER_X86_EIP + 1 ) ,
+ REGISTER_X86_EBP = ( REGISTER_X86_ESP + 1 ) ,
+ REGISTER_X86_EAX = ( REGISTER_X86_EBP + 1 ) ,
+ REGISTER_X86_ECX = ( REGISTER_X86_EAX + 1 ) ,
+ REGISTER_X86_EDX = ( REGISTER_X86_ECX + 1 ) ,
+ REGISTER_X86_EBX = ( REGISTER_X86_EDX + 1 ) ,
+ REGISTER_X86_ESI = ( REGISTER_X86_EBX + 1 ) ,
+ REGISTER_X86_EDI = ( REGISTER_X86_ESI + 1 ) ,
+ REGISTER_X86_FPSTACK_0 = ( REGISTER_X86_EDI + 1 ) ,
+ REGISTER_X86_FPSTACK_1 = ( REGISTER_X86_FPSTACK_0 + 1 ) ,
+ REGISTER_X86_FPSTACK_2 = ( REGISTER_X86_FPSTACK_1 + 1 ) ,
+ REGISTER_X86_FPSTACK_3 = ( REGISTER_X86_FPSTACK_2 + 1 ) ,
+ REGISTER_X86_FPSTACK_4 = ( REGISTER_X86_FPSTACK_3 + 1 ) ,
+ REGISTER_X86_FPSTACK_5 = ( REGISTER_X86_FPSTACK_4 + 1 ) ,
+ REGISTER_X86_FPSTACK_6 = ( REGISTER_X86_FPSTACK_5 + 1 ) ,
+ REGISTER_X86_FPSTACK_7 = ( REGISTER_X86_FPSTACK_6 + 1 ) ,
+ REGISTER_AMD64_RIP = 0,
+ REGISTER_AMD64_RSP = ( REGISTER_AMD64_RIP + 1 ) ,
+ REGISTER_AMD64_RBP = ( REGISTER_AMD64_RSP + 1 ) ,
+ REGISTER_AMD64_RAX = ( REGISTER_AMD64_RBP + 1 ) ,
+ REGISTER_AMD64_RCX = ( REGISTER_AMD64_RAX + 1 ) ,
+ REGISTER_AMD64_RDX = ( REGISTER_AMD64_RCX + 1 ) ,
+ REGISTER_AMD64_RBX = ( REGISTER_AMD64_RDX + 1 ) ,
+ REGISTER_AMD64_RSI = ( REGISTER_AMD64_RBX + 1 ) ,
+ REGISTER_AMD64_RDI = ( REGISTER_AMD64_RSI + 1 ) ,
+ REGISTER_AMD64_R8 = ( REGISTER_AMD64_RDI + 1 ) ,
+ REGISTER_AMD64_R9 = ( REGISTER_AMD64_R8 + 1 ) ,
+ REGISTER_AMD64_R10 = ( REGISTER_AMD64_R9 + 1 ) ,
+ REGISTER_AMD64_R11 = ( REGISTER_AMD64_R10 + 1 ) ,
+ REGISTER_AMD64_R12 = ( REGISTER_AMD64_R11 + 1 ) ,
+ REGISTER_AMD64_R13 = ( REGISTER_AMD64_R12 + 1 ) ,
+ REGISTER_AMD64_R14 = ( REGISTER_AMD64_R13 + 1 ) ,
+ REGISTER_AMD64_R15 = ( REGISTER_AMD64_R14 + 1 ) ,
+ REGISTER_AMD64_XMM0 = ( REGISTER_AMD64_R15 + 1 ) ,
+ REGISTER_AMD64_XMM1 = ( REGISTER_AMD64_XMM0 + 1 ) ,
+ REGISTER_AMD64_XMM2 = ( REGISTER_AMD64_XMM1 + 1 ) ,
+ REGISTER_AMD64_XMM3 = ( REGISTER_AMD64_XMM2 + 1 ) ,
+ REGISTER_AMD64_XMM4 = ( REGISTER_AMD64_XMM3 + 1 ) ,
+ REGISTER_AMD64_XMM5 = ( REGISTER_AMD64_XMM4 + 1 ) ,
+ REGISTER_AMD64_XMM6 = ( REGISTER_AMD64_XMM5 + 1 ) ,
+ REGISTER_AMD64_XMM7 = ( REGISTER_AMD64_XMM6 + 1 ) ,
+ REGISTER_AMD64_XMM8 = ( REGISTER_AMD64_XMM7 + 1 ) ,
+ REGISTER_AMD64_XMM9 = ( REGISTER_AMD64_XMM8 + 1 ) ,
+ REGISTER_AMD64_XMM10 = ( REGISTER_AMD64_XMM9 + 1 ) ,
+ REGISTER_AMD64_XMM11 = ( REGISTER_AMD64_XMM10 + 1 ) ,
+ REGISTER_AMD64_XMM12 = ( REGISTER_AMD64_XMM11 + 1 ) ,
+ REGISTER_AMD64_XMM13 = ( REGISTER_AMD64_XMM12 + 1 ) ,
+ REGISTER_AMD64_XMM14 = ( REGISTER_AMD64_XMM13 + 1 ) ,
+ REGISTER_AMD64_XMM15 = ( REGISTER_AMD64_XMM14 + 1 ) ,
+ REGISTER_IA64_BSP = REGISTER_FRAME_POINTER,
+ REGISTER_IA64_R0 = ( REGISTER_IA64_BSP + 1 ) ,
+ REGISTER_IA64_F0 = ( REGISTER_IA64_R0 + 128 ) ,
+ REGISTER_ARM_PC = 0,
+ REGISTER_ARM_SP = ( REGISTER_ARM_PC + 1 ) ,
+ REGISTER_ARM_R0 = ( REGISTER_ARM_SP + 1 ) ,
+ REGISTER_ARM_R1 = ( REGISTER_ARM_R0 + 1 ) ,
+ REGISTER_ARM_R2 = ( REGISTER_ARM_R1 + 1 ) ,
+ REGISTER_ARM_R3 = ( REGISTER_ARM_R2 + 1 ) ,
+ REGISTER_ARM_R4 = ( REGISTER_ARM_R3 + 1 ) ,
+ REGISTER_ARM_R5 = ( REGISTER_ARM_R4 + 1 ) ,
+ REGISTER_ARM_R6 = ( REGISTER_ARM_R5 + 1 ) ,
+ REGISTER_ARM_R7 = ( REGISTER_ARM_R6 + 1 ) ,
+ REGISTER_ARM_R8 = ( REGISTER_ARM_R7 + 1 ) ,
+ REGISTER_ARM_R9 = ( REGISTER_ARM_R8 + 1 ) ,
+ REGISTER_ARM_R10 = ( REGISTER_ARM_R9 + 1 ) ,
+ REGISTER_ARM_R11 = ( REGISTER_ARM_R10 + 1 ) ,
+ REGISTER_ARM_R12 = ( REGISTER_ARM_R11 + 1 ) ,
+ REGISTER_ARM_LR = ( REGISTER_ARM_R12 + 1 ) ,
+ REGISTER_ARM_D0 = ( REGISTER_ARM_LR + 1 ) ,
+ REGISTER_ARM_D1 = ( REGISTER_ARM_D0 + 1 ) ,
+ REGISTER_ARM_D2 = ( REGISTER_ARM_D1 + 1 ) ,
+ REGISTER_ARM_D3 = ( REGISTER_ARM_D2 + 1 ) ,
+ REGISTER_ARM_D4 = ( REGISTER_ARM_D3 + 1 ) ,
+ REGISTER_ARM_D5 = ( REGISTER_ARM_D4 + 1 ) ,
+ REGISTER_ARM_D6 = ( REGISTER_ARM_D5 + 1 ) ,
+ REGISTER_ARM_D7 = ( REGISTER_ARM_D6 + 1 ) ,
+ REGISTER_ARM_D8 = ( REGISTER_ARM_D7 + 1 ) ,
+ REGISTER_ARM_D9 = ( REGISTER_ARM_D8 + 1 ) ,
+ REGISTER_ARM_D10 = ( REGISTER_ARM_D9 + 1 ) ,
+ REGISTER_ARM_D11 = ( REGISTER_ARM_D10 + 1 ) ,
+ REGISTER_ARM_D12 = ( REGISTER_ARM_D11 + 1 ) ,
+ REGISTER_ARM_D13 = ( REGISTER_ARM_D12 + 1 ) ,
+ REGISTER_ARM_D14 = ( REGISTER_ARM_D13 + 1 ) ,
+ REGISTER_ARM_D15 = ( REGISTER_ARM_D14 + 1 ) ,
+ REGISTER_ARM_D16 = ( REGISTER_ARM_D15 + 1 ) ,
+ REGISTER_ARM_D17 = ( REGISTER_ARM_D16 + 1 ) ,
+ REGISTER_ARM_D18 = ( REGISTER_ARM_D17 + 1 ) ,
+ REGISTER_ARM_D19 = ( REGISTER_ARM_D18 + 1 ) ,
+ REGISTER_ARM_D20 = ( REGISTER_ARM_D19 + 1 ) ,
+ REGISTER_ARM_D21 = ( REGISTER_ARM_D20 + 1 ) ,
+ REGISTER_ARM_D22 = ( REGISTER_ARM_D21 + 1 ) ,
+ REGISTER_ARM_D23 = ( REGISTER_ARM_D22 + 1 ) ,
+ REGISTER_ARM_D24 = ( REGISTER_ARM_D23 + 1 ) ,
+ REGISTER_ARM_D25 = ( REGISTER_ARM_D24 + 1 ) ,
+ REGISTER_ARM_D26 = ( REGISTER_ARM_D25 + 1 ) ,
+ REGISTER_ARM_D27 = ( REGISTER_ARM_D26 + 1 ) ,
+ REGISTER_ARM_D28 = ( REGISTER_ARM_D27 + 1 ) ,
+ REGISTER_ARM_D29 = ( REGISTER_ARM_D28 + 1 ) ,
+ REGISTER_ARM_D30 = ( REGISTER_ARM_D29 + 1 ) ,
+ REGISTER_ARM_D31 = ( REGISTER_ARM_D30 + 1 ) ,
+ REGISTER_ARM64_PC = 0,
+ REGISTER_ARM64_SP = ( REGISTER_ARM64_PC + 1 ) ,
+ REGISTER_ARM64_FP = ( REGISTER_ARM64_SP + 1 ) ,
+ REGISTER_ARM64_X0 = ( REGISTER_ARM64_FP + 1 ) ,
+ REGISTER_ARM64_X1 = ( REGISTER_ARM64_X0 + 1 ) ,
+ REGISTER_ARM64_X2 = ( REGISTER_ARM64_X1 + 1 ) ,
+ REGISTER_ARM64_X3 = ( REGISTER_ARM64_X2 + 1 ) ,
+ REGISTER_ARM64_X4 = ( REGISTER_ARM64_X3 + 1 ) ,
+ REGISTER_ARM64_X5 = ( REGISTER_ARM64_X4 + 1 ) ,
+ REGISTER_ARM64_X6 = ( REGISTER_ARM64_X5 + 1 ) ,
+ REGISTER_ARM64_X7 = ( REGISTER_ARM64_X6 + 1 ) ,
+ REGISTER_ARM64_X8 = ( REGISTER_ARM64_X7 + 1 ) ,
+ REGISTER_ARM64_X9 = ( REGISTER_ARM64_X8 + 1 ) ,
+ REGISTER_ARM64_X10 = ( REGISTER_ARM64_X9 + 1 ) ,
+ REGISTER_ARM64_X11 = ( REGISTER_ARM64_X10 + 1 ) ,
+ REGISTER_ARM64_X12 = ( REGISTER_ARM64_X11 + 1 ) ,
+ REGISTER_ARM64_X13 = ( REGISTER_ARM64_X12 + 1 ) ,
+ REGISTER_ARM64_X14 = ( REGISTER_ARM64_X13 + 1 ) ,
+ REGISTER_ARM64_X15 = ( REGISTER_ARM64_X14 + 1 ) ,
+ REGISTER_ARM64_X16 = ( REGISTER_ARM64_X15 + 1 ) ,
+ REGISTER_ARM64_X17 = ( REGISTER_ARM64_X16 + 1 ) ,
+ REGISTER_ARM64_X18 = ( REGISTER_ARM64_X17 + 1 ) ,
+ REGISTER_ARM64_X19 = ( REGISTER_ARM64_X18 + 1 ) ,
+ REGISTER_ARM64_X20 = ( REGISTER_ARM64_X19 + 1 ) ,
+ REGISTER_ARM64_X21 = ( REGISTER_ARM64_X20 + 1 ) ,
+ REGISTER_ARM64_X22 = ( REGISTER_ARM64_X21 + 1 ) ,
+ REGISTER_ARM64_X23 = ( REGISTER_ARM64_X22 + 1 ) ,
+ REGISTER_ARM64_X24 = ( REGISTER_ARM64_X23 + 1 ) ,
+ REGISTER_ARM64_X25 = ( REGISTER_ARM64_X24 + 1 ) ,
+ REGISTER_ARM64_X26 = ( REGISTER_ARM64_X25 + 1 ) ,
+ REGISTER_ARM64_X27 = ( REGISTER_ARM64_X26 + 1 ) ,
+ REGISTER_ARM64_X28 = ( REGISTER_ARM64_X27 + 1 ) ,
+ REGISTER_ARM64_LR = ( REGISTER_ARM64_X28 + 1 ) ,
+ REGISTER_ARM64_V0 = ( REGISTER_ARM64_LR + 1 ) ,
+ REGISTER_ARM64_V1 = ( REGISTER_ARM64_V0 + 1 ) ,
+ REGISTER_ARM64_V2 = ( REGISTER_ARM64_V1 + 1 ) ,
+ REGISTER_ARM64_V3 = ( REGISTER_ARM64_V2 + 1 ) ,
+ REGISTER_ARM64_V4 = ( REGISTER_ARM64_V3 + 1 ) ,
+ REGISTER_ARM64_V5 = ( REGISTER_ARM64_V4 + 1 ) ,
+ REGISTER_ARM64_V6 = ( REGISTER_ARM64_V5 + 1 ) ,
+ REGISTER_ARM64_V7 = ( REGISTER_ARM64_V6 + 1 ) ,
+ REGISTER_ARM64_V8 = ( REGISTER_ARM64_V7 + 1 ) ,
+ REGISTER_ARM64_V9 = ( REGISTER_ARM64_V8 + 1 ) ,
+ REGISTER_ARM64_V10 = ( REGISTER_ARM64_V9 + 1 ) ,
+ REGISTER_ARM64_V11 = ( REGISTER_ARM64_V10 + 1 ) ,
+ REGISTER_ARM64_V12 = ( REGISTER_ARM64_V11 + 1 ) ,
+ REGISTER_ARM64_V13 = ( REGISTER_ARM64_V12 + 1 ) ,
+ REGISTER_ARM64_V14 = ( REGISTER_ARM64_V13 + 1 ) ,
+ REGISTER_ARM64_V15 = ( REGISTER_ARM64_V14 + 1 ) ,
+ REGISTER_ARM64_V16 = ( REGISTER_ARM64_V15 + 1 ) ,
+ REGISTER_ARM64_V17 = ( REGISTER_ARM64_V16 + 1 ) ,
+ REGISTER_ARM64_V18 = ( REGISTER_ARM64_V17 + 1 ) ,
+ REGISTER_ARM64_V19 = ( REGISTER_ARM64_V18 + 1 ) ,
+ REGISTER_ARM64_V20 = ( REGISTER_ARM64_V19 + 1 ) ,
+ REGISTER_ARM64_V21 = ( REGISTER_ARM64_V20 + 1 ) ,
+ REGISTER_ARM64_V22 = ( REGISTER_ARM64_V21 + 1 ) ,
+ REGISTER_ARM64_V23 = ( REGISTER_ARM64_V22 + 1 ) ,
+ REGISTER_ARM64_V24 = ( REGISTER_ARM64_V23 + 1 ) ,
+ REGISTER_ARM64_V25 = ( REGISTER_ARM64_V24 + 1 ) ,
+ REGISTER_ARM64_V26 = ( REGISTER_ARM64_V25 + 1 ) ,
+ REGISTER_ARM64_V27 = ( REGISTER_ARM64_V26 + 1 ) ,
+ REGISTER_ARM64_V28 = ( REGISTER_ARM64_V27 + 1 ) ,
+ REGISTER_ARM64_V29 = ( REGISTER_ARM64_V28 + 1 ) ,
+ REGISTER_ARM64_V30 = ( REGISTER_ARM64_V29 + 1 ) ,
+ REGISTER_ARM64_V31 = ( REGISTER_ARM64_V30 + 1 ) ,
REGISTER_LOONGARCH64_PC = 0,
REGISTER_LOONGARCH64_SP = ( REGISTER_LOONGARCH64_PC + 1 ) ,
REGISTER_LOONGARCH64_FP = ( REGISTER_LOONGARCH64_SP + 1 ) ,
REGISTER_LOONGARCH64_F30 = ( REGISTER_LOONGARCH64_F29 + 1 ) ,
REGISTER_LOONGARCH64_F31 = ( REGISTER_LOONGARCH64_F30 + 1 ) ,
REGISTER_RISCV64_PC = 0,
- REGISTER_RISCV64_SP = ( REGISTER_RISCV64_PC + 1 ),
- REGISTER_RISCV64_FP = ( REGISTER_RISCV64_SP + 1 ),
- REGISTER_RISCV64_RA = ( REGISTER_RISCV64_FP + 1 ),
- REGISTER_RISCV64_GP = ( REGISTER_RISCV64_RA + 1 ),
- REGISTER_RISCV64_TP = ( REGISTER_RISCV64_GP + 1 ),
- REGISTER_RISCV64_T0 = ( REGISTER_RISCV64_TP + 1 ),
- REGISTER_RISCV64_T1 = ( REGISTER_RISCV64_T0 + 1 ),
- REGISTER_RISCV64_T2 = ( REGISTER_RISCV64_T1 + 1 ),
- REGISTER_RISCV64_S1 = ( REGISTER_RISCV64_T2 + 1 ),
- REGISTER_RISCV64_A0 = ( REGISTER_RISCV64_S1 + 1 ),
- REGISTER_RISCV64_A1 = ( REGISTER_RISCV64_A0 + 1 ),
- REGISTER_RISCV64_A2 = ( REGISTER_RISCV64_A1 + 1 ),
- REGISTER_RISCV64_A3 = ( REGISTER_RISCV64_A2 + 1 ),
- REGISTER_RISCV64_A4 = ( REGISTER_RISCV64_A3 + 1 ),
- REGISTER_RISCV64_A5 = ( REGISTER_RISCV64_A4 + 1 ),
- REGISTER_RISCV64_A6 = ( REGISTER_RISCV64_A5 + 1 ),
- REGISTER_RISCV64_A7 = ( REGISTER_RISCV64_A6 + 1 ),
- REGISTER_RISCV64_S2 = ( REGISTER_RISCV64_A7 + 1 ),
- REGISTER_RISCV64_S3 = ( REGISTER_RISCV64_S2 + 1 ),
- REGISTER_RISCV64_S4 = ( REGISTER_RISCV64_S3 + 1 ),
- REGISTER_RISCV64_S5 = ( REGISTER_RISCV64_S4 + 1 ),
- REGISTER_RISCV64_S6 = ( REGISTER_RISCV64_S5 + 1 ),
- REGISTER_RISCV64_S7 = ( REGISTER_RISCV64_S6 + 1 ),
- REGISTER_RISCV64_S8 = ( REGISTER_RISCV64_S7 + 1 ),
- REGISTER_RISCV64_S9 = ( REGISTER_RISCV64_S8 + 1 ),
- REGISTER_RISCV64_S10 = ( REGISTER_RISCV64_S9 + 1 ),
- REGISTER_RISCV64_S11 = ( REGISTER_RISCV64_S10 + 1 ),
- REGISTER_RISCV64_T3 = ( REGISTER_RISCV64_S11 + 1 ),
- REGISTER_RISCV64_T4 = ( REGISTER_RISCV64_T3 + 1 ),
- REGISTER_RISCV64_T5 = ( REGISTER_RISCV64_T4 + 1 ),
- REGISTER_RISCV64_T6 = ( REGISTER_RISCV64_T5 + 1 ),
- REGISTER_RISCV64_F0 = ( REGISTER_RISCV64_T6 + 1 ),
- REGISTER_RISCV64_F1 = ( REGISTER_RISCV64_F0 + 1 ),
- REGISTER_RISCV64_F2 = ( REGISTER_RISCV64_F1 + 1 ),
- REGISTER_RISCV64_F3 = ( REGISTER_RISCV64_F2 + 1 ),
- REGISTER_RISCV64_F4 = ( REGISTER_RISCV64_F3 + 1 ),
- REGISTER_RISCV64_F5 = ( REGISTER_RISCV64_F4 + 1 ),
- REGISTER_RISCV64_F6 = ( REGISTER_RISCV64_F5 + 1 ),
- REGISTER_RISCV64_F7 = ( REGISTER_RISCV64_F6 + 1 ),
- REGISTER_RISCV64_F8 = ( REGISTER_RISCV64_F7 + 1 ),
- REGISTER_RISCV64_F9 = ( REGISTER_RISCV64_F8 + 1 ),
- REGISTER_RISCV64_F10 = ( REGISTER_RISCV64_F9 + 1 ),
- REGISTER_RISCV64_F11 = ( REGISTER_RISCV64_F10 + 1 ),
- REGISTER_RISCV64_F12 = ( REGISTER_RISCV64_F11 + 1 ),
- REGISTER_RISCV64_F13 = ( REGISTER_RISCV64_F12 + 1 ),
- REGISTER_RISCV64_F14 = ( REGISTER_RISCV64_F13 + 1 ),
- REGISTER_RISCV64_F15 = ( REGISTER_RISCV64_F14 + 1 ),
- REGISTER_RISCV64_F16 = ( REGISTER_RISCV64_F15 + 1 ),
- REGISTER_RISCV64_F17 = ( REGISTER_RISCV64_F16 + 1 ),
- REGISTER_RISCV64_F18 = ( REGISTER_RISCV64_F17 + 1 ),
- REGISTER_RISCV64_F19 = ( REGISTER_RISCV64_F18 + 1 ),
- REGISTER_RISCV64_F20 = ( REGISTER_RISCV64_F19 + 1 ),
- REGISTER_RISCV64_F21 = ( REGISTER_RISCV64_F20 + 1 ),
- REGISTER_RISCV64_F22 = ( REGISTER_RISCV64_F21 + 1 ),
- REGISTER_RISCV64_F23 = ( REGISTER_RISCV64_F22 + 1 ),
- REGISTER_RISCV64_F24 = ( REGISTER_RISCV64_F23 + 1 ),
- REGISTER_RISCV64_F25 = ( REGISTER_RISCV64_F24 + 1 ),
- REGISTER_RISCV64_F26 = ( REGISTER_RISCV64_F25 + 1 ),
- REGISTER_RISCV64_F27 = ( REGISTER_RISCV64_F26 + 1 ),
- REGISTER_RISCV64_F28 = ( REGISTER_RISCV64_F27 + 1 ),
- REGISTER_RISCV64_F29 = ( REGISTER_RISCV64_F28 + 1 ),
- REGISTER_RISCV64_F30 = ( REGISTER_RISCV64_F29 + 1 ),
- REGISTER_RISCV64_F31 = ( REGISTER_RISCV64_F30 + 1 ),
- REGISTER_RISCV64_X0 = ( REGISTER_RISCV64_F31 + 1 ), // TODO-RISCV64-CQ: Add X0 for an use in debug. Need to check.
- } CorDebugRegister;
+ REGISTER_RISCV64_SP = ( REGISTER_RISCV64_PC + 1 ) ,
+ REGISTER_RISCV64_FP = ( REGISTER_RISCV64_SP + 1 ) ,
+ REGISTER_RISCV64_RA = ( REGISTER_RISCV64_FP + 1 ) ,
+ REGISTER_RISCV64_GP = ( REGISTER_RISCV64_RA + 1 ) ,
+ REGISTER_RISCV64_TP = ( REGISTER_RISCV64_GP + 1 ) ,
+ REGISTER_RISCV64_T0 = ( REGISTER_RISCV64_TP + 1 ) ,
+ REGISTER_RISCV64_T1 = ( REGISTER_RISCV64_T0 + 1 ) ,
+ REGISTER_RISCV64_T2 = ( REGISTER_RISCV64_T1 + 1 ) ,
+ REGISTER_RISCV64_S1 = ( REGISTER_RISCV64_T2 + 1 ) ,
+ REGISTER_RISCV64_A0 = ( REGISTER_RISCV64_S1 + 1 ) ,
+ REGISTER_RISCV64_A1 = ( REGISTER_RISCV64_A0 + 1 ) ,
+ REGISTER_RISCV64_A2 = ( REGISTER_RISCV64_A1 + 1 ) ,
+ REGISTER_RISCV64_A3 = ( REGISTER_RISCV64_A2 + 1 ) ,
+ REGISTER_RISCV64_A4 = ( REGISTER_RISCV64_A3 + 1 ) ,
+ REGISTER_RISCV64_A5 = ( REGISTER_RISCV64_A4 + 1 ) ,
+ REGISTER_RISCV64_A6 = ( REGISTER_RISCV64_A5 + 1 ) ,
+ REGISTER_RISCV64_A7 = ( REGISTER_RISCV64_A6 + 1 ) ,
+ REGISTER_RISCV64_S2 = ( REGISTER_RISCV64_A7 + 1 ) ,
+ REGISTER_RISCV64_S3 = ( REGISTER_RISCV64_S2 + 1 ) ,
+ REGISTER_RISCV64_S4 = ( REGISTER_RISCV64_S3 + 1 ) ,
+ REGISTER_RISCV64_S5 = ( REGISTER_RISCV64_S4 + 1 ) ,
+ REGISTER_RISCV64_S6 = ( REGISTER_RISCV64_S5 + 1 ) ,
+ REGISTER_RISCV64_S7 = ( REGISTER_RISCV64_S6 + 1 ) ,
+ REGISTER_RISCV64_S8 = ( REGISTER_RISCV64_S7 + 1 ) ,
+ REGISTER_RISCV64_S9 = ( REGISTER_RISCV64_S8 + 1 ) ,
+ REGISTER_RISCV64_S10 = ( REGISTER_RISCV64_S9 + 1 ) ,
+ REGISTER_RISCV64_S11 = ( REGISTER_RISCV64_S10 + 1 ) ,
+ REGISTER_RISCV64_T3 = ( REGISTER_RISCV64_S11 + 1 ) ,
+ REGISTER_RISCV64_T4 = ( REGISTER_RISCV64_T3 + 1 ) ,
+ REGISTER_RISCV64_T5 = ( REGISTER_RISCV64_T4 + 1 ) ,
+ REGISTER_RISCV64_T6 = ( REGISTER_RISCV64_T5 + 1 ) ,
+ REGISTER_RISCV64_F0 = ( REGISTER_RISCV64_T6 + 1 ) ,
+ REGISTER_RISCV64_F1 = ( REGISTER_RISCV64_F0 + 1 ) ,
+ REGISTER_RISCV64_F2 = ( REGISTER_RISCV64_F1 + 1 ) ,
+ REGISTER_RISCV64_F3 = ( REGISTER_RISCV64_F2 + 1 ) ,
+ REGISTER_RISCV64_F4 = ( REGISTER_RISCV64_F3 + 1 ) ,
+ REGISTER_RISCV64_F5 = ( REGISTER_RISCV64_F4 + 1 ) ,
+ REGISTER_RISCV64_F6 = ( REGISTER_RISCV64_F5 + 1 ) ,
+ REGISTER_RISCV64_F7 = ( REGISTER_RISCV64_F6 + 1 ) ,
+ REGISTER_RISCV64_F8 = ( REGISTER_RISCV64_F7 + 1 ) ,
+ REGISTER_RISCV64_F9 = ( REGISTER_RISCV64_F8 + 1 ) ,
+ REGISTER_RISCV64_F10 = ( REGISTER_RISCV64_F9 + 1 ) ,
+ REGISTER_RISCV64_F11 = ( REGISTER_RISCV64_F10 + 1 ) ,
+ REGISTER_RISCV64_F12 = ( REGISTER_RISCV64_F11 + 1 ) ,
+ REGISTER_RISCV64_F13 = ( REGISTER_RISCV64_F12 + 1 ) ,
+ REGISTER_RISCV64_F14 = ( REGISTER_RISCV64_F13 + 1 ) ,
+ REGISTER_RISCV64_F15 = ( REGISTER_RISCV64_F14 + 1 ) ,
+ REGISTER_RISCV64_F16 = ( REGISTER_RISCV64_F15 + 1 ) ,
+ REGISTER_RISCV64_F17 = ( REGISTER_RISCV64_F16 + 1 ) ,
+ REGISTER_RISCV64_F18 = ( REGISTER_RISCV64_F17 + 1 ) ,
+ REGISTER_RISCV64_F19 = ( REGISTER_RISCV64_F18 + 1 ) ,
+ REGISTER_RISCV64_F20 = ( REGISTER_RISCV64_F19 + 1 ) ,
+ REGISTER_RISCV64_F21 = ( REGISTER_RISCV64_F20 + 1 ) ,
+ REGISTER_RISCV64_F22 = ( REGISTER_RISCV64_F21 + 1 ) ,
+ REGISTER_RISCV64_F23 = ( REGISTER_RISCV64_F22 + 1 ) ,
+ REGISTER_RISCV64_F24 = ( REGISTER_RISCV64_F23 + 1 ) ,
+ REGISTER_RISCV64_F25 = ( REGISTER_RISCV64_F24 + 1 ) ,
+ REGISTER_RISCV64_F26 = ( REGISTER_RISCV64_F25 + 1 ) ,
+ REGISTER_RISCV64_F27 = ( REGISTER_RISCV64_F26 + 1 ) ,
+ REGISTER_RISCV64_F28 = ( REGISTER_RISCV64_F27 + 1 ) ,
+ REGISTER_RISCV64_F29 = ( REGISTER_RISCV64_F28 + 1 ) ,
+ REGISTER_RISCV64_F30 = ( REGISTER_RISCV64_F29 + 1 ) ,
+ REGISTER_RISCV64_F31 = ( REGISTER_RISCV64_F30 + 1 )
+ } CorDebugRegister;
EXTERN_C const IID IID_ICorDebugRegisterSet;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugRegisterSetVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugRegisterSet * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugRegisterSet * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugRegisterSet * This);
+ DECLSPEC_XFGVIRT(ICorDebugRegisterSet, GetRegistersAvailable)
HRESULT ( STDMETHODCALLTYPE *GetRegistersAvailable )(
ICorDebugRegisterSet * This,
/* [out] */ ULONG64 *pAvailable);
+ DECLSPEC_XFGVIRT(ICorDebugRegisterSet, GetRegisters)
HRESULT ( STDMETHODCALLTYPE *GetRegisters )(
ICorDebugRegisterSet * This,
/* [in] */ ULONG64 mask,
/* [in] */ ULONG32 regCount,
/* [length_is][size_is][out] */ CORDB_REGISTER regBuffer[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugRegisterSet, SetRegisters)
HRESULT ( STDMETHODCALLTYPE *SetRegisters )(
ICorDebugRegisterSet * This,
/* [in] */ ULONG64 mask,
/* [in] */ ULONG32 regCount,
/* [size_is][in] */ CORDB_REGISTER regBuffer[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugRegisterSet, GetThreadContext)
HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
ICorDebugRegisterSet * This,
/* [in] */ ULONG32 contextSize,
/* [size_is][length_is][out][in] */ BYTE context[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugRegisterSet, SetThreadContext)
HRESULT ( STDMETHODCALLTYPE *SetThreadContext )(
ICorDebugRegisterSet * This,
/* [in] */ ULONG32 contextSize,
#ifdef COBJMACROS
-#define ICorDebugRegisterSet_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugRegisterSet_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugRegisterSet_AddRef(This) \
+#define ICorDebugRegisterSet_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugRegisterSet_Release(This) \
+#define ICorDebugRegisterSet_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugRegisterSet_GetRegistersAvailable(This,pAvailable) \
+#define ICorDebugRegisterSet_GetRegistersAvailable(This,pAvailable) \
( (This)->lpVtbl -> GetRegistersAvailable(This,pAvailable) )
-#define ICorDebugRegisterSet_GetRegisters(This,mask,regCount,regBuffer) \
+#define ICorDebugRegisterSet_GetRegisters(This,mask,regCount,regBuffer) \
( (This)->lpVtbl -> GetRegisters(This,mask,regCount,regBuffer) )
-#define ICorDebugRegisterSet_SetRegisters(This,mask,regCount,regBuffer) \
+#define ICorDebugRegisterSet_SetRegisters(This,mask,regCount,regBuffer) \
( (This)->lpVtbl -> SetRegisters(This,mask,regCount,regBuffer) )
-#define ICorDebugRegisterSet_GetThreadContext(This,contextSize,context) \
+#define ICorDebugRegisterSet_GetThreadContext(This,contextSize,context) \
( (This)->lpVtbl -> GetThreadContext(This,contextSize,context) )
-#define ICorDebugRegisterSet_SetThreadContext(This,contextSize,context) \
+#define ICorDebugRegisterSet_SetThreadContext(This,contextSize,context) \
( (This)->lpVtbl -> SetThreadContext(This,contextSize,context) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugRegisterSet_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugRegisterSet_INTERFACE_DEFINED__ */
#ifndef __ICorDebugRegisterSet2_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugRegisterSet2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugRegisterSet2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugRegisterSet2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugRegisterSet2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugRegisterSet2, GetRegistersAvailable)
HRESULT ( STDMETHODCALLTYPE *GetRegistersAvailable )(
ICorDebugRegisterSet2 * This,
/* [in] */ ULONG32 numChunks,
/* [size_is][out] */ BYTE availableRegChunks[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugRegisterSet2, GetRegisters)
HRESULT ( STDMETHODCALLTYPE *GetRegisters )(
ICorDebugRegisterSet2 * This,
/* [in] */ ULONG32 maskCount,
/* [in] */ ULONG32 regCount,
/* [size_is][out] */ CORDB_REGISTER regBuffer[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugRegisterSet2, SetRegisters)
HRESULT ( STDMETHODCALLTYPE *SetRegisters )(
ICorDebugRegisterSet2 * This,
/* [in] */ ULONG32 maskCount,
#ifdef COBJMACROS
-#define ICorDebugRegisterSet2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugRegisterSet2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugRegisterSet2_AddRef(This) \
+#define ICorDebugRegisterSet2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugRegisterSet2_Release(This) \
+#define ICorDebugRegisterSet2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugRegisterSet2_GetRegistersAvailable(This,numChunks,availableRegChunks) \
+#define ICorDebugRegisterSet2_GetRegistersAvailable(This,numChunks,availableRegChunks) \
( (This)->lpVtbl -> GetRegistersAvailable(This,numChunks,availableRegChunks) )
-#define ICorDebugRegisterSet2_GetRegisters(This,maskCount,mask,regCount,regBuffer) \
+#define ICorDebugRegisterSet2_GetRegisters(This,maskCount,mask,regCount,regBuffer) \
( (This)->lpVtbl -> GetRegisters(This,maskCount,mask,regCount,regBuffer) )
-#define ICorDebugRegisterSet2_SetRegisters(This,maskCount,mask,regCount,regBuffer) \
+#define ICorDebugRegisterSet2_SetRegisters(This,maskCount,mask,regCount,regBuffer) \
( (This)->lpVtbl -> SetRegisters(This,maskCount,mask,regCount,regBuffer) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugRegisterSet2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugRegisterSet2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugThread_INTERFACE_DEFINED__
typedef
enum CorDebugUserState
{
- USER_STOP_REQUESTED = 0x1,
- USER_SUSPEND_REQUESTED = 0x2,
- USER_BACKGROUND = 0x4,
- USER_UNSTARTED = 0x8,
- USER_STOPPED = 0x10,
- USER_WAIT_SLEEP_JOIN = 0x20,
- USER_SUSPENDED = 0x40,
- USER_UNSAFE_POINT = 0x80,
- USER_THREADPOOL = 0x100
- } CorDebugUserState;
+ USER_STOP_REQUESTED = 0x1,
+ USER_SUSPEND_REQUESTED = 0x2,
+ USER_BACKGROUND = 0x4,
+ USER_UNSTARTED = 0x8,
+ USER_STOPPED = 0x10,
+ USER_WAIT_SLEEP_JOIN = 0x20,
+ USER_SUSPENDED = 0x40,
+ USER_UNSAFE_POINT = 0x80,
+ USER_THREADPOOL = 0x100
+ } CorDebugUserState;
EXTERN_C const IID IID_ICorDebugThread;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugThreadVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugThread * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugThread * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugThread * This);
+ DECLSPEC_XFGVIRT(ICorDebugThread, GetProcess)
HRESULT ( STDMETHODCALLTYPE *GetProcess )(
ICorDebugThread * This,
/* [out] */ ICorDebugProcess **ppProcess);
+ DECLSPEC_XFGVIRT(ICorDebugThread, GetID)
HRESULT ( STDMETHODCALLTYPE *GetID )(
ICorDebugThread * This,
/* [out] */ DWORD *pdwThreadId);
+ DECLSPEC_XFGVIRT(ICorDebugThread, GetHandle)
HRESULT ( STDMETHODCALLTYPE *GetHandle )(
ICorDebugThread * This,
/* [out] */ HTHREAD *phThreadHandle);
+ DECLSPEC_XFGVIRT(ICorDebugThread, GetAppDomain)
HRESULT ( STDMETHODCALLTYPE *GetAppDomain )(
ICorDebugThread * This,
/* [out] */ ICorDebugAppDomain **ppAppDomain);
+ DECLSPEC_XFGVIRT(ICorDebugThread, SetDebugState)
HRESULT ( STDMETHODCALLTYPE *SetDebugState )(
ICorDebugThread * This,
/* [in] */ CorDebugThreadState state);
+ DECLSPEC_XFGVIRT(ICorDebugThread, GetDebugState)
HRESULT ( STDMETHODCALLTYPE *GetDebugState )(
ICorDebugThread * This,
/* [out] */ CorDebugThreadState *pState);
+ DECLSPEC_XFGVIRT(ICorDebugThread, GetUserState)
HRESULT ( STDMETHODCALLTYPE *GetUserState )(
ICorDebugThread * This,
/* [out] */ CorDebugUserState *pState);
+ DECLSPEC_XFGVIRT(ICorDebugThread, GetCurrentException)
HRESULT ( STDMETHODCALLTYPE *GetCurrentException )(
ICorDebugThread * This,
/* [out] */ ICorDebugValue **ppExceptionObject);
+ DECLSPEC_XFGVIRT(ICorDebugThread, ClearCurrentException)
HRESULT ( STDMETHODCALLTYPE *ClearCurrentException )(
ICorDebugThread * This);
+ DECLSPEC_XFGVIRT(ICorDebugThread, CreateStepper)
HRESULT ( STDMETHODCALLTYPE *CreateStepper )(
ICorDebugThread * This,
/* [out] */ ICorDebugStepper **ppStepper);
+ DECLSPEC_XFGVIRT(ICorDebugThread, EnumerateChains)
HRESULT ( STDMETHODCALLTYPE *EnumerateChains )(
ICorDebugThread * This,
/* [out] */ ICorDebugChainEnum **ppChains);
+ DECLSPEC_XFGVIRT(ICorDebugThread, GetActiveChain)
HRESULT ( STDMETHODCALLTYPE *GetActiveChain )(
ICorDebugThread * This,
/* [out] */ ICorDebugChain **ppChain);
+ DECLSPEC_XFGVIRT(ICorDebugThread, GetActiveFrame)
HRESULT ( STDMETHODCALLTYPE *GetActiveFrame )(
ICorDebugThread * This,
/* [out] */ ICorDebugFrame **ppFrame);
+ DECLSPEC_XFGVIRT(ICorDebugThread, GetRegisterSet)
HRESULT ( STDMETHODCALLTYPE *GetRegisterSet )(
ICorDebugThread * This,
/* [out] */ ICorDebugRegisterSet **ppRegisters);
+ DECLSPEC_XFGVIRT(ICorDebugThread, CreateEval)
HRESULT ( STDMETHODCALLTYPE *CreateEval )(
ICorDebugThread * This,
/* [out] */ ICorDebugEval **ppEval);
+ DECLSPEC_XFGVIRT(ICorDebugThread, GetObject)
HRESULT ( STDMETHODCALLTYPE *GetObject )(
ICorDebugThread * This,
/* [out] */ ICorDebugValue **ppObject);
#ifdef COBJMACROS
-#define ICorDebugThread_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugThread_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugThread_AddRef(This) \
+#define ICorDebugThread_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugThread_Release(This) \
+#define ICorDebugThread_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugThread_GetProcess(This,ppProcess) \
+#define ICorDebugThread_GetProcess(This,ppProcess) \
( (This)->lpVtbl -> GetProcess(This,ppProcess) )
-#define ICorDebugThread_GetID(This,pdwThreadId) \
+#define ICorDebugThread_GetID(This,pdwThreadId) \
( (This)->lpVtbl -> GetID(This,pdwThreadId) )
-#define ICorDebugThread_GetHandle(This,phThreadHandle) \
+#define ICorDebugThread_GetHandle(This,phThreadHandle) \
( (This)->lpVtbl -> GetHandle(This,phThreadHandle) )
-#define ICorDebugThread_GetAppDomain(This,ppAppDomain) \
+#define ICorDebugThread_GetAppDomain(This,ppAppDomain) \
( (This)->lpVtbl -> GetAppDomain(This,ppAppDomain) )
-#define ICorDebugThread_SetDebugState(This,state) \
+#define ICorDebugThread_SetDebugState(This,state) \
( (This)->lpVtbl -> SetDebugState(This,state) )
-#define ICorDebugThread_GetDebugState(This,pState) \
+#define ICorDebugThread_GetDebugState(This,pState) \
( (This)->lpVtbl -> GetDebugState(This,pState) )
-#define ICorDebugThread_GetUserState(This,pState) \
+#define ICorDebugThread_GetUserState(This,pState) \
( (This)->lpVtbl -> GetUserState(This,pState) )
-#define ICorDebugThread_GetCurrentException(This,ppExceptionObject) \
+#define ICorDebugThread_GetCurrentException(This,ppExceptionObject) \
( (This)->lpVtbl -> GetCurrentException(This,ppExceptionObject) )
-#define ICorDebugThread_ClearCurrentException(This) \
+#define ICorDebugThread_ClearCurrentException(This) \
( (This)->lpVtbl -> ClearCurrentException(This) )
-#define ICorDebugThread_CreateStepper(This,ppStepper) \
+#define ICorDebugThread_CreateStepper(This,ppStepper) \
( (This)->lpVtbl -> CreateStepper(This,ppStepper) )
-#define ICorDebugThread_EnumerateChains(This,ppChains) \
+#define ICorDebugThread_EnumerateChains(This,ppChains) \
( (This)->lpVtbl -> EnumerateChains(This,ppChains) )
-#define ICorDebugThread_GetActiveChain(This,ppChain) \
+#define ICorDebugThread_GetActiveChain(This,ppChain) \
( (This)->lpVtbl -> GetActiveChain(This,ppChain) )
-#define ICorDebugThread_GetActiveFrame(This,ppFrame) \
+#define ICorDebugThread_GetActiveFrame(This,ppFrame) \
( (This)->lpVtbl -> GetActiveFrame(This,ppFrame) )
-#define ICorDebugThread_GetRegisterSet(This,ppRegisters) \
+#define ICorDebugThread_GetRegisterSet(This,ppRegisters) \
( (This)->lpVtbl -> GetRegisterSet(This,ppRegisters) )
-#define ICorDebugThread_CreateEval(This,ppEval) \
+#define ICorDebugThread_CreateEval(This,ppEval) \
( (This)->lpVtbl -> CreateEval(This,ppEval) )
-#define ICorDebugThread_GetObject(This,ppObject) \
+#define ICorDebugThread_GetObject(This,ppObject) \
( (This)->lpVtbl -> GetObject(This,ppObject) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugThread_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugThread_INTERFACE_DEFINED__ */
#ifndef __ICorDebugThread2_INTERFACE_DEFINED__
ICorDebugFunction2 *pFunction;
ULONG32 ilOffset;
ULONG32 flags;
- } COR_ACTIVE_FUNCTION;
+ } COR_ACTIVE_FUNCTION;
EXTERN_C const IID IID_ICorDebugThread2;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugThread2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugThread2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugThread2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugThread2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugThread2, GetActiveFunctions)
HRESULT ( STDMETHODCALLTYPE *GetActiveFunctions )(
ICorDebugThread2 * This,
/* [in] */ ULONG32 cFunctions,
/* [out] */ ULONG32 *pcFunctions,
/* [length_is][size_is][out][in] */ COR_ACTIVE_FUNCTION pFunctions[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugThread2, GetConnectionID)
HRESULT ( STDMETHODCALLTYPE *GetConnectionID )(
ICorDebugThread2 * This,
/* [out] */ CONNID *pdwConnectionId);
+ DECLSPEC_XFGVIRT(ICorDebugThread2, GetTaskID)
HRESULT ( STDMETHODCALLTYPE *GetTaskID )(
ICorDebugThread2 * This,
/* [out] */ TASKID *pTaskId);
+ DECLSPEC_XFGVIRT(ICorDebugThread2, GetVolatileOSThreadID)
HRESULT ( STDMETHODCALLTYPE *GetVolatileOSThreadID )(
ICorDebugThread2 * This,
/* [out] */ DWORD *pdwTid);
+ DECLSPEC_XFGVIRT(ICorDebugThread2, InterceptCurrentException)
HRESULT ( STDMETHODCALLTYPE *InterceptCurrentException )(
ICorDebugThread2 * This,
/* [in] */ ICorDebugFrame *pFrame);
#ifdef COBJMACROS
-#define ICorDebugThread2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugThread2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugThread2_AddRef(This) \
+#define ICorDebugThread2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugThread2_Release(This) \
+#define ICorDebugThread2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugThread2_GetActiveFunctions(This,cFunctions,pcFunctions,pFunctions) \
+#define ICorDebugThread2_GetActiveFunctions(This,cFunctions,pcFunctions,pFunctions) \
( (This)->lpVtbl -> GetActiveFunctions(This,cFunctions,pcFunctions,pFunctions) )
-#define ICorDebugThread2_GetConnectionID(This,pdwConnectionId) \
+#define ICorDebugThread2_GetConnectionID(This,pdwConnectionId) \
( (This)->lpVtbl -> GetConnectionID(This,pdwConnectionId) )
-#define ICorDebugThread2_GetTaskID(This,pTaskId) \
+#define ICorDebugThread2_GetTaskID(This,pTaskId) \
( (This)->lpVtbl -> GetTaskID(This,pTaskId) )
-#define ICorDebugThread2_GetVolatileOSThreadID(This,pdwTid) \
+#define ICorDebugThread2_GetVolatileOSThreadID(This,pdwTid) \
( (This)->lpVtbl -> GetVolatileOSThreadID(This,pdwTid) )
-#define ICorDebugThread2_InterceptCurrentException(This,pFrame) \
+#define ICorDebugThread2_InterceptCurrentException(This,pFrame) \
( (This)->lpVtbl -> InterceptCurrentException(This,pFrame) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugThread2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugThread2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugThread3_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugThread3Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugThread3 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugThread3 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugThread3 * This);
+ DECLSPEC_XFGVIRT(ICorDebugThread3, CreateStackWalk)
HRESULT ( STDMETHODCALLTYPE *CreateStackWalk )(
ICorDebugThread3 * This,
/* [out] */ ICorDebugStackWalk **ppStackWalk);
+ DECLSPEC_XFGVIRT(ICorDebugThread3, GetActiveInternalFrames)
HRESULT ( STDMETHODCALLTYPE *GetActiveInternalFrames )(
ICorDebugThread3 * This,
/* [in] */ ULONG32 cInternalFrames,
#ifdef COBJMACROS
-#define ICorDebugThread3_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugThread3_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugThread3_AddRef(This) \
+#define ICorDebugThread3_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugThread3_Release(This) \
+#define ICorDebugThread3_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugThread3_CreateStackWalk(This,ppStackWalk) \
+#define ICorDebugThread3_CreateStackWalk(This,ppStackWalk) \
( (This)->lpVtbl -> CreateStackWalk(This,ppStackWalk) )
-#define ICorDebugThread3_GetActiveInternalFrames(This,cInternalFrames,pcInternalFrames,ppInternalFrames) \
+#define ICorDebugThread3_GetActiveInternalFrames(This,cInternalFrames,pcInternalFrames,ppInternalFrames) \
( (This)->lpVtbl -> GetActiveInternalFrames(This,cInternalFrames,pcInternalFrames,ppInternalFrames) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugThread3_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugThread3_INTERFACE_DEFINED__ */
#ifndef __ICorDebugThread4_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugThread4Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugThread4 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugThread4 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugThread4 * This);
+ DECLSPEC_XFGVIRT(ICorDebugThread4, HasUnhandledException)
HRESULT ( STDMETHODCALLTYPE *HasUnhandledException )(
ICorDebugThread4 * This);
+ DECLSPEC_XFGVIRT(ICorDebugThread4, GetBlockingObjects)
HRESULT ( STDMETHODCALLTYPE *GetBlockingObjects )(
ICorDebugThread4 * This,
/* [out] */ ICorDebugBlockingObjectEnum **ppBlockingObjectEnum);
+ DECLSPEC_XFGVIRT(ICorDebugThread4, GetCurrentCustomDebuggerNotification)
HRESULT ( STDMETHODCALLTYPE *GetCurrentCustomDebuggerNotification )(
ICorDebugThread4 * This,
/* [out] */ ICorDebugValue **ppNotificationObject);
#ifdef COBJMACROS
-#define ICorDebugThread4_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugThread4_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugThread4_AddRef(This) \
+#define ICorDebugThread4_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugThread4_Release(This) \
+#define ICorDebugThread4_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugThread4_HasUnhandledException(This) \
+#define ICorDebugThread4_HasUnhandledException(This) \
( (This)->lpVtbl -> HasUnhandledException(This) )
-#define ICorDebugThread4_GetBlockingObjects(This,ppBlockingObjectEnum) \
+#define ICorDebugThread4_GetBlockingObjects(This,ppBlockingObjectEnum) \
( (This)->lpVtbl -> GetBlockingObjects(This,ppBlockingObjectEnum) )
-#define ICorDebugThread4_GetCurrentCustomDebuggerNotification(This,ppNotificationObject) \
+#define ICorDebugThread4_GetCurrentCustomDebuggerNotification(This,ppNotificationObject) \
( (This)->lpVtbl -> GetCurrentCustomDebuggerNotification(This,ppNotificationObject) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugThread4_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugThread4_INTERFACE_DEFINED__ */
#ifndef __ICorDebugThread5_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugThread5Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugThread5 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugThread5 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugThread5 * This);
+ DECLSPEC_XFGVIRT(ICorDebugThread5, GetBytesAllocated)
HRESULT ( STDMETHODCALLTYPE *GetBytesAllocated )(
ICorDebugThread5 * This,
/* [out] */ ULONG64 *pSohAllocatedBytes,
#ifdef COBJMACROS
-#define ICorDebugThread5_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugThread5_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugThread5_AddRef(This) \
+#define ICorDebugThread5_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugThread5_Release(This) \
+#define ICorDebugThread5_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugThread5_GetBytesAllocated(This,pSohAllocatedBytes,pUohAllocatedBytes) \
+#define ICorDebugThread5_GetBytesAllocated(This,pSohAllocatedBytes,pUohAllocatedBytes) \
( (This)->lpVtbl -> GetBytesAllocated(This,pSohAllocatedBytes,pUohAllocatedBytes) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugThread5_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugThread5_INTERFACE_DEFINED__ */
#ifndef __ICorDebugStackWalk_INTERFACE_DEFINED__
typedef
enum CorDebugSetContextFlag
{
- SET_CONTEXT_FLAG_ACTIVE_FRAME = 0x1,
- SET_CONTEXT_FLAG_UNWIND_FRAME = 0x2
- } CorDebugSetContextFlag;
+ SET_CONTEXT_FLAG_ACTIVE_FRAME = 0x1,
+ SET_CONTEXT_FLAG_UNWIND_FRAME = 0x2
+ } CorDebugSetContextFlag;
EXTERN_C const IID IID_ICorDebugStackWalk;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugStackWalkVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugStackWalk * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugStackWalk * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugStackWalk * This);
+ DECLSPEC_XFGVIRT(ICorDebugStackWalk, GetContext)
HRESULT ( STDMETHODCALLTYPE *GetContext )(
ICorDebugStackWalk * This,
/* [in] */ ULONG32 contextFlags,
/* [out] */ ULONG32 *contextSize,
/* [size_is][out] */ BYTE contextBuf[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugStackWalk, SetContext)
HRESULT ( STDMETHODCALLTYPE *SetContext )(
ICorDebugStackWalk * This,
/* [in] */ CorDebugSetContextFlag flag,
/* [in] */ ULONG32 contextSize,
/* [size_is][in] */ BYTE context[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugStackWalk, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugStackWalk * This);
+ DECLSPEC_XFGVIRT(ICorDebugStackWalk, GetFrame)
HRESULT ( STDMETHODCALLTYPE *GetFrame )(
ICorDebugStackWalk * This,
/* [out] */ ICorDebugFrame **pFrame);
#ifdef COBJMACROS
-#define ICorDebugStackWalk_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugStackWalk_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugStackWalk_AddRef(This) \
+#define ICorDebugStackWalk_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugStackWalk_Release(This) \
+#define ICorDebugStackWalk_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugStackWalk_GetContext(This,contextFlags,contextBufSize,contextSize,contextBuf) \
+#define ICorDebugStackWalk_GetContext(This,contextFlags,contextBufSize,contextSize,contextBuf) \
( (This)->lpVtbl -> GetContext(This,contextFlags,contextBufSize,contextSize,contextBuf) )
-#define ICorDebugStackWalk_SetContext(This,flag,contextSize,context) \
+#define ICorDebugStackWalk_SetContext(This,flag,contextSize,context) \
( (This)->lpVtbl -> SetContext(This,flag,contextSize,context) )
-#define ICorDebugStackWalk_Next(This) \
+#define ICorDebugStackWalk_Next(This) \
( (This)->lpVtbl -> Next(This) )
-#define ICorDebugStackWalk_GetFrame(This,pFrame) \
+#define ICorDebugStackWalk_GetFrame(This,pFrame) \
( (This)->lpVtbl -> GetFrame(This,pFrame) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugStackWalk_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugStackWalk_INTERFACE_DEFINED__ */
#ifndef __ICorDebugChain_INTERFACE_DEFINED__
typedef
enum CorDebugChainReason
{
- CHAIN_NONE = 0,
- CHAIN_CLASS_INIT = 0x1,
- CHAIN_EXCEPTION_FILTER = 0x2,
- CHAIN_SECURITY = 0x4,
- CHAIN_CONTEXT_POLICY = 0x8,
- CHAIN_INTERCEPTION = 0x10,
- CHAIN_PROCESS_START = 0x20,
- CHAIN_THREAD_START = 0x40,
- CHAIN_ENTER_MANAGED = 0x80,
- CHAIN_ENTER_UNMANAGED = 0x100,
- CHAIN_DEBUGGER_EVAL = 0x200,
- CHAIN_CONTEXT_SWITCH = 0x400,
- CHAIN_FUNC_EVAL = 0x800
- } CorDebugChainReason;
+ CHAIN_NONE = 0,
+ CHAIN_CLASS_INIT = 0x1,
+ CHAIN_EXCEPTION_FILTER = 0x2,
+ CHAIN_SECURITY = 0x4,
+ CHAIN_CONTEXT_POLICY = 0x8,
+ CHAIN_INTERCEPTION = 0x10,
+ CHAIN_PROCESS_START = 0x20,
+ CHAIN_THREAD_START = 0x40,
+ CHAIN_ENTER_MANAGED = 0x80,
+ CHAIN_ENTER_UNMANAGED = 0x100,
+ CHAIN_DEBUGGER_EVAL = 0x200,
+ CHAIN_CONTEXT_SWITCH = 0x400,
+ CHAIN_FUNC_EVAL = 0x800
+ } CorDebugChainReason;
EXTERN_C const IID IID_ICorDebugChain;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugChainVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugChain * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugChain * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugChain * This);
+ DECLSPEC_XFGVIRT(ICorDebugChain, GetThread)
HRESULT ( STDMETHODCALLTYPE *GetThread )(
ICorDebugChain * This,
/* [out] */ ICorDebugThread **ppThread);
+ DECLSPEC_XFGVIRT(ICorDebugChain, GetStackRange)
HRESULT ( STDMETHODCALLTYPE *GetStackRange )(
ICorDebugChain * This,
/* [out] */ CORDB_ADDRESS *pStart,
/* [out] */ CORDB_ADDRESS *pEnd);
+ DECLSPEC_XFGVIRT(ICorDebugChain, GetContext)
HRESULT ( STDMETHODCALLTYPE *GetContext )(
ICorDebugChain * This,
/* [out] */ ICorDebugContext **ppContext);
+ DECLSPEC_XFGVIRT(ICorDebugChain, GetCaller)
HRESULT ( STDMETHODCALLTYPE *GetCaller )(
ICorDebugChain * This,
/* [out] */ ICorDebugChain **ppChain);
+ DECLSPEC_XFGVIRT(ICorDebugChain, GetCallee)
HRESULT ( STDMETHODCALLTYPE *GetCallee )(
ICorDebugChain * This,
/* [out] */ ICorDebugChain **ppChain);
+ DECLSPEC_XFGVIRT(ICorDebugChain, GetPrevious)
HRESULT ( STDMETHODCALLTYPE *GetPrevious )(
ICorDebugChain * This,
/* [out] */ ICorDebugChain **ppChain);
+ DECLSPEC_XFGVIRT(ICorDebugChain, GetNext)
HRESULT ( STDMETHODCALLTYPE *GetNext )(
ICorDebugChain * This,
/* [out] */ ICorDebugChain **ppChain);
+ DECLSPEC_XFGVIRT(ICorDebugChain, IsManaged)
HRESULT ( STDMETHODCALLTYPE *IsManaged )(
ICorDebugChain * This,
/* [out] */ BOOL *pManaged);
+ DECLSPEC_XFGVIRT(ICorDebugChain, EnumerateFrames)
HRESULT ( STDMETHODCALLTYPE *EnumerateFrames )(
ICorDebugChain * This,
/* [out] */ ICorDebugFrameEnum **ppFrames);
+ DECLSPEC_XFGVIRT(ICorDebugChain, GetActiveFrame)
HRESULT ( STDMETHODCALLTYPE *GetActiveFrame )(
ICorDebugChain * This,
/* [out] */ ICorDebugFrame **ppFrame);
+ DECLSPEC_XFGVIRT(ICorDebugChain, GetRegisterSet)
HRESULT ( STDMETHODCALLTYPE *GetRegisterSet )(
ICorDebugChain * This,
/* [out] */ ICorDebugRegisterSet **ppRegisters);
+ DECLSPEC_XFGVIRT(ICorDebugChain, GetReason)
HRESULT ( STDMETHODCALLTYPE *GetReason )(
ICorDebugChain * This,
/* [out] */ CorDebugChainReason *pReason);
#ifdef COBJMACROS
-#define ICorDebugChain_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugChain_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugChain_AddRef(This) \
+#define ICorDebugChain_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugChain_Release(This) \
+#define ICorDebugChain_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugChain_GetThread(This,ppThread) \
+#define ICorDebugChain_GetThread(This,ppThread) \
( (This)->lpVtbl -> GetThread(This,ppThread) )
-#define ICorDebugChain_GetStackRange(This,pStart,pEnd) \
+#define ICorDebugChain_GetStackRange(This,pStart,pEnd) \
( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) )
-#define ICorDebugChain_GetContext(This,ppContext) \
+#define ICorDebugChain_GetContext(This,ppContext) \
( (This)->lpVtbl -> GetContext(This,ppContext) )
-#define ICorDebugChain_GetCaller(This,ppChain) \
+#define ICorDebugChain_GetCaller(This,ppChain) \
( (This)->lpVtbl -> GetCaller(This,ppChain) )
-#define ICorDebugChain_GetCallee(This,ppChain) \
+#define ICorDebugChain_GetCallee(This,ppChain) \
( (This)->lpVtbl -> GetCallee(This,ppChain) )
-#define ICorDebugChain_GetPrevious(This,ppChain) \
+#define ICorDebugChain_GetPrevious(This,ppChain) \
( (This)->lpVtbl -> GetPrevious(This,ppChain) )
-#define ICorDebugChain_GetNext(This,ppChain) \
+#define ICorDebugChain_GetNext(This,ppChain) \
( (This)->lpVtbl -> GetNext(This,ppChain) )
-#define ICorDebugChain_IsManaged(This,pManaged) \
+#define ICorDebugChain_IsManaged(This,pManaged) \
( (This)->lpVtbl -> IsManaged(This,pManaged) )
-#define ICorDebugChain_EnumerateFrames(This,ppFrames) \
+#define ICorDebugChain_EnumerateFrames(This,ppFrames) \
( (This)->lpVtbl -> EnumerateFrames(This,ppFrames) )
-#define ICorDebugChain_GetActiveFrame(This,ppFrame) \
+#define ICorDebugChain_GetActiveFrame(This,ppFrame) \
( (This)->lpVtbl -> GetActiveFrame(This,ppFrame) )
-#define ICorDebugChain_GetRegisterSet(This,ppRegisters) \
+#define ICorDebugChain_GetRegisterSet(This,ppRegisters) \
( (This)->lpVtbl -> GetRegisterSet(This,ppRegisters) )
-#define ICorDebugChain_GetReason(This,pReason) \
+#define ICorDebugChain_GetReason(This,pReason) \
( (This)->lpVtbl -> GetReason(This,pReason) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugChain_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugChain_INTERFACE_DEFINED__ */
#ifndef __ICorDebugFrame_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugFrameVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugFrame * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugFrame * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugFrame * This);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetChain)
HRESULT ( STDMETHODCALLTYPE *GetChain )(
ICorDebugFrame * This,
/* [out] */ ICorDebugChain **ppChain);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetCode)
HRESULT ( STDMETHODCALLTYPE *GetCode )(
ICorDebugFrame * This,
/* [out] */ ICorDebugCode **ppCode);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetFunction)
HRESULT ( STDMETHODCALLTYPE *GetFunction )(
ICorDebugFrame * This,
/* [out] */ ICorDebugFunction **ppFunction);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetFunctionToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionToken )(
ICorDebugFrame * This,
/* [out] */ mdMethodDef *pToken);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetStackRange)
HRESULT ( STDMETHODCALLTYPE *GetStackRange )(
ICorDebugFrame * This,
/* [out] */ CORDB_ADDRESS *pStart,
/* [out] */ CORDB_ADDRESS *pEnd);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetCaller)
HRESULT ( STDMETHODCALLTYPE *GetCaller )(
ICorDebugFrame * This,
/* [out] */ ICorDebugFrame **ppFrame);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetCallee)
HRESULT ( STDMETHODCALLTYPE *GetCallee )(
ICorDebugFrame * This,
/* [out] */ ICorDebugFrame **ppFrame);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, CreateStepper)
HRESULT ( STDMETHODCALLTYPE *CreateStepper )(
ICorDebugFrame * This,
/* [out] */ ICorDebugStepper **ppStepper);
#ifdef COBJMACROS
-#define ICorDebugFrame_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugFrame_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugFrame_AddRef(This) \
+#define ICorDebugFrame_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugFrame_Release(This) \
+#define ICorDebugFrame_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugFrame_GetChain(This,ppChain) \
+#define ICorDebugFrame_GetChain(This,ppChain) \
( (This)->lpVtbl -> GetChain(This,ppChain) )
-#define ICorDebugFrame_GetCode(This,ppCode) \
+#define ICorDebugFrame_GetCode(This,ppCode) \
( (This)->lpVtbl -> GetCode(This,ppCode) )
-#define ICorDebugFrame_GetFunction(This,ppFunction) \
+#define ICorDebugFrame_GetFunction(This,ppFunction) \
( (This)->lpVtbl -> GetFunction(This,ppFunction) )
-#define ICorDebugFrame_GetFunctionToken(This,pToken) \
+#define ICorDebugFrame_GetFunctionToken(This,pToken) \
( (This)->lpVtbl -> GetFunctionToken(This,pToken) )
-#define ICorDebugFrame_GetStackRange(This,pStart,pEnd) \
+#define ICorDebugFrame_GetStackRange(This,pStart,pEnd) \
( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) )
-#define ICorDebugFrame_GetCaller(This,ppFrame) \
+#define ICorDebugFrame_GetCaller(This,ppFrame) \
( (This)->lpVtbl -> GetCaller(This,ppFrame) )
-#define ICorDebugFrame_GetCallee(This,ppFrame) \
+#define ICorDebugFrame_GetCallee(This,ppFrame) \
( (This)->lpVtbl -> GetCallee(This,ppFrame) )
-#define ICorDebugFrame_CreateStepper(This,ppStepper) \
+#define ICorDebugFrame_CreateStepper(This,ppStepper) \
( (This)->lpVtbl -> CreateStepper(This,ppStepper) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugFrame_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugFrame_INTERFACE_DEFINED__ */
#ifndef __ICorDebugInternalFrame_INTERFACE_DEFINED__
typedef
enum CorDebugInternalFrameType
{
- STUBFRAME_NONE = 0,
- STUBFRAME_M2U = 0x1,
- STUBFRAME_U2M = 0x2,
- STUBFRAME_APPDOMAIN_TRANSITION = 0x3,
- STUBFRAME_LIGHTWEIGHT_FUNCTION = 0x4,
- STUBFRAME_FUNC_EVAL = 0x5,
- STUBFRAME_INTERNALCALL = 0x6,
- STUBFRAME_CLASS_INIT = 0x7,
- STUBFRAME_EXCEPTION = 0x8,
- STUBFRAME_SECURITY = 0x9,
- STUBFRAME_JIT_COMPILATION = 0xa
- } CorDebugInternalFrameType;
+ STUBFRAME_NONE = 0,
+ STUBFRAME_M2U = 0x1,
+ STUBFRAME_U2M = 0x2,
+ STUBFRAME_APPDOMAIN_TRANSITION = 0x3,
+ STUBFRAME_LIGHTWEIGHT_FUNCTION = 0x4,
+ STUBFRAME_FUNC_EVAL = 0x5,
+ STUBFRAME_INTERNALCALL = 0x6,
+ STUBFRAME_CLASS_INIT = 0x7,
+ STUBFRAME_EXCEPTION = 0x8,
+ STUBFRAME_SECURITY = 0x9,
+ STUBFRAME_JIT_COMPILATION = 0xa
+ } CorDebugInternalFrameType;
EXTERN_C const IID IID_ICorDebugInternalFrame;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugInternalFrameVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugInternalFrame * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugInternalFrame * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugInternalFrame * This);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetChain)
HRESULT ( STDMETHODCALLTYPE *GetChain )(
ICorDebugInternalFrame * This,
/* [out] */ ICorDebugChain **ppChain);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetCode)
HRESULT ( STDMETHODCALLTYPE *GetCode )(
ICorDebugInternalFrame * This,
/* [out] */ ICorDebugCode **ppCode);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetFunction)
HRESULT ( STDMETHODCALLTYPE *GetFunction )(
ICorDebugInternalFrame * This,
/* [out] */ ICorDebugFunction **ppFunction);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetFunctionToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionToken )(
ICorDebugInternalFrame * This,
/* [out] */ mdMethodDef *pToken);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetStackRange)
HRESULT ( STDMETHODCALLTYPE *GetStackRange )(
ICorDebugInternalFrame * This,
/* [out] */ CORDB_ADDRESS *pStart,
/* [out] */ CORDB_ADDRESS *pEnd);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetCaller)
HRESULT ( STDMETHODCALLTYPE *GetCaller )(
ICorDebugInternalFrame * This,
/* [out] */ ICorDebugFrame **ppFrame);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetCallee)
HRESULT ( STDMETHODCALLTYPE *GetCallee )(
ICorDebugInternalFrame * This,
/* [out] */ ICorDebugFrame **ppFrame);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, CreateStepper)
HRESULT ( STDMETHODCALLTYPE *CreateStepper )(
ICorDebugInternalFrame * This,
/* [out] */ ICorDebugStepper **ppStepper);
+ DECLSPEC_XFGVIRT(ICorDebugInternalFrame, GetFrameType)
HRESULT ( STDMETHODCALLTYPE *GetFrameType )(
ICorDebugInternalFrame * This,
/* [out] */ CorDebugInternalFrameType *pType);
#ifdef COBJMACROS
-#define ICorDebugInternalFrame_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugInternalFrame_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugInternalFrame_AddRef(This) \
+#define ICorDebugInternalFrame_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugInternalFrame_Release(This) \
+#define ICorDebugInternalFrame_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugInternalFrame_GetChain(This,ppChain) \
+#define ICorDebugInternalFrame_GetChain(This,ppChain) \
( (This)->lpVtbl -> GetChain(This,ppChain) )
-#define ICorDebugInternalFrame_GetCode(This,ppCode) \
+#define ICorDebugInternalFrame_GetCode(This,ppCode) \
( (This)->lpVtbl -> GetCode(This,ppCode) )
-#define ICorDebugInternalFrame_GetFunction(This,ppFunction) \
+#define ICorDebugInternalFrame_GetFunction(This,ppFunction) \
( (This)->lpVtbl -> GetFunction(This,ppFunction) )
-#define ICorDebugInternalFrame_GetFunctionToken(This,pToken) \
+#define ICorDebugInternalFrame_GetFunctionToken(This,pToken) \
( (This)->lpVtbl -> GetFunctionToken(This,pToken) )
-#define ICorDebugInternalFrame_GetStackRange(This,pStart,pEnd) \
+#define ICorDebugInternalFrame_GetStackRange(This,pStart,pEnd) \
( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) )
-#define ICorDebugInternalFrame_GetCaller(This,ppFrame) \
+#define ICorDebugInternalFrame_GetCaller(This,ppFrame) \
( (This)->lpVtbl -> GetCaller(This,ppFrame) )
-#define ICorDebugInternalFrame_GetCallee(This,ppFrame) \
+#define ICorDebugInternalFrame_GetCallee(This,ppFrame) \
( (This)->lpVtbl -> GetCallee(This,ppFrame) )
-#define ICorDebugInternalFrame_CreateStepper(This,ppStepper) \
+#define ICorDebugInternalFrame_CreateStepper(This,ppStepper) \
( (This)->lpVtbl -> CreateStepper(This,ppStepper) )
-#define ICorDebugInternalFrame_GetFrameType(This,pType) \
+#define ICorDebugInternalFrame_GetFrameType(This,pType) \
( (This)->lpVtbl -> GetFrameType(This,pType) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugInternalFrame_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugInternalFrame_INTERFACE_DEFINED__ */
#ifndef __ICorDebugInternalFrame2_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugInternalFrame2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugInternalFrame2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugInternalFrame2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugInternalFrame2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugInternalFrame2, GetAddress)
HRESULT ( STDMETHODCALLTYPE *GetAddress )(
ICorDebugInternalFrame2 * This,
/* [out] */ CORDB_ADDRESS *pAddress);
+ DECLSPEC_XFGVIRT(ICorDebugInternalFrame2, IsCloserToLeaf)
HRESULT ( STDMETHODCALLTYPE *IsCloserToLeaf )(
ICorDebugInternalFrame2 * This,
/* [in] */ ICorDebugFrame *pFrameToCompare,
#ifdef COBJMACROS
-#define ICorDebugInternalFrame2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugInternalFrame2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugInternalFrame2_AddRef(This) \
+#define ICorDebugInternalFrame2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugInternalFrame2_Release(This) \
+#define ICorDebugInternalFrame2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugInternalFrame2_GetAddress(This,pAddress) \
+#define ICorDebugInternalFrame2_GetAddress(This,pAddress) \
( (This)->lpVtbl -> GetAddress(This,pAddress) )
-#define ICorDebugInternalFrame2_IsCloserToLeaf(This,pFrameToCompare,pIsCloser) \
+#define ICorDebugInternalFrame2_IsCloserToLeaf(This,pFrameToCompare,pIsCloser) \
( (This)->lpVtbl -> IsCloserToLeaf(This,pFrameToCompare,pIsCloser) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugInternalFrame2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugInternalFrame2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugILFrame_INTERFACE_DEFINED__
typedef
enum CorDebugMappingResult
{
- MAPPING_PROLOG = 0x1,
- MAPPING_EPILOG = 0x2,
- MAPPING_NO_INFO = 0x4,
- MAPPING_UNMAPPED_ADDRESS = 0x8,
- MAPPING_EXACT = 0x10,
- MAPPING_APPROXIMATE = 0x20
- } CorDebugMappingResult;
+ MAPPING_PROLOG = 0x1,
+ MAPPING_EPILOG = 0x2,
+ MAPPING_NO_INFO = 0x4,
+ MAPPING_UNMAPPED_ADDRESS = 0x8,
+ MAPPING_EXACT = 0x10,
+ MAPPING_APPROXIMATE = 0x20
+ } CorDebugMappingResult;
EXTERN_C const IID IID_ICorDebugILFrame;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugILFrameVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugILFrame * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugILFrame * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugILFrame * This);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetChain)
HRESULT ( STDMETHODCALLTYPE *GetChain )(
ICorDebugILFrame * This,
/* [out] */ ICorDebugChain **ppChain);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetCode)
HRESULT ( STDMETHODCALLTYPE *GetCode )(
ICorDebugILFrame * This,
/* [out] */ ICorDebugCode **ppCode);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetFunction)
HRESULT ( STDMETHODCALLTYPE *GetFunction )(
ICorDebugILFrame * This,
/* [out] */ ICorDebugFunction **ppFunction);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetFunctionToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionToken )(
ICorDebugILFrame * This,
/* [out] */ mdMethodDef *pToken);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetStackRange)
HRESULT ( STDMETHODCALLTYPE *GetStackRange )(
ICorDebugILFrame * This,
/* [out] */ CORDB_ADDRESS *pStart,
/* [out] */ CORDB_ADDRESS *pEnd);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetCaller)
HRESULT ( STDMETHODCALLTYPE *GetCaller )(
ICorDebugILFrame * This,
/* [out] */ ICorDebugFrame **ppFrame);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetCallee)
HRESULT ( STDMETHODCALLTYPE *GetCallee )(
ICorDebugILFrame * This,
/* [out] */ ICorDebugFrame **ppFrame);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, CreateStepper)
HRESULT ( STDMETHODCALLTYPE *CreateStepper )(
ICorDebugILFrame * This,
/* [out] */ ICorDebugStepper **ppStepper);
+ DECLSPEC_XFGVIRT(ICorDebugILFrame, GetIP)
HRESULT ( STDMETHODCALLTYPE *GetIP )(
ICorDebugILFrame * This,
/* [out] */ ULONG32 *pnOffset,
/* [out] */ CorDebugMappingResult *pMappingResult);
+ DECLSPEC_XFGVIRT(ICorDebugILFrame, SetIP)
HRESULT ( STDMETHODCALLTYPE *SetIP )(
ICorDebugILFrame * This,
/* [in] */ ULONG32 nOffset);
+ DECLSPEC_XFGVIRT(ICorDebugILFrame, EnumerateLocalVariables)
HRESULT ( STDMETHODCALLTYPE *EnumerateLocalVariables )(
ICorDebugILFrame * This,
/* [out] */ ICorDebugValueEnum **ppValueEnum);
+ DECLSPEC_XFGVIRT(ICorDebugILFrame, GetLocalVariable)
HRESULT ( STDMETHODCALLTYPE *GetLocalVariable )(
ICorDebugILFrame * This,
/* [in] */ DWORD dwIndex,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugILFrame, EnumerateArguments)
HRESULT ( STDMETHODCALLTYPE *EnumerateArguments )(
ICorDebugILFrame * This,
/* [out] */ ICorDebugValueEnum **ppValueEnum);
+ DECLSPEC_XFGVIRT(ICorDebugILFrame, GetArgument)
HRESULT ( STDMETHODCALLTYPE *GetArgument )(
ICorDebugILFrame * This,
/* [in] */ DWORD dwIndex,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugILFrame, GetStackDepth)
HRESULT ( STDMETHODCALLTYPE *GetStackDepth )(
ICorDebugILFrame * This,
/* [out] */ ULONG32 *pDepth);
+ DECLSPEC_XFGVIRT(ICorDebugILFrame, GetStackValue)
HRESULT ( STDMETHODCALLTYPE *GetStackValue )(
ICorDebugILFrame * This,
/* [in] */ DWORD dwIndex,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugILFrame, CanSetIP)
HRESULT ( STDMETHODCALLTYPE *CanSetIP )(
ICorDebugILFrame * This,
/* [in] */ ULONG32 nOffset);
#ifdef COBJMACROS
-#define ICorDebugILFrame_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugILFrame_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugILFrame_AddRef(This) \
+#define ICorDebugILFrame_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugILFrame_Release(This) \
+#define ICorDebugILFrame_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugILFrame_GetChain(This,ppChain) \
+#define ICorDebugILFrame_GetChain(This,ppChain) \
( (This)->lpVtbl -> GetChain(This,ppChain) )
-#define ICorDebugILFrame_GetCode(This,ppCode) \
+#define ICorDebugILFrame_GetCode(This,ppCode) \
( (This)->lpVtbl -> GetCode(This,ppCode) )
-#define ICorDebugILFrame_GetFunction(This,ppFunction) \
+#define ICorDebugILFrame_GetFunction(This,ppFunction) \
( (This)->lpVtbl -> GetFunction(This,ppFunction) )
-#define ICorDebugILFrame_GetFunctionToken(This,pToken) \
+#define ICorDebugILFrame_GetFunctionToken(This,pToken) \
( (This)->lpVtbl -> GetFunctionToken(This,pToken) )
-#define ICorDebugILFrame_GetStackRange(This,pStart,pEnd) \
+#define ICorDebugILFrame_GetStackRange(This,pStart,pEnd) \
( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) )
-#define ICorDebugILFrame_GetCaller(This,ppFrame) \
+#define ICorDebugILFrame_GetCaller(This,ppFrame) \
( (This)->lpVtbl -> GetCaller(This,ppFrame) )
-#define ICorDebugILFrame_GetCallee(This,ppFrame) \
+#define ICorDebugILFrame_GetCallee(This,ppFrame) \
( (This)->lpVtbl -> GetCallee(This,ppFrame) )
-#define ICorDebugILFrame_CreateStepper(This,ppStepper) \
+#define ICorDebugILFrame_CreateStepper(This,ppStepper) \
( (This)->lpVtbl -> CreateStepper(This,ppStepper) )
-#define ICorDebugILFrame_GetIP(This,pnOffset,pMappingResult) \
+#define ICorDebugILFrame_GetIP(This,pnOffset,pMappingResult) \
( (This)->lpVtbl -> GetIP(This,pnOffset,pMappingResult) )
-#define ICorDebugILFrame_SetIP(This,nOffset) \
+#define ICorDebugILFrame_SetIP(This,nOffset) \
( (This)->lpVtbl -> SetIP(This,nOffset) )
-#define ICorDebugILFrame_EnumerateLocalVariables(This,ppValueEnum) \
+#define ICorDebugILFrame_EnumerateLocalVariables(This,ppValueEnum) \
( (This)->lpVtbl -> EnumerateLocalVariables(This,ppValueEnum) )
-#define ICorDebugILFrame_GetLocalVariable(This,dwIndex,ppValue) \
+#define ICorDebugILFrame_GetLocalVariable(This,dwIndex,ppValue) \
( (This)->lpVtbl -> GetLocalVariable(This,dwIndex,ppValue) )
-#define ICorDebugILFrame_EnumerateArguments(This,ppValueEnum) \
+#define ICorDebugILFrame_EnumerateArguments(This,ppValueEnum) \
( (This)->lpVtbl -> EnumerateArguments(This,ppValueEnum) )
-#define ICorDebugILFrame_GetArgument(This,dwIndex,ppValue) \
+#define ICorDebugILFrame_GetArgument(This,dwIndex,ppValue) \
( (This)->lpVtbl -> GetArgument(This,dwIndex,ppValue) )
-#define ICorDebugILFrame_GetStackDepth(This,pDepth) \
+#define ICorDebugILFrame_GetStackDepth(This,pDepth) \
( (This)->lpVtbl -> GetStackDepth(This,pDepth) )
-#define ICorDebugILFrame_GetStackValue(This,dwIndex,ppValue) \
+#define ICorDebugILFrame_GetStackValue(This,dwIndex,ppValue) \
( (This)->lpVtbl -> GetStackValue(This,dwIndex,ppValue) )
-#define ICorDebugILFrame_CanSetIP(This,nOffset) \
+#define ICorDebugILFrame_CanSetIP(This,nOffset) \
( (This)->lpVtbl -> CanSetIP(This,nOffset) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugILFrame_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugILFrame_INTERFACE_DEFINED__ */
#ifndef __ICorDebugILFrame2_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugILFrame2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugILFrame2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugILFrame2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugILFrame2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugILFrame2, RemapFunction)
HRESULT ( STDMETHODCALLTYPE *RemapFunction )(
ICorDebugILFrame2 * This,
/* [in] */ ULONG32 newILOffset);
+ DECLSPEC_XFGVIRT(ICorDebugILFrame2, EnumerateTypeParameters)
HRESULT ( STDMETHODCALLTYPE *EnumerateTypeParameters )(
ICorDebugILFrame2 * This,
/* [out] */ ICorDebugTypeEnum **ppTyParEnum);
#ifdef COBJMACROS
-#define ICorDebugILFrame2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugILFrame2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugILFrame2_AddRef(This) \
+#define ICorDebugILFrame2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugILFrame2_Release(This) \
+#define ICorDebugILFrame2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugILFrame2_RemapFunction(This,newILOffset) \
+#define ICorDebugILFrame2_RemapFunction(This,newILOffset) \
( (This)->lpVtbl -> RemapFunction(This,newILOffset) )
-#define ICorDebugILFrame2_EnumerateTypeParameters(This,ppTyParEnum) \
+#define ICorDebugILFrame2_EnumerateTypeParameters(This,ppTyParEnum) \
( (This)->lpVtbl -> EnumerateTypeParameters(This,ppTyParEnum) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugILFrame2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugILFrame2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugILFrame3_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugILFrame3Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugILFrame3 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugILFrame3 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugILFrame3 * This);
+ DECLSPEC_XFGVIRT(ICorDebugILFrame3, GetReturnValueForILOffset)
HRESULT ( STDMETHODCALLTYPE *GetReturnValueForILOffset )(
ICorDebugILFrame3 * This,
ULONG32 ILoffset,
#ifdef COBJMACROS
-#define ICorDebugILFrame3_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugILFrame3_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugILFrame3_AddRef(This) \
+#define ICorDebugILFrame3_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugILFrame3_Release(This) \
+#define ICorDebugILFrame3_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugILFrame3_GetReturnValueForILOffset(This,ILoffset,ppReturnValue) \
+#define ICorDebugILFrame3_GetReturnValueForILOffset(This,ILoffset,ppReturnValue) \
( (This)->lpVtbl -> GetReturnValueForILOffset(This,ILoffset,ppReturnValue) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugILFrame3_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugILFrame3_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0070 */
typedef
enum ILCodeKind
{
- ILCODE_ORIGINAL_IL = 0x1,
- ILCODE_REJIT_IL = 0x2
- } ILCodeKind;
+ ILCODE_ORIGINAL_IL = 0x1,
+ ILCODE_REJIT_IL = 0x2
+ } ILCodeKind;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugILFrame4Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugILFrame4 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugILFrame4 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugILFrame4 * This);
+ DECLSPEC_XFGVIRT(ICorDebugILFrame4, EnumerateLocalVariablesEx)
HRESULT ( STDMETHODCALLTYPE *EnumerateLocalVariablesEx )(
ICorDebugILFrame4 * This,
/* [in] */ ILCodeKind flags,
/* [out] */ ICorDebugValueEnum **ppValueEnum);
+ DECLSPEC_XFGVIRT(ICorDebugILFrame4, GetLocalVariableEx)
HRESULT ( STDMETHODCALLTYPE *GetLocalVariableEx )(
ICorDebugILFrame4 * This,
/* [in] */ ILCodeKind flags,
/* [in] */ DWORD dwIndex,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugILFrame4, GetCodeEx)
HRESULT ( STDMETHODCALLTYPE *GetCodeEx )(
ICorDebugILFrame4 * This,
/* [in] */ ILCodeKind flags,
#ifdef COBJMACROS
-#define ICorDebugILFrame4_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugILFrame4_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugILFrame4_AddRef(This) \
+#define ICorDebugILFrame4_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugILFrame4_Release(This) \
+#define ICorDebugILFrame4_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugILFrame4_EnumerateLocalVariablesEx(This,flags,ppValueEnum) \
+#define ICorDebugILFrame4_EnumerateLocalVariablesEx(This,flags,ppValueEnum) \
( (This)->lpVtbl -> EnumerateLocalVariablesEx(This,flags,ppValueEnum) )
-#define ICorDebugILFrame4_GetLocalVariableEx(This,flags,dwIndex,ppValue) \
+#define ICorDebugILFrame4_GetLocalVariableEx(This,flags,dwIndex,ppValue) \
( (This)->lpVtbl -> GetLocalVariableEx(This,flags,dwIndex,ppValue) )
-#define ICorDebugILFrame4_GetCodeEx(This,flags,ppCode) \
+#define ICorDebugILFrame4_GetCodeEx(This,flags,ppCode) \
( (This)->lpVtbl -> GetCodeEx(This,flags,ppCode) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugILFrame4_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugILFrame4_INTERFACE_DEFINED__ */
#ifndef __ICorDebugNativeFrame_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugNativeFrameVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugNativeFrame * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugNativeFrame * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugNativeFrame * This);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetChain)
HRESULT ( STDMETHODCALLTYPE *GetChain )(
ICorDebugNativeFrame * This,
/* [out] */ ICorDebugChain **ppChain);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetCode)
HRESULT ( STDMETHODCALLTYPE *GetCode )(
ICorDebugNativeFrame * This,
/* [out] */ ICorDebugCode **ppCode);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetFunction)
HRESULT ( STDMETHODCALLTYPE *GetFunction )(
ICorDebugNativeFrame * This,
/* [out] */ ICorDebugFunction **ppFunction);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetFunctionToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionToken )(
ICorDebugNativeFrame * This,
/* [out] */ mdMethodDef *pToken);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetStackRange)
HRESULT ( STDMETHODCALLTYPE *GetStackRange )(
ICorDebugNativeFrame * This,
/* [out] */ CORDB_ADDRESS *pStart,
/* [out] */ CORDB_ADDRESS *pEnd);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetCaller)
HRESULT ( STDMETHODCALLTYPE *GetCaller )(
ICorDebugNativeFrame * This,
/* [out] */ ICorDebugFrame **ppFrame);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetCallee)
HRESULT ( STDMETHODCALLTYPE *GetCallee )(
ICorDebugNativeFrame * This,
/* [out] */ ICorDebugFrame **ppFrame);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, CreateStepper)
HRESULT ( STDMETHODCALLTYPE *CreateStepper )(
ICorDebugNativeFrame * This,
/* [out] */ ICorDebugStepper **ppStepper);
+ DECLSPEC_XFGVIRT(ICorDebugNativeFrame, GetIP)
HRESULT ( STDMETHODCALLTYPE *GetIP )(
ICorDebugNativeFrame * This,
/* [out] */ ULONG32 *pnOffset);
+ DECLSPEC_XFGVIRT(ICorDebugNativeFrame, SetIP)
HRESULT ( STDMETHODCALLTYPE *SetIP )(
ICorDebugNativeFrame * This,
/* [in] */ ULONG32 nOffset);
+ DECLSPEC_XFGVIRT(ICorDebugNativeFrame, GetRegisterSet)
HRESULT ( STDMETHODCALLTYPE *GetRegisterSet )(
ICorDebugNativeFrame * This,
/* [out] */ ICorDebugRegisterSet **ppRegisters);
+ DECLSPEC_XFGVIRT(ICorDebugNativeFrame, GetLocalRegisterValue)
HRESULT ( STDMETHODCALLTYPE *GetLocalRegisterValue )(
ICorDebugNativeFrame * This,
/* [in] */ CorDebugRegister reg,
/* [in] */ PCCOR_SIGNATURE pvSigBlob,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugNativeFrame, GetLocalDoubleRegisterValue)
HRESULT ( STDMETHODCALLTYPE *GetLocalDoubleRegisterValue )(
ICorDebugNativeFrame * This,
/* [in] */ CorDebugRegister highWordReg,
/* [in] */ PCCOR_SIGNATURE pvSigBlob,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugNativeFrame, GetLocalMemoryValue)
HRESULT ( STDMETHODCALLTYPE *GetLocalMemoryValue )(
ICorDebugNativeFrame * This,
/* [in] */ CORDB_ADDRESS address,
/* [in] */ PCCOR_SIGNATURE pvSigBlob,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugNativeFrame, GetLocalRegisterMemoryValue)
HRESULT ( STDMETHODCALLTYPE *GetLocalRegisterMemoryValue )(
ICorDebugNativeFrame * This,
/* [in] */ CorDebugRegister highWordReg,
/* [in] */ PCCOR_SIGNATURE pvSigBlob,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugNativeFrame, GetLocalMemoryRegisterValue)
HRESULT ( STDMETHODCALLTYPE *GetLocalMemoryRegisterValue )(
ICorDebugNativeFrame * This,
/* [in] */ CORDB_ADDRESS highWordAddress,
/* [in] */ PCCOR_SIGNATURE pvSigBlob,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugNativeFrame, CanSetIP)
HRESULT ( STDMETHODCALLTYPE *CanSetIP )(
ICorDebugNativeFrame * This,
/* [in] */ ULONG32 nOffset);
#ifdef COBJMACROS
-#define ICorDebugNativeFrame_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugNativeFrame_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugNativeFrame_AddRef(This) \
+#define ICorDebugNativeFrame_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugNativeFrame_Release(This) \
+#define ICorDebugNativeFrame_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugNativeFrame_GetChain(This,ppChain) \
+#define ICorDebugNativeFrame_GetChain(This,ppChain) \
( (This)->lpVtbl -> GetChain(This,ppChain) )
-#define ICorDebugNativeFrame_GetCode(This,ppCode) \
+#define ICorDebugNativeFrame_GetCode(This,ppCode) \
( (This)->lpVtbl -> GetCode(This,ppCode) )
-#define ICorDebugNativeFrame_GetFunction(This,ppFunction) \
+#define ICorDebugNativeFrame_GetFunction(This,ppFunction) \
( (This)->lpVtbl -> GetFunction(This,ppFunction) )
-#define ICorDebugNativeFrame_GetFunctionToken(This,pToken) \
+#define ICorDebugNativeFrame_GetFunctionToken(This,pToken) \
( (This)->lpVtbl -> GetFunctionToken(This,pToken) )
-#define ICorDebugNativeFrame_GetStackRange(This,pStart,pEnd) \
+#define ICorDebugNativeFrame_GetStackRange(This,pStart,pEnd) \
( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) )
-#define ICorDebugNativeFrame_GetCaller(This,ppFrame) \
+#define ICorDebugNativeFrame_GetCaller(This,ppFrame) \
( (This)->lpVtbl -> GetCaller(This,ppFrame) )
-#define ICorDebugNativeFrame_GetCallee(This,ppFrame) \
+#define ICorDebugNativeFrame_GetCallee(This,ppFrame) \
( (This)->lpVtbl -> GetCallee(This,ppFrame) )
-#define ICorDebugNativeFrame_CreateStepper(This,ppStepper) \
+#define ICorDebugNativeFrame_CreateStepper(This,ppStepper) \
( (This)->lpVtbl -> CreateStepper(This,ppStepper) )
-#define ICorDebugNativeFrame_GetIP(This,pnOffset) \
+#define ICorDebugNativeFrame_GetIP(This,pnOffset) \
( (This)->lpVtbl -> GetIP(This,pnOffset) )
-#define ICorDebugNativeFrame_SetIP(This,nOffset) \
+#define ICorDebugNativeFrame_SetIP(This,nOffset) \
( (This)->lpVtbl -> SetIP(This,nOffset) )
-#define ICorDebugNativeFrame_GetRegisterSet(This,ppRegisters) \
+#define ICorDebugNativeFrame_GetRegisterSet(This,ppRegisters) \
( (This)->lpVtbl -> GetRegisterSet(This,ppRegisters) )
-#define ICorDebugNativeFrame_GetLocalRegisterValue(This,reg,cbSigBlob,pvSigBlob,ppValue) \
+#define ICorDebugNativeFrame_GetLocalRegisterValue(This,reg,cbSigBlob,pvSigBlob,ppValue) \
( (This)->lpVtbl -> GetLocalRegisterValue(This,reg,cbSigBlob,pvSigBlob,ppValue) )
-#define ICorDebugNativeFrame_GetLocalDoubleRegisterValue(This,highWordReg,lowWordReg,cbSigBlob,pvSigBlob,ppValue) \
+#define ICorDebugNativeFrame_GetLocalDoubleRegisterValue(This,highWordReg,lowWordReg,cbSigBlob,pvSigBlob,ppValue) \
( (This)->lpVtbl -> GetLocalDoubleRegisterValue(This,highWordReg,lowWordReg,cbSigBlob,pvSigBlob,ppValue) )
-#define ICorDebugNativeFrame_GetLocalMemoryValue(This,address,cbSigBlob,pvSigBlob,ppValue) \
+#define ICorDebugNativeFrame_GetLocalMemoryValue(This,address,cbSigBlob,pvSigBlob,ppValue) \
( (This)->lpVtbl -> GetLocalMemoryValue(This,address,cbSigBlob,pvSigBlob,ppValue) )
-#define ICorDebugNativeFrame_GetLocalRegisterMemoryValue(This,highWordReg,lowWordAddress,cbSigBlob,pvSigBlob,ppValue) \
+#define ICorDebugNativeFrame_GetLocalRegisterMemoryValue(This,highWordReg,lowWordAddress,cbSigBlob,pvSigBlob,ppValue) \
( (This)->lpVtbl -> GetLocalRegisterMemoryValue(This,highWordReg,lowWordAddress,cbSigBlob,pvSigBlob,ppValue) )
-#define ICorDebugNativeFrame_GetLocalMemoryRegisterValue(This,highWordAddress,lowWordRegister,cbSigBlob,pvSigBlob,ppValue) \
+#define ICorDebugNativeFrame_GetLocalMemoryRegisterValue(This,highWordAddress,lowWordRegister,cbSigBlob,pvSigBlob,ppValue) \
( (This)->lpVtbl -> GetLocalMemoryRegisterValue(This,highWordAddress,lowWordRegister,cbSigBlob,pvSigBlob,ppValue) )
-#define ICorDebugNativeFrame_CanSetIP(This,nOffset) \
+#define ICorDebugNativeFrame_CanSetIP(This,nOffset) \
( (This)->lpVtbl -> CanSetIP(This,nOffset) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugNativeFrame_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugNativeFrame_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0072 */
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugNativeFrame2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugNativeFrame2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugNativeFrame2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugNativeFrame2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugNativeFrame2, IsChild)
HRESULT ( STDMETHODCALLTYPE *IsChild )(
ICorDebugNativeFrame2 * This,
/* [out] */ BOOL *pIsChild);
+ DECLSPEC_XFGVIRT(ICorDebugNativeFrame2, IsMatchingParentFrame)
HRESULT ( STDMETHODCALLTYPE *IsMatchingParentFrame )(
ICorDebugNativeFrame2 * This,
/* [in] */ ICorDebugNativeFrame2 *pPotentialParentFrame,
/* [out] */ BOOL *pIsParent);
+ DECLSPEC_XFGVIRT(ICorDebugNativeFrame2, GetStackParameterSize)
HRESULT ( STDMETHODCALLTYPE *GetStackParameterSize )(
ICorDebugNativeFrame2 * This,
/* [out] */ ULONG32 *pSize);
#ifdef COBJMACROS
-#define ICorDebugNativeFrame2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugNativeFrame2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugNativeFrame2_AddRef(This) \
+#define ICorDebugNativeFrame2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugNativeFrame2_Release(This) \
+#define ICorDebugNativeFrame2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugNativeFrame2_IsChild(This,pIsChild) \
+#define ICorDebugNativeFrame2_IsChild(This,pIsChild) \
( (This)->lpVtbl -> IsChild(This,pIsChild) )
-#define ICorDebugNativeFrame2_IsMatchingParentFrame(This,pPotentialParentFrame,pIsParent) \
+#define ICorDebugNativeFrame2_IsMatchingParentFrame(This,pPotentialParentFrame,pIsParent) \
( (This)->lpVtbl -> IsMatchingParentFrame(This,pPotentialParentFrame,pIsParent) )
-#define ICorDebugNativeFrame2_GetStackParameterSize(This,pSize) \
+#define ICorDebugNativeFrame2_GetStackParameterSize(This,pSize) \
( (This)->lpVtbl -> GetStackParameterSize(This,pSize) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugNativeFrame2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugNativeFrame2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugModule3_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugModule3Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugModule3 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugModule3 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugModule3 * This);
+ DECLSPEC_XFGVIRT(ICorDebugModule3, CreateReaderForInMemorySymbols)
HRESULT ( STDMETHODCALLTYPE *CreateReaderForInMemorySymbols )(
ICorDebugModule3 * This,
/* [in] */ REFIID riid,
#ifdef COBJMACROS
-#define ICorDebugModule3_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugModule3_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugModule3_AddRef(This) \
+#define ICorDebugModule3_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugModule3_Release(This) \
+#define ICorDebugModule3_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugModule3_CreateReaderForInMemorySymbols(This,riid,ppObj) \
+#define ICorDebugModule3_CreateReaderForInMemorySymbols(This,riid,ppObj) \
( (This)->lpVtbl -> CreateReaderForInMemorySymbols(This,riid,ppObj) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugModule3_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugModule3_INTERFACE_DEFINED__ */
#ifndef __ICorDebugModule4_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugModule4Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugModule4 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugModule4 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugModule4 * This);
+ DECLSPEC_XFGVIRT(ICorDebugModule4, IsMappedLayout)
HRESULT ( STDMETHODCALLTYPE *IsMappedLayout )(
ICorDebugModule4 * This,
/* [out] */ BOOL *pIsMapped);
#ifdef COBJMACROS
-#define ICorDebugModule4_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugModule4_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugModule4_AddRef(This) \
+#define ICorDebugModule4_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugModule4_Release(This) \
+#define ICorDebugModule4_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugModule4_IsMappedLayout(This,pIsMapped) \
+#define ICorDebugModule4_IsMappedLayout(This,pIsMapped) \
( (This)->lpVtbl -> IsMappedLayout(This,pIsMapped) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugModule4_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugModule4_INTERFACE_DEFINED__ */
#ifndef __ICorDebugRuntimeUnwindableFrame_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugRuntimeUnwindableFrameVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugRuntimeUnwindableFrame * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugRuntimeUnwindableFrame * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugRuntimeUnwindableFrame * This);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetChain)
HRESULT ( STDMETHODCALLTYPE *GetChain )(
ICorDebugRuntimeUnwindableFrame * This,
/* [out] */ ICorDebugChain **ppChain);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetCode)
HRESULT ( STDMETHODCALLTYPE *GetCode )(
ICorDebugRuntimeUnwindableFrame * This,
/* [out] */ ICorDebugCode **ppCode);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetFunction)
HRESULT ( STDMETHODCALLTYPE *GetFunction )(
ICorDebugRuntimeUnwindableFrame * This,
/* [out] */ ICorDebugFunction **ppFunction);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetFunctionToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionToken )(
ICorDebugRuntimeUnwindableFrame * This,
/* [out] */ mdMethodDef *pToken);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetStackRange)
HRESULT ( STDMETHODCALLTYPE *GetStackRange )(
ICorDebugRuntimeUnwindableFrame * This,
/* [out] */ CORDB_ADDRESS *pStart,
/* [out] */ CORDB_ADDRESS *pEnd);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetCaller)
HRESULT ( STDMETHODCALLTYPE *GetCaller )(
ICorDebugRuntimeUnwindableFrame * This,
/* [out] */ ICorDebugFrame **ppFrame);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, GetCallee)
HRESULT ( STDMETHODCALLTYPE *GetCallee )(
ICorDebugRuntimeUnwindableFrame * This,
/* [out] */ ICorDebugFrame **ppFrame);
+ DECLSPEC_XFGVIRT(ICorDebugFrame, CreateStepper)
HRESULT ( STDMETHODCALLTYPE *CreateStepper )(
ICorDebugRuntimeUnwindableFrame * This,
/* [out] */ ICorDebugStepper **ppStepper);
#ifdef COBJMACROS
-#define ICorDebugRuntimeUnwindableFrame_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugRuntimeUnwindableFrame_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugRuntimeUnwindableFrame_AddRef(This) \
+#define ICorDebugRuntimeUnwindableFrame_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugRuntimeUnwindableFrame_Release(This) \
+#define ICorDebugRuntimeUnwindableFrame_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugRuntimeUnwindableFrame_GetChain(This,ppChain) \
+#define ICorDebugRuntimeUnwindableFrame_GetChain(This,ppChain) \
( (This)->lpVtbl -> GetChain(This,ppChain) )
-#define ICorDebugRuntimeUnwindableFrame_GetCode(This,ppCode) \
+#define ICorDebugRuntimeUnwindableFrame_GetCode(This,ppCode) \
( (This)->lpVtbl -> GetCode(This,ppCode) )
-#define ICorDebugRuntimeUnwindableFrame_GetFunction(This,ppFunction) \
+#define ICorDebugRuntimeUnwindableFrame_GetFunction(This,ppFunction) \
( (This)->lpVtbl -> GetFunction(This,ppFunction) )
-#define ICorDebugRuntimeUnwindableFrame_GetFunctionToken(This,pToken) \
+#define ICorDebugRuntimeUnwindableFrame_GetFunctionToken(This,pToken) \
( (This)->lpVtbl -> GetFunctionToken(This,pToken) )
-#define ICorDebugRuntimeUnwindableFrame_GetStackRange(This,pStart,pEnd) \
+#define ICorDebugRuntimeUnwindableFrame_GetStackRange(This,pStart,pEnd) \
( (This)->lpVtbl -> GetStackRange(This,pStart,pEnd) )
-#define ICorDebugRuntimeUnwindableFrame_GetCaller(This,ppFrame) \
+#define ICorDebugRuntimeUnwindableFrame_GetCaller(This,ppFrame) \
( (This)->lpVtbl -> GetCaller(This,ppFrame) )
-#define ICorDebugRuntimeUnwindableFrame_GetCallee(This,ppFrame) \
+#define ICorDebugRuntimeUnwindableFrame_GetCallee(This,ppFrame) \
( (This)->lpVtbl -> GetCallee(This,ppFrame) )
-#define ICorDebugRuntimeUnwindableFrame_CreateStepper(This,ppStepper) \
+#define ICorDebugRuntimeUnwindableFrame_CreateStepper(This,ppStepper) \
( (This)->lpVtbl -> CreateStepper(This,ppStepper) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugRuntimeUnwindableFrame_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugRuntimeUnwindableFrame_INTERFACE_DEFINED__ */
#ifndef __ICorDebugModule_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugModuleVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugModule * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugModule * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugModule * This);
+ DECLSPEC_XFGVIRT(ICorDebugModule, GetProcess)
HRESULT ( STDMETHODCALLTYPE *GetProcess )(
ICorDebugModule * This,
/* [out] */ ICorDebugProcess **ppProcess);
+ DECLSPEC_XFGVIRT(ICorDebugModule, GetBaseAddress)
HRESULT ( STDMETHODCALLTYPE *GetBaseAddress )(
ICorDebugModule * This,
/* [out] */ CORDB_ADDRESS *pAddress);
+ DECLSPEC_XFGVIRT(ICorDebugModule, GetAssembly)
HRESULT ( STDMETHODCALLTYPE *GetAssembly )(
ICorDebugModule * This,
/* [out] */ ICorDebugAssembly **ppAssembly);
+ DECLSPEC_XFGVIRT(ICorDebugModule, GetName)
HRESULT ( STDMETHODCALLTYPE *GetName )(
ICorDebugModule * This,
/* [in] */ ULONG32 cchName,
/* [out] */ ULONG32 *pcchName,
/* [length_is][size_is][out] */ WCHAR szName[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugModule, EnableJITDebugging)
HRESULT ( STDMETHODCALLTYPE *EnableJITDebugging )(
ICorDebugModule * This,
/* [in] */ BOOL bTrackJITInfo,
/* [in] */ BOOL bAllowJitOpts);
+ DECLSPEC_XFGVIRT(ICorDebugModule, EnableClassLoadCallbacks)
HRESULT ( STDMETHODCALLTYPE *EnableClassLoadCallbacks )(
ICorDebugModule * This,
/* [in] */ BOOL bClassLoadCallbacks);
+ DECLSPEC_XFGVIRT(ICorDebugModule, GetFunctionFromToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )(
ICorDebugModule * This,
/* [in] */ mdMethodDef methodDef,
/* [out] */ ICorDebugFunction **ppFunction);
+ DECLSPEC_XFGVIRT(ICorDebugModule, GetFunctionFromRVA)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromRVA )(
ICorDebugModule * This,
/* [in] */ CORDB_ADDRESS rva,
/* [out] */ ICorDebugFunction **ppFunction);
+ DECLSPEC_XFGVIRT(ICorDebugModule, GetClassFromToken)
HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )(
ICorDebugModule * This,
/* [in] */ mdTypeDef typeDef,
/* [out] */ ICorDebugClass **ppClass);
+ DECLSPEC_XFGVIRT(ICorDebugModule, CreateBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )(
ICorDebugModule * This,
/* [out] */ ICorDebugModuleBreakpoint **ppBreakpoint);
+ DECLSPEC_XFGVIRT(ICorDebugModule, GetEditAndContinueSnapshot)
HRESULT ( STDMETHODCALLTYPE *GetEditAndContinueSnapshot )(
ICorDebugModule * This,
/* [out] */ ICorDebugEditAndContinueSnapshot **ppEditAndContinueSnapshot);
+ DECLSPEC_XFGVIRT(ICorDebugModule, GetMetaDataInterface)
HRESULT ( STDMETHODCALLTYPE *GetMetaDataInterface )(
ICorDebugModule * This,
/* [in] */ REFIID riid,
/* [out] */ IUnknown **ppObj);
+ DECLSPEC_XFGVIRT(ICorDebugModule, GetToken)
HRESULT ( STDMETHODCALLTYPE *GetToken )(
ICorDebugModule * This,
/* [out] */ mdModule *pToken);
+ DECLSPEC_XFGVIRT(ICorDebugModule, IsDynamic)
HRESULT ( STDMETHODCALLTYPE *IsDynamic )(
ICorDebugModule * This,
/* [out] */ BOOL *pDynamic);
+ DECLSPEC_XFGVIRT(ICorDebugModule, GetGlobalVariableValue)
HRESULT ( STDMETHODCALLTYPE *GetGlobalVariableValue )(
ICorDebugModule * This,
/* [in] */ mdFieldDef fieldDef,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugModule, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugModule * This,
/* [out] */ ULONG32 *pcBytes);
+ DECLSPEC_XFGVIRT(ICorDebugModule, IsInMemory)
HRESULT ( STDMETHODCALLTYPE *IsInMemory )(
ICorDebugModule * This,
/* [out] */ BOOL *pInMemory);
#ifdef COBJMACROS
-#define ICorDebugModule_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugModule_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugModule_AddRef(This) \
+#define ICorDebugModule_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugModule_Release(This) \
+#define ICorDebugModule_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugModule_GetProcess(This,ppProcess) \
+#define ICorDebugModule_GetProcess(This,ppProcess) \
( (This)->lpVtbl -> GetProcess(This,ppProcess) )
-#define ICorDebugModule_GetBaseAddress(This,pAddress) \
+#define ICorDebugModule_GetBaseAddress(This,pAddress) \
( (This)->lpVtbl -> GetBaseAddress(This,pAddress) )
-#define ICorDebugModule_GetAssembly(This,ppAssembly) \
+#define ICorDebugModule_GetAssembly(This,ppAssembly) \
( (This)->lpVtbl -> GetAssembly(This,ppAssembly) )
-#define ICorDebugModule_GetName(This,cchName,pcchName,szName) \
+#define ICorDebugModule_GetName(This,cchName,pcchName,szName) \
( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) )
-#define ICorDebugModule_EnableJITDebugging(This,bTrackJITInfo,bAllowJitOpts) \
+#define ICorDebugModule_EnableJITDebugging(This,bTrackJITInfo,bAllowJitOpts) \
( (This)->lpVtbl -> EnableJITDebugging(This,bTrackJITInfo,bAllowJitOpts) )
-#define ICorDebugModule_EnableClassLoadCallbacks(This,bClassLoadCallbacks) \
+#define ICorDebugModule_EnableClassLoadCallbacks(This,bClassLoadCallbacks) \
( (This)->lpVtbl -> EnableClassLoadCallbacks(This,bClassLoadCallbacks) )
-#define ICorDebugModule_GetFunctionFromToken(This,methodDef,ppFunction) \
+#define ICorDebugModule_GetFunctionFromToken(This,methodDef,ppFunction) \
( (This)->lpVtbl -> GetFunctionFromToken(This,methodDef,ppFunction) )
-#define ICorDebugModule_GetFunctionFromRVA(This,rva,ppFunction) \
+#define ICorDebugModule_GetFunctionFromRVA(This,rva,ppFunction) \
( (This)->lpVtbl -> GetFunctionFromRVA(This,rva,ppFunction) )
-#define ICorDebugModule_GetClassFromToken(This,typeDef,ppClass) \
+#define ICorDebugModule_GetClassFromToken(This,typeDef,ppClass) \
( (This)->lpVtbl -> GetClassFromToken(This,typeDef,ppClass) )
-#define ICorDebugModule_CreateBreakpoint(This,ppBreakpoint) \
+#define ICorDebugModule_CreateBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) )
-#define ICorDebugModule_GetEditAndContinueSnapshot(This,ppEditAndContinueSnapshot) \
+#define ICorDebugModule_GetEditAndContinueSnapshot(This,ppEditAndContinueSnapshot) \
( (This)->lpVtbl -> GetEditAndContinueSnapshot(This,ppEditAndContinueSnapshot) )
-#define ICorDebugModule_GetMetaDataInterface(This,riid,ppObj) \
+#define ICorDebugModule_GetMetaDataInterface(This,riid,ppObj) \
( (This)->lpVtbl -> GetMetaDataInterface(This,riid,ppObj) )
-#define ICorDebugModule_GetToken(This,pToken) \
+#define ICorDebugModule_GetToken(This,pToken) \
( (This)->lpVtbl -> GetToken(This,pToken) )
-#define ICorDebugModule_IsDynamic(This,pDynamic) \
+#define ICorDebugModule_IsDynamic(This,pDynamic) \
( (This)->lpVtbl -> IsDynamic(This,pDynamic) )
-#define ICorDebugModule_GetGlobalVariableValue(This,fieldDef,ppValue) \
+#define ICorDebugModule_GetGlobalVariableValue(This,fieldDef,ppValue) \
( (This)->lpVtbl -> GetGlobalVariableValue(This,fieldDef,ppValue) )
-#define ICorDebugModule_GetSize(This,pcBytes) \
+#define ICorDebugModule_GetSize(This,pcBytes) \
( (This)->lpVtbl -> GetSize(This,pcBytes) )
-#define ICorDebugModule_IsInMemory(This,pInMemory) \
+#define ICorDebugModule_IsInMemory(This,pInMemory) \
( (This)->lpVtbl -> IsInMemory(This,pInMemory) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugModule_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugModule_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_cordebug_0000_0077 */
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugModule2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugModule2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugModule2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugModule2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugModule2, SetJMCStatus)
HRESULT ( STDMETHODCALLTYPE *SetJMCStatus )(
ICorDebugModule2 * This,
/* [in] */ BOOL bIsJustMyCode,
/* [in] */ ULONG32 cTokens,
/* [size_is][in] */ mdToken pTokens[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugModule2, ApplyChanges)
HRESULT ( STDMETHODCALLTYPE *ApplyChanges )(
ICorDebugModule2 * This,
/* [in] */ ULONG cbMetadata,
/* [in] */ ULONG cbIL,
/* [size_is][in] */ BYTE pbIL[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugModule2, SetJITCompilerFlags)
HRESULT ( STDMETHODCALLTYPE *SetJITCompilerFlags )(
ICorDebugModule2 * This,
/* [in] */ DWORD dwFlags);
+ DECLSPEC_XFGVIRT(ICorDebugModule2, GetJITCompilerFlags)
HRESULT ( STDMETHODCALLTYPE *GetJITCompilerFlags )(
ICorDebugModule2 * This,
/* [out] */ DWORD *pdwFlags);
+ DECLSPEC_XFGVIRT(ICorDebugModule2, ResolveAssembly)
HRESULT ( STDMETHODCALLTYPE *ResolveAssembly )(
ICorDebugModule2 * This,
/* [in] */ mdToken tkAssemblyRef,
#ifdef COBJMACROS
-#define ICorDebugModule2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugModule2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugModule2_AddRef(This) \
+#define ICorDebugModule2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugModule2_Release(This) \
+#define ICorDebugModule2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugModule2_SetJMCStatus(This,bIsJustMyCode,cTokens,pTokens) \
+#define ICorDebugModule2_SetJMCStatus(This,bIsJustMyCode,cTokens,pTokens) \
( (This)->lpVtbl -> SetJMCStatus(This,bIsJustMyCode,cTokens,pTokens) )
-#define ICorDebugModule2_ApplyChanges(This,cbMetadata,pbMetadata,cbIL,pbIL) \
+#define ICorDebugModule2_ApplyChanges(This,cbMetadata,pbMetadata,cbIL,pbIL) \
( (This)->lpVtbl -> ApplyChanges(This,cbMetadata,pbMetadata,cbIL,pbIL) )
-#define ICorDebugModule2_SetJITCompilerFlags(This,dwFlags) \
+#define ICorDebugModule2_SetJITCompilerFlags(This,dwFlags) \
( (This)->lpVtbl -> SetJITCompilerFlags(This,dwFlags) )
-#define ICorDebugModule2_GetJITCompilerFlags(This,pdwFlags) \
+#define ICorDebugModule2_GetJITCompilerFlags(This,pdwFlags) \
( (This)->lpVtbl -> GetJITCompilerFlags(This,pdwFlags) )
-#define ICorDebugModule2_ResolveAssembly(This,tkAssemblyRef,ppAssembly) \
+#define ICorDebugModule2_ResolveAssembly(This,tkAssemblyRef,ppAssembly) \
( (This)->lpVtbl -> ResolveAssembly(This,tkAssemblyRef,ppAssembly) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugModule2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugModule2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugFunction_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugFunctionVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugFunction * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugFunction * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugFunction * This);
+ DECLSPEC_XFGVIRT(ICorDebugFunction, GetModule)
HRESULT ( STDMETHODCALLTYPE *GetModule )(
ICorDebugFunction * This,
/* [out] */ ICorDebugModule **ppModule);
+ DECLSPEC_XFGVIRT(ICorDebugFunction, GetClass)
HRESULT ( STDMETHODCALLTYPE *GetClass )(
ICorDebugFunction * This,
/* [out] */ ICorDebugClass **ppClass);
+ DECLSPEC_XFGVIRT(ICorDebugFunction, GetToken)
HRESULT ( STDMETHODCALLTYPE *GetToken )(
ICorDebugFunction * This,
/* [out] */ mdMethodDef *pMethodDef);
+ DECLSPEC_XFGVIRT(ICorDebugFunction, GetILCode)
HRESULT ( STDMETHODCALLTYPE *GetILCode )(
ICorDebugFunction * This,
/* [out] */ ICorDebugCode **ppCode);
+ DECLSPEC_XFGVIRT(ICorDebugFunction, GetNativeCode)
HRESULT ( STDMETHODCALLTYPE *GetNativeCode )(
ICorDebugFunction * This,
/* [out] */ ICorDebugCode **ppCode);
+ DECLSPEC_XFGVIRT(ICorDebugFunction, CreateBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )(
ICorDebugFunction * This,
/* [out] */ ICorDebugFunctionBreakpoint **ppBreakpoint);
+ DECLSPEC_XFGVIRT(ICorDebugFunction, GetLocalVarSigToken)
HRESULT ( STDMETHODCALLTYPE *GetLocalVarSigToken )(
ICorDebugFunction * This,
/* [out] */ mdSignature *pmdSig);
+ DECLSPEC_XFGVIRT(ICorDebugFunction, GetCurrentVersionNumber)
HRESULT ( STDMETHODCALLTYPE *GetCurrentVersionNumber )(
ICorDebugFunction * This,
/* [out] */ ULONG32 *pnCurrentVersion);
#ifdef COBJMACROS
-#define ICorDebugFunction_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugFunction_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugFunction_AddRef(This) \
+#define ICorDebugFunction_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugFunction_Release(This) \
+#define ICorDebugFunction_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugFunction_GetModule(This,ppModule) \
+#define ICorDebugFunction_GetModule(This,ppModule) \
( (This)->lpVtbl -> GetModule(This,ppModule) )
-#define ICorDebugFunction_GetClass(This,ppClass) \
+#define ICorDebugFunction_GetClass(This,ppClass) \
( (This)->lpVtbl -> GetClass(This,ppClass) )
-#define ICorDebugFunction_GetToken(This,pMethodDef) \
+#define ICorDebugFunction_GetToken(This,pMethodDef) \
( (This)->lpVtbl -> GetToken(This,pMethodDef) )
-#define ICorDebugFunction_GetILCode(This,ppCode) \
+#define ICorDebugFunction_GetILCode(This,ppCode) \
( (This)->lpVtbl -> GetILCode(This,ppCode) )
-#define ICorDebugFunction_GetNativeCode(This,ppCode) \
+#define ICorDebugFunction_GetNativeCode(This,ppCode) \
( (This)->lpVtbl -> GetNativeCode(This,ppCode) )
-#define ICorDebugFunction_CreateBreakpoint(This,ppBreakpoint) \
+#define ICorDebugFunction_CreateBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) )
-#define ICorDebugFunction_GetLocalVarSigToken(This,pmdSig) \
+#define ICorDebugFunction_GetLocalVarSigToken(This,pmdSig) \
( (This)->lpVtbl -> GetLocalVarSigToken(This,pmdSig) )
-#define ICorDebugFunction_GetCurrentVersionNumber(This,pnCurrentVersion) \
+#define ICorDebugFunction_GetCurrentVersionNumber(This,pnCurrentVersion) \
( (This)->lpVtbl -> GetCurrentVersionNumber(This,pnCurrentVersion) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugFunction_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugFunction_INTERFACE_DEFINED__ */
#ifndef __ICorDebugFunction2_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugFunction2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugFunction2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugFunction2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugFunction2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugFunction2, SetJMCStatus)
HRESULT ( STDMETHODCALLTYPE *SetJMCStatus )(
ICorDebugFunction2 * This,
/* [in] */ BOOL bIsJustMyCode);
+ DECLSPEC_XFGVIRT(ICorDebugFunction2, GetJMCStatus)
HRESULT ( STDMETHODCALLTYPE *GetJMCStatus )(
ICorDebugFunction2 * This,
/* [out] */ BOOL *pbIsJustMyCode);
+ DECLSPEC_XFGVIRT(ICorDebugFunction2, EnumerateNativeCode)
HRESULT ( STDMETHODCALLTYPE *EnumerateNativeCode )(
ICorDebugFunction2 * This,
/* [out] */ ICorDebugCodeEnum **ppCodeEnum);
+ DECLSPEC_XFGVIRT(ICorDebugFunction2, GetVersionNumber)
HRESULT ( STDMETHODCALLTYPE *GetVersionNumber )(
ICorDebugFunction2 * This,
/* [out] */ ULONG32 *pnVersion);
#ifdef COBJMACROS
-#define ICorDebugFunction2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugFunction2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugFunction2_AddRef(This) \
+#define ICorDebugFunction2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugFunction2_Release(This) \
+#define ICorDebugFunction2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugFunction2_SetJMCStatus(This,bIsJustMyCode) \
+#define ICorDebugFunction2_SetJMCStatus(This,bIsJustMyCode) \
( (This)->lpVtbl -> SetJMCStatus(This,bIsJustMyCode) )
-#define ICorDebugFunction2_GetJMCStatus(This,pbIsJustMyCode) \
+#define ICorDebugFunction2_GetJMCStatus(This,pbIsJustMyCode) \
( (This)->lpVtbl -> GetJMCStatus(This,pbIsJustMyCode) )
-#define ICorDebugFunction2_EnumerateNativeCode(This,ppCodeEnum) \
+#define ICorDebugFunction2_EnumerateNativeCode(This,ppCodeEnum) \
( (This)->lpVtbl -> EnumerateNativeCode(This,ppCodeEnum) )
-#define ICorDebugFunction2_GetVersionNumber(This,pnVersion) \
+#define ICorDebugFunction2_GetVersionNumber(This,pnVersion) \
( (This)->lpVtbl -> GetVersionNumber(This,pnVersion) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugFunction2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugFunction2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugFunction3_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugFunction3Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugFunction3 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugFunction3 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugFunction3 * This);
+ DECLSPEC_XFGVIRT(ICorDebugFunction3, GetActiveReJitRequestILCode)
HRESULT ( STDMETHODCALLTYPE *GetActiveReJitRequestILCode )(
ICorDebugFunction3 * This,
ICorDebugILCode **ppReJitedILCode);
#ifdef COBJMACROS
-#define ICorDebugFunction3_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugFunction3_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugFunction3_AddRef(This) \
+#define ICorDebugFunction3_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugFunction3_Release(This) \
+#define ICorDebugFunction3_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugFunction3_GetActiveReJitRequestILCode(This,ppReJitedILCode) \
+#define ICorDebugFunction3_GetActiveReJitRequestILCode(This,ppReJitedILCode) \
( (This)->lpVtbl -> GetActiveReJitRequestILCode(This,ppReJitedILCode) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugFunction3_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugFunction3_INTERFACE_DEFINED__ */
#ifndef __ICorDebugFunction4_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugFunction4Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugFunction4 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugFunction4 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugFunction4 * This);
+ DECLSPEC_XFGVIRT(ICorDebugFunction4, CreateNativeBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateNativeBreakpoint )(
ICorDebugFunction4 * This,
ICorDebugFunctionBreakpoint **ppBreakpoint);
#ifdef COBJMACROS
-#define ICorDebugFunction4_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugFunction4_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugFunction4_AddRef(This) \
+#define ICorDebugFunction4_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugFunction4_Release(This) \
+#define ICorDebugFunction4_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugFunction4_CreateNativeBreakpoint(This,ppBreakpoint) \
+#define ICorDebugFunction4_CreateNativeBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateNativeBreakpoint(This,ppBreakpoint) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
+
+
+
+
+#endif /* __ICorDebugFunction4_INTERFACE_DEFINED__ */
+
+
+#ifndef __ICorDebugFunction5_INTERFACE_DEFINED__
+#define __ICorDebugFunction5_INTERFACE_DEFINED__
+
+/* interface ICorDebugFunction5 */
+/* [unique][uuid][local][object] */
+
+
+EXTERN_C const IID IID_ICorDebugFunction5;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("9D4DAB7B-3401-4F37-BD08-CA09F3FDF10F")
+ ICorDebugFunction5 : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE DisableOptimizations( void) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE AreOptimizationsDisabled(
+ BOOL *pOptimizationsDisabled) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct ICorDebugFunction5Vtbl
+ {
+ BEGIN_INTERFACE
+
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ ICorDebugFunction5 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ ICorDebugFunction5 * This);
+
+ DECLSPEC_XFGVIRT(IUnknown, Release)
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ ICorDebugFunction5 * This);
+
+ DECLSPEC_XFGVIRT(ICorDebugFunction5, DisableOptimizations)
+ HRESULT ( STDMETHODCALLTYPE *DisableOptimizations )(
+ ICorDebugFunction5 * This);
+
+ DECLSPEC_XFGVIRT(ICorDebugFunction5, AreOptimizationsDisabled)
+ HRESULT ( STDMETHODCALLTYPE *AreOptimizationsDisabled )(
+ ICorDebugFunction5 * This,
+ BOOL *pOptimizationsDisabled);
+
+ END_INTERFACE
+ } ICorDebugFunction5Vtbl;
+
+ interface ICorDebugFunction5
+ {
+ CONST_VTBL struct ICorDebugFunction5Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define ICorDebugFunction5_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define ICorDebugFunction5_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define ICorDebugFunction5_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define ICorDebugFunction5_DisableOptimizations(This) \
+ ( (This)->lpVtbl -> DisableOptimizations(This) )
+
+#define ICorDebugFunction5_AreOptimizationsDisabled(This,pOptimizationsDisabled) \
+ ( (This)->lpVtbl -> AreOptimizationsDisabled(This,pOptimizationsDisabled) )
+
+#endif /* COBJMACROS */
+#endif /* C style interface */
-#endif /* __ICorDebugFunction4_INTERFACE_DEFINED__ */
+
+
+#endif /* __ICorDebugFunction5_INTERFACE_DEFINED__ */
#ifndef __ICorDebugCode_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugCodeVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugCode * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugCode * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugCode * This);
+ DECLSPEC_XFGVIRT(ICorDebugCode, IsIL)
HRESULT ( STDMETHODCALLTYPE *IsIL )(
ICorDebugCode * This,
/* [out] */ BOOL *pbIL);
+ DECLSPEC_XFGVIRT(ICorDebugCode, GetFunction)
HRESULT ( STDMETHODCALLTYPE *GetFunction )(
ICorDebugCode * This,
/* [out] */ ICorDebugFunction **ppFunction);
+ DECLSPEC_XFGVIRT(ICorDebugCode, GetAddress)
HRESULT ( STDMETHODCALLTYPE *GetAddress )(
ICorDebugCode * This,
/* [out] */ CORDB_ADDRESS *pStart);
+ DECLSPEC_XFGVIRT(ICorDebugCode, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugCode * This,
/* [out] */ ULONG32 *pcBytes);
+ DECLSPEC_XFGVIRT(ICorDebugCode, CreateBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )(
ICorDebugCode * This,
/* [in] */ ULONG32 offset,
/* [out] */ ICorDebugFunctionBreakpoint **ppBreakpoint);
+ DECLSPEC_XFGVIRT(ICorDebugCode, GetCode)
HRESULT ( STDMETHODCALLTYPE *GetCode )(
ICorDebugCode * This,
/* [in] */ ULONG32 startOffset,
/* [length_is][size_is][out] */ BYTE buffer[ ],
/* [out] */ ULONG32 *pcBufferSize);
+ DECLSPEC_XFGVIRT(ICorDebugCode, GetVersionNumber)
HRESULT ( STDMETHODCALLTYPE *GetVersionNumber )(
ICorDebugCode * This,
/* [out] */ ULONG32 *nVersion);
+ DECLSPEC_XFGVIRT(ICorDebugCode, GetILToNativeMapping)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )(
ICorDebugCode * This,
/* [in] */ ULONG32 cMap,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugCode, GetEnCRemapSequencePoints)
HRESULT ( STDMETHODCALLTYPE *GetEnCRemapSequencePoints )(
ICorDebugCode * This,
/* [in] */ ULONG32 cMap,
#ifdef COBJMACROS
-#define ICorDebugCode_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugCode_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugCode_AddRef(This) \
+#define ICorDebugCode_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugCode_Release(This) \
+#define ICorDebugCode_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugCode_IsIL(This,pbIL) \
+#define ICorDebugCode_IsIL(This,pbIL) \
( (This)->lpVtbl -> IsIL(This,pbIL) )
-#define ICorDebugCode_GetFunction(This,ppFunction) \
+#define ICorDebugCode_GetFunction(This,ppFunction) \
( (This)->lpVtbl -> GetFunction(This,ppFunction) )
-#define ICorDebugCode_GetAddress(This,pStart) \
+#define ICorDebugCode_GetAddress(This,pStart) \
( (This)->lpVtbl -> GetAddress(This,pStart) )
-#define ICorDebugCode_GetSize(This,pcBytes) \
+#define ICorDebugCode_GetSize(This,pcBytes) \
( (This)->lpVtbl -> GetSize(This,pcBytes) )
-#define ICorDebugCode_CreateBreakpoint(This,offset,ppBreakpoint) \
+#define ICorDebugCode_CreateBreakpoint(This,offset,ppBreakpoint) \
( (This)->lpVtbl -> CreateBreakpoint(This,offset,ppBreakpoint) )
-#define ICorDebugCode_GetCode(This,startOffset,endOffset,cBufferAlloc,buffer,pcBufferSize) \
+#define ICorDebugCode_GetCode(This,startOffset,endOffset,cBufferAlloc,buffer,pcBufferSize) \
( (This)->lpVtbl -> GetCode(This,startOffset,endOffset,cBufferAlloc,buffer,pcBufferSize) )
-#define ICorDebugCode_GetVersionNumber(This,nVersion) \
+#define ICorDebugCode_GetVersionNumber(This,nVersion) \
( (This)->lpVtbl -> GetVersionNumber(This,nVersion) )
-#define ICorDebugCode_GetILToNativeMapping(This,cMap,pcMap,map) \
+#define ICorDebugCode_GetILToNativeMapping(This,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping(This,cMap,pcMap,map) )
-#define ICorDebugCode_GetEnCRemapSequencePoints(This,cMap,pcMap,offsets) \
+#define ICorDebugCode_GetEnCRemapSequencePoints(This,cMap,pcMap,offsets) \
( (This)->lpVtbl -> GetEnCRemapSequencePoints(This,cMap,pcMap,offsets) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugCode_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugCode_INTERFACE_DEFINED__ */
#ifndef __ICorDebugCode2_INTERFACE_DEFINED__
{
CORDB_ADDRESS startAddr;
ULONG32 length;
- } CodeChunkInfo;
+ } CodeChunkInfo;
EXTERN_C const IID IID_ICorDebugCode2;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugCode2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugCode2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugCode2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugCode2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugCode2, GetCodeChunks)
HRESULT ( STDMETHODCALLTYPE *GetCodeChunks )(
ICorDebugCode2 * This,
/* [in] */ ULONG32 cbufSize,
/* [out] */ ULONG32 *pcnumChunks,
/* [length_is][size_is][out] */ CodeChunkInfo chunks[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugCode2, GetCompilerFlags)
HRESULT ( STDMETHODCALLTYPE *GetCompilerFlags )(
ICorDebugCode2 * This,
/* [out] */ DWORD *pdwFlags);
#ifdef COBJMACROS
-#define ICorDebugCode2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugCode2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugCode2_AddRef(This) \
+#define ICorDebugCode2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugCode2_Release(This) \
+#define ICorDebugCode2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugCode2_GetCodeChunks(This,cbufSize,pcnumChunks,chunks) \
+#define ICorDebugCode2_GetCodeChunks(This,cbufSize,pcnumChunks,chunks) \
( (This)->lpVtbl -> GetCodeChunks(This,cbufSize,pcnumChunks,chunks) )
-#define ICorDebugCode2_GetCompilerFlags(This,pdwFlags) \
+#define ICorDebugCode2_GetCompilerFlags(This,pdwFlags) \
( (This)->lpVtbl -> GetCompilerFlags(This,pdwFlags) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugCode2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugCode2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugCode3_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugCode3Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugCode3 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugCode3 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugCode3 * This);
+ DECLSPEC_XFGVIRT(ICorDebugCode3, GetReturnValueLiveOffset)
HRESULT ( STDMETHODCALLTYPE *GetReturnValueLiveOffset )(
ICorDebugCode3 * This,
/* [in] */ ULONG32 ILoffset,
#ifdef COBJMACROS
-#define ICorDebugCode3_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugCode3_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugCode3_AddRef(This) \
+#define ICorDebugCode3_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugCode3_Release(This) \
+#define ICorDebugCode3_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugCode3_GetReturnValueLiveOffset(This,ILoffset,bufferSize,pFetched,pOffsets) \
+#define ICorDebugCode3_GetReturnValueLiveOffset(This,ILoffset,bufferSize,pFetched,pOffsets) \
( (This)->lpVtbl -> GetReturnValueLiveOffset(This,ILoffset,bufferSize,pFetched,pOffsets) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugCode3_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugCode3_INTERFACE_DEFINED__ */
#ifndef __ICorDebugCode4_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugCode4Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugCode4 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugCode4 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugCode4 * This);
+ DECLSPEC_XFGVIRT(ICorDebugCode4, EnumerateVariableHomes)
HRESULT ( STDMETHODCALLTYPE *EnumerateVariableHomes )(
ICorDebugCode4 * This,
/* [out] */ ICorDebugVariableHomeEnum **ppEnum);
#ifdef COBJMACROS
-#define ICorDebugCode4_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugCode4_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugCode4_AddRef(This) \
+#define ICorDebugCode4_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugCode4_Release(This) \
+#define ICorDebugCode4_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugCode4_EnumerateVariableHomes(This,ppEnum) \
+#define ICorDebugCode4_EnumerateVariableHomes(This,ppEnum) \
( (This)->lpVtbl -> EnumerateVariableHomes(This,ppEnum) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugCode4_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugCode4_INTERFACE_DEFINED__ */
#ifndef __ICorDebugILCode_INTERFACE_DEFINED__
ULONG32 HandlerLength;
ULONG32 ClassToken;
ULONG32 FilterOffset;
- } CorDebugEHClause;
+ } CorDebugEHClause;
EXTERN_C const IID IID_ICorDebugILCode;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugILCodeVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugILCode * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugILCode * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugILCode * This);
+ DECLSPEC_XFGVIRT(ICorDebugILCode, GetEHClauses)
HRESULT ( STDMETHODCALLTYPE *GetEHClauses )(
ICorDebugILCode * This,
/* [in] */ ULONG32 cClauses,
#ifdef COBJMACROS
-#define ICorDebugILCode_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugILCode_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugILCode_AddRef(This) \
+#define ICorDebugILCode_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugILCode_Release(This) \
+#define ICorDebugILCode_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugILCode_GetEHClauses(This,cClauses,pcClauses,clauses) \
+#define ICorDebugILCode_GetEHClauses(This,cClauses,pcClauses,clauses) \
( (This)->lpVtbl -> GetEHClauses(This,cClauses,pcClauses,clauses) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugILCode_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugILCode_INTERFACE_DEFINED__ */
#ifndef __ICorDebugILCode2_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugILCode2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugILCode2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugILCode2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugILCode2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugILCode2, GetLocalVarSigToken)
HRESULT ( STDMETHODCALLTYPE *GetLocalVarSigToken )(
ICorDebugILCode2 * This,
/* [out] */ mdSignature *pmdSig);
+ DECLSPEC_XFGVIRT(ICorDebugILCode2, GetInstrumentedILMap)
HRESULT ( STDMETHODCALLTYPE *GetInstrumentedILMap )(
ICorDebugILCode2 * This,
/* [in] */ ULONG32 cMap,
#ifdef COBJMACROS
-#define ICorDebugILCode2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugILCode2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugILCode2_AddRef(This) \
+#define ICorDebugILCode2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugILCode2_Release(This) \
+#define ICorDebugILCode2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugILCode2_GetLocalVarSigToken(This,pmdSig) \
+#define ICorDebugILCode2_GetLocalVarSigToken(This,pmdSig) \
( (This)->lpVtbl -> GetLocalVarSigToken(This,pmdSig) )
-#define ICorDebugILCode2_GetInstrumentedILMap(This,cMap,pcMap,map) \
+#define ICorDebugILCode2_GetInstrumentedILMap(This,cMap,pcMap,map) \
( (This)->lpVtbl -> GetInstrumentedILMap(This,cMap,pcMap,map) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugILCode2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugILCode2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugClass_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugClassVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugClass * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugClass * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugClass * This);
+ DECLSPEC_XFGVIRT(ICorDebugClass, GetModule)
HRESULT ( STDMETHODCALLTYPE *GetModule )(
ICorDebugClass * This,
/* [out] */ ICorDebugModule **pModule);
+ DECLSPEC_XFGVIRT(ICorDebugClass, GetToken)
HRESULT ( STDMETHODCALLTYPE *GetToken )(
ICorDebugClass * This,
/* [out] */ mdTypeDef *pTypeDef);
+ DECLSPEC_XFGVIRT(ICorDebugClass, GetStaticFieldValue)
HRESULT ( STDMETHODCALLTYPE *GetStaticFieldValue )(
ICorDebugClass * This,
/* [in] */ mdFieldDef fieldDef,
#ifdef COBJMACROS
-#define ICorDebugClass_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugClass_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugClass_AddRef(This) \
+#define ICorDebugClass_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugClass_Release(This) \
+#define ICorDebugClass_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugClass_GetModule(This,pModule) \
+#define ICorDebugClass_GetModule(This,pModule) \
( (This)->lpVtbl -> GetModule(This,pModule) )
-#define ICorDebugClass_GetToken(This,pTypeDef) \
+#define ICorDebugClass_GetToken(This,pTypeDef) \
( (This)->lpVtbl -> GetToken(This,pTypeDef) )
-#define ICorDebugClass_GetStaticFieldValue(This,fieldDef,pFrame,ppValue) \
+#define ICorDebugClass_GetStaticFieldValue(This,fieldDef,pFrame,ppValue) \
( (This)->lpVtbl -> GetStaticFieldValue(This,fieldDef,pFrame,ppValue) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugClass_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugClass_INTERFACE_DEFINED__ */
#ifndef __ICorDebugClass2_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugClass2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugClass2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugClass2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugClass2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugClass2, GetParameterizedType)
HRESULT ( STDMETHODCALLTYPE *GetParameterizedType )(
ICorDebugClass2 * This,
/* [in] */ CorElementType elementType,
/* [size_is][in] */ ICorDebugType *ppTypeArgs[ ],
/* [out] */ ICorDebugType **ppType);
+ DECLSPEC_XFGVIRT(ICorDebugClass2, SetJMCStatus)
HRESULT ( STDMETHODCALLTYPE *SetJMCStatus )(
ICorDebugClass2 * This,
/* [in] */ BOOL bIsJustMyCode);
#ifdef COBJMACROS
-#define ICorDebugClass2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugClass2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugClass2_AddRef(This) \
+#define ICorDebugClass2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugClass2_Release(This) \
+#define ICorDebugClass2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugClass2_GetParameterizedType(This,elementType,nTypeArgs,ppTypeArgs,ppType) \
+#define ICorDebugClass2_GetParameterizedType(This,elementType,nTypeArgs,ppTypeArgs,ppType) \
( (This)->lpVtbl -> GetParameterizedType(This,elementType,nTypeArgs,ppTypeArgs,ppType) )
-#define ICorDebugClass2_SetJMCStatus(This,bIsJustMyCode) \
+#define ICorDebugClass2_SetJMCStatus(This,bIsJustMyCode) \
( (This)->lpVtbl -> SetJMCStatus(This,bIsJustMyCode) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugClass2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugClass2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugEval_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugEvalVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugEval * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugEval * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugEval * This);
+ DECLSPEC_XFGVIRT(ICorDebugEval, CallFunction)
HRESULT ( STDMETHODCALLTYPE *CallFunction )(
ICorDebugEval * This,
/* [in] */ ICorDebugFunction *pFunction,
/* [in] */ ULONG32 nArgs,
/* [size_is][in] */ ICorDebugValue *ppArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugEval, NewObject)
HRESULT ( STDMETHODCALLTYPE *NewObject )(
ICorDebugEval * This,
/* [in] */ ICorDebugFunction *pConstructor,
/* [in] */ ULONG32 nArgs,
/* [size_is][in] */ ICorDebugValue *ppArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugEval, NewObjectNoConstructor)
HRESULT ( STDMETHODCALLTYPE *NewObjectNoConstructor )(
ICorDebugEval * This,
/* [in] */ ICorDebugClass *pClass);
+ DECLSPEC_XFGVIRT(ICorDebugEval, NewString)
HRESULT ( STDMETHODCALLTYPE *NewString )(
ICorDebugEval * This,
/* [in] */ LPCWSTR string);
+ DECLSPEC_XFGVIRT(ICorDebugEval, NewArray)
HRESULT ( STDMETHODCALLTYPE *NewArray )(
ICorDebugEval * This,
/* [in] */ CorElementType elementType,
/* [size_is][in] */ ULONG32 dims[ ],
/* [size_is][in] */ ULONG32 lowBounds[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugEval, IsActive)
HRESULT ( STDMETHODCALLTYPE *IsActive )(
ICorDebugEval * This,
/* [out] */ BOOL *pbActive);
+ DECLSPEC_XFGVIRT(ICorDebugEval, Abort)
HRESULT ( STDMETHODCALLTYPE *Abort )(
ICorDebugEval * This);
+ DECLSPEC_XFGVIRT(ICorDebugEval, GetResult)
HRESULT ( STDMETHODCALLTYPE *GetResult )(
ICorDebugEval * This,
/* [out] */ ICorDebugValue **ppResult);
+ DECLSPEC_XFGVIRT(ICorDebugEval, GetThread)
HRESULT ( STDMETHODCALLTYPE *GetThread )(
ICorDebugEval * This,
/* [out] */ ICorDebugThread **ppThread);
+ DECLSPEC_XFGVIRT(ICorDebugEval, CreateValue)
HRESULT ( STDMETHODCALLTYPE *CreateValue )(
ICorDebugEval * This,
/* [in] */ CorElementType elementType,
#ifdef COBJMACROS
-#define ICorDebugEval_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugEval_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugEval_AddRef(This) \
+#define ICorDebugEval_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugEval_Release(This) \
+#define ICorDebugEval_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugEval_CallFunction(This,pFunction,nArgs,ppArgs) \
+#define ICorDebugEval_CallFunction(This,pFunction,nArgs,ppArgs) \
( (This)->lpVtbl -> CallFunction(This,pFunction,nArgs,ppArgs) )
-#define ICorDebugEval_NewObject(This,pConstructor,nArgs,ppArgs) \
+#define ICorDebugEval_NewObject(This,pConstructor,nArgs,ppArgs) \
( (This)->lpVtbl -> NewObject(This,pConstructor,nArgs,ppArgs) )
-#define ICorDebugEval_NewObjectNoConstructor(This,pClass) \
+#define ICorDebugEval_NewObjectNoConstructor(This,pClass) \
( (This)->lpVtbl -> NewObjectNoConstructor(This,pClass) )
-#define ICorDebugEval_NewString(This,string) \
+#define ICorDebugEval_NewString(This,string) \
( (This)->lpVtbl -> NewString(This,string) )
-#define ICorDebugEval_NewArray(This,elementType,pElementClass,rank,dims,lowBounds) \
+#define ICorDebugEval_NewArray(This,elementType,pElementClass,rank,dims,lowBounds) \
( (This)->lpVtbl -> NewArray(This,elementType,pElementClass,rank,dims,lowBounds) )
-#define ICorDebugEval_IsActive(This,pbActive) \
+#define ICorDebugEval_IsActive(This,pbActive) \
( (This)->lpVtbl -> IsActive(This,pbActive) )
-#define ICorDebugEval_Abort(This) \
+#define ICorDebugEval_Abort(This) \
( (This)->lpVtbl -> Abort(This) )
-#define ICorDebugEval_GetResult(This,ppResult) \
+#define ICorDebugEval_GetResult(This,ppResult) \
( (This)->lpVtbl -> GetResult(This,ppResult) )
-#define ICorDebugEval_GetThread(This,ppThread) \
+#define ICorDebugEval_GetThread(This,ppThread) \
( (This)->lpVtbl -> GetThread(This,ppThread) )
-#define ICorDebugEval_CreateValue(This,elementType,pElementClass,ppValue) \
+#define ICorDebugEval_CreateValue(This,elementType,pElementClass,ppValue) \
( (This)->lpVtbl -> CreateValue(This,elementType,pElementClass,ppValue) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugEval_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugEval_INTERFACE_DEFINED__ */
#ifndef __ICorDebugEval2_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugEval2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugEval2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugEval2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugEval2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugEval2, CallParameterizedFunction)
HRESULT ( STDMETHODCALLTYPE *CallParameterizedFunction )(
ICorDebugEval2 * This,
/* [in] */ ICorDebugFunction *pFunction,
/* [in] */ ULONG32 nArgs,
/* [size_is][in] */ ICorDebugValue *ppArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugEval2, CreateValueForType)
HRESULT ( STDMETHODCALLTYPE *CreateValueForType )(
ICorDebugEval2 * This,
/* [in] */ ICorDebugType *pType,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugEval2, NewParameterizedObject)
HRESULT ( STDMETHODCALLTYPE *NewParameterizedObject )(
ICorDebugEval2 * This,
/* [in] */ ICorDebugFunction *pConstructor,
/* [in] */ ULONG32 nArgs,
/* [size_is][in] */ ICorDebugValue *ppArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugEval2, NewParameterizedObjectNoConstructor)
HRESULT ( STDMETHODCALLTYPE *NewParameterizedObjectNoConstructor )(
ICorDebugEval2 * This,
/* [in] */ ICorDebugClass *pClass,
/* [in] */ ULONG32 nTypeArgs,
/* [size_is][in] */ ICorDebugType *ppTypeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugEval2, NewParameterizedArray)
HRESULT ( STDMETHODCALLTYPE *NewParameterizedArray )(
ICorDebugEval2 * This,
/* [in] */ ICorDebugType *pElementType,
/* [size_is][in] */ ULONG32 dims[ ],
/* [size_is][in] */ ULONG32 lowBounds[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugEval2, NewStringWithLength)
HRESULT ( STDMETHODCALLTYPE *NewStringWithLength )(
ICorDebugEval2 * This,
/* [in] */ LPCWSTR string,
/* [in] */ UINT uiLength);
+ DECLSPEC_XFGVIRT(ICorDebugEval2, RudeAbort)
HRESULT ( STDMETHODCALLTYPE *RudeAbort )(
ICorDebugEval2 * This);
#ifdef COBJMACROS
-#define ICorDebugEval2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugEval2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugEval2_AddRef(This) \
+#define ICorDebugEval2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugEval2_Release(This) \
+#define ICorDebugEval2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugEval2_CallParameterizedFunction(This,pFunction,nTypeArgs,ppTypeArgs,nArgs,ppArgs) \
+#define ICorDebugEval2_CallParameterizedFunction(This,pFunction,nTypeArgs,ppTypeArgs,nArgs,ppArgs) \
( (This)->lpVtbl -> CallParameterizedFunction(This,pFunction,nTypeArgs,ppTypeArgs,nArgs,ppArgs) )
-#define ICorDebugEval2_CreateValueForType(This,pType,ppValue) \
+#define ICorDebugEval2_CreateValueForType(This,pType,ppValue) \
( (This)->lpVtbl -> CreateValueForType(This,pType,ppValue) )
-#define ICorDebugEval2_NewParameterizedObject(This,pConstructor,nTypeArgs,ppTypeArgs,nArgs,ppArgs) \
+#define ICorDebugEval2_NewParameterizedObject(This,pConstructor,nTypeArgs,ppTypeArgs,nArgs,ppArgs) \
( (This)->lpVtbl -> NewParameterizedObject(This,pConstructor,nTypeArgs,ppTypeArgs,nArgs,ppArgs) )
-#define ICorDebugEval2_NewParameterizedObjectNoConstructor(This,pClass,nTypeArgs,ppTypeArgs) \
+#define ICorDebugEval2_NewParameterizedObjectNoConstructor(This,pClass,nTypeArgs,ppTypeArgs) \
( (This)->lpVtbl -> NewParameterizedObjectNoConstructor(This,pClass,nTypeArgs,ppTypeArgs) )
-#define ICorDebugEval2_NewParameterizedArray(This,pElementType,rank,dims,lowBounds) \
+#define ICorDebugEval2_NewParameterizedArray(This,pElementType,rank,dims,lowBounds) \
( (This)->lpVtbl -> NewParameterizedArray(This,pElementType,rank,dims,lowBounds) )
-#define ICorDebugEval2_NewStringWithLength(This,string,uiLength) \
+#define ICorDebugEval2_NewStringWithLength(This,string,uiLength) \
( (This)->lpVtbl -> NewStringWithLength(This,string,uiLength) )
-#define ICorDebugEval2_RudeAbort(This) \
+#define ICorDebugEval2_RudeAbort(This) \
( (This)->lpVtbl -> RudeAbort(This) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugEval2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugEval2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugValue_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugValueVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugValue * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugValue * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugValue * This);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetType)
HRESULT ( STDMETHODCALLTYPE *GetType )(
ICorDebugValue * This,
/* [out] */ CorElementType *pType);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugValue * This,
/* [out] */ ULONG32 *pSize);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetAddress)
HRESULT ( STDMETHODCALLTYPE *GetAddress )(
ICorDebugValue * This,
/* [out] */ CORDB_ADDRESS *pAddress);
+ DECLSPEC_XFGVIRT(ICorDebugValue, CreateBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )(
ICorDebugValue * This,
/* [out] */ ICorDebugValueBreakpoint **ppBreakpoint);
#ifdef COBJMACROS
-#define ICorDebugValue_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugValue_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugValue_AddRef(This) \
+#define ICorDebugValue_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugValue_Release(This) \
+#define ICorDebugValue_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugValue_GetType(This,pType) \
+#define ICorDebugValue_GetType(This,pType) \
( (This)->lpVtbl -> GetType(This,pType) )
-#define ICorDebugValue_GetSize(This,pSize) \
+#define ICorDebugValue_GetSize(This,pSize) \
( (This)->lpVtbl -> GetSize(This,pSize) )
-#define ICorDebugValue_GetAddress(This,pAddress) \
+#define ICorDebugValue_GetAddress(This,pAddress) \
( (This)->lpVtbl -> GetAddress(This,pAddress) )
-#define ICorDebugValue_CreateBreakpoint(This,ppBreakpoint) \
+#define ICorDebugValue_CreateBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugValue_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugValue_INTERFACE_DEFINED__ */
#ifndef __ICorDebugValue2_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugValue2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugValue2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugValue2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugValue2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugValue2, GetExactType)
HRESULT ( STDMETHODCALLTYPE *GetExactType )(
ICorDebugValue2 * This,
/* [out] */ ICorDebugType **ppType);
#ifdef COBJMACROS
-#define ICorDebugValue2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugValue2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugValue2_AddRef(This) \
+#define ICorDebugValue2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugValue2_Release(This) \
+#define ICorDebugValue2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugValue2_GetExactType(This,ppType) \
+#define ICorDebugValue2_GetExactType(This,ppType) \
( (This)->lpVtbl -> GetExactType(This,ppType) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugValue2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugValue2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugValue3_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugValue3Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugValue3 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugValue3 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugValue3 * This);
+ DECLSPEC_XFGVIRT(ICorDebugValue3, GetSize64)
HRESULT ( STDMETHODCALLTYPE *GetSize64 )(
ICorDebugValue3 * This,
/* [out] */ ULONG64 *pSize);
#ifdef COBJMACROS
-#define ICorDebugValue3_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugValue3_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugValue3_AddRef(This) \
+#define ICorDebugValue3_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugValue3_Release(This) \
+#define ICorDebugValue3_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugValue3_GetSize64(This,pSize) \
+#define ICorDebugValue3_GetSize64(This,pSize) \
( (This)->lpVtbl -> GetSize64(This,pSize) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugValue3_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugValue3_INTERFACE_DEFINED__ */
#ifndef __ICorDebugGenericValue_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugGenericValueVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugGenericValue * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugGenericValue * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugGenericValue * This);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetType)
HRESULT ( STDMETHODCALLTYPE *GetType )(
ICorDebugGenericValue * This,
/* [out] */ CorElementType *pType);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugGenericValue * This,
/* [out] */ ULONG32 *pSize);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetAddress)
HRESULT ( STDMETHODCALLTYPE *GetAddress )(
ICorDebugGenericValue * This,
/* [out] */ CORDB_ADDRESS *pAddress);
+ DECLSPEC_XFGVIRT(ICorDebugValue, CreateBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )(
ICorDebugGenericValue * This,
/* [out] */ ICorDebugValueBreakpoint **ppBreakpoint);
+ DECLSPEC_XFGVIRT(ICorDebugGenericValue, GetValue)
HRESULT ( STDMETHODCALLTYPE *GetValue )(
ICorDebugGenericValue * This,
/* [out] */ void *pTo);
+ DECLSPEC_XFGVIRT(ICorDebugGenericValue, SetValue)
HRESULT ( STDMETHODCALLTYPE *SetValue )(
ICorDebugGenericValue * This,
/* [in] */ void *pFrom);
#ifdef COBJMACROS
-#define ICorDebugGenericValue_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugGenericValue_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugGenericValue_AddRef(This) \
+#define ICorDebugGenericValue_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugGenericValue_Release(This) \
+#define ICorDebugGenericValue_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugGenericValue_GetType(This,pType) \
+#define ICorDebugGenericValue_GetType(This,pType) \
( (This)->lpVtbl -> GetType(This,pType) )
-#define ICorDebugGenericValue_GetSize(This,pSize) \
+#define ICorDebugGenericValue_GetSize(This,pSize) \
( (This)->lpVtbl -> GetSize(This,pSize) )
-#define ICorDebugGenericValue_GetAddress(This,pAddress) \
+#define ICorDebugGenericValue_GetAddress(This,pAddress) \
( (This)->lpVtbl -> GetAddress(This,pAddress) )
-#define ICorDebugGenericValue_CreateBreakpoint(This,ppBreakpoint) \
+#define ICorDebugGenericValue_CreateBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) )
-#define ICorDebugGenericValue_GetValue(This,pTo) \
+#define ICorDebugGenericValue_GetValue(This,pTo) \
( (This)->lpVtbl -> GetValue(This,pTo) )
-#define ICorDebugGenericValue_SetValue(This,pFrom) \
+#define ICorDebugGenericValue_SetValue(This,pFrom) \
( (This)->lpVtbl -> SetValue(This,pFrom) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugGenericValue_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugGenericValue_INTERFACE_DEFINED__ */
#ifndef __ICorDebugReferenceValue_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugReferenceValueVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugReferenceValue * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugReferenceValue * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugReferenceValue * This);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetType)
HRESULT ( STDMETHODCALLTYPE *GetType )(
ICorDebugReferenceValue * This,
/* [out] */ CorElementType *pType);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugReferenceValue * This,
/* [out] */ ULONG32 *pSize);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetAddress)
HRESULT ( STDMETHODCALLTYPE *GetAddress )(
ICorDebugReferenceValue * This,
/* [out] */ CORDB_ADDRESS *pAddress);
+ DECLSPEC_XFGVIRT(ICorDebugValue, CreateBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )(
ICorDebugReferenceValue * This,
/* [out] */ ICorDebugValueBreakpoint **ppBreakpoint);
+ DECLSPEC_XFGVIRT(ICorDebugReferenceValue, IsNull)
HRESULT ( STDMETHODCALLTYPE *IsNull )(
ICorDebugReferenceValue * This,
/* [out] */ BOOL *pbNull);
+ DECLSPEC_XFGVIRT(ICorDebugReferenceValue, GetValue)
HRESULT ( STDMETHODCALLTYPE *GetValue )(
ICorDebugReferenceValue * This,
/* [out] */ CORDB_ADDRESS *pValue);
+ DECLSPEC_XFGVIRT(ICorDebugReferenceValue, SetValue)
HRESULT ( STDMETHODCALLTYPE *SetValue )(
ICorDebugReferenceValue * This,
/* [in] */ CORDB_ADDRESS value);
+ DECLSPEC_XFGVIRT(ICorDebugReferenceValue, Dereference)
HRESULT ( STDMETHODCALLTYPE *Dereference )(
ICorDebugReferenceValue * This,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugReferenceValue, DereferenceStrong)
HRESULT ( STDMETHODCALLTYPE *DereferenceStrong )(
ICorDebugReferenceValue * This,
/* [out] */ ICorDebugValue **ppValue);
#ifdef COBJMACROS
-#define ICorDebugReferenceValue_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugReferenceValue_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugReferenceValue_AddRef(This) \
+#define ICorDebugReferenceValue_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugReferenceValue_Release(This) \
+#define ICorDebugReferenceValue_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugReferenceValue_GetType(This,pType) \
+#define ICorDebugReferenceValue_GetType(This,pType) \
( (This)->lpVtbl -> GetType(This,pType) )
-#define ICorDebugReferenceValue_GetSize(This,pSize) \
+#define ICorDebugReferenceValue_GetSize(This,pSize) \
( (This)->lpVtbl -> GetSize(This,pSize) )
-#define ICorDebugReferenceValue_GetAddress(This,pAddress) \
+#define ICorDebugReferenceValue_GetAddress(This,pAddress) \
( (This)->lpVtbl -> GetAddress(This,pAddress) )
-#define ICorDebugReferenceValue_CreateBreakpoint(This,ppBreakpoint) \
+#define ICorDebugReferenceValue_CreateBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) )
-#define ICorDebugReferenceValue_IsNull(This,pbNull) \
+#define ICorDebugReferenceValue_IsNull(This,pbNull) \
( (This)->lpVtbl -> IsNull(This,pbNull) )
-#define ICorDebugReferenceValue_GetValue(This,pValue) \
+#define ICorDebugReferenceValue_GetValue(This,pValue) \
( (This)->lpVtbl -> GetValue(This,pValue) )
-#define ICorDebugReferenceValue_SetValue(This,value) \
+#define ICorDebugReferenceValue_SetValue(This,value) \
( (This)->lpVtbl -> SetValue(This,value) )
-#define ICorDebugReferenceValue_Dereference(This,ppValue) \
+#define ICorDebugReferenceValue_Dereference(This,ppValue) \
( (This)->lpVtbl -> Dereference(This,ppValue) )
-#define ICorDebugReferenceValue_DereferenceStrong(This,ppValue) \
+#define ICorDebugReferenceValue_DereferenceStrong(This,ppValue) \
( (This)->lpVtbl -> DereferenceStrong(This,ppValue) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugReferenceValue_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugReferenceValue_INTERFACE_DEFINED__ */
#ifndef __ICorDebugHeapValue_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugHeapValueVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugHeapValue * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugHeapValue * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugHeapValue * This);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetType)
HRESULT ( STDMETHODCALLTYPE *GetType )(
ICorDebugHeapValue * This,
/* [out] */ CorElementType *pType);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugHeapValue * This,
/* [out] */ ULONG32 *pSize);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetAddress)
HRESULT ( STDMETHODCALLTYPE *GetAddress )(
ICorDebugHeapValue * This,
/* [out] */ CORDB_ADDRESS *pAddress);
+ DECLSPEC_XFGVIRT(ICorDebugValue, CreateBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )(
ICorDebugHeapValue * This,
/* [out] */ ICorDebugValueBreakpoint **ppBreakpoint);
+ DECLSPEC_XFGVIRT(ICorDebugHeapValue, IsValid)
HRESULT ( STDMETHODCALLTYPE *IsValid )(
ICorDebugHeapValue * This,
/* [out] */ BOOL *pbValid);
+ DECLSPEC_XFGVIRT(ICorDebugHeapValue, CreateRelocBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateRelocBreakpoint )(
ICorDebugHeapValue * This,
/* [out] */ ICorDebugValueBreakpoint **ppBreakpoint);
#ifdef COBJMACROS
-#define ICorDebugHeapValue_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugHeapValue_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugHeapValue_AddRef(This) \
+#define ICorDebugHeapValue_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugHeapValue_Release(This) \
+#define ICorDebugHeapValue_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugHeapValue_GetType(This,pType) \
+#define ICorDebugHeapValue_GetType(This,pType) \
( (This)->lpVtbl -> GetType(This,pType) )
-#define ICorDebugHeapValue_GetSize(This,pSize) \
+#define ICorDebugHeapValue_GetSize(This,pSize) \
( (This)->lpVtbl -> GetSize(This,pSize) )
-#define ICorDebugHeapValue_GetAddress(This,pAddress) \
+#define ICorDebugHeapValue_GetAddress(This,pAddress) \
( (This)->lpVtbl -> GetAddress(This,pAddress) )
-#define ICorDebugHeapValue_CreateBreakpoint(This,ppBreakpoint) \
+#define ICorDebugHeapValue_CreateBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) )
-#define ICorDebugHeapValue_IsValid(This,pbValid) \
+#define ICorDebugHeapValue_IsValid(This,pbValid) \
( (This)->lpVtbl -> IsValid(This,pbValid) )
-#define ICorDebugHeapValue_CreateRelocBreakpoint(This,ppBreakpoint) \
+#define ICorDebugHeapValue_CreateRelocBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateRelocBreakpoint(This,ppBreakpoint) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugHeapValue_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugHeapValue_INTERFACE_DEFINED__ */
#ifndef __ICorDebugHeapValue2_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugHeapValue2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugHeapValue2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugHeapValue2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugHeapValue2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugHeapValue2, CreateHandle)
HRESULT ( STDMETHODCALLTYPE *CreateHandle )(
ICorDebugHeapValue2 * This,
/* [in] */ CorDebugHandleType type,
#ifdef COBJMACROS
-#define ICorDebugHeapValue2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugHeapValue2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugHeapValue2_AddRef(This) \
+#define ICorDebugHeapValue2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugHeapValue2_Release(This) \
+#define ICorDebugHeapValue2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugHeapValue2_CreateHandle(This,type,ppHandle) \
+#define ICorDebugHeapValue2_CreateHandle(This,type,ppHandle) \
( (This)->lpVtbl -> CreateHandle(This,type,ppHandle) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugHeapValue2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugHeapValue2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugHeapValue3_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugHeapValue3Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugHeapValue3 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugHeapValue3 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugHeapValue3 * This);
+ DECLSPEC_XFGVIRT(ICorDebugHeapValue3, GetThreadOwningMonitorLock)
HRESULT ( STDMETHODCALLTYPE *GetThreadOwningMonitorLock )(
ICorDebugHeapValue3 * This,
/* [out] */ ICorDebugThread **ppThread,
/* [out] */ DWORD *pAcquisitionCount);
+ DECLSPEC_XFGVIRT(ICorDebugHeapValue3, GetMonitorEventWaitList)
HRESULT ( STDMETHODCALLTYPE *GetMonitorEventWaitList )(
ICorDebugHeapValue3 * This,
/* [out] */ ICorDebugThreadEnum **ppThreadEnum);
#ifdef COBJMACROS
-#define ICorDebugHeapValue3_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugHeapValue3_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugHeapValue3_AddRef(This) \
+#define ICorDebugHeapValue3_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugHeapValue3_Release(This) \
+#define ICorDebugHeapValue3_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugHeapValue3_GetThreadOwningMonitorLock(This,ppThread,pAcquisitionCount) \
+#define ICorDebugHeapValue3_GetThreadOwningMonitorLock(This,ppThread,pAcquisitionCount) \
( (This)->lpVtbl -> GetThreadOwningMonitorLock(This,ppThread,pAcquisitionCount) )
-#define ICorDebugHeapValue3_GetMonitorEventWaitList(This,ppThreadEnum) \
+#define ICorDebugHeapValue3_GetMonitorEventWaitList(This,ppThreadEnum) \
( (This)->lpVtbl -> GetMonitorEventWaitList(This,ppThreadEnum) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugHeapValue3_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugHeapValue3_INTERFACE_DEFINED__ */
#ifndef __ICorDebugHeapValue4_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugHeapValue4Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugHeapValue4 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugHeapValue4 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugHeapValue4 * This);
+ DECLSPEC_XFGVIRT(ICorDebugHeapValue4, CreatePinnedHandle)
HRESULT ( STDMETHODCALLTYPE *CreatePinnedHandle )(
ICorDebugHeapValue4 * This,
/* [out] */ ICorDebugHandleValue **ppHandle);
#ifdef COBJMACROS
-#define ICorDebugHeapValue4_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugHeapValue4_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugHeapValue4_AddRef(This) \
+#define ICorDebugHeapValue4_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugHeapValue4_Release(This) \
+#define ICorDebugHeapValue4_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugHeapValue4_CreatePinnedHandle(This,ppHandle) \
+#define ICorDebugHeapValue4_CreatePinnedHandle(This,ppHandle) \
( (This)->lpVtbl -> CreatePinnedHandle(This,ppHandle) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugHeapValue4_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugHeapValue4_INTERFACE_DEFINED__ */
#ifndef __ICorDebugObjectValue_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugObjectValueVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugObjectValue * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugObjectValue * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugObjectValue * This);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetType)
HRESULT ( STDMETHODCALLTYPE *GetType )(
ICorDebugObjectValue * This,
/* [out] */ CorElementType *pType);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugObjectValue * This,
/* [out] */ ULONG32 *pSize);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetAddress)
HRESULT ( STDMETHODCALLTYPE *GetAddress )(
ICorDebugObjectValue * This,
/* [out] */ CORDB_ADDRESS *pAddress);
+ DECLSPEC_XFGVIRT(ICorDebugValue, CreateBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )(
ICorDebugObjectValue * This,
/* [out] */ ICorDebugValueBreakpoint **ppBreakpoint);
+ DECLSPEC_XFGVIRT(ICorDebugObjectValue, GetClass)
HRESULT ( STDMETHODCALLTYPE *GetClass )(
ICorDebugObjectValue * This,
/* [out] */ ICorDebugClass **ppClass);
+ DECLSPEC_XFGVIRT(ICorDebugObjectValue, GetFieldValue)
HRESULT ( STDMETHODCALLTYPE *GetFieldValue )(
ICorDebugObjectValue * This,
/* [in] */ ICorDebugClass *pClass,
/* [in] */ mdFieldDef fieldDef,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugObjectValue, GetVirtualMethod)
HRESULT ( STDMETHODCALLTYPE *GetVirtualMethod )(
ICorDebugObjectValue * This,
/* [in] */ mdMemberRef memberRef,
/* [out] */ ICorDebugFunction **ppFunction);
+ DECLSPEC_XFGVIRT(ICorDebugObjectValue, GetContext)
HRESULT ( STDMETHODCALLTYPE *GetContext )(
ICorDebugObjectValue * This,
/* [out] */ ICorDebugContext **ppContext);
+ DECLSPEC_XFGVIRT(ICorDebugObjectValue, IsValueClass)
HRESULT ( STDMETHODCALLTYPE *IsValueClass )(
ICorDebugObjectValue * This,
/* [out] */ BOOL *pbIsValueClass);
+ DECLSPEC_XFGVIRT(ICorDebugObjectValue, GetManagedCopy)
HRESULT ( STDMETHODCALLTYPE *GetManagedCopy )(
ICorDebugObjectValue * This,
/* [out] */ IUnknown **ppObject);
+ DECLSPEC_XFGVIRT(ICorDebugObjectValue, SetFromManagedCopy)
HRESULT ( STDMETHODCALLTYPE *SetFromManagedCopy )(
ICorDebugObjectValue * This,
/* [in] */ IUnknown *pObject);
#ifdef COBJMACROS
-#define ICorDebugObjectValue_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugObjectValue_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugObjectValue_AddRef(This) \
+#define ICorDebugObjectValue_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugObjectValue_Release(This) \
+#define ICorDebugObjectValue_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugObjectValue_GetType(This,pType) \
+#define ICorDebugObjectValue_GetType(This,pType) \
( (This)->lpVtbl -> GetType(This,pType) )
-#define ICorDebugObjectValue_GetSize(This,pSize) \
+#define ICorDebugObjectValue_GetSize(This,pSize) \
( (This)->lpVtbl -> GetSize(This,pSize) )
-#define ICorDebugObjectValue_GetAddress(This,pAddress) \
+#define ICorDebugObjectValue_GetAddress(This,pAddress) \
( (This)->lpVtbl -> GetAddress(This,pAddress) )
-#define ICorDebugObjectValue_CreateBreakpoint(This,ppBreakpoint) \
+#define ICorDebugObjectValue_CreateBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) )
-#define ICorDebugObjectValue_GetClass(This,ppClass) \
+#define ICorDebugObjectValue_GetClass(This,ppClass) \
( (This)->lpVtbl -> GetClass(This,ppClass) )
-#define ICorDebugObjectValue_GetFieldValue(This,pClass,fieldDef,ppValue) \
+#define ICorDebugObjectValue_GetFieldValue(This,pClass,fieldDef,ppValue) \
( (This)->lpVtbl -> GetFieldValue(This,pClass,fieldDef,ppValue) )
-#define ICorDebugObjectValue_GetVirtualMethod(This,memberRef,ppFunction) \
+#define ICorDebugObjectValue_GetVirtualMethod(This,memberRef,ppFunction) \
( (This)->lpVtbl -> GetVirtualMethod(This,memberRef,ppFunction) )
-#define ICorDebugObjectValue_GetContext(This,ppContext) \
+#define ICorDebugObjectValue_GetContext(This,ppContext) \
( (This)->lpVtbl -> GetContext(This,ppContext) )
-#define ICorDebugObjectValue_IsValueClass(This,pbIsValueClass) \
+#define ICorDebugObjectValue_IsValueClass(This,pbIsValueClass) \
( (This)->lpVtbl -> IsValueClass(This,pbIsValueClass) )
-#define ICorDebugObjectValue_GetManagedCopy(This,ppObject) \
+#define ICorDebugObjectValue_GetManagedCopy(This,ppObject) \
( (This)->lpVtbl -> GetManagedCopy(This,ppObject) )
-#define ICorDebugObjectValue_SetFromManagedCopy(This,pObject) \
+#define ICorDebugObjectValue_SetFromManagedCopy(This,pObject) \
( (This)->lpVtbl -> SetFromManagedCopy(This,pObject) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugObjectValue_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugObjectValue_INTERFACE_DEFINED__ */
#ifndef __ICorDebugObjectValue2_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugObjectValue2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugObjectValue2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugObjectValue2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugObjectValue2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugObjectValue2, GetVirtualMethodAndType)
HRESULT ( STDMETHODCALLTYPE *GetVirtualMethodAndType )(
ICorDebugObjectValue2 * This,
/* [in] */ mdMemberRef memberRef,
#ifdef COBJMACROS
-#define ICorDebugObjectValue2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugObjectValue2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugObjectValue2_AddRef(This) \
+#define ICorDebugObjectValue2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugObjectValue2_Release(This) \
+#define ICorDebugObjectValue2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugObjectValue2_GetVirtualMethodAndType(This,memberRef,ppFunction,ppType) \
+#define ICorDebugObjectValue2_GetVirtualMethodAndType(This,memberRef,ppFunction,ppType) \
( (This)->lpVtbl -> GetVirtualMethodAndType(This,memberRef,ppFunction,ppType) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugObjectValue2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugObjectValue2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugDelegateObjectValue_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugDelegateObjectValueVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugDelegateObjectValue * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugDelegateObjectValue * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugDelegateObjectValue * This);
+ DECLSPEC_XFGVIRT(ICorDebugDelegateObjectValue, GetTarget)
HRESULT ( STDMETHODCALLTYPE *GetTarget )(
ICorDebugDelegateObjectValue * This,
/* [out] */ ICorDebugReferenceValue **ppObject);
+ DECLSPEC_XFGVIRT(ICorDebugDelegateObjectValue, GetFunction)
HRESULT ( STDMETHODCALLTYPE *GetFunction )(
ICorDebugDelegateObjectValue * This,
/* [out] */ ICorDebugFunction **ppFunction);
#ifdef COBJMACROS
-#define ICorDebugDelegateObjectValue_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugDelegateObjectValue_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugDelegateObjectValue_AddRef(This) \
+#define ICorDebugDelegateObjectValue_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugDelegateObjectValue_Release(This) \
+#define ICorDebugDelegateObjectValue_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugDelegateObjectValue_GetTarget(This,ppObject) \
+#define ICorDebugDelegateObjectValue_GetTarget(This,ppObject) \
( (This)->lpVtbl -> GetTarget(This,ppObject) )
-#define ICorDebugDelegateObjectValue_GetFunction(This,ppFunction) \
+#define ICorDebugDelegateObjectValue_GetFunction(This,ppFunction) \
( (This)->lpVtbl -> GetFunction(This,ppFunction) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugDelegateObjectValue_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugDelegateObjectValue_INTERFACE_DEFINED__ */
#ifndef __ICorDebugBoxValue_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugBoxValueVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugBoxValue * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugBoxValue * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugBoxValue * This);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetType)
HRESULT ( STDMETHODCALLTYPE *GetType )(
ICorDebugBoxValue * This,
/* [out] */ CorElementType *pType);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugBoxValue * This,
/* [out] */ ULONG32 *pSize);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetAddress)
HRESULT ( STDMETHODCALLTYPE *GetAddress )(
ICorDebugBoxValue * This,
/* [out] */ CORDB_ADDRESS *pAddress);
+ DECLSPEC_XFGVIRT(ICorDebugValue, CreateBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )(
ICorDebugBoxValue * This,
/* [out] */ ICorDebugValueBreakpoint **ppBreakpoint);
+ DECLSPEC_XFGVIRT(ICorDebugHeapValue, IsValid)
HRESULT ( STDMETHODCALLTYPE *IsValid )(
ICorDebugBoxValue * This,
/* [out] */ BOOL *pbValid);
+ DECLSPEC_XFGVIRT(ICorDebugHeapValue, CreateRelocBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateRelocBreakpoint )(
ICorDebugBoxValue * This,
/* [out] */ ICorDebugValueBreakpoint **ppBreakpoint);
+ DECLSPEC_XFGVIRT(ICorDebugBoxValue, GetObject)
HRESULT ( STDMETHODCALLTYPE *GetObject )(
ICorDebugBoxValue * This,
/* [out] */ ICorDebugObjectValue **ppObject);
#ifdef COBJMACROS
-#define ICorDebugBoxValue_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugBoxValue_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugBoxValue_AddRef(This) \
+#define ICorDebugBoxValue_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugBoxValue_Release(This) \
+#define ICorDebugBoxValue_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugBoxValue_GetType(This,pType) \
+#define ICorDebugBoxValue_GetType(This,pType) \
( (This)->lpVtbl -> GetType(This,pType) )
-#define ICorDebugBoxValue_GetSize(This,pSize) \
+#define ICorDebugBoxValue_GetSize(This,pSize) \
( (This)->lpVtbl -> GetSize(This,pSize) )
-#define ICorDebugBoxValue_GetAddress(This,pAddress) \
+#define ICorDebugBoxValue_GetAddress(This,pAddress) \
( (This)->lpVtbl -> GetAddress(This,pAddress) )
-#define ICorDebugBoxValue_CreateBreakpoint(This,ppBreakpoint) \
+#define ICorDebugBoxValue_CreateBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) )
-#define ICorDebugBoxValue_IsValid(This,pbValid) \
+#define ICorDebugBoxValue_IsValid(This,pbValid) \
( (This)->lpVtbl -> IsValid(This,pbValid) )
-#define ICorDebugBoxValue_CreateRelocBreakpoint(This,ppBreakpoint) \
+#define ICorDebugBoxValue_CreateRelocBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateRelocBreakpoint(This,ppBreakpoint) )
-#define ICorDebugBoxValue_GetObject(This,ppObject) \
+#define ICorDebugBoxValue_GetObject(This,ppObject) \
( (This)->lpVtbl -> GetObject(This,ppObject) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugBoxValue_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugBoxValue_INTERFACE_DEFINED__ */
-/* interface __MIDL_itf_cordebug_0000_0105 */
+/* interface __MIDL_itf_cordebug_0000_0106 */
/* [local] */
#pragma warning(push)
#pragma warning(disable:28718)
-extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0105_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0105_v0_0_s_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0106_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0106_v0_0_s_ifspec;
#ifndef __ICorDebugStringValue_INTERFACE_DEFINED__
#define __ICorDebugStringValue_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugStringValueVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugStringValue * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugStringValue * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugStringValue * This);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetType)
HRESULT ( STDMETHODCALLTYPE *GetType )(
ICorDebugStringValue * This,
/* [out] */ CorElementType *pType);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugStringValue * This,
/* [out] */ ULONG32 *pSize);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetAddress)
HRESULT ( STDMETHODCALLTYPE *GetAddress )(
ICorDebugStringValue * This,
/* [out] */ CORDB_ADDRESS *pAddress);
+ DECLSPEC_XFGVIRT(ICorDebugValue, CreateBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )(
ICorDebugStringValue * This,
/* [out] */ ICorDebugValueBreakpoint **ppBreakpoint);
+ DECLSPEC_XFGVIRT(ICorDebugHeapValue, IsValid)
HRESULT ( STDMETHODCALLTYPE *IsValid )(
ICorDebugStringValue * This,
/* [out] */ BOOL *pbValid);
+ DECLSPEC_XFGVIRT(ICorDebugHeapValue, CreateRelocBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateRelocBreakpoint )(
ICorDebugStringValue * This,
/* [out] */ ICorDebugValueBreakpoint **ppBreakpoint);
+ DECLSPEC_XFGVIRT(ICorDebugStringValue, GetLength)
HRESULT ( STDMETHODCALLTYPE *GetLength )(
ICorDebugStringValue * This,
/* [out] */ ULONG32 *pcchString);
+ DECLSPEC_XFGVIRT(ICorDebugStringValue, GetString)
HRESULT ( STDMETHODCALLTYPE *GetString )(
ICorDebugStringValue * This,
/* [in] */ ULONG32 cchString,
#ifdef COBJMACROS
-#define ICorDebugStringValue_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugStringValue_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugStringValue_AddRef(This) \
+#define ICorDebugStringValue_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugStringValue_Release(This) \
+#define ICorDebugStringValue_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugStringValue_GetType(This,pType) \
+#define ICorDebugStringValue_GetType(This,pType) \
( (This)->lpVtbl -> GetType(This,pType) )
-#define ICorDebugStringValue_GetSize(This,pSize) \
+#define ICorDebugStringValue_GetSize(This,pSize) \
( (This)->lpVtbl -> GetSize(This,pSize) )
-#define ICorDebugStringValue_GetAddress(This,pAddress) \
+#define ICorDebugStringValue_GetAddress(This,pAddress) \
( (This)->lpVtbl -> GetAddress(This,pAddress) )
-#define ICorDebugStringValue_CreateBreakpoint(This,ppBreakpoint) \
+#define ICorDebugStringValue_CreateBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) )
-#define ICorDebugStringValue_IsValid(This,pbValid) \
+#define ICorDebugStringValue_IsValid(This,pbValid) \
( (This)->lpVtbl -> IsValid(This,pbValid) )
-#define ICorDebugStringValue_CreateRelocBreakpoint(This,ppBreakpoint) \
+#define ICorDebugStringValue_CreateRelocBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateRelocBreakpoint(This,ppBreakpoint) )
-#define ICorDebugStringValue_GetLength(This,pcchString) \
+#define ICorDebugStringValue_GetLength(This,pcchString) \
( (This)->lpVtbl -> GetLength(This,pcchString) )
-#define ICorDebugStringValue_GetString(This,cchString,pcchString,szString) \
+#define ICorDebugStringValue_GetString(This,cchString,pcchString,szString) \
( (This)->lpVtbl -> GetString(This,cchString,pcchString,szString) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugStringValue_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugStringValue_INTERFACE_DEFINED__ */
-/* interface __MIDL_itf_cordebug_0000_0106 */
+/* interface __MIDL_itf_cordebug_0000_0107 */
/* [local] */
#pragma warning(pop)
-extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0106_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0106_v0_0_s_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0107_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0107_v0_0_s_ifspec;
#ifndef __ICorDebugArrayValue_INTERFACE_DEFINED__
#define __ICorDebugArrayValue_INTERFACE_DEFINED__
virtual HRESULT STDMETHODCALLTYPE GetBaseIndicies(
/* [in] */ ULONG32 cdim,
- /* [length_is][size_is][out] */ ULONG32 indicies[ ]) = 0;
+ /* [length_is][size_is][out] */ ULONG32 indices[ ]) = 0;
virtual HRESULT STDMETHODCALLTYPE GetElement(
/* [in] */ ULONG32 cdim,
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugArrayValueVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugArrayValue * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugArrayValue * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugArrayValue * This);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetType)
HRESULT ( STDMETHODCALLTYPE *GetType )(
ICorDebugArrayValue * This,
/* [out] */ CorElementType *pType);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugArrayValue * This,
/* [out] */ ULONG32 *pSize);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetAddress)
HRESULT ( STDMETHODCALLTYPE *GetAddress )(
ICorDebugArrayValue * This,
/* [out] */ CORDB_ADDRESS *pAddress);
+ DECLSPEC_XFGVIRT(ICorDebugValue, CreateBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )(
ICorDebugArrayValue * This,
/* [out] */ ICorDebugValueBreakpoint **ppBreakpoint);
+ DECLSPEC_XFGVIRT(ICorDebugHeapValue, IsValid)
HRESULT ( STDMETHODCALLTYPE *IsValid )(
ICorDebugArrayValue * This,
/* [out] */ BOOL *pbValid);
+ DECLSPEC_XFGVIRT(ICorDebugHeapValue, CreateRelocBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateRelocBreakpoint )(
ICorDebugArrayValue * This,
/* [out] */ ICorDebugValueBreakpoint **ppBreakpoint);
+ DECLSPEC_XFGVIRT(ICorDebugArrayValue, GetElementType)
HRESULT ( STDMETHODCALLTYPE *GetElementType )(
ICorDebugArrayValue * This,
/* [out] */ CorElementType *pType);
+ DECLSPEC_XFGVIRT(ICorDebugArrayValue, GetRank)
HRESULT ( STDMETHODCALLTYPE *GetRank )(
ICorDebugArrayValue * This,
/* [out] */ ULONG32 *pnRank);
+ DECLSPEC_XFGVIRT(ICorDebugArrayValue, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugArrayValue * This,
/* [out] */ ULONG32 *pnCount);
+ DECLSPEC_XFGVIRT(ICorDebugArrayValue, GetDimensions)
HRESULT ( STDMETHODCALLTYPE *GetDimensions )(
ICorDebugArrayValue * This,
/* [in] */ ULONG32 cdim,
/* [length_is][size_is][out] */ ULONG32 dims[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugArrayValue, HasBaseIndicies)
HRESULT ( STDMETHODCALLTYPE *HasBaseIndicies )(
ICorDebugArrayValue * This,
/* [out] */ BOOL *pbHasBaseIndicies);
+ DECLSPEC_XFGVIRT(ICorDebugArrayValue, GetBaseIndicies)
HRESULT ( STDMETHODCALLTYPE *GetBaseIndicies )(
ICorDebugArrayValue * This,
/* [in] */ ULONG32 cdim,
- /* [length_is][size_is][out] */ ULONG32 indicies[ ]);
+ /* [length_is][size_is][out] */ ULONG32 indices[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugArrayValue, GetElement)
HRESULT ( STDMETHODCALLTYPE *GetElement )(
ICorDebugArrayValue * This,
/* [in] */ ULONG32 cdim,
/* [length_is][size_is][in] */ ULONG32 indices[ ],
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugArrayValue, GetElementAtPosition)
HRESULT ( STDMETHODCALLTYPE *GetElementAtPosition )(
ICorDebugArrayValue * This,
/* [in] */ ULONG32 nPosition,
#ifdef COBJMACROS
-#define ICorDebugArrayValue_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugArrayValue_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugArrayValue_AddRef(This) \
+#define ICorDebugArrayValue_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugArrayValue_Release(This) \
+#define ICorDebugArrayValue_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugArrayValue_GetType(This,pType) \
+#define ICorDebugArrayValue_GetType(This,pType) \
( (This)->lpVtbl -> GetType(This,pType) )
-#define ICorDebugArrayValue_GetSize(This,pSize) \
+#define ICorDebugArrayValue_GetSize(This,pSize) \
( (This)->lpVtbl -> GetSize(This,pSize) )
-#define ICorDebugArrayValue_GetAddress(This,pAddress) \
+#define ICorDebugArrayValue_GetAddress(This,pAddress) \
( (This)->lpVtbl -> GetAddress(This,pAddress) )
-#define ICorDebugArrayValue_CreateBreakpoint(This,ppBreakpoint) \
+#define ICorDebugArrayValue_CreateBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) )
-#define ICorDebugArrayValue_IsValid(This,pbValid) \
+#define ICorDebugArrayValue_IsValid(This,pbValid) \
( (This)->lpVtbl -> IsValid(This,pbValid) )
-#define ICorDebugArrayValue_CreateRelocBreakpoint(This,ppBreakpoint) \
+#define ICorDebugArrayValue_CreateRelocBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateRelocBreakpoint(This,ppBreakpoint) )
-#define ICorDebugArrayValue_GetElementType(This,pType) \
+#define ICorDebugArrayValue_GetElementType(This,pType) \
( (This)->lpVtbl -> GetElementType(This,pType) )
-#define ICorDebugArrayValue_GetRank(This,pnRank) \
+#define ICorDebugArrayValue_GetRank(This,pnRank) \
( (This)->lpVtbl -> GetRank(This,pnRank) )
-#define ICorDebugArrayValue_GetCount(This,pnCount) \
+#define ICorDebugArrayValue_GetCount(This,pnCount) \
( (This)->lpVtbl -> GetCount(This,pnCount) )
-#define ICorDebugArrayValue_GetDimensions(This,cdim,dims) \
+#define ICorDebugArrayValue_GetDimensions(This,cdim,dims) \
( (This)->lpVtbl -> GetDimensions(This,cdim,dims) )
-#define ICorDebugArrayValue_HasBaseIndicies(This,pbHasBaseIndicies) \
+#define ICorDebugArrayValue_HasBaseIndicies(This,pbHasBaseIndicies) \
( (This)->lpVtbl -> HasBaseIndicies(This,pbHasBaseIndicies) )
-#define ICorDebugArrayValue_GetBaseIndicies(This,cdim,indicies) \
- ( (This)->lpVtbl -> GetBaseIndicies(This,cdim,indicies) )
+#define ICorDebugArrayValue_GetBaseIndicies(This,cdim,indices) \
+ ( (This)->lpVtbl -> GetBaseIndicies(This,cdim,indices) )
-#define ICorDebugArrayValue_GetElement(This,cdim,indices,ppValue) \
+#define ICorDebugArrayValue_GetElement(This,cdim,indices,ppValue) \
( (This)->lpVtbl -> GetElement(This,cdim,indices,ppValue) )
-#define ICorDebugArrayValue_GetElementAtPosition(This,nPosition,ppValue) \
+#define ICorDebugArrayValue_GetElementAtPosition(This,nPosition,ppValue) \
( (This)->lpVtbl -> GetElementAtPosition(This,nPosition,ppValue) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugArrayValue_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugArrayValue_INTERFACE_DEFINED__ */
#ifndef __ICorDebugVariableHome_INTERFACE_DEFINED__
typedef
enum VariableLocationType
{
- VLT_REGISTER = 0,
- VLT_REGISTER_RELATIVE = ( VLT_REGISTER + 1 ) ,
- VLT_INVALID = ( VLT_REGISTER_RELATIVE + 1 )
- } VariableLocationType;
+ VLT_REGISTER = 0,
+ VLT_REGISTER_RELATIVE = ( VLT_REGISTER + 1 ) ,
+ VLT_INVALID = ( VLT_REGISTER_RELATIVE + 1 )
+ } VariableLocationType;
EXTERN_C const IID IID_ICorDebugVariableHome;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugVariableHomeVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugVariableHome * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugVariableHome * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugVariableHome * This);
+ DECLSPEC_XFGVIRT(ICorDebugVariableHome, GetCode)
HRESULT ( STDMETHODCALLTYPE *GetCode )(
ICorDebugVariableHome * This,
/* [out] */ ICorDebugCode **ppCode);
+ DECLSPEC_XFGVIRT(ICorDebugVariableHome, GetSlotIndex)
HRESULT ( STDMETHODCALLTYPE *GetSlotIndex )(
ICorDebugVariableHome * This,
/* [out] */ ULONG32 *pSlotIndex);
+ DECLSPEC_XFGVIRT(ICorDebugVariableHome, GetArgumentIndex)
HRESULT ( STDMETHODCALLTYPE *GetArgumentIndex )(
ICorDebugVariableHome * This,
/* [out] */ ULONG32 *pArgumentIndex);
+ DECLSPEC_XFGVIRT(ICorDebugVariableHome, GetLiveRange)
HRESULT ( STDMETHODCALLTYPE *GetLiveRange )(
ICorDebugVariableHome * This,
/* [out] */ ULONG32 *pStartOffset,
/* [out] */ ULONG32 *pEndOffset);
+ DECLSPEC_XFGVIRT(ICorDebugVariableHome, GetLocationType)
HRESULT ( STDMETHODCALLTYPE *GetLocationType )(
ICorDebugVariableHome * This,
/* [out] */ VariableLocationType *pLocationType);
+ DECLSPEC_XFGVIRT(ICorDebugVariableHome, GetRegister)
HRESULT ( STDMETHODCALLTYPE *GetRegister )(
ICorDebugVariableHome * This,
/* [out] */ CorDebugRegister *pRegister);
+ DECLSPEC_XFGVIRT(ICorDebugVariableHome, GetOffset)
HRESULT ( STDMETHODCALLTYPE *GetOffset )(
ICorDebugVariableHome * This,
/* [out] */ LONG *pOffset);
#ifdef COBJMACROS
-#define ICorDebugVariableHome_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugVariableHome_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugVariableHome_AddRef(This) \
+#define ICorDebugVariableHome_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugVariableHome_Release(This) \
+#define ICorDebugVariableHome_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugVariableHome_GetCode(This,ppCode) \
+#define ICorDebugVariableHome_GetCode(This,ppCode) \
( (This)->lpVtbl -> GetCode(This,ppCode) )
-#define ICorDebugVariableHome_GetSlotIndex(This,pSlotIndex) \
+#define ICorDebugVariableHome_GetSlotIndex(This,pSlotIndex) \
( (This)->lpVtbl -> GetSlotIndex(This,pSlotIndex) )
-#define ICorDebugVariableHome_GetArgumentIndex(This,pArgumentIndex) \
+#define ICorDebugVariableHome_GetArgumentIndex(This,pArgumentIndex) \
( (This)->lpVtbl -> GetArgumentIndex(This,pArgumentIndex) )
-#define ICorDebugVariableHome_GetLiveRange(This,pStartOffset,pEndOffset) \
+#define ICorDebugVariableHome_GetLiveRange(This,pStartOffset,pEndOffset) \
( (This)->lpVtbl -> GetLiveRange(This,pStartOffset,pEndOffset) )
-#define ICorDebugVariableHome_GetLocationType(This,pLocationType) \
+#define ICorDebugVariableHome_GetLocationType(This,pLocationType) \
( (This)->lpVtbl -> GetLocationType(This,pLocationType) )
-#define ICorDebugVariableHome_GetRegister(This,pRegister) \
+#define ICorDebugVariableHome_GetRegister(This,pRegister) \
( (This)->lpVtbl -> GetRegister(This,pRegister) )
-#define ICorDebugVariableHome_GetOffset(This,pOffset) \
+#define ICorDebugVariableHome_GetOffset(This,pOffset) \
( (This)->lpVtbl -> GetOffset(This,pOffset) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugVariableHome_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugVariableHome_INTERFACE_DEFINED__ */
#ifndef __ICorDebugHandleValue_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugHandleValueVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugHandleValue * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugHandleValue * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugHandleValue * This);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetType)
HRESULT ( STDMETHODCALLTYPE *GetType )(
ICorDebugHandleValue * This,
/* [out] */ CorElementType *pType);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugHandleValue * This,
/* [out] */ ULONG32 *pSize);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetAddress)
HRESULT ( STDMETHODCALLTYPE *GetAddress )(
ICorDebugHandleValue * This,
/* [out] */ CORDB_ADDRESS *pAddress);
+ DECLSPEC_XFGVIRT(ICorDebugValue, CreateBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )(
ICorDebugHandleValue * This,
/* [out] */ ICorDebugValueBreakpoint **ppBreakpoint);
+ DECLSPEC_XFGVIRT(ICorDebugReferenceValue, IsNull)
HRESULT ( STDMETHODCALLTYPE *IsNull )(
ICorDebugHandleValue * This,
/* [out] */ BOOL *pbNull);
+ DECLSPEC_XFGVIRT(ICorDebugReferenceValue, GetValue)
HRESULT ( STDMETHODCALLTYPE *GetValue )(
ICorDebugHandleValue * This,
/* [out] */ CORDB_ADDRESS *pValue);
+ DECLSPEC_XFGVIRT(ICorDebugReferenceValue, SetValue)
HRESULT ( STDMETHODCALLTYPE *SetValue )(
ICorDebugHandleValue * This,
/* [in] */ CORDB_ADDRESS value);
+ DECLSPEC_XFGVIRT(ICorDebugReferenceValue, Dereference)
HRESULT ( STDMETHODCALLTYPE *Dereference )(
ICorDebugHandleValue * This,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugReferenceValue, DereferenceStrong)
HRESULT ( STDMETHODCALLTYPE *DereferenceStrong )(
ICorDebugHandleValue * This,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugHandleValue, GetHandleType)
HRESULT ( STDMETHODCALLTYPE *GetHandleType )(
ICorDebugHandleValue * This,
/* [out] */ CorDebugHandleType *pType);
+ DECLSPEC_XFGVIRT(ICorDebugHandleValue, Dispose)
HRESULT ( STDMETHODCALLTYPE *Dispose )(
ICorDebugHandleValue * This);
#ifdef COBJMACROS
-#define ICorDebugHandleValue_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugHandleValue_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugHandleValue_AddRef(This) \
+#define ICorDebugHandleValue_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugHandleValue_Release(This) \
+#define ICorDebugHandleValue_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugHandleValue_GetType(This,pType) \
+#define ICorDebugHandleValue_GetType(This,pType) \
( (This)->lpVtbl -> GetType(This,pType) )
-#define ICorDebugHandleValue_GetSize(This,pSize) \
+#define ICorDebugHandleValue_GetSize(This,pSize) \
( (This)->lpVtbl -> GetSize(This,pSize) )
-#define ICorDebugHandleValue_GetAddress(This,pAddress) \
+#define ICorDebugHandleValue_GetAddress(This,pAddress) \
( (This)->lpVtbl -> GetAddress(This,pAddress) )
-#define ICorDebugHandleValue_CreateBreakpoint(This,ppBreakpoint) \
+#define ICorDebugHandleValue_CreateBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) )
-#define ICorDebugHandleValue_IsNull(This,pbNull) \
+#define ICorDebugHandleValue_IsNull(This,pbNull) \
( (This)->lpVtbl -> IsNull(This,pbNull) )
-#define ICorDebugHandleValue_GetValue(This,pValue) \
+#define ICorDebugHandleValue_GetValue(This,pValue) \
( (This)->lpVtbl -> GetValue(This,pValue) )
-#define ICorDebugHandleValue_SetValue(This,value) \
+#define ICorDebugHandleValue_SetValue(This,value) \
( (This)->lpVtbl -> SetValue(This,value) )
-#define ICorDebugHandleValue_Dereference(This,ppValue) \
+#define ICorDebugHandleValue_Dereference(This,ppValue) \
( (This)->lpVtbl -> Dereference(This,ppValue) )
-#define ICorDebugHandleValue_DereferenceStrong(This,ppValue) \
+#define ICorDebugHandleValue_DereferenceStrong(This,ppValue) \
( (This)->lpVtbl -> DereferenceStrong(This,ppValue) )
-#define ICorDebugHandleValue_GetHandleType(This,pType) \
+#define ICorDebugHandleValue_GetHandleType(This,pType) \
( (This)->lpVtbl -> GetHandleType(This,pType) )
-#define ICorDebugHandleValue_Dispose(This) \
+#define ICorDebugHandleValue_Dispose(This) \
( (This)->lpVtbl -> Dispose(This) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugHandleValue_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugHandleValue_INTERFACE_DEFINED__ */
#ifndef __ICorDebugContext_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugContextVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugContext * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugContext * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugContext * This);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetType)
HRESULT ( STDMETHODCALLTYPE *GetType )(
ICorDebugContext * This,
/* [out] */ CorElementType *pType);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetSize)
HRESULT ( STDMETHODCALLTYPE *GetSize )(
ICorDebugContext * This,
/* [out] */ ULONG32 *pSize);
+ DECLSPEC_XFGVIRT(ICorDebugValue, GetAddress)
HRESULT ( STDMETHODCALLTYPE *GetAddress )(
ICorDebugContext * This,
/* [out] */ CORDB_ADDRESS *pAddress);
+ DECLSPEC_XFGVIRT(ICorDebugValue, CreateBreakpoint)
HRESULT ( STDMETHODCALLTYPE *CreateBreakpoint )(
ICorDebugContext * This,
/* [out] */ ICorDebugValueBreakpoint **ppBreakpoint);
+ DECLSPEC_XFGVIRT(ICorDebugObjectValue, GetClass)
HRESULT ( STDMETHODCALLTYPE *GetClass )(
ICorDebugContext * This,
/* [out] */ ICorDebugClass **ppClass);
+ DECLSPEC_XFGVIRT(ICorDebugObjectValue, GetFieldValue)
HRESULT ( STDMETHODCALLTYPE *GetFieldValue )(
ICorDebugContext * This,
/* [in] */ ICorDebugClass *pClass,
/* [in] */ mdFieldDef fieldDef,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugObjectValue, GetVirtualMethod)
HRESULT ( STDMETHODCALLTYPE *GetVirtualMethod )(
ICorDebugContext * This,
/* [in] */ mdMemberRef memberRef,
/* [out] */ ICorDebugFunction **ppFunction);
+ DECLSPEC_XFGVIRT(ICorDebugObjectValue, GetContext)
HRESULT ( STDMETHODCALLTYPE *GetContext )(
ICorDebugContext * This,
/* [out] */ ICorDebugContext **ppContext);
+ DECLSPEC_XFGVIRT(ICorDebugObjectValue, IsValueClass)
HRESULT ( STDMETHODCALLTYPE *IsValueClass )(
ICorDebugContext * This,
/* [out] */ BOOL *pbIsValueClass);
+ DECLSPEC_XFGVIRT(ICorDebugObjectValue, GetManagedCopy)
HRESULT ( STDMETHODCALLTYPE *GetManagedCopy )(
ICorDebugContext * This,
/* [out] */ IUnknown **ppObject);
+ DECLSPEC_XFGVIRT(ICorDebugObjectValue, SetFromManagedCopy)
HRESULT ( STDMETHODCALLTYPE *SetFromManagedCopy )(
ICorDebugContext * This,
/* [in] */ IUnknown *pObject);
#ifdef COBJMACROS
-#define ICorDebugContext_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugContext_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugContext_AddRef(This) \
+#define ICorDebugContext_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugContext_Release(This) \
+#define ICorDebugContext_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugContext_GetType(This,pType) \
+#define ICorDebugContext_GetType(This,pType) \
( (This)->lpVtbl -> GetType(This,pType) )
-#define ICorDebugContext_GetSize(This,pSize) \
+#define ICorDebugContext_GetSize(This,pSize) \
( (This)->lpVtbl -> GetSize(This,pSize) )
-#define ICorDebugContext_GetAddress(This,pAddress) \
+#define ICorDebugContext_GetAddress(This,pAddress) \
( (This)->lpVtbl -> GetAddress(This,pAddress) )
-#define ICorDebugContext_CreateBreakpoint(This,ppBreakpoint) \
+#define ICorDebugContext_CreateBreakpoint(This,ppBreakpoint) \
( (This)->lpVtbl -> CreateBreakpoint(This,ppBreakpoint) )
-#define ICorDebugContext_GetClass(This,ppClass) \
+#define ICorDebugContext_GetClass(This,ppClass) \
( (This)->lpVtbl -> GetClass(This,ppClass) )
-#define ICorDebugContext_GetFieldValue(This,pClass,fieldDef,ppValue) \
+#define ICorDebugContext_GetFieldValue(This,pClass,fieldDef,ppValue) \
( (This)->lpVtbl -> GetFieldValue(This,pClass,fieldDef,ppValue) )
-#define ICorDebugContext_GetVirtualMethod(This,memberRef,ppFunction) \
+#define ICorDebugContext_GetVirtualMethod(This,memberRef,ppFunction) \
( (This)->lpVtbl -> GetVirtualMethod(This,memberRef,ppFunction) )
-#define ICorDebugContext_GetContext(This,ppContext) \
+#define ICorDebugContext_GetContext(This,ppContext) \
( (This)->lpVtbl -> GetContext(This,ppContext) )
-#define ICorDebugContext_IsValueClass(This,pbIsValueClass) \
+#define ICorDebugContext_IsValueClass(This,pbIsValueClass) \
( (This)->lpVtbl -> IsValueClass(This,pbIsValueClass) )
-#define ICorDebugContext_GetManagedCopy(This,ppObject) \
+#define ICorDebugContext_GetManagedCopy(This,ppObject) \
( (This)->lpVtbl -> GetManagedCopy(This,ppObject) )
-#define ICorDebugContext_SetFromManagedCopy(This,pObject) \
+#define ICorDebugContext_SetFromManagedCopy(This,pObject) \
( (This)->lpVtbl -> SetFromManagedCopy(This,pObject) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugContext_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugContext_INTERFACE_DEFINED__ */
#ifndef __ICorDebugComObjectValue_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugComObjectValueVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugComObjectValue * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugComObjectValue * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugComObjectValue * This);
+ DECLSPEC_XFGVIRT(ICorDebugComObjectValue, GetCachedInterfaceTypes)
HRESULT ( STDMETHODCALLTYPE *GetCachedInterfaceTypes )(
ICorDebugComObjectValue * This,
/* [in] */ BOOL bIInspectableOnly,
/* [out] */ ICorDebugTypeEnum **ppInterfacesEnum);
+ DECLSPEC_XFGVIRT(ICorDebugComObjectValue, GetCachedInterfacePointers)
HRESULT ( STDMETHODCALLTYPE *GetCachedInterfacePointers )(
ICorDebugComObjectValue * This,
/* [in] */ BOOL bIInspectableOnly,
#ifdef COBJMACROS
-#define ICorDebugComObjectValue_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugComObjectValue_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugComObjectValue_AddRef(This) \
+#define ICorDebugComObjectValue_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugComObjectValue_Release(This) \
+#define ICorDebugComObjectValue_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugComObjectValue_GetCachedInterfaceTypes(This,bIInspectableOnly,ppInterfacesEnum) \
+#define ICorDebugComObjectValue_GetCachedInterfaceTypes(This,bIInspectableOnly,ppInterfacesEnum) \
( (This)->lpVtbl -> GetCachedInterfaceTypes(This,bIInspectableOnly,ppInterfacesEnum) )
-#define ICorDebugComObjectValue_GetCachedInterfacePointers(This,bIInspectableOnly,celt,pcEltFetched,ptrs) \
+#define ICorDebugComObjectValue_GetCachedInterfacePointers(This,bIInspectableOnly,celt,pcEltFetched,ptrs) \
( (This)->lpVtbl -> GetCachedInterfacePointers(This,bIInspectableOnly,celt,pcEltFetched,ptrs) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugComObjectValue_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugComObjectValue_INTERFACE_DEFINED__ */
#ifndef __ICorDebugObjectEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugObjectEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugObjectEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugObjectEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugObjectEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugObjectEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugObjectEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugObjectEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugObjectEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugObjectEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugObjectEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugObjectEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugObjectEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugObjectEnum_AddRef(This) \
+#define ICorDebugObjectEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugObjectEnum_Release(This) \
+#define ICorDebugObjectEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugObjectEnum_Skip(This,celt) \
+#define ICorDebugObjectEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugObjectEnum_Reset(This) \
+#define ICorDebugObjectEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugObjectEnum_Clone(This,ppEnum) \
+#define ICorDebugObjectEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugObjectEnum_GetCount(This,pcelt) \
+#define ICorDebugObjectEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugObjectEnum_Next(This,celt,objects,pceltFetched) \
+#define ICorDebugObjectEnum_Next(This,celt,objects,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,objects,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugObjectEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugObjectEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugBreakpointEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugBreakpointEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugBreakpointEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugBreakpointEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugBreakpointEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugBreakpointEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugBreakpointEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugBreakpointEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugBreakpointEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugBreakpointEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugBreakpointEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugBreakpointEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugBreakpointEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugBreakpointEnum_AddRef(This) \
+#define ICorDebugBreakpointEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugBreakpointEnum_Release(This) \
+#define ICorDebugBreakpointEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugBreakpointEnum_Skip(This,celt) \
+#define ICorDebugBreakpointEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugBreakpointEnum_Reset(This) \
+#define ICorDebugBreakpointEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugBreakpointEnum_Clone(This,ppEnum) \
+#define ICorDebugBreakpointEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugBreakpointEnum_GetCount(This,pcelt) \
+#define ICorDebugBreakpointEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugBreakpointEnum_Next(This,celt,breakpoints,pceltFetched) \
+#define ICorDebugBreakpointEnum_Next(This,celt,breakpoints,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,breakpoints,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugBreakpointEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugBreakpointEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugStepperEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugStepperEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugStepperEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugStepperEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugStepperEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugStepperEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugStepperEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugStepperEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugStepperEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugStepperEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugStepperEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugStepperEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugStepperEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugStepperEnum_AddRef(This) \
+#define ICorDebugStepperEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugStepperEnum_Release(This) \
+#define ICorDebugStepperEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugStepperEnum_Skip(This,celt) \
+#define ICorDebugStepperEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugStepperEnum_Reset(This) \
+#define ICorDebugStepperEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugStepperEnum_Clone(This,ppEnum) \
+#define ICorDebugStepperEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugStepperEnum_GetCount(This,pcelt) \
+#define ICorDebugStepperEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugStepperEnum_Next(This,celt,steppers,pceltFetched) \
+#define ICorDebugStepperEnum_Next(This,celt,steppers,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,steppers,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugStepperEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugStepperEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugProcessEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugProcessEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugProcessEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugProcessEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugProcessEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugProcessEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugProcessEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugProcessEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugProcessEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugProcessEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugProcessEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugProcessEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugProcessEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugProcessEnum_AddRef(This) \
+#define ICorDebugProcessEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugProcessEnum_Release(This) \
+#define ICorDebugProcessEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugProcessEnum_Skip(This,celt) \
+#define ICorDebugProcessEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugProcessEnum_Reset(This) \
+#define ICorDebugProcessEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugProcessEnum_Clone(This,ppEnum) \
+#define ICorDebugProcessEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugProcessEnum_GetCount(This,pcelt) \
+#define ICorDebugProcessEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugProcessEnum_Next(This,celt,processes,pceltFetched) \
+#define ICorDebugProcessEnum_Next(This,celt,processes,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,processes,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugProcessEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugProcessEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugThreadEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugThreadEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugThreadEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugThreadEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugThreadEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugThreadEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugThreadEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugThreadEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugThreadEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugThreadEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugThreadEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugThreadEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugThreadEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugThreadEnum_AddRef(This) \
+#define ICorDebugThreadEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugThreadEnum_Release(This) \
+#define ICorDebugThreadEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugThreadEnum_Skip(This,celt) \
+#define ICorDebugThreadEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugThreadEnum_Reset(This) \
+#define ICorDebugThreadEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugThreadEnum_Clone(This,ppEnum) \
+#define ICorDebugThreadEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugThreadEnum_GetCount(This,pcelt) \
+#define ICorDebugThreadEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugThreadEnum_Next(This,celt,threads,pceltFetched) \
+#define ICorDebugThreadEnum_Next(This,celt,threads,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,threads,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugThreadEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugThreadEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugFrameEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugFrameEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugFrameEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugFrameEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugFrameEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugFrameEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugFrameEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugFrameEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugFrameEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugFrameEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugFrameEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugFrameEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugFrameEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugFrameEnum_AddRef(This) \
+#define ICorDebugFrameEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugFrameEnum_Release(This) \
+#define ICorDebugFrameEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugFrameEnum_Skip(This,celt) \
+#define ICorDebugFrameEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugFrameEnum_Reset(This) \
+#define ICorDebugFrameEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugFrameEnum_Clone(This,ppEnum) \
+#define ICorDebugFrameEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugFrameEnum_GetCount(This,pcelt) \
+#define ICorDebugFrameEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugFrameEnum_Next(This,celt,frames,pceltFetched) \
+#define ICorDebugFrameEnum_Next(This,celt,frames,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,frames,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugFrameEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugFrameEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugChainEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugChainEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugChainEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugChainEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugChainEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugChainEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugChainEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugChainEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugChainEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugChainEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugChainEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugChainEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugChainEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugChainEnum_AddRef(This) \
+#define ICorDebugChainEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugChainEnum_Release(This) \
+#define ICorDebugChainEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugChainEnum_Skip(This,celt) \
+#define ICorDebugChainEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugChainEnum_Reset(This) \
+#define ICorDebugChainEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugChainEnum_Clone(This,ppEnum) \
+#define ICorDebugChainEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugChainEnum_GetCount(This,pcelt) \
+#define ICorDebugChainEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugChainEnum_Next(This,celt,chains,pceltFetched) \
+#define ICorDebugChainEnum_Next(This,celt,chains,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,chains,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugChainEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugChainEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugModuleEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugModuleEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugModuleEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugModuleEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugModuleEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugModuleEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugModuleEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugModuleEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugModuleEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugModuleEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugModuleEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugModuleEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugModuleEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugModuleEnum_AddRef(This) \
+#define ICorDebugModuleEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugModuleEnum_Release(This) \
+#define ICorDebugModuleEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugModuleEnum_Skip(This,celt) \
+#define ICorDebugModuleEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugModuleEnum_Reset(This) \
+#define ICorDebugModuleEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugModuleEnum_Clone(This,ppEnum) \
+#define ICorDebugModuleEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugModuleEnum_GetCount(This,pcelt) \
+#define ICorDebugModuleEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugModuleEnum_Next(This,celt,modules,pceltFetched) \
+#define ICorDebugModuleEnum_Next(This,celt,modules,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,modules,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugModuleEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugModuleEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugValueEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugValueEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugValueEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugValueEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugValueEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugValueEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugValueEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugValueEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugValueEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugValueEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugValueEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugValueEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugValueEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugValueEnum_AddRef(This) \
+#define ICorDebugValueEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugValueEnum_Release(This) \
+#define ICorDebugValueEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugValueEnum_Skip(This,celt) \
+#define ICorDebugValueEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugValueEnum_Reset(This) \
+#define ICorDebugValueEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugValueEnum_Clone(This,ppEnum) \
+#define ICorDebugValueEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugValueEnum_GetCount(This,pcelt) \
+#define ICorDebugValueEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugValueEnum_Next(This,celt,values,pceltFetched) \
+#define ICorDebugValueEnum_Next(This,celt,values,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugValueEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugValueEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugVariableHomeEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugVariableHomeEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugVariableHomeEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugVariableHomeEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugVariableHomeEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugVariableHomeEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugVariableHomeEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugVariableHomeEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugVariableHomeEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugVariableHomeEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugVariableHomeEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugVariableHomeEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugVariableHomeEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugVariableHomeEnum_AddRef(This) \
+#define ICorDebugVariableHomeEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugVariableHomeEnum_Release(This) \
+#define ICorDebugVariableHomeEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugVariableHomeEnum_Skip(This,celt) \
+#define ICorDebugVariableHomeEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugVariableHomeEnum_Reset(This) \
+#define ICorDebugVariableHomeEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugVariableHomeEnum_Clone(This,ppEnum) \
+#define ICorDebugVariableHomeEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugVariableHomeEnum_GetCount(This,pcelt) \
+#define ICorDebugVariableHomeEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugVariableHomeEnum_Next(This,celt,homes,pceltFetched) \
+#define ICorDebugVariableHomeEnum_Next(This,celt,homes,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,homes,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugVariableHomeEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugVariableHomeEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugCodeEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugCodeEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugCodeEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugCodeEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugCodeEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugCodeEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugCodeEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugCodeEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugCodeEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugCodeEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugCodeEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugCodeEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugCodeEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugCodeEnum_AddRef(This) \
+#define ICorDebugCodeEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugCodeEnum_Release(This) \
+#define ICorDebugCodeEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugCodeEnum_Skip(This,celt) \
+#define ICorDebugCodeEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugCodeEnum_Reset(This) \
+#define ICorDebugCodeEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugCodeEnum_Clone(This,ppEnum) \
+#define ICorDebugCodeEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugCodeEnum_GetCount(This,pcelt) \
+#define ICorDebugCodeEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugCodeEnum_Next(This,celt,values,pceltFetched) \
+#define ICorDebugCodeEnum_Next(This,celt,values,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugCodeEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugCodeEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugTypeEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugTypeEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugTypeEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugTypeEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugTypeEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugTypeEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugTypeEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugTypeEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugTypeEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugTypeEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugTypeEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugTypeEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugTypeEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugTypeEnum_AddRef(This) \
+#define ICorDebugTypeEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugTypeEnum_Release(This) \
+#define ICorDebugTypeEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugTypeEnum_Skip(This,celt) \
+#define ICorDebugTypeEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugTypeEnum_Reset(This) \
+#define ICorDebugTypeEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugTypeEnum_Clone(This,ppEnum) \
+#define ICorDebugTypeEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugTypeEnum_GetCount(This,pcelt) \
+#define ICorDebugTypeEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugTypeEnum_Next(This,celt,values,pceltFetched) \
+#define ICorDebugTypeEnum_Next(This,celt,values,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugTypeEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugTypeEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugType_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugTypeVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugType * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugType * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugType * This);
+ DECLSPEC_XFGVIRT(ICorDebugType, GetType)
HRESULT ( STDMETHODCALLTYPE *GetType )(
ICorDebugType * This,
/* [out] */ CorElementType *ty);
+ DECLSPEC_XFGVIRT(ICorDebugType, GetClass)
HRESULT ( STDMETHODCALLTYPE *GetClass )(
ICorDebugType * This,
/* [out] */ ICorDebugClass **ppClass);
+ DECLSPEC_XFGVIRT(ICorDebugType, EnumerateTypeParameters)
HRESULT ( STDMETHODCALLTYPE *EnumerateTypeParameters )(
ICorDebugType * This,
/* [out] */ ICorDebugTypeEnum **ppTyParEnum);
+ DECLSPEC_XFGVIRT(ICorDebugType, GetFirstTypeParameter)
HRESULT ( STDMETHODCALLTYPE *GetFirstTypeParameter )(
ICorDebugType * This,
/* [out] */ ICorDebugType **value);
+ DECLSPEC_XFGVIRT(ICorDebugType, GetBase)
HRESULT ( STDMETHODCALLTYPE *GetBase )(
ICorDebugType * This,
/* [out] */ ICorDebugType **pBase);
+ DECLSPEC_XFGVIRT(ICorDebugType, GetStaticFieldValue)
HRESULT ( STDMETHODCALLTYPE *GetStaticFieldValue )(
ICorDebugType * This,
/* [in] */ mdFieldDef fieldDef,
/* [in] */ ICorDebugFrame *pFrame,
/* [out] */ ICorDebugValue **ppValue);
+ DECLSPEC_XFGVIRT(ICorDebugType, GetRank)
HRESULT ( STDMETHODCALLTYPE *GetRank )(
ICorDebugType * This,
/* [out] */ ULONG32 *pnRank);
#ifdef COBJMACROS
-#define ICorDebugType_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugType_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugType_AddRef(This) \
+#define ICorDebugType_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugType_Release(This) \
+#define ICorDebugType_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugType_GetType(This,ty) \
+#define ICorDebugType_GetType(This,ty) \
( (This)->lpVtbl -> GetType(This,ty) )
-#define ICorDebugType_GetClass(This,ppClass) \
+#define ICorDebugType_GetClass(This,ppClass) \
( (This)->lpVtbl -> GetClass(This,ppClass) )
-#define ICorDebugType_EnumerateTypeParameters(This,ppTyParEnum) \
+#define ICorDebugType_EnumerateTypeParameters(This,ppTyParEnum) \
( (This)->lpVtbl -> EnumerateTypeParameters(This,ppTyParEnum) )
-#define ICorDebugType_GetFirstTypeParameter(This,value) \
+#define ICorDebugType_GetFirstTypeParameter(This,value) \
( (This)->lpVtbl -> GetFirstTypeParameter(This,value) )
-#define ICorDebugType_GetBase(This,pBase) \
+#define ICorDebugType_GetBase(This,pBase) \
( (This)->lpVtbl -> GetBase(This,pBase) )
-#define ICorDebugType_GetStaticFieldValue(This,fieldDef,pFrame,ppValue) \
+#define ICorDebugType_GetStaticFieldValue(This,fieldDef,pFrame,ppValue) \
( (This)->lpVtbl -> GetStaticFieldValue(This,fieldDef,pFrame,ppValue) )
-#define ICorDebugType_GetRank(This,pnRank) \
+#define ICorDebugType_GetRank(This,pnRank) \
( (This)->lpVtbl -> GetRank(This,pnRank) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugType_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugType_INTERFACE_DEFINED__ */
#ifndef __ICorDebugType2_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugType2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugType2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugType2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugType2 * This);
+ DECLSPEC_XFGVIRT(ICorDebugType2, GetTypeID)
HRESULT ( STDMETHODCALLTYPE *GetTypeID )(
ICorDebugType2 * This,
/* [out] */ COR_TYPEID *id);
#ifdef COBJMACROS
-#define ICorDebugType2_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugType2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugType2_AddRef(This) \
+#define ICorDebugType2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugType2_Release(This) \
+#define ICorDebugType2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugType2_GetTypeID(This,id) \
+#define ICorDebugType2_GetTypeID(This,id) \
( (This)->lpVtbl -> GetTypeID(This,id) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugType2_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugType2_INTERFACE_DEFINED__ */
#ifndef __ICorDebugErrorInfoEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugErrorInfoEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugErrorInfoEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugErrorInfoEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugErrorInfoEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugErrorInfoEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugErrorInfoEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugErrorInfoEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugErrorInfoEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugErrorInfoEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugErrorInfoEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugErrorInfoEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugErrorInfoEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugErrorInfoEnum_AddRef(This) \
+#define ICorDebugErrorInfoEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugErrorInfoEnum_Release(This) \
+#define ICorDebugErrorInfoEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugErrorInfoEnum_Skip(This,celt) \
+#define ICorDebugErrorInfoEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugErrorInfoEnum_Reset(This) \
+#define ICorDebugErrorInfoEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugErrorInfoEnum_Clone(This,ppEnum) \
+#define ICorDebugErrorInfoEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugErrorInfoEnum_GetCount(This,pcelt) \
+#define ICorDebugErrorInfoEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugErrorInfoEnum_Next(This,celt,errors,pceltFetched) \
+#define ICorDebugErrorInfoEnum_Next(This,celt,errors,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,errors,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugErrorInfoEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugErrorInfoEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugAppDomainEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugAppDomainEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugAppDomainEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugAppDomainEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugAppDomainEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugAppDomainEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugAppDomainEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugAppDomainEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugAppDomainEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugAppDomainEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugAppDomainEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugAppDomainEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugAppDomainEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugAppDomainEnum_AddRef(This) \
+#define ICorDebugAppDomainEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugAppDomainEnum_Release(This) \
+#define ICorDebugAppDomainEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugAppDomainEnum_Skip(This,celt) \
+#define ICorDebugAppDomainEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugAppDomainEnum_Reset(This) \
+#define ICorDebugAppDomainEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugAppDomainEnum_Clone(This,ppEnum) \
+#define ICorDebugAppDomainEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugAppDomainEnum_GetCount(This,pcelt) \
+#define ICorDebugAppDomainEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugAppDomainEnum_Next(This,celt,values,pceltFetched) \
+#define ICorDebugAppDomainEnum_Next(This,celt,values,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugAppDomainEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugAppDomainEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugAssemblyEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugAssemblyEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugAssemblyEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugAssemblyEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugAssemblyEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugAssemblyEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugAssemblyEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugAssemblyEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugAssemblyEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugAssemblyEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugAssemblyEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugAssemblyEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugAssemblyEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugAssemblyEnum_AddRef(This) \
+#define ICorDebugAssemblyEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugAssemblyEnum_Release(This) \
+#define ICorDebugAssemblyEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugAssemblyEnum_Skip(This,celt) \
+#define ICorDebugAssemblyEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugAssemblyEnum_Reset(This) \
+#define ICorDebugAssemblyEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugAssemblyEnum_Clone(This,ppEnum) \
+#define ICorDebugAssemblyEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugAssemblyEnum_GetCount(This,pcelt) \
+#define ICorDebugAssemblyEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugAssemblyEnum_Next(This,celt,values,pceltFetched) \
+#define ICorDebugAssemblyEnum_Next(This,celt,values,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugAssemblyEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugAssemblyEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugBlockingObjectEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugBlockingObjectEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugBlockingObjectEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugBlockingObjectEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugBlockingObjectEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugBlockingObjectEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugBlockingObjectEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugBlockingObjectEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugBlockingObjectEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugBlockingObjectEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugBlockingObjectEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugBlockingObjectEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugBlockingObjectEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugBlockingObjectEnum_AddRef(This) \
+#define ICorDebugBlockingObjectEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugBlockingObjectEnum_Release(This) \
+#define ICorDebugBlockingObjectEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugBlockingObjectEnum_Skip(This,celt) \
+#define ICorDebugBlockingObjectEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugBlockingObjectEnum_Reset(This) \
+#define ICorDebugBlockingObjectEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugBlockingObjectEnum_Clone(This,ppEnum) \
+#define ICorDebugBlockingObjectEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugBlockingObjectEnum_GetCount(This,pcelt) \
+#define ICorDebugBlockingObjectEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugBlockingObjectEnum_Next(This,celt,values,pceltFetched) \
+#define ICorDebugBlockingObjectEnum_Next(This,celt,values,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugBlockingObjectEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugBlockingObjectEnum_INTERFACE_DEFINED__ */
-/* interface __MIDL_itf_cordebug_0000_0130 */
+/* interface __MIDL_itf_cordebug_0000_0131 */
/* [local] */
#pragma warning(push)
#pragma warning(disable:28718)
-extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0130_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0130_v0_0_s_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0131_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0131_v0_0_s_ifspec;
#ifndef __ICorDebugMDA_INTERFACE_DEFINED__
#define __ICorDebugMDA_INTERFACE_DEFINED__
typedef
enum CorDebugMDAFlags
{
- MDA_FLAG_SLIP = 0x2
- } CorDebugMDAFlags;
+ MDA_FLAG_SLIP = 0x2
+ } CorDebugMDAFlags;
EXTERN_C const IID IID_ICorDebugMDA;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugMDAVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugMDA * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugMDA * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugMDA * This);
+ DECLSPEC_XFGVIRT(ICorDebugMDA, GetName)
HRESULT ( STDMETHODCALLTYPE *GetName )(
ICorDebugMDA * This,
/* [in] */ ULONG32 cchName,
/* [out] */ ULONG32 *pcchName,
/* [length_is][size_is][out] */ WCHAR szName[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugMDA, GetDescription)
HRESULT ( STDMETHODCALLTYPE *GetDescription )(
ICorDebugMDA * This,
/* [in] */ ULONG32 cchName,
/* [out] */ ULONG32 *pcchName,
/* [length_is][size_is][out] */ WCHAR szName[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugMDA, GetXML)
HRESULT ( STDMETHODCALLTYPE *GetXML )(
ICorDebugMDA * This,
/* [in] */ ULONG32 cchName,
/* [out] */ ULONG32 *pcchName,
/* [length_is][size_is][out] */ WCHAR szName[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugMDA, GetFlags)
HRESULT ( STDMETHODCALLTYPE *GetFlags )(
ICorDebugMDA * This,
/* [in] */ CorDebugMDAFlags *pFlags);
+ DECLSPEC_XFGVIRT(ICorDebugMDA, GetOSThreadId)
HRESULT ( STDMETHODCALLTYPE *GetOSThreadId )(
ICorDebugMDA * This,
/* [out] */ DWORD *pOsTid);
#ifdef COBJMACROS
-#define ICorDebugMDA_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugMDA_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugMDA_AddRef(This) \
+#define ICorDebugMDA_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugMDA_Release(This) \
+#define ICorDebugMDA_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugMDA_GetName(This,cchName,pcchName,szName) \
+#define ICorDebugMDA_GetName(This,cchName,pcchName,szName) \
( (This)->lpVtbl -> GetName(This,cchName,pcchName,szName) )
-#define ICorDebugMDA_GetDescription(This,cchName,pcchName,szName) \
+#define ICorDebugMDA_GetDescription(This,cchName,pcchName,szName) \
( (This)->lpVtbl -> GetDescription(This,cchName,pcchName,szName) )
-#define ICorDebugMDA_GetXML(This,cchName,pcchName,szName) \
+#define ICorDebugMDA_GetXML(This,cchName,pcchName,szName) \
( (This)->lpVtbl -> GetXML(This,cchName,pcchName,szName) )
-#define ICorDebugMDA_GetFlags(This,pFlags) \
+#define ICorDebugMDA_GetFlags(This,pFlags) \
( (This)->lpVtbl -> GetFlags(This,pFlags) )
-#define ICorDebugMDA_GetOSThreadId(This,pOsTid) \
+#define ICorDebugMDA_GetOSThreadId(This,pOsTid) \
( (This)->lpVtbl -> GetOSThreadId(This,pOsTid) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugMDA_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugMDA_INTERFACE_DEFINED__ */
-/* interface __MIDL_itf_cordebug_0000_0131 */
+/* interface __MIDL_itf_cordebug_0000_0132 */
/* [local] */
#pragma warning(pop)
#pragma warning(disable:28718)
-extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0131_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0131_v0_0_s_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0132_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0132_v0_0_s_ifspec;
#ifndef __ICorDebugEditAndContinueErrorInfo_INTERFACE_DEFINED__
#define __ICorDebugEditAndContinueErrorInfo_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugEditAndContinueErrorInfoVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugEditAndContinueErrorInfo * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugEditAndContinueErrorInfo * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugEditAndContinueErrorInfo * This);
+ DECLSPEC_XFGVIRT(ICorDebugEditAndContinueErrorInfo, GetModule)
HRESULT ( STDMETHODCALLTYPE *GetModule )(
ICorDebugEditAndContinueErrorInfo * This,
/* [out] */ ICorDebugModule **ppModule);
+ DECLSPEC_XFGVIRT(ICorDebugEditAndContinueErrorInfo, GetToken)
HRESULT ( STDMETHODCALLTYPE *GetToken )(
ICorDebugEditAndContinueErrorInfo * This,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorDebugEditAndContinueErrorInfo, GetErrorCode)
HRESULT ( STDMETHODCALLTYPE *GetErrorCode )(
ICorDebugEditAndContinueErrorInfo * This,
/* [out] */ HRESULT *pHr);
+ DECLSPEC_XFGVIRT(ICorDebugEditAndContinueErrorInfo, GetString)
HRESULT ( STDMETHODCALLTYPE *GetString )(
ICorDebugEditAndContinueErrorInfo * This,
/* [in] */ ULONG32 cchString,
#ifdef COBJMACROS
-#define ICorDebugEditAndContinueErrorInfo_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugEditAndContinueErrorInfo_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugEditAndContinueErrorInfo_AddRef(This) \
+#define ICorDebugEditAndContinueErrorInfo_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugEditAndContinueErrorInfo_Release(This) \
+#define ICorDebugEditAndContinueErrorInfo_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugEditAndContinueErrorInfo_GetModule(This,ppModule) \
+#define ICorDebugEditAndContinueErrorInfo_GetModule(This,ppModule) \
( (This)->lpVtbl -> GetModule(This,ppModule) )
-#define ICorDebugEditAndContinueErrorInfo_GetToken(This,pToken) \
+#define ICorDebugEditAndContinueErrorInfo_GetToken(This,pToken) \
( (This)->lpVtbl -> GetToken(This,pToken) )
-#define ICorDebugEditAndContinueErrorInfo_GetErrorCode(This,pHr) \
+#define ICorDebugEditAndContinueErrorInfo_GetErrorCode(This,pHr) \
( (This)->lpVtbl -> GetErrorCode(This,pHr) )
-#define ICorDebugEditAndContinueErrorInfo_GetString(This,cchString,pcchString,szString) \
+#define ICorDebugEditAndContinueErrorInfo_GetString(This,cchString,pcchString,szString) \
( (This)->lpVtbl -> GetString(This,cchString,pcchString,szString) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugEditAndContinueErrorInfo_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugEditAndContinueErrorInfo_INTERFACE_DEFINED__ */
-/* interface __MIDL_itf_cordebug_0000_0132 */
+/* interface __MIDL_itf_cordebug_0000_0133 */
/* [local] */
#pragma warning(pop)
-extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0132_v0_0_c_ifspec;
-extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0132_v0_0_s_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0133_v0_0_c_ifspec;
+extern RPC_IF_HANDLE __MIDL_itf_cordebug_0000_0133_v0_0_s_ifspec;
#ifndef __ICorDebugEditAndContinueSnapshot_INTERFACE_DEFINED__
#define __ICorDebugEditAndContinueSnapshot_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugEditAndContinueSnapshotVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugEditAndContinueSnapshot * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugEditAndContinueSnapshot * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugEditAndContinueSnapshot * This);
+ DECLSPEC_XFGVIRT(ICorDebugEditAndContinueSnapshot, CopyMetaData)
HRESULT ( STDMETHODCALLTYPE *CopyMetaData )(
ICorDebugEditAndContinueSnapshot * This,
/* [in] */ IStream *pIStream,
/* [out] */ GUID *pMvid);
+ DECLSPEC_XFGVIRT(ICorDebugEditAndContinueSnapshot, GetMvid)
HRESULT ( STDMETHODCALLTYPE *GetMvid )(
ICorDebugEditAndContinueSnapshot * This,
/* [out] */ GUID *pMvid);
+ DECLSPEC_XFGVIRT(ICorDebugEditAndContinueSnapshot, GetRoDataRVA)
HRESULT ( STDMETHODCALLTYPE *GetRoDataRVA )(
ICorDebugEditAndContinueSnapshot * This,
/* [out] */ ULONG32 *pRoDataRVA);
+ DECLSPEC_XFGVIRT(ICorDebugEditAndContinueSnapshot, GetRwDataRVA)
HRESULT ( STDMETHODCALLTYPE *GetRwDataRVA )(
ICorDebugEditAndContinueSnapshot * This,
/* [out] */ ULONG32 *pRwDataRVA);
+ DECLSPEC_XFGVIRT(ICorDebugEditAndContinueSnapshot, SetPEBytes)
HRESULT ( STDMETHODCALLTYPE *SetPEBytes )(
ICorDebugEditAndContinueSnapshot * This,
/* [in] */ IStream *pIStream);
+ DECLSPEC_XFGVIRT(ICorDebugEditAndContinueSnapshot, SetILMap)
HRESULT ( STDMETHODCALLTYPE *SetILMap )(
ICorDebugEditAndContinueSnapshot * This,
/* [in] */ mdToken mdFunction,
/* [in] */ ULONG cMapSize,
/* [size_is][in] */ COR_IL_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorDebugEditAndContinueSnapshot, SetPESymbolBytes)
HRESULT ( STDMETHODCALLTYPE *SetPESymbolBytes )(
ICorDebugEditAndContinueSnapshot * This,
/* [in] */ IStream *pIStream);
#ifdef COBJMACROS
-#define ICorDebugEditAndContinueSnapshot_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugEditAndContinueSnapshot_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugEditAndContinueSnapshot_AddRef(This) \
+#define ICorDebugEditAndContinueSnapshot_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugEditAndContinueSnapshot_Release(This) \
+#define ICorDebugEditAndContinueSnapshot_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugEditAndContinueSnapshot_CopyMetaData(This,pIStream,pMvid) \
+#define ICorDebugEditAndContinueSnapshot_CopyMetaData(This,pIStream,pMvid) \
( (This)->lpVtbl -> CopyMetaData(This,pIStream,pMvid) )
-#define ICorDebugEditAndContinueSnapshot_GetMvid(This,pMvid) \
+#define ICorDebugEditAndContinueSnapshot_GetMvid(This,pMvid) \
( (This)->lpVtbl -> GetMvid(This,pMvid) )
-#define ICorDebugEditAndContinueSnapshot_GetRoDataRVA(This,pRoDataRVA) \
+#define ICorDebugEditAndContinueSnapshot_GetRoDataRVA(This,pRoDataRVA) \
( (This)->lpVtbl -> GetRoDataRVA(This,pRoDataRVA) )
-#define ICorDebugEditAndContinueSnapshot_GetRwDataRVA(This,pRwDataRVA) \
+#define ICorDebugEditAndContinueSnapshot_GetRwDataRVA(This,pRwDataRVA) \
( (This)->lpVtbl -> GetRwDataRVA(This,pRwDataRVA) )
-#define ICorDebugEditAndContinueSnapshot_SetPEBytes(This,pIStream) \
+#define ICorDebugEditAndContinueSnapshot_SetPEBytes(This,pIStream) \
( (This)->lpVtbl -> SetPEBytes(This,pIStream) )
-#define ICorDebugEditAndContinueSnapshot_SetILMap(This,mdFunction,cMapSize,map) \
+#define ICorDebugEditAndContinueSnapshot_SetILMap(This,mdFunction,cMapSize,map) \
( (This)->lpVtbl -> SetILMap(This,mdFunction,cMapSize,map) )
-#define ICorDebugEditAndContinueSnapshot_SetPESymbolBytes(This,pIStream) \
+#define ICorDebugEditAndContinueSnapshot_SetPESymbolBytes(This,pIStream) \
( (This)->lpVtbl -> SetPESymbolBytes(This,pIStream) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugEditAndContinueSnapshot_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugEditAndContinueSnapshot_INTERFACE_DEFINED__ */
#ifndef __ICorDebugExceptionObjectCallStackEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugExceptionObjectCallStackEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugExceptionObjectCallStackEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugExceptionObjectCallStackEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugExceptionObjectCallStackEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorDebugExceptionObjectCallStackEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorDebugExceptionObjectCallStackEnum * This);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorDebugExceptionObjectCallStackEnum * This,
/* [out] */ ICorDebugEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorDebugEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorDebugExceptionObjectCallStackEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorDebugExceptionObjectCallStackEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorDebugExceptionObjectCallStackEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorDebugExceptionObjectCallStackEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugExceptionObjectCallStackEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugExceptionObjectCallStackEnum_AddRef(This) \
+#define ICorDebugExceptionObjectCallStackEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugExceptionObjectCallStackEnum_Release(This) \
+#define ICorDebugExceptionObjectCallStackEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugExceptionObjectCallStackEnum_Skip(This,celt) \
+#define ICorDebugExceptionObjectCallStackEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorDebugExceptionObjectCallStackEnum_Reset(This) \
+#define ICorDebugExceptionObjectCallStackEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorDebugExceptionObjectCallStackEnum_Clone(This,ppEnum) \
+#define ICorDebugExceptionObjectCallStackEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorDebugExceptionObjectCallStackEnum_GetCount(This,pcelt) \
+#define ICorDebugExceptionObjectCallStackEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorDebugExceptionObjectCallStackEnum_Next(This,celt,values,pceltFetched) \
+#define ICorDebugExceptionObjectCallStackEnum_Next(This,celt,values,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,values,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorDebugExceptionObjectCallStackEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugExceptionObjectCallStackEnum_INTERFACE_DEFINED__ */
#ifndef __ICorDebugExceptionObjectValue_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorDebugExceptionObjectValueVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorDebugExceptionObjectValue * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorDebugExceptionObjectValue * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorDebugExceptionObjectValue * This);
+ DECLSPEC_XFGVIRT(ICorDebugExceptionObjectValue, EnumerateExceptionCallStack)
HRESULT ( STDMETHODCALLTYPE *EnumerateExceptionCallStack )(
ICorDebugExceptionObjectValue * This,
/* [out] */ ICorDebugExceptionObjectCallStackEnum **ppCallStackEnum);
#ifdef COBJMACROS
-#define ICorDebugExceptionObjectValue_QueryInterface(This,riid,ppvObject) \
+#define ICorDebugExceptionObjectValue_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorDebugExceptionObjectValue_AddRef(This) \
+#define ICorDebugExceptionObjectValue_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorDebugExceptionObjectValue_Release(This) \
+#define ICorDebugExceptionObjectValue_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorDebugExceptionObjectValue_EnumerateExceptionCallStack(This,ppCallStackEnum) \
+#define ICorDebugExceptionObjectValue_EnumerateExceptionCallStack(This,ppCallStackEnum) \
( (This)->lpVtbl -> EnumerateExceptionCallStack(This,ppCallStackEnum) )
#endif /* COBJMACROS */
+#endif /* C style interface */
+
+
+
+
+#endif /* __ICorDebugExceptionObjectValue_INTERFACE_DEFINED__ */
+
+
+#ifndef __ICorDebugExceptionObjectValue2_INTERFACE_DEFINED__
+#define __ICorDebugExceptionObjectValue2_INTERFACE_DEFINED__
+
+/* interface ICorDebugExceptionObjectValue2 */
+/* [unique][uuid][local][object] */
+
+
+EXTERN_C const IID IID_ICorDebugExceptionObjectValue2;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("e3b2f332-cc46-4f1e-ab4e-5400e332195e")
+ ICorDebugExceptionObjectValue2 : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE ForceCatchHandlerFoundEvents(
+ /* [in] */ BOOL enableEvents) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct ICorDebugExceptionObjectValue2Vtbl
+ {
+ BEGIN_INTERFACE
+
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ ICorDebugExceptionObjectValue2 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ ICorDebugExceptionObjectValue2 * This);
+
+ DECLSPEC_XFGVIRT(IUnknown, Release)
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ ICorDebugExceptionObjectValue2 * This);
+
+ DECLSPEC_XFGVIRT(ICorDebugExceptionObjectValue2, ForceCatchHandlerFoundEvents)
+ HRESULT ( STDMETHODCALLTYPE *ForceCatchHandlerFoundEvents )(
+ ICorDebugExceptionObjectValue2 * This,
+ /* [in] */ BOOL enableEvents);
+
+ END_INTERFACE
+ } ICorDebugExceptionObjectValue2Vtbl;
+
+ interface ICorDebugExceptionObjectValue2
+ {
+ CONST_VTBL struct ICorDebugExceptionObjectValue2Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define ICorDebugExceptionObjectValue2_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define ICorDebugExceptionObjectValue2_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define ICorDebugExceptionObjectValue2_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define ICorDebugExceptionObjectValue2_ForceCatchHandlerFoundEvents(This,enableEvents) \
+ ( (This)->lpVtbl -> ForceCatchHandlerFoundEvents(This,enableEvents) )
+
+#endif /* COBJMACROS */
+
+
#endif /* C style interface */
-#endif /* __ICorDebugExceptionObjectValue_INTERFACE_DEFINED__ */
+#endif /* __ICorDebugExceptionObjectValue2_INTERFACE_DEFINED__ */
#endif
#endif
+
+
#define CORDBG_S_FUNC_EVAL_ABORTED SMAKEHR(0x1319)
#define CORDBG_S_AT_END_OF_STACK SMAKEHR(0x1324)
#define CORDBG_S_NOT_ALL_BITS_SET SMAKEHR(0x1c13)
-#define CEE_E_CVTRES_NOT_FOUND EMAKEHR(0x1001)
#define COR_E_TYPEUNLOADED EMAKEHR(0x1013)
#define COR_E_APPDOMAINUNLOADED EMAKEHR(0x1014)
#define COR_E_CANNOTUNLOADAPPDOMAIN EMAKEHR(0x1015)
#define MSEE_E_ASSEMBLYLOADINPROGRESS EMAKEHR(0x1016)
#define COR_E_ASSEMBLYEXPECTED EMAKEHR(0x1018)
-#define COR_E_FIXUPSINEXE EMAKEHR(0x1019)
#define COR_E_NEWER_RUNTIME EMAKEHR(0x101b)
#define COR_E_MULTIMODULEASSEMBLIESDIALLOWED EMAKEHR(0x101e)
-#define HOST_E_DEADLOCK EMAKEHR(0x1020)
#define HOST_E_INVALIDOPERATION EMAKEHR(0x1022)
#define HOST_E_CLRNOTAVAILABLE EMAKEHR(0x1023)
-#define HOST_E_EXITPROCESS_THREADABORT EMAKEHR(0x1027)
-#define HOST_E_EXITPROCESS_ADUNLOAD EMAKEHR(0x1028)
-#define HOST_E_EXITPROCESS_TIMEOUT EMAKEHR(0x1029)
-#define HOST_E_EXITPROCESS_OUTOFMEMORY EMAKEHR(0x102a)
-#define COR_E_MODULE_HASH_CHECK_FAILED EMAKEHR(0x1039)
#define FUSION_E_REF_DEF_MISMATCH EMAKEHR(0x1040)
-#define FUSION_E_INVALID_PRIVATE_ASM_LOCATION EMAKEHR(0x1041)
-#define FUSION_E_ASM_MODULE_MISSING EMAKEHR(0x1042)
-#define FUSION_E_PRIVATE_ASM_DISALLOWED EMAKEHR(0x1044)
-#define FUSION_E_SIGNATURE_CHECK_FAILED EMAKEHR(0x1045)
#define FUSION_E_INVALID_NAME EMAKEHR(0x1047)
-#define FUSION_E_CODE_DOWNLOAD_DISABLED EMAKEHR(0x1048)
-#define FUSION_E_HOST_GAC_ASM_MISMATCH EMAKEHR(0x1050)
-#define FUSION_E_LOADFROM_BLOCKED EMAKEHR(0x1051)
-#define FUSION_E_CACHEFILE_FAILED EMAKEHR(0x1052)
#define FUSION_E_APP_DOMAIN_LOCKED EMAKEHR(0x1053)
-#define FUSION_E_CONFIGURATION_ERROR EMAKEHR(0x1054)
-#define FUSION_E_MANIFEST_PARSE_ERROR EMAKEHR(0x1055)
#define COR_E_LOADING_REFERENCE_ASSEMBLY EMAKEHR(0x1058)
-#define COR_E_NI_AND_RUNTIME_VERSION_MISMATCH EMAKEHR(0x1059)
-#define COR_E_LOADING_WINMD_REFERENCE_ASSEMBLY EMAKEHR(0x1069)
#define COR_E_AMBIGUOUSIMPLEMENTATION EMAKEHR(0x106a)
#define CLDB_E_FILE_BADREAD EMAKEHR(0x1100)
#define CLDB_E_FILE_BADWRITE EMAKEHR(0x1101)
#define CORDIAGIPC_E_UNKNOWN_MAGIC EMAKEHR(0x1386)
#define CORDIAGIPC_E_UNKNOWN_ERROR EMAKEHR(0x1387)
#define CORPROF_E_SUSPENSION_IN_PROGRESS EMAKEHR(0x1388)
-#define SECURITY_E_INCOMPATIBLE_SHARE EMAKEHR(0x1401)
-#define SECURITY_E_UNVERIFIABLE EMAKEHR(0x1402)
-#define SECURITY_E_INCOMPATIBLE_EVIDENCE EMAKEHR(0x1403)
+#define CORPROF_E_NOT_GC_OBJECT EMAKEHR(0x1389)
+#define CORPROF_E_MODULE_IS_ENC EMAKEHR(0x138A)
#define CORSEC_E_POLICY_EXCEPTION EMAKEHR(0x1416)
#define CORSEC_E_MIN_GRANT_FAIL EMAKEHR(0x1417)
#define CORSEC_E_NO_EXEC_PERM EMAKEHR(0x1418)
#define CORSEC_E_XMLSYNTAX EMAKEHR(0x1419)
#define CORSEC_E_INVALID_STRONGNAME EMAKEHR(0x141a)
-#define CORSEC_E_MISSING_STRONGNAME EMAKEHR(0x141b)
#define CORSEC_E_INVALID_IMAGE_FORMAT EMAKEHR(0x141d)
#define CORSEC_E_INVALID_PUBLICKEY EMAKEHR(0x141e)
#define CORSEC_E_SIGNATURE_MISMATCH EMAKEHR(0x1420)
#define CORSEC_E_CRYPTO EMAKEHR(0x1430)
#define CORSEC_E_CRYPTO_UNEX_OPER EMAKEHR(0x1431)
-#define CORSECATTR_E_BAD_ACTION EMAKEHR(0x1442)
#define COR_E_EXCEPTION EMAKEHR(0x1500)
#define COR_E_SYSTEM EMAKEHR(0x1501)
#define COR_E_ARGUMENTOUTOFRANGE EMAKEHR(0x1502)
#define CORDBG_E_ILLEGAL_IN_OPTIMIZED_CODE EMAKEHR(0x1c26)
#define CORDBG_E_APPDOMAIN_MISMATCH EMAKEHR(0x1c28)
#define CORDBG_E_CONTEXT_UNVAILABLE EMAKEHR(0x1c29)
-#define CORDBG_E_UNCOMPATIBLE_PLATFORMS EMAKEHR(0x1c30)
+#define CORDBG_E_INCOMPATIBLE_PLATFORMS EMAKEHR(0x1c30)
#define CORDBG_E_DEBUGGING_DISABLED EMAKEHR(0x1c31)
#define CORDBG_E_DETACH_FAILED_ON_ENC EMAKEHR(0x1c32)
#define CORDBG_E_CURRENT_EXCEPTION_IS_OUTSIDE_CURRENT_EXECUTION_SCOPE EMAKEHR(0x1c33)
#define CORDBG_E_UNSUPPORTED EMAKEHR(0x1c4e)
#define CORDBG_E_MISSING_DEBUGGER_EXPORTS EMAKEHR(0x1c4f)
#define CORDBG_E_DATA_TARGET_ERROR EMAKEHR(0x1c61)
-#define CORDBG_E_NO_IMAGE_AVAILABLE EMAKEHR(0x1c64)
#define CORDBG_E_UNSUPPORTED_DELEGATE EMAKEHR(0x1c68)
#define CORDBG_E_ASSEMBLY_UPDATES_APPLIED EMAKEHR(0x1c69)
#define PEFMT_E_64BIT EMAKEHR(0x1d02)
#define PEFMT_E_32BIT EMAKEHR(0x1d0b)
#define CLDB_E_INTERNALERROR EMAKEHR(0x1fff)
-#define CLR_E_BIND_ASSEMBLY_VERSION_TOO_LOW EMAKEHR(0x2000)
-#define CLR_E_BIND_ASSEMBLY_PUBLIC_KEY_MISMATCH EMAKEHR(0x2001)
-#define CLR_E_BIND_IMAGE_UNAVAILABLE EMAKEHR(0x2002)
-#define CLR_E_BIND_UNRECOGNIZED_IDENTITY_FORMAT EMAKEHR(0x2003)
-#define CLR_E_BIND_ASSEMBLY_NOT_FOUND EMAKEHR(0x2004)
-#define CLR_E_BIND_TYPE_NOT_FOUND EMAKEHR(0x2005)
-#define CLR_E_BIND_SYS_ASM_NI_MISSING EMAKEHR(0x2006)
-#define CLR_E_BIND_NI_SECURITY_FAILURE EMAKEHR(0x2007)
-#define CLR_E_BIND_NI_DEP_IDENTITY_MISMATCH EMAKEHR(0x2008)
+#define CLR_E_BIND_ARCHITECTURE_MISMATCH EMAKEHR(0x2006)
#define CLR_E_GC_OOM EMAKEHR(0x2009)
#define CLR_E_GC_BAD_AFFINITY_CONFIG EMAKEHR(0x200a)
#define CLR_E_GC_BAD_AFFINITY_CONFIG_FORMAT EMAKEHR(0x200b)
-#define CLR_E_CROSSGEN_NO_IBC_DATA_FOUND EMAKEHR(0x200c)
-#define CLR_E_GC_BAD_HARD_LIMIT EMAKEHR(0x200d)
-#define CLR_E_GC_LARGE_PAGE_MISSING_HARD_LIMIT EMAKEHR(0x200e)
+#define CLR_E_GC_BAD_HARD_LIMIT EMAKEHR(0x200d)
+#define CLR_E_GC_LARGE_PAGE_MISSING_HARD_LIMIT EMAKEHR(0x200e)
+#define CLR_E_GC_BAD_REGION_SIZE EMAKEHR(0x200f)
#define COR_E_UNAUTHORIZEDACCESS E_ACCESSDENIED
#define COR_E_ARGUMENT E_INVALIDARG
#define COR_E_INVALIDCAST E_NOINTERFACE
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
- /* File created by MIDL compiler version 8.01.0622 */
+ /* File created by MIDL compiler version 8.01.0628 */
/* Compiler settings for corprof.idl:
- Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0622
+ Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0628
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
#pragma once
#endif
+#ifndef DECLSPEC_XFGVIRT
+#if defined(_CONTROL_FLOW_GUARD_XFG)
+#define DECLSPEC_XFGVIRT(base, func) __declspec(xfg_virtual(base, func))
+#else
+#define DECLSPEC_XFGVIRT(base, func)
+#endif
+#endif
+
/* Forward Declarations */
#ifndef __ICorProfilerCallback_FWD_DEFINED__
#define __ICorProfilerCallback_FWD_DEFINED__
typedef interface ICorProfilerCallback ICorProfilerCallback;
-#endif /* __ICorProfilerCallback_FWD_DEFINED__ */
+#endif /* __ICorProfilerCallback_FWD_DEFINED__ */
#ifndef __ICorProfilerCallback2_FWD_DEFINED__
#define __ICorProfilerCallback2_FWD_DEFINED__
typedef interface ICorProfilerCallback2 ICorProfilerCallback2;
-#endif /* __ICorProfilerCallback2_FWD_DEFINED__ */
+#endif /* __ICorProfilerCallback2_FWD_DEFINED__ */
#ifndef __ICorProfilerCallback3_FWD_DEFINED__
#define __ICorProfilerCallback3_FWD_DEFINED__
typedef interface ICorProfilerCallback3 ICorProfilerCallback3;
-#endif /* __ICorProfilerCallback3_FWD_DEFINED__ */
+#endif /* __ICorProfilerCallback3_FWD_DEFINED__ */
#ifndef __ICorProfilerCallback4_FWD_DEFINED__
#define __ICorProfilerCallback4_FWD_DEFINED__
typedef interface ICorProfilerCallback4 ICorProfilerCallback4;
-#endif /* __ICorProfilerCallback4_FWD_DEFINED__ */
+#endif /* __ICorProfilerCallback4_FWD_DEFINED__ */
#ifndef __ICorProfilerCallback5_FWD_DEFINED__
#define __ICorProfilerCallback5_FWD_DEFINED__
typedef interface ICorProfilerCallback5 ICorProfilerCallback5;
-#endif /* __ICorProfilerCallback5_FWD_DEFINED__ */
+#endif /* __ICorProfilerCallback5_FWD_DEFINED__ */
#ifndef __ICorProfilerCallback6_FWD_DEFINED__
#define __ICorProfilerCallback6_FWD_DEFINED__
typedef interface ICorProfilerCallback6 ICorProfilerCallback6;
-#endif /* __ICorProfilerCallback6_FWD_DEFINED__ */
+#endif /* __ICorProfilerCallback6_FWD_DEFINED__ */
#ifndef __ICorProfilerCallback7_FWD_DEFINED__
#define __ICorProfilerCallback7_FWD_DEFINED__
typedef interface ICorProfilerCallback7 ICorProfilerCallback7;
-#endif /* __ICorProfilerCallback7_FWD_DEFINED__ */
+#endif /* __ICorProfilerCallback7_FWD_DEFINED__ */
#ifndef __ICorProfilerCallback8_FWD_DEFINED__
#define __ICorProfilerCallback8_FWD_DEFINED__
typedef interface ICorProfilerCallback8 ICorProfilerCallback8;
-#endif /* __ICorProfilerCallback8_FWD_DEFINED__ */
+#endif /* __ICorProfilerCallback8_FWD_DEFINED__ */
#ifndef __ICorProfilerCallback9_FWD_DEFINED__
#define __ICorProfilerCallback9_FWD_DEFINED__
typedef interface ICorProfilerCallback9 ICorProfilerCallback9;
-#endif /* __ICorProfilerCallback9_FWD_DEFINED__ */
+#endif /* __ICorProfilerCallback9_FWD_DEFINED__ */
#ifndef __ICorProfilerCallback10_FWD_DEFINED__
#define __ICorProfilerCallback10_FWD_DEFINED__
typedef interface ICorProfilerCallback10 ICorProfilerCallback10;
-#endif /* __ICorProfilerCallback10_FWD_DEFINED__ */
+#endif /* __ICorProfilerCallback10_FWD_DEFINED__ */
#ifndef __ICorProfilerCallback11_FWD_DEFINED__
#define __ICorProfilerCallback11_FWD_DEFINED__
typedef interface ICorProfilerCallback11 ICorProfilerCallback11;
-#endif /* __ICorProfilerCallback11_FWD_DEFINED__ */
+#endif /* __ICorProfilerCallback11_FWD_DEFINED__ */
#ifndef __ICorProfilerInfo_FWD_DEFINED__
#define __ICorProfilerInfo_FWD_DEFINED__
typedef interface ICorProfilerInfo ICorProfilerInfo;
-#endif /* __ICorProfilerInfo_FWD_DEFINED__ */
+#endif /* __ICorProfilerInfo_FWD_DEFINED__ */
#ifndef __ICorProfilerInfo2_FWD_DEFINED__
#define __ICorProfilerInfo2_FWD_DEFINED__
typedef interface ICorProfilerInfo2 ICorProfilerInfo2;
-#endif /* __ICorProfilerInfo2_FWD_DEFINED__ */
+#endif /* __ICorProfilerInfo2_FWD_DEFINED__ */
#ifndef __ICorProfilerInfo3_FWD_DEFINED__
#define __ICorProfilerInfo3_FWD_DEFINED__
typedef interface ICorProfilerInfo3 ICorProfilerInfo3;
-#endif /* __ICorProfilerInfo3_FWD_DEFINED__ */
+#endif /* __ICorProfilerInfo3_FWD_DEFINED__ */
#ifndef __ICorProfilerObjectEnum_FWD_DEFINED__
#define __ICorProfilerObjectEnum_FWD_DEFINED__
typedef interface ICorProfilerObjectEnum ICorProfilerObjectEnum;
-#endif /* __ICorProfilerObjectEnum_FWD_DEFINED__ */
+#endif /* __ICorProfilerObjectEnum_FWD_DEFINED__ */
#ifndef __ICorProfilerFunctionEnum_FWD_DEFINED__
#define __ICorProfilerFunctionEnum_FWD_DEFINED__
typedef interface ICorProfilerFunctionEnum ICorProfilerFunctionEnum;
-#endif /* __ICorProfilerFunctionEnum_FWD_DEFINED__ */
+#endif /* __ICorProfilerFunctionEnum_FWD_DEFINED__ */
#ifndef __ICorProfilerModuleEnum_FWD_DEFINED__
#define __ICorProfilerModuleEnum_FWD_DEFINED__
typedef interface ICorProfilerModuleEnum ICorProfilerModuleEnum;
-#endif /* __ICorProfilerModuleEnum_FWD_DEFINED__ */
+#endif /* __ICorProfilerModuleEnum_FWD_DEFINED__ */
#ifndef __IMethodMalloc_FWD_DEFINED__
#define __IMethodMalloc_FWD_DEFINED__
typedef interface IMethodMalloc IMethodMalloc;
-#endif /* __IMethodMalloc_FWD_DEFINED__ */
+#endif /* __IMethodMalloc_FWD_DEFINED__ */
#ifndef __ICorProfilerFunctionControl_FWD_DEFINED__
#define __ICorProfilerFunctionControl_FWD_DEFINED__
typedef interface ICorProfilerFunctionControl ICorProfilerFunctionControl;
-#endif /* __ICorProfilerFunctionControl_FWD_DEFINED__ */
+#endif /* __ICorProfilerFunctionControl_FWD_DEFINED__ */
#ifndef __ICorProfilerInfo4_FWD_DEFINED__
#define __ICorProfilerInfo4_FWD_DEFINED__
typedef interface ICorProfilerInfo4 ICorProfilerInfo4;
-#endif /* __ICorProfilerInfo4_FWD_DEFINED__ */
+#endif /* __ICorProfilerInfo4_FWD_DEFINED__ */
#ifndef __ICorProfilerInfo5_FWD_DEFINED__
#define __ICorProfilerInfo5_FWD_DEFINED__
typedef interface ICorProfilerInfo5 ICorProfilerInfo5;
-#endif /* __ICorProfilerInfo5_FWD_DEFINED__ */
+#endif /* __ICorProfilerInfo5_FWD_DEFINED__ */
#ifndef __ICorProfilerInfo6_FWD_DEFINED__
#define __ICorProfilerInfo6_FWD_DEFINED__
typedef interface ICorProfilerInfo6 ICorProfilerInfo6;
-#endif /* __ICorProfilerInfo6_FWD_DEFINED__ */
+#endif /* __ICorProfilerInfo6_FWD_DEFINED__ */
#ifndef __ICorProfilerInfo7_FWD_DEFINED__
#define __ICorProfilerInfo7_FWD_DEFINED__
typedef interface ICorProfilerInfo7 ICorProfilerInfo7;
-#endif /* __ICorProfilerInfo7_FWD_DEFINED__ */
+#endif /* __ICorProfilerInfo7_FWD_DEFINED__ */
#ifndef __ICorProfilerInfo8_FWD_DEFINED__
#define __ICorProfilerInfo8_FWD_DEFINED__
typedef interface ICorProfilerInfo8 ICorProfilerInfo8;
-#endif /* __ICorProfilerInfo8_FWD_DEFINED__ */
+#endif /* __ICorProfilerInfo8_FWD_DEFINED__ */
#ifndef __ICorProfilerInfo9_FWD_DEFINED__
#define __ICorProfilerInfo9_FWD_DEFINED__
typedef interface ICorProfilerInfo9 ICorProfilerInfo9;
-#endif /* __ICorProfilerInfo9_FWD_DEFINED__ */
+#endif /* __ICorProfilerInfo9_FWD_DEFINED__ */
#ifndef __ICorProfilerInfo10_FWD_DEFINED__
#define __ICorProfilerInfo10_FWD_DEFINED__
typedef interface ICorProfilerInfo10 ICorProfilerInfo10;
-#endif /* __ICorProfilerInfo10_FWD_DEFINED__ */
+#endif /* __ICorProfilerInfo10_FWD_DEFINED__ */
#ifndef __ICorProfilerInfo11_FWD_DEFINED__
#define __ICorProfilerInfo11_FWD_DEFINED__
typedef interface ICorProfilerInfo11 ICorProfilerInfo11;
-#endif /* __ICorProfilerInfo11_FWD_DEFINED__ */
+#endif /* __ICorProfilerInfo11_FWD_DEFINED__ */
#ifndef __ICorProfilerInfo12_FWD_DEFINED__
#define __ICorProfilerInfo12_FWD_DEFINED__
typedef interface ICorProfilerInfo12 ICorProfilerInfo12;
-#endif /* __ICorProfilerInfo12_FWD_DEFINED__ */
+#endif /* __ICorProfilerInfo12_FWD_DEFINED__ */
+
+
+#ifndef __ICorProfilerInfo13_FWD_DEFINED__
+#define __ICorProfilerInfo13_FWD_DEFINED__
+typedef interface ICorProfilerInfo13 ICorProfilerInfo13;
+
+#endif /* __ICorProfilerInfo13_FWD_DEFINED__ */
+
+
+#ifndef __ICorProfilerInfo14_FWD_DEFINED__
+#define __ICorProfilerInfo14_FWD_DEFINED__
+typedef interface ICorProfilerInfo14 ICorProfilerInfo14;
+
+#endif /* __ICorProfilerInfo14_FWD_DEFINED__ */
+
+
+#ifndef __ICorProfilerInfo15_FWD_DEFINED__
+#define __ICorProfilerInfo15_FWD_DEFINED__
+typedef interface ICorProfilerInfo15 ICorProfilerInfo15;
+
+#endif /* __ICorProfilerInfo15_FWD_DEFINED__ */
#ifndef __ICorProfilerMethodEnum_FWD_DEFINED__
#define __ICorProfilerMethodEnum_FWD_DEFINED__
typedef interface ICorProfilerMethodEnum ICorProfilerMethodEnum;
-#endif /* __ICorProfilerMethodEnum_FWD_DEFINED__ */
+#endif /* __ICorProfilerMethodEnum_FWD_DEFINED__ */
#ifndef __ICorProfilerThreadEnum_FWD_DEFINED__
#define __ICorProfilerThreadEnum_FWD_DEFINED__
typedef interface ICorProfilerThreadEnum ICorProfilerThreadEnum;
-#endif /* __ICorProfilerThreadEnum_FWD_DEFINED__ */
+#endif /* __ICorProfilerThreadEnum_FWD_DEFINED__ */
#ifndef __ICorProfilerAssemblyReferenceProvider_FWD_DEFINED__
#define __ICorProfilerAssemblyReferenceProvider_FWD_DEFINED__
typedef interface ICorProfilerAssemblyReferenceProvider ICorProfilerAssemblyReferenceProvider;
-#endif /* __ICorProfilerAssemblyReferenceProvider_FWD_DEFINED__ */
+#endif /* __ICorProfilerAssemblyReferenceProvider_FWD_DEFINED__ */
/* header files for imported files */
/* interface __MIDL_itf_corprof_0000_0000 */
/* [local] */
-#define CorDB_CONTROL_Profiling "Cor_Enable_Profiling"
-#define CorDB_CONTROL_ProfilingL L"Cor_Enable_Profiling"
#if 0
typedef LONG32 mdToken;
DWORD dwOSPlatformId;
DWORD dwOSMajorVersion;
DWORD dwOSMinorVersion;
- } OSINFO;
+ } OSINFO;
typedef /* [public][public][public] */ struct __MIDL___MIDL_itf_corprof_0000_0000_0002
{
ULONG ulProcessor;
OSINFO *rOS;
ULONG ulOS;
- } ASSEMBLYMETADATA;
+ } ASSEMBLYMETADATA;
#endif
typedef const BYTE *LPCBYTE;
ULONG32 oldOffset;
ULONG32 newOffset;
BOOL fAccurate;
- } COR_IL_MAP;
+ } COR_IL_MAP;
#endif //_COR_IL_MAP
#ifndef _COR_DEBUG_IL_TO_NATIVE_MAP_
typedef
enum CorDebugIlToNativeMappingTypes
{
- NO_MAPPING = -1,
- PROLOG = -2,
- EPILOG = -3
- } CorDebugIlToNativeMappingTypes;
+ NO_MAPPING = -1,
+ PROLOG = -2,
+ EPILOG = -3
+ } CorDebugIlToNativeMappingTypes;
typedef struct COR_DEBUG_IL_TO_NATIVE_MAP
{
ULONG32 ilOffset;
ULONG32 nativeStartOffset;
ULONG32 nativeEndOffset;
- } COR_DEBUG_IL_TO_NATIVE_MAP;
+ } COR_DEBUG_IL_TO_NATIVE_MAP;
#endif // _COR_DEBUG_IL_TO_NATIVE_MAP_
#ifndef _COR_FIELD_OFFSET_
{
mdFieldDef ridOfField;
ULONG ulOffset;
- } COR_FIELD_OFFSET;
+ } COR_FIELD_OFFSET;
#endif // _COR_FIELD_OFFSET_
typedef UINT_PTR ProcessID;
{
FunctionID functionID;
UINT_PTR clientID;
- } FunctionIDOrClientID;
+ } FunctionIDOrClientID;
typedef UINT_PTR __stdcall __stdcall FunctionIDMapper(
FunctionID funcId,
typedef
enum _COR_PRF_SNAPSHOT_INFO
{
- COR_PRF_SNAPSHOT_DEFAULT = 0,
- COR_PRF_SNAPSHOT_REGISTER_CONTEXT = 0x1,
- COR_PRF_SNAPSHOT_X86_OPTIMIZED = 0x2
- } COR_PRF_SNAPSHOT_INFO;
+ COR_PRF_SNAPSHOT_DEFAULT = 0,
+ COR_PRF_SNAPSHOT_REGISTER_CONTEXT = 0x1,
+ COR_PRF_SNAPSHOT_X86_OPTIMIZED = 0x2
+ } COR_PRF_SNAPSHOT_INFO;
typedef UINT_PTR COR_PRF_FRAME_INFO;
{
UINT_PTR startAddress;
ULONG length;
- } COR_PRF_FUNCTION_ARGUMENT_RANGE;
+ } COR_PRF_FUNCTION_ARGUMENT_RANGE;
typedef struct _COR_PRF_FUNCTION_ARGUMENT_INFO
{
ULONG numRanges;
ULONG totalArgumentSize;
COR_PRF_FUNCTION_ARGUMENT_RANGE ranges[ 1 ];
- } COR_PRF_FUNCTION_ARGUMENT_INFO;
+ } COR_PRF_FUNCTION_ARGUMENT_INFO;
typedef struct _COR_PRF_CODE_INFO
{
UINT_PTR startAddress;
SIZE_T size;
- } COR_PRF_CODE_INFO;
+ } COR_PRF_CODE_INFO;
typedef /* [public][public] */
enum __MIDL___MIDL_itf_corprof_0000_0000_0004
{
- COR_PRF_FIELD_NOT_A_STATIC = 0,
- COR_PRF_FIELD_APP_DOMAIN_STATIC = 0x1,
- COR_PRF_FIELD_THREAD_STATIC = 0x2,
- COR_PRF_FIELD_CONTEXT_STATIC = 0x4,
- COR_PRF_FIELD_RVA_STATIC = 0x8
- } COR_PRF_STATIC_TYPE;
+ COR_PRF_FIELD_NOT_A_STATIC = 0,
+ COR_PRF_FIELD_APP_DOMAIN_STATIC = 0x1,
+ COR_PRF_FIELD_THREAD_STATIC = 0x2,
+ COR_PRF_FIELD_CONTEXT_STATIC = 0x4,
+ COR_PRF_FIELD_RVA_STATIC = 0x8
+ } COR_PRF_STATIC_TYPE;
typedef struct _COR_PRF_FUNCTION
{
FunctionID functionId;
ReJITID reJitId;
- } COR_PRF_FUNCTION;
+ } COR_PRF_FUNCTION;
typedef struct _COR_PRF_ASSEMBLY_REFERENCE_INFO
{
void *pbHashValue;
ULONG cbHashValue;
DWORD dwAssemblyRefFlags;
- } COR_PRF_ASSEMBLY_REFERENCE_INFO;
+ } COR_PRF_ASSEMBLY_REFERENCE_INFO;
typedef struct _COR_PRF_METHOD
{
ModuleID moduleId;
mdMethodDef methodId;
- } COR_PRF_METHOD;
+ } COR_PRF_METHOD;
typedef void FunctionEnter(
FunctionID funcID);
typedef /* [public] */
enum __MIDL___MIDL_itf_corprof_0000_0000_0005
{
- COR_PRF_MONITOR_NONE = 0,
- COR_PRF_MONITOR_FUNCTION_UNLOADS = 0x1,
- COR_PRF_MONITOR_CLASS_LOADS = 0x2,
- COR_PRF_MONITOR_MODULE_LOADS = 0x4,
- COR_PRF_MONITOR_ASSEMBLY_LOADS = 0x8,
- COR_PRF_MONITOR_APPDOMAIN_LOADS = 0x10,
- COR_PRF_MONITOR_JIT_COMPILATION = 0x20,
- COR_PRF_MONITOR_EXCEPTIONS = 0x40,
- COR_PRF_MONITOR_GC = 0x80,
- COR_PRF_MONITOR_OBJECT_ALLOCATED = 0x100,
- COR_PRF_MONITOR_THREADS = 0x200,
- COR_PRF_MONITOR_REMOTING = 0x400,
- COR_PRF_MONITOR_CODE_TRANSITIONS = 0x800,
- COR_PRF_MONITOR_ENTERLEAVE = 0x1000,
- COR_PRF_MONITOR_CCW = 0x2000,
- COR_PRF_MONITOR_REMOTING_COOKIE = ( 0x4000 | COR_PRF_MONITOR_REMOTING ) ,
- COR_PRF_MONITOR_REMOTING_ASYNC = ( 0x8000 | COR_PRF_MONITOR_REMOTING ) ,
- COR_PRF_MONITOR_SUSPENDS = 0x10000,
- COR_PRF_MONITOR_CACHE_SEARCHES = 0x20000,
- COR_PRF_ENABLE_REJIT = 0x40000,
- COR_PRF_ENABLE_INPROC_DEBUGGING = 0x80000,
- COR_PRF_ENABLE_JIT_MAPS = 0x100000,
- COR_PRF_DISABLE_INLINING = 0x200000,
- COR_PRF_DISABLE_OPTIMIZATIONS = 0x400000,
- COR_PRF_ENABLE_OBJECT_ALLOCATED = 0x800000,
- COR_PRF_MONITOR_CLR_EXCEPTIONS = 0x1000000,
- COR_PRF_MONITOR_ALL = 0x107ffff,
- COR_PRF_ENABLE_FUNCTION_ARGS = 0x2000000,
- COR_PRF_ENABLE_FUNCTION_RETVAL = 0x4000000,
- COR_PRF_ENABLE_FRAME_INFO = 0x8000000,
- COR_PRF_ENABLE_STACK_SNAPSHOT = 0x10000000,
- COR_PRF_USE_PROFILE_IMAGES = 0x20000000,
- COR_PRF_DISABLE_TRANSPARENCY_CHECKS_UNDER_FULL_TRUST = 0x40000000,
- COR_PRF_DISABLE_ALL_NGEN_IMAGES = 0x80000000,
- COR_PRF_ALL = 0x8fffffff,
- COR_PRF_REQUIRE_PROFILE_IMAGE = ( ( COR_PRF_USE_PROFILE_IMAGES | COR_PRF_MONITOR_CODE_TRANSITIONS ) | COR_PRF_MONITOR_ENTERLEAVE ) ,
- COR_PRF_ALLOWABLE_AFTER_ATTACH = ( ( ( ( ( ( ( ( ( ( COR_PRF_MONITOR_THREADS | COR_PRF_MONITOR_MODULE_LOADS ) | COR_PRF_MONITOR_ASSEMBLY_LOADS ) | COR_PRF_MONITOR_APPDOMAIN_LOADS ) | COR_PRF_ENABLE_STACK_SNAPSHOT ) | COR_PRF_MONITOR_GC ) | COR_PRF_MONITOR_SUSPENDS ) | COR_PRF_MONITOR_CLASS_LOADS ) | COR_PRF_MONITOR_EXCEPTIONS ) | COR_PRF_MONITOR_JIT_COMPILATION ) | COR_PRF_ENABLE_REJIT ) ,
- COR_PRF_ALLOWABLE_NOTIFICATION_PROFILER = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( COR_PRF_MONITOR_FUNCTION_UNLOADS | COR_PRF_MONITOR_CLASS_LOADS ) | COR_PRF_MONITOR_MODULE_LOADS ) | COR_PRF_MONITOR_ASSEMBLY_LOADS ) | COR_PRF_MONITOR_APPDOMAIN_LOADS ) | COR_PRF_MONITOR_JIT_COMPILATION ) | COR_PRF_MONITOR_EXCEPTIONS ) | COR_PRF_MONITOR_OBJECT_ALLOCATED ) | COR_PRF_MONITOR_THREADS ) | COR_PRF_MONITOR_CODE_TRANSITIONS ) | COR_PRF_MONITOR_CCW ) | COR_PRF_MONITOR_SUSPENDS ) | COR_PRF_MONITOR_CACHE_SEARCHES ) | COR_PRF_DISABLE_INLINING ) | COR_PRF_DISABLE_OPTIMIZATIONS ) | COR_PRF_ENABLE_OBJECT_ALLOCATED ) | COR_PRF_MONITOR_CLR_EXCEPTIONS ) | COR_PRF_ENABLE_STACK_SNAPSHOT ) | COR_PRF_USE_PROFILE_IMAGES ) | COR_PRF_DISABLE_ALL_NGEN_IMAGES ) ,
- COR_PRF_MONITOR_IMMUTABLE = ( ( ( ( ( ( ( ( ( ( ( ( ( ( COR_PRF_MONITOR_CODE_TRANSITIONS | COR_PRF_MONITOR_REMOTING ) | COR_PRF_MONITOR_REMOTING_COOKIE ) | COR_PRF_MONITOR_REMOTING_ASYNC ) | COR_PRF_ENABLE_INPROC_DEBUGGING ) | COR_PRF_ENABLE_JIT_MAPS ) | COR_PRF_DISABLE_OPTIMIZATIONS ) | COR_PRF_DISABLE_INLINING ) | COR_PRF_ENABLE_OBJECT_ALLOCATED ) | COR_PRF_ENABLE_FUNCTION_ARGS ) | COR_PRF_ENABLE_FUNCTION_RETVAL ) | COR_PRF_ENABLE_FRAME_INFO ) | COR_PRF_USE_PROFILE_IMAGES ) | COR_PRF_DISABLE_TRANSPARENCY_CHECKS_UNDER_FULL_TRUST ) | COR_PRF_DISABLE_ALL_NGEN_IMAGES )
- } COR_PRF_MONITOR;
+ COR_PRF_MONITOR_NONE = 0,
+ COR_PRF_MONITOR_FUNCTION_UNLOADS = 0x1,
+ COR_PRF_MONITOR_CLASS_LOADS = 0x2,
+ COR_PRF_MONITOR_MODULE_LOADS = 0x4,
+ COR_PRF_MONITOR_ASSEMBLY_LOADS = 0x8,
+ COR_PRF_MONITOR_APPDOMAIN_LOADS = 0x10,
+ COR_PRF_MONITOR_JIT_COMPILATION = 0x20,
+ COR_PRF_MONITOR_EXCEPTIONS = 0x40,
+ COR_PRF_MONITOR_GC = 0x80,
+ COR_PRF_MONITOR_OBJECT_ALLOCATED = 0x100,
+ COR_PRF_MONITOR_THREADS = 0x200,
+ COR_PRF_MONITOR_REMOTING = 0x400,
+ COR_PRF_MONITOR_CODE_TRANSITIONS = 0x800,
+ COR_PRF_MONITOR_ENTERLEAVE = 0x1000,
+ COR_PRF_MONITOR_CCW = 0x2000,
+ COR_PRF_MONITOR_REMOTING_COOKIE = ( 0x4000 | COR_PRF_MONITOR_REMOTING ) ,
+ COR_PRF_MONITOR_REMOTING_ASYNC = ( 0x8000 | COR_PRF_MONITOR_REMOTING ) ,
+ COR_PRF_MONITOR_SUSPENDS = 0x10000,
+ COR_PRF_MONITOR_CACHE_SEARCHES = 0x20000,
+ COR_PRF_ENABLE_REJIT = 0x40000,
+ COR_PRF_ENABLE_INPROC_DEBUGGING = 0x80000,
+ COR_PRF_ENABLE_JIT_MAPS = 0x100000,
+ COR_PRF_DISABLE_INLINING = 0x200000,
+ COR_PRF_DISABLE_OPTIMIZATIONS = 0x400000,
+ COR_PRF_ENABLE_OBJECT_ALLOCATED = 0x800000,
+ COR_PRF_MONITOR_CLR_EXCEPTIONS = 0x1000000,
+ COR_PRF_MONITOR_ALL = 0x107ffff,
+ COR_PRF_ENABLE_FUNCTION_ARGS = 0x2000000,
+ COR_PRF_ENABLE_FUNCTION_RETVAL = 0x4000000,
+ COR_PRF_ENABLE_FRAME_INFO = 0x8000000,
+ COR_PRF_ENABLE_STACK_SNAPSHOT = 0x10000000,
+ COR_PRF_USE_PROFILE_IMAGES = 0x20000000,
+ COR_PRF_DISABLE_TRANSPARENCY_CHECKS_UNDER_FULL_TRUST = 0x40000000,
+ COR_PRF_DISABLE_ALL_NGEN_IMAGES = 0x80000000,
+ COR_PRF_ALL = 0x8fffffff,
+ COR_PRF_REQUIRE_PROFILE_IMAGE = ( ( COR_PRF_USE_PROFILE_IMAGES | COR_PRF_MONITOR_CODE_TRANSITIONS ) | COR_PRF_MONITOR_ENTERLEAVE ) ,
+ COR_PRF_ALLOWABLE_AFTER_ATTACH = ( ( ( ( ( ( ( ( ( ( COR_PRF_MONITOR_THREADS | COR_PRF_MONITOR_MODULE_LOADS ) | COR_PRF_MONITOR_ASSEMBLY_LOADS ) | COR_PRF_MONITOR_APPDOMAIN_LOADS ) | COR_PRF_ENABLE_STACK_SNAPSHOT ) | COR_PRF_MONITOR_GC ) | COR_PRF_MONITOR_SUSPENDS ) | COR_PRF_MONITOR_CLASS_LOADS ) | COR_PRF_MONITOR_EXCEPTIONS ) | COR_PRF_MONITOR_JIT_COMPILATION ) | COR_PRF_ENABLE_REJIT ) ,
+ COR_PRF_ALLOWABLE_NOTIFICATION_PROFILER = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( COR_PRF_MONITOR_FUNCTION_UNLOADS | COR_PRF_MONITOR_CLASS_LOADS ) | COR_PRF_MONITOR_MODULE_LOADS ) | COR_PRF_MONITOR_ASSEMBLY_LOADS ) | COR_PRF_MONITOR_APPDOMAIN_LOADS ) | COR_PRF_MONITOR_JIT_COMPILATION ) | COR_PRF_MONITOR_EXCEPTIONS ) | COR_PRF_MONITOR_OBJECT_ALLOCATED ) | COR_PRF_MONITOR_THREADS ) | COR_PRF_MONITOR_CODE_TRANSITIONS ) | COR_PRF_MONITOR_CCW ) | COR_PRF_MONITOR_SUSPENDS ) | COR_PRF_MONITOR_CACHE_SEARCHES ) | COR_PRF_DISABLE_INLINING ) | COR_PRF_DISABLE_OPTIMIZATIONS ) | COR_PRF_ENABLE_OBJECT_ALLOCATED ) | COR_PRF_MONITOR_CLR_EXCEPTIONS ) | COR_PRF_ENABLE_STACK_SNAPSHOT ) | COR_PRF_USE_PROFILE_IMAGES ) | COR_PRF_DISABLE_ALL_NGEN_IMAGES ) ,
+ COR_PRF_MONITOR_IMMUTABLE = ( ( ( ( ( ( ( ( ( ( ( ( ( ( COR_PRF_MONITOR_CODE_TRANSITIONS | COR_PRF_MONITOR_REMOTING ) | COR_PRF_MONITOR_REMOTING_COOKIE ) | COR_PRF_MONITOR_REMOTING_ASYNC ) | COR_PRF_ENABLE_INPROC_DEBUGGING ) | COR_PRF_ENABLE_JIT_MAPS ) | COR_PRF_DISABLE_OPTIMIZATIONS ) | COR_PRF_DISABLE_INLINING ) | COR_PRF_ENABLE_OBJECT_ALLOCATED ) | COR_PRF_ENABLE_FUNCTION_ARGS ) | COR_PRF_ENABLE_FUNCTION_RETVAL ) | COR_PRF_ENABLE_FRAME_INFO ) | COR_PRF_USE_PROFILE_IMAGES ) | COR_PRF_DISABLE_TRANSPARENCY_CHECKS_UNDER_FULL_TRUST ) | COR_PRF_DISABLE_ALL_NGEN_IMAGES )
+ } COR_PRF_MONITOR;
typedef /* [public] */
enum __MIDL___MIDL_itf_corprof_0000_0000_0006
{
- COR_PRF_HIGH_MONITOR_NONE = 0,
- COR_PRF_HIGH_ADD_ASSEMBLY_REFERENCES = 0x1,
- COR_PRF_HIGH_IN_MEMORY_SYMBOLS_UPDATED = 0x2,
- COR_PRF_HIGH_MONITOR_DYNAMIC_FUNCTION_UNLOADS = 0x4,
- COR_PRF_HIGH_DISABLE_TIERED_COMPILATION = 0x8,
- COR_PRF_HIGH_BASIC_GC = 0x10,
- COR_PRF_HIGH_MONITOR_GC_MOVED_OBJECTS = 0x20,
- COR_PRF_HIGH_REQUIRE_PROFILE_IMAGE = 0,
- COR_PRF_HIGH_MONITOR_LARGEOBJECT_ALLOCATED = 0x40,
- COR_PRF_HIGH_MONITOR_EVENT_PIPE = 0x80,
- COR_PRF_HIGH_MONITOR_PINNEDOBJECT_ALLOCATED = 0x100,
- COR_PRF_HIGH_ALLOWABLE_AFTER_ATTACH = ( ( ( ( ( COR_PRF_HIGH_IN_MEMORY_SYMBOLS_UPDATED | COR_PRF_HIGH_MONITOR_DYNAMIC_FUNCTION_UNLOADS ) | COR_PRF_HIGH_BASIC_GC ) | COR_PRF_HIGH_MONITOR_GC_MOVED_OBJECTS ) | COR_PRF_HIGH_MONITOR_LARGEOBJECT_ALLOCATED ) | COR_PRF_HIGH_MONITOR_EVENT_PIPE ) ,
- COR_PRF_HIGH_ALLOWABLE_NOTIFICATION_PROFILER = ( ( ( ( ( ( COR_PRF_HIGH_IN_MEMORY_SYMBOLS_UPDATED | COR_PRF_HIGH_MONITOR_DYNAMIC_FUNCTION_UNLOADS ) | COR_PRF_HIGH_DISABLE_TIERED_COMPILATION ) | COR_PRF_HIGH_BASIC_GC ) | COR_PRF_HIGH_MONITOR_GC_MOVED_OBJECTS ) | COR_PRF_HIGH_MONITOR_LARGEOBJECT_ALLOCATED ) | COR_PRF_HIGH_MONITOR_EVENT_PIPE ) ,
- COR_PRF_HIGH_MONITOR_IMMUTABLE = COR_PRF_HIGH_DISABLE_TIERED_COMPILATION
- } COR_PRF_HIGH_MONITOR;
+ COR_PRF_HIGH_MONITOR_NONE = 0,
+ COR_PRF_HIGH_ADD_ASSEMBLY_REFERENCES = 0x1,
+ COR_PRF_HIGH_IN_MEMORY_SYMBOLS_UPDATED = 0x2,
+ COR_PRF_HIGH_MONITOR_DYNAMIC_FUNCTION_UNLOADS = 0x4,
+ COR_PRF_HIGH_DISABLE_TIERED_COMPILATION = 0x8,
+ COR_PRF_HIGH_BASIC_GC = 0x10,
+ COR_PRF_HIGH_MONITOR_GC_MOVED_OBJECTS = 0x20,
+ COR_PRF_HIGH_REQUIRE_PROFILE_IMAGE = 0,
+ COR_PRF_HIGH_MONITOR_LARGEOBJECT_ALLOCATED = 0x40,
+ COR_PRF_HIGH_MONITOR_EVENT_PIPE = 0x80,
+ COR_PRF_HIGH_MONITOR_PINNEDOBJECT_ALLOCATED = 0x100,
+ COR_PRF_HIGH_ALLOWABLE_AFTER_ATTACH = ( ( ( ( ( COR_PRF_HIGH_IN_MEMORY_SYMBOLS_UPDATED | COR_PRF_HIGH_MONITOR_DYNAMIC_FUNCTION_UNLOADS ) | COR_PRF_HIGH_BASIC_GC ) | COR_PRF_HIGH_MONITOR_GC_MOVED_OBJECTS ) | COR_PRF_HIGH_MONITOR_LARGEOBJECT_ALLOCATED ) | COR_PRF_HIGH_MONITOR_EVENT_PIPE ) ,
+ COR_PRF_HIGH_ALLOWABLE_NOTIFICATION_PROFILER = ( ( ( ( ( ( COR_PRF_HIGH_IN_MEMORY_SYMBOLS_UPDATED | COR_PRF_HIGH_MONITOR_DYNAMIC_FUNCTION_UNLOADS ) | COR_PRF_HIGH_DISABLE_TIERED_COMPILATION ) | COR_PRF_HIGH_BASIC_GC ) | COR_PRF_HIGH_MONITOR_GC_MOVED_OBJECTS ) | COR_PRF_HIGH_MONITOR_LARGEOBJECT_ALLOCATED ) | COR_PRF_HIGH_MONITOR_EVENT_PIPE ) ,
+ COR_PRF_HIGH_MONITOR_IMMUTABLE = COR_PRF_HIGH_DISABLE_TIERED_COMPILATION
+ } COR_PRF_HIGH_MONITOR;
typedef /* [public] */
enum __MIDL___MIDL_itf_corprof_0000_0000_0007
{
- PROFILER_PARENT_UNKNOWN = 0xfffffffd,
- PROFILER_GLOBAL_CLASS = 0xfffffffe,
- PROFILER_GLOBAL_MODULE = 0xffffffff
- } COR_PRF_MISC;
+ PROFILER_PARENT_UNKNOWN = 0xfffffffd,
+ PROFILER_GLOBAL_CLASS = 0xfffffffe,
+ PROFILER_GLOBAL_MODULE = 0xffffffff
+ } COR_PRF_MISC;
typedef /* [public][public] */
enum __MIDL___MIDL_itf_corprof_0000_0000_0008
{
- COR_PRF_CACHED_FUNCTION_FOUND = 0,
- COR_PRF_CACHED_FUNCTION_NOT_FOUND = ( COR_PRF_CACHED_FUNCTION_FOUND + 1 )
- } COR_PRF_JIT_CACHE;
+ COR_PRF_CACHED_FUNCTION_FOUND = 0,
+ COR_PRF_CACHED_FUNCTION_NOT_FOUND = ( COR_PRF_CACHED_FUNCTION_FOUND + 1 )
+ } COR_PRF_JIT_CACHE;
typedef /* [public][public][public] */
enum __MIDL___MIDL_itf_corprof_0000_0000_0009
{
- COR_PRF_TRANSITION_CALL = 0,
- COR_PRF_TRANSITION_RETURN = ( COR_PRF_TRANSITION_CALL + 1 )
- } COR_PRF_TRANSITION_REASON;
+ COR_PRF_TRANSITION_CALL = 0,
+ COR_PRF_TRANSITION_RETURN = ( COR_PRF_TRANSITION_CALL + 1 )
+ } COR_PRF_TRANSITION_REASON;
typedef /* [public][public] */
enum __MIDL___MIDL_itf_corprof_0000_0000_0010
{
- COR_PRF_SUSPEND_OTHER = 0,
- COR_PRF_SUSPEND_FOR_GC = 1,
- COR_PRF_SUSPEND_FOR_APPDOMAIN_SHUTDOWN = 2,
- COR_PRF_SUSPEND_FOR_CODE_PITCHING = 3,
- COR_PRF_SUSPEND_FOR_SHUTDOWN = 4,
- COR_PRF_SUSPEND_FOR_INPROC_DEBUGGER = 6,
- COR_PRF_SUSPEND_FOR_GC_PREP = 7,
- COR_PRF_SUSPEND_FOR_REJIT = 8,
- COR_PRF_SUSPEND_FOR_PROFILER = 9
- } COR_PRF_SUSPEND_REASON;
+ COR_PRF_SUSPEND_OTHER = 0,
+ COR_PRF_SUSPEND_FOR_GC = 1,
+ COR_PRF_SUSPEND_FOR_APPDOMAIN_SHUTDOWN = 2,
+ COR_PRF_SUSPEND_FOR_CODE_PITCHING = 3,
+ COR_PRF_SUSPEND_FOR_SHUTDOWN = 4,
+ COR_PRF_SUSPEND_FOR_INPROC_DEBUGGER = 6,
+ COR_PRF_SUSPEND_FOR_GC_PREP = 7,
+ COR_PRF_SUSPEND_FOR_REJIT = 8,
+ COR_PRF_SUSPEND_FOR_PROFILER = 9
+ } COR_PRF_SUSPEND_REASON;
typedef /* [public][public] */
enum __MIDL___MIDL_itf_corprof_0000_0000_0011
{
- COR_PRF_DESKTOP_CLR = 0x1,
- COR_PRF_CORE_CLR = 0x2
- } COR_PRF_RUNTIME_TYPE;
+ COR_PRF_DESKTOP_CLR = 0x1,
+ COR_PRF_CORE_CLR = 0x2
+ } COR_PRF_RUNTIME_TYPE;
typedef /* [public] */
enum __MIDL___MIDL_itf_corprof_0000_0000_0012
{
- COR_PRF_REJIT_BLOCK_INLINING = 0x1,
- COR_PRF_REJIT_INLINING_CALLBACKS = 0x2
- } COR_PRF_REJIT_FLAGS;
+ COR_PRF_REJIT_BLOCK_INLINING = 0x1,
+ COR_PRF_REJIT_INLINING_CALLBACKS = 0x2
+ } COR_PRF_REJIT_FLAGS;
typedef UINT_PTR EVENTPIPE_PROVIDER;
typedef /* [public] */
enum __MIDL___MIDL_itf_corprof_0000_0000_0013
{
- COR_PRF_EVENTPIPE_OBJECT = 1,
- COR_PRF_EVENTPIPE_BOOLEAN = 3,
- COR_PRF_EVENTPIPE_CHAR = 4,
- COR_PRF_EVENTPIPE_SBYTE = 5,
- COR_PRF_EVENTPIPE_BYTE = 6,
- COR_PRF_EVENTPIPE_INT16 = 7,
- COR_PRF_EVENTPIPE_UINT16 = 8,
- COR_PRF_EVENTPIPE_INT32 = 9,
- COR_PRF_EVENTPIPE_UINT32 = 10,
- COR_PRF_EVENTPIPE_INT64 = 11,
- COR_PRF_EVENTPIPE_UINT64 = 12,
- COR_PRF_EVENTPIPE_SINGLE = 13,
- COR_PRF_EVENTPIPE_DOUBLE = 14,
- COR_PRF_EVENTPIPE_DECIMAL = 15,
- COR_PRF_EVENTPIPE_DATETIME = 16,
- COR_PRF_EVENTPIPE_GUID = 17,
- COR_PRF_EVENTPIPE_STRING = 18,
- COR_PRF_EVENTPIPE_ARRAY = 19
- } COR_PRF_EVENTPIPE_PARAM_TYPE;
+ COR_PRF_EVENTPIPE_OBJECT = 1,
+ COR_PRF_EVENTPIPE_BOOLEAN = 3,
+ COR_PRF_EVENTPIPE_CHAR = 4,
+ COR_PRF_EVENTPIPE_SBYTE = 5,
+ COR_PRF_EVENTPIPE_BYTE = 6,
+ COR_PRF_EVENTPIPE_INT16 = 7,
+ COR_PRF_EVENTPIPE_UINT16 = 8,
+ COR_PRF_EVENTPIPE_INT32 = 9,
+ COR_PRF_EVENTPIPE_UINT32 = 10,
+ COR_PRF_EVENTPIPE_INT64 = 11,
+ COR_PRF_EVENTPIPE_UINT64 = 12,
+ COR_PRF_EVENTPIPE_SINGLE = 13,
+ COR_PRF_EVENTPIPE_DOUBLE = 14,
+ COR_PRF_EVENTPIPE_DECIMAL = 15,
+ COR_PRF_EVENTPIPE_DATETIME = 16,
+ COR_PRF_EVENTPIPE_GUID = 17,
+ COR_PRF_EVENTPIPE_STRING = 18,
+ COR_PRF_EVENTPIPE_ARRAY = 19
+ } COR_PRF_EVENTPIPE_PARAM_TYPE;
typedef /* [public] */
enum __MIDL___MIDL_itf_corprof_0000_0000_0014
{
- COR_PRF_EVENTPIPE_LOGALWAYS = 0,
- COR_PRF_EVENTPIPE_CRITICAL = 1,
- COR_PRF_EVENTPIPE_ERROR = 2,
- COR_PRF_EVENTPIPE_WARNING = 3,
- COR_PRF_EVENTPIPE_INFORMATIONAL = 4,
- COR_PRF_EVENTPIPE_VERBOSE = 5
- } COR_PRF_EVENTPIPE_LEVEL;
+ COR_PRF_EVENTPIPE_LOGALWAYS = 0,
+ COR_PRF_EVENTPIPE_CRITICAL = 1,
+ COR_PRF_EVENTPIPE_ERROR = 2,
+ COR_PRF_EVENTPIPE_WARNING = 3,
+ COR_PRF_EVENTPIPE_INFORMATIONAL = 4,
+ COR_PRF_EVENTPIPE_VERBOSE = 5
+ } COR_PRF_EVENTPIPE_LEVEL;
typedef /* [public][public][public] */ struct __MIDL___MIDL_itf_corprof_0000_0000_0015
{
UINT64 keywords;
UINT32 loggingLevel;
const WCHAR *filterData;
- } COR_PRF_EVENTPIPE_PROVIDER_CONFIG;
+ } COR_PRF_EVENTPIPE_PROVIDER_CONFIG;
typedef /* [public][public] */ struct __MIDL___MIDL_itf_corprof_0000_0000_0016
{
UINT32 type;
UINT32 elementType;
const WCHAR *name;
- } COR_PRF_EVENTPIPE_PARAM_DESC;
+ } COR_PRF_EVENTPIPE_PARAM_DESC;
typedef /* [public][public] */ struct __MIDL___MIDL_itf_corprof_0000_0000_0017
{
UINT64 ptr;
UINT32 size;
UINT32 reserved;
- } COR_PRF_EVENT_DATA;
+ } COR_PRF_EVENT_DATA;
+
+typedef /* [public][public][public] */ struct __MIDL___MIDL_itf_corprof_0000_0000_0018
+ {
+ UINT64 Ptr;
+ UINT32 Size;
+ UINT32 Type;
+ } COR_PRF_FILTER_DATA;
+
+typedef void EventPipeProviderCallback(
+ const UINT8 *source_id,
+ UINT32 is_enabled,
+ UINT8 level,
+ UINT64 match_any_keywords,
+ UINT64 match_all_keywords,
+ COR_PRF_FILTER_DATA *filter_data,
+ void *callback_data);
+
+typedef
+enum _COR_PRF_HANDLE_TYPE
+ {
+ COR_PRF_HANDLE_TYPE_WEAK = 0x1,
+ COR_PRF_HANDLE_TYPE_STRONG = 0x2,
+ COR_PRF_HANDLE_TYPE_PINNED = 0x3
+ } COR_PRF_HANDLE_TYPE;
+
+typedef void **ObjectHandleID;
+
+typedef BOOL ( *ObjectCallback )(
+ ObjectID object,
+ void *callbackState);
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerCallbackVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerCallback * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Initialize)
HRESULT ( STDMETHODCALLTYPE *Initialize )(
ICorProfilerCallback * This,
/* [in] */ IUnknown *pICorProfilerInfoUnk);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Shutdown)
HRESULT ( STDMETHODCALLTYPE *Shutdown )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )(
ICorProfilerCallback * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )(
ICorProfilerCallback * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )(
ICorProfilerCallback * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )(
ICorProfilerCallback * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )(
ICorProfilerCallback * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )(
ICorProfilerCallback * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )(
ICorProfilerCallback * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )(
ICorProfilerCallback * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )(
ICorProfilerCallback * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )(
ICorProfilerCallback * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )(
ICorProfilerCallback * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )(
ICorProfilerCallback * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleAttachedToAssembly)
HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )(
ICorProfilerCallback * This,
/* [in] */ ModuleID moduleId,
/* [in] */ AssemblyID AssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )(
ICorProfilerCallback * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )(
ICorProfilerCallback * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )(
ICorProfilerCallback * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )(
ICorProfilerCallback * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, FunctionUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )(
ICorProfilerCallback * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )(
ICorProfilerCallback * This,
/* [in] */ FunctionID functionId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )(
ICorProfilerCallback * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchStarted)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )(
ICorProfilerCallback * This,
/* [in] */ FunctionID functionId,
/* [out] */ BOOL *pbUseCachedFunction);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchFinished)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )(
ICorProfilerCallback * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_JIT_CACHE result);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITFunctionPitched)
HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )(
ICorProfilerCallback * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITInlining)
HRESULT ( STDMETHODCALLTYPE *JITInlining )(
ICorProfilerCallback * This,
/* [in] */ FunctionID callerId,
/* [in] */ FunctionID calleeId,
/* [out] */ BOOL *pfShouldInline);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadCreated)
HRESULT ( STDMETHODCALLTYPE *ThreadCreated )(
ICorProfilerCallback * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadDestroyed)
HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )(
ICorProfilerCallback * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadAssignedToOSThread)
HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )(
ICorProfilerCallback * This,
/* [in] */ ThreadID managedThreadId,
/* [in] */ DWORD osThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientSendingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )(
ICorProfilerCallback * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientReceivingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )(
ICorProfilerCallback * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationFinished)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerReceivingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )(
ICorProfilerCallback * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationReturned)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerSendingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )(
ICorProfilerCallback * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, UnmanagedToManagedTransition)
HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )(
ICorProfilerCallback * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ManagedToUnmanagedTransition)
HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )(
ICorProfilerCallback * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )(
ICorProfilerCallback * This,
/* [in] */ COR_PRF_SUSPEND_REASON suspendReason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendAborted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadSuspended)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )(
ICorProfilerCallback * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadResumed)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )(
ICorProfilerCallback * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, MovedReferences)
HRESULT ( STDMETHODCALLTYPE *MovedReferences )(
ICorProfilerCallback * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectAllocated)
HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )(
ICorProfilerCallback * This,
/* [in] */ ObjectID objectId,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectsAllocatedByClass)
HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )(
ICorProfilerCallback * This,
/* [in] */ ULONG cClassCount,
/* [size_is][in] */ ClassID classIds[ ],
/* [size_is][in] */ ULONG cObjects[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectReferences)
HRESULT ( STDMETHODCALLTYPE *ObjectReferences )(
ICorProfilerCallback * This,
/* [in] */ ObjectID objectId,
/* [in] */ ULONG cObjectRefs,
/* [size_is][in] */ ObjectID objectRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RootReferences)
HRESULT ( STDMETHODCALLTYPE *RootReferences )(
ICorProfilerCallback * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID rootRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionThrown)
HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )(
ICorProfilerCallback * This,
/* [in] */ ObjectID thrownObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )(
ICorProfilerCallback * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )(
ICorProfilerCallback * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )(
ICorProfilerCallback * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )(
ICorProfilerCallback * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )(
ICorProfilerCallback * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )(
ICorProfilerCallback * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )(
ICorProfilerCallback * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )(
ICorProfilerCallback * This,
/* [in] */ FunctionID functionId,
/* [in] */ ObjectID objectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableCreated)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )(
ICorProfilerCallback * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ void *pVTable,
/* [in] */ ULONG cSlots);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableDestroyed)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )(
ICorProfilerCallback * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ REFGUID implementedIID,
/* [in] */ void *pVTable);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )(
ICorProfilerCallback * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherExecute)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )(
ICorProfilerCallback * This);
#ifdef COBJMACROS
-#define ICorProfilerCallback_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerCallback_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerCallback_AddRef(This) \
+#define ICorProfilerCallback_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerCallback_Release(This) \
+#define ICorProfilerCallback_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerCallback_Initialize(This,pICorProfilerInfoUnk) \
+#define ICorProfilerCallback_Initialize(This,pICorProfilerInfoUnk) \
( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) )
-#define ICorProfilerCallback_Shutdown(This) \
+#define ICorProfilerCallback_Shutdown(This) \
( (This)->lpVtbl -> Shutdown(This) )
-#define ICorProfilerCallback_AppDomainCreationStarted(This,appDomainId) \
+#define ICorProfilerCallback_AppDomainCreationStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) )
-#define ICorProfilerCallback_AppDomainCreationFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback_AppDomainCreationFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback_AppDomainShutdownStarted(This,appDomainId) \
+#define ICorProfilerCallback_AppDomainShutdownStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) )
-#define ICorProfilerCallback_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback_AssemblyLoadStarted(This,assemblyId) \
+#define ICorProfilerCallback_AssemblyLoadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) )
-#define ICorProfilerCallback_AssemblyLoadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback_AssemblyLoadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback_AssemblyUnloadStarted(This,assemblyId) \
+#define ICorProfilerCallback_AssemblyUnloadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) )
-#define ICorProfilerCallback_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback_ModuleLoadStarted(This,moduleId) \
+#define ICorProfilerCallback_ModuleLoadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) )
-#define ICorProfilerCallback_ModuleLoadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback_ModuleLoadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback_ModuleUnloadStarted(This,moduleId) \
+#define ICorProfilerCallback_ModuleUnloadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) )
-#define ICorProfilerCallback_ModuleUnloadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback_ModuleUnloadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
+#define ICorProfilerCallback_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) )
-#define ICorProfilerCallback_ClassLoadStarted(This,classId) \
+#define ICorProfilerCallback_ClassLoadStarted(This,classId) \
( (This)->lpVtbl -> ClassLoadStarted(This,classId) )
-#define ICorProfilerCallback_ClassLoadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback_ClassLoadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback_ClassUnloadStarted(This,classId) \
+#define ICorProfilerCallback_ClassUnloadStarted(This,classId) \
( (This)->lpVtbl -> ClassUnloadStarted(This,classId) )
-#define ICorProfilerCallback_ClassUnloadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback_ClassUnloadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback_FunctionUnloadStarted(This,functionId) \
+#define ICorProfilerCallback_FunctionUnloadStarted(This,functionId) \
( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) )
-#define ICorProfilerCallback_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
+#define ICorProfilerCallback_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) )
-#define ICorProfilerCallback_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
+#define ICorProfilerCallback_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) )
-#define ICorProfilerCallback_JITCachedFunctionSearchFinished(This,functionId,result) \
+#define ICorProfilerCallback_JITCachedFunctionSearchFinished(This,functionId,result) \
( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) )
-#define ICorProfilerCallback_JITFunctionPitched(This,functionId) \
+#define ICorProfilerCallback_JITFunctionPitched(This,functionId) \
( (This)->lpVtbl -> JITFunctionPitched(This,functionId) )
-#define ICorProfilerCallback_JITInlining(This,callerId,calleeId,pfShouldInline) \
+#define ICorProfilerCallback_JITInlining(This,callerId,calleeId,pfShouldInline) \
( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) )
-#define ICorProfilerCallback_ThreadCreated(This,threadId) \
+#define ICorProfilerCallback_ThreadCreated(This,threadId) \
( (This)->lpVtbl -> ThreadCreated(This,threadId) )
-#define ICorProfilerCallback_ThreadDestroyed(This,threadId) \
+#define ICorProfilerCallback_ThreadDestroyed(This,threadId) \
( (This)->lpVtbl -> ThreadDestroyed(This,threadId) )
-#define ICorProfilerCallback_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
+#define ICorProfilerCallback_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) )
-#define ICorProfilerCallback_RemotingClientInvocationStarted(This) \
+#define ICorProfilerCallback_RemotingClientInvocationStarted(This) \
( (This)->lpVtbl -> RemotingClientInvocationStarted(This) )
-#define ICorProfilerCallback_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback_RemotingClientInvocationFinished(This) \
+#define ICorProfilerCallback_RemotingClientInvocationFinished(This) \
( (This)->lpVtbl -> RemotingClientInvocationFinished(This) )
-#define ICorProfilerCallback_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback_RemotingServerInvocationStarted(This) \
+#define ICorProfilerCallback_RemotingServerInvocationStarted(This) \
( (This)->lpVtbl -> RemotingServerInvocationStarted(This) )
-#define ICorProfilerCallback_RemotingServerInvocationReturned(This) \
+#define ICorProfilerCallback_RemotingServerInvocationReturned(This) \
( (This)->lpVtbl -> RemotingServerInvocationReturned(This) )
-#define ICorProfilerCallback_RemotingServerSendingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback_RemotingServerSendingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback_UnmanagedToManagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback_UnmanagedToManagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback_ManagedToUnmanagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback_ManagedToUnmanagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback_RuntimeSuspendStarted(This,suspendReason) \
+#define ICorProfilerCallback_RuntimeSuspendStarted(This,suspendReason) \
( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) )
-#define ICorProfilerCallback_RuntimeSuspendFinished(This) \
+#define ICorProfilerCallback_RuntimeSuspendFinished(This) \
( (This)->lpVtbl -> RuntimeSuspendFinished(This) )
-#define ICorProfilerCallback_RuntimeSuspendAborted(This) \
+#define ICorProfilerCallback_RuntimeSuspendAborted(This) \
( (This)->lpVtbl -> RuntimeSuspendAborted(This) )
-#define ICorProfilerCallback_RuntimeResumeStarted(This) \
+#define ICorProfilerCallback_RuntimeResumeStarted(This) \
( (This)->lpVtbl -> RuntimeResumeStarted(This) )
-#define ICorProfilerCallback_RuntimeResumeFinished(This) \
+#define ICorProfilerCallback_RuntimeResumeFinished(This) \
( (This)->lpVtbl -> RuntimeResumeFinished(This) )
-#define ICorProfilerCallback_RuntimeThreadSuspended(This,threadId) \
+#define ICorProfilerCallback_RuntimeThreadSuspended(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) )
-#define ICorProfilerCallback_RuntimeThreadResumed(This,threadId) \
+#define ICorProfilerCallback_RuntimeThreadResumed(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) )
-#define ICorProfilerCallback_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback_ObjectAllocated(This,objectId,classId) \
+#define ICorProfilerCallback_ObjectAllocated(This,objectId,classId) \
( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) )
-#define ICorProfilerCallback_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
+#define ICorProfilerCallback_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) )
-#define ICorProfilerCallback_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
+#define ICorProfilerCallback_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) )
-#define ICorProfilerCallback_RootReferences(This,cRootRefs,rootRefIds) \
+#define ICorProfilerCallback_RootReferences(This,cRootRefs,rootRefIds) \
( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) )
-#define ICorProfilerCallback_ExceptionThrown(This,thrownObjectId) \
+#define ICorProfilerCallback_ExceptionThrown(This,thrownObjectId) \
( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) )
-#define ICorProfilerCallback_ExceptionSearchFunctionEnter(This,functionId) \
+#define ICorProfilerCallback_ExceptionSearchFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) )
-#define ICorProfilerCallback_ExceptionSearchFunctionLeave(This) \
+#define ICorProfilerCallback_ExceptionSearchFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) )
-#define ICorProfilerCallback_ExceptionSearchFilterEnter(This,functionId) \
+#define ICorProfilerCallback_ExceptionSearchFilterEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) )
-#define ICorProfilerCallback_ExceptionSearchFilterLeave(This) \
+#define ICorProfilerCallback_ExceptionSearchFilterLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) )
-#define ICorProfilerCallback_ExceptionSearchCatcherFound(This,functionId) \
+#define ICorProfilerCallback_ExceptionSearchCatcherFound(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) )
-#define ICorProfilerCallback_ExceptionOSHandlerEnter(This,__unused) \
+#define ICorProfilerCallback_ExceptionOSHandlerEnter(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) )
-#define ICorProfilerCallback_ExceptionOSHandlerLeave(This,__unused) \
+#define ICorProfilerCallback_ExceptionOSHandlerLeave(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) )
-#define ICorProfilerCallback_ExceptionUnwindFunctionEnter(This,functionId) \
+#define ICorProfilerCallback_ExceptionUnwindFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) )
-#define ICorProfilerCallback_ExceptionUnwindFunctionLeave(This) \
+#define ICorProfilerCallback_ExceptionUnwindFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) )
-#define ICorProfilerCallback_ExceptionUnwindFinallyEnter(This,functionId) \
+#define ICorProfilerCallback_ExceptionUnwindFinallyEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) )
-#define ICorProfilerCallback_ExceptionUnwindFinallyLeave(This) \
+#define ICorProfilerCallback_ExceptionUnwindFinallyLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) )
-#define ICorProfilerCallback_ExceptionCatcherEnter(This,functionId,objectId) \
+#define ICorProfilerCallback_ExceptionCatcherEnter(This,functionId,objectId) \
( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) )
-#define ICorProfilerCallback_ExceptionCatcherLeave(This) \
+#define ICorProfilerCallback_ExceptionCatcherLeave(This) \
( (This)->lpVtbl -> ExceptionCatcherLeave(This) )
-#define ICorProfilerCallback_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
+#define ICorProfilerCallback_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) )
-#define ICorProfilerCallback_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
+#define ICorProfilerCallback_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) )
-#define ICorProfilerCallback_ExceptionCLRCatcherFound(This) \
+#define ICorProfilerCallback_ExceptionCLRCatcherFound(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) )
-#define ICorProfilerCallback_ExceptionCLRCatcherExecute(This) \
+#define ICorProfilerCallback_ExceptionCLRCatcherExecute(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerCallback_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerCallback_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_corprof_0000_0001 */
typedef /* [public][public] */
enum __MIDL___MIDL_itf_corprof_0000_0001_0001
{
- COR_PRF_GC_ROOT_STACK = 1,
- COR_PRF_GC_ROOT_FINALIZER = 2,
- COR_PRF_GC_ROOT_HANDLE = 3,
- COR_PRF_GC_ROOT_OTHER = 0
- } COR_PRF_GC_ROOT_KIND;
+ COR_PRF_GC_ROOT_STACK = 1,
+ COR_PRF_GC_ROOT_FINALIZER = 2,
+ COR_PRF_GC_ROOT_HANDLE = 3,
+ COR_PRF_GC_ROOT_OTHER = 0
+ } COR_PRF_GC_ROOT_KIND;
typedef /* [public][public] */
enum __MIDL___MIDL_itf_corprof_0000_0001_0002
{
- COR_PRF_GC_ROOT_PINNING = 0x1,
- COR_PRF_GC_ROOT_WEAKREF = 0x2,
- COR_PRF_GC_ROOT_INTERIOR = 0x4,
- COR_PRF_GC_ROOT_REFCOUNTED = 0x8
- } COR_PRF_GC_ROOT_FLAGS;
+ COR_PRF_GC_ROOT_PINNING = 0x1,
+ COR_PRF_GC_ROOT_WEAKREF = 0x2,
+ COR_PRF_GC_ROOT_INTERIOR = 0x4,
+ COR_PRF_GC_ROOT_REFCOUNTED = 0x8
+ } COR_PRF_GC_ROOT_FLAGS;
typedef /* [public] */
enum __MIDL___MIDL_itf_corprof_0000_0001_0003
{
- COR_PRF_FINALIZER_CRITICAL = 0x1
- } COR_PRF_FINALIZER_FLAGS;
+ COR_PRF_FINALIZER_CRITICAL = 0x1
+ } COR_PRF_FINALIZER_FLAGS;
typedef /* [public][public][public][public] */
enum __MIDL___MIDL_itf_corprof_0000_0001_0004
{
- COR_PRF_GC_GEN_0 = 0,
- COR_PRF_GC_GEN_1 = 1,
- COR_PRF_GC_GEN_2 = 2,
- COR_PRF_GC_LARGE_OBJECT_HEAP = 3,
- COR_PRF_GC_PINNED_OBJECT_HEAP = 4
- } COR_PRF_GC_GENERATION;
+ COR_PRF_GC_GEN_0 = 0,
+ COR_PRF_GC_GEN_1 = 1,
+ COR_PRF_GC_GEN_2 = 2,
+ COR_PRF_GC_LARGE_OBJECT_HEAP = 3,
+ COR_PRF_GC_PINNED_OBJECT_HEAP = 4
+ } COR_PRF_GC_GENERATION;
typedef struct COR_PRF_GC_GENERATION_RANGE
{
ObjectID rangeStart;
UINT_PTR rangeLength;
UINT_PTR rangeLengthReserved;
- } COR_PRF_GC_GENERATION_RANGE;
+ } COR_PRF_GC_GENERATION_RANGE;
+
+typedef struct COR_PRF_NONGC_HEAP_RANGE
+ {
+ ObjectID rangeStart;
+ UINT_PTR rangeLength;
+ UINT_PTR rangeLengthReserved;
+ } COR_PRF_NONGC_HEAP_RANGE;
typedef /* [public][public][public] */
enum __MIDL___MIDL_itf_corprof_0000_0001_0005
{
- COR_PRF_CLAUSE_NONE = 0,
- COR_PRF_CLAUSE_FILTER = 1,
- COR_PRF_CLAUSE_CATCH = 2,
- COR_PRF_CLAUSE_FINALLY = 3
- } COR_PRF_CLAUSE_TYPE;
+ COR_PRF_CLAUSE_NONE = 0,
+ COR_PRF_CLAUSE_FILTER = 1,
+ COR_PRF_CLAUSE_CATCH = 2,
+ COR_PRF_CLAUSE_FINALLY = 3
+ } COR_PRF_CLAUSE_TYPE;
typedef struct COR_PRF_EX_CLAUSE_INFO
{
UINT_PTR programCounter;
UINT_PTR framePointer;
UINT_PTR shadowStackPointer;
- } COR_PRF_EX_CLAUSE_INFO;
+ } COR_PRF_EX_CLAUSE_INFO;
typedef /* [public][public] */
enum __MIDL___MIDL_itf_corprof_0000_0001_0006
{
- COR_PRF_GC_INDUCED = 1,
- COR_PRF_GC_OTHER = 0
- } COR_PRF_GC_REASON;
+ COR_PRF_GC_INDUCED = 1,
+ COR_PRF_GC_OTHER = 0
+ } COR_PRF_GC_REASON;
typedef /* [public] */
enum __MIDL___MIDL_itf_corprof_0000_0001_0007
{
- COR_PRF_MODULE_DISK = 0x1,
- COR_PRF_MODULE_NGEN = 0x2,
- COR_PRF_MODULE_DYNAMIC = 0x4,
- COR_PRF_MODULE_COLLECTIBLE = 0x8,
- COR_PRF_MODULE_RESOURCE = 0x10,
- COR_PRF_MODULE_FLAT_LAYOUT = 0x20,
- COR_PRF_MODULE_WINDOWS_RUNTIME = 0x40
- } COR_PRF_MODULE_FLAGS;
+ COR_PRF_MODULE_DISK = 0x1,
+ COR_PRF_MODULE_NGEN = 0x2,
+ COR_PRF_MODULE_DYNAMIC = 0x4,
+ COR_PRF_MODULE_COLLECTIBLE = 0x8,
+ COR_PRF_MODULE_RESOURCE = 0x10,
+ COR_PRF_MODULE_FLAT_LAYOUT = 0x20,
+ COR_PRF_MODULE_WINDOWS_RUNTIME = 0x40
+ } COR_PRF_MODULE_FLAGS;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerCallback2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerCallback2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Initialize)
HRESULT ( STDMETHODCALLTYPE *Initialize )(
ICorProfilerCallback2 * This,
/* [in] */ IUnknown *pICorProfilerInfoUnk);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Shutdown)
HRESULT ( STDMETHODCALLTYPE *Shutdown )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )(
ICorProfilerCallback2 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )(
ICorProfilerCallback2 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )(
ICorProfilerCallback2 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )(
ICorProfilerCallback2 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )(
ICorProfilerCallback2 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )(
ICorProfilerCallback2 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )(
ICorProfilerCallback2 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )(
ICorProfilerCallback2 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )(
ICorProfilerCallback2 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )(
ICorProfilerCallback2 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )(
ICorProfilerCallback2 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )(
ICorProfilerCallback2 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleAttachedToAssembly)
HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )(
ICorProfilerCallback2 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ AssemblyID AssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )(
ICorProfilerCallback2 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )(
ICorProfilerCallback2 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )(
ICorProfilerCallback2 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )(
ICorProfilerCallback2 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, FunctionUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )(
ICorProfilerCallback2 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )(
ICorProfilerCallback2 * This,
/* [in] */ FunctionID functionId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )(
ICorProfilerCallback2 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchStarted)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )(
ICorProfilerCallback2 * This,
/* [in] */ FunctionID functionId,
/* [out] */ BOOL *pbUseCachedFunction);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchFinished)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )(
ICorProfilerCallback2 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_JIT_CACHE result);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITFunctionPitched)
HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )(
ICorProfilerCallback2 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITInlining)
HRESULT ( STDMETHODCALLTYPE *JITInlining )(
ICorProfilerCallback2 * This,
/* [in] */ FunctionID callerId,
/* [in] */ FunctionID calleeId,
/* [out] */ BOOL *pfShouldInline);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadCreated)
HRESULT ( STDMETHODCALLTYPE *ThreadCreated )(
ICorProfilerCallback2 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadDestroyed)
HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )(
ICorProfilerCallback2 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadAssignedToOSThread)
HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )(
ICorProfilerCallback2 * This,
/* [in] */ ThreadID managedThreadId,
/* [in] */ DWORD osThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientSendingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )(
ICorProfilerCallback2 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientReceivingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )(
ICorProfilerCallback2 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationFinished)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerReceivingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )(
ICorProfilerCallback2 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationReturned)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerSendingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )(
ICorProfilerCallback2 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, UnmanagedToManagedTransition)
HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )(
ICorProfilerCallback2 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ManagedToUnmanagedTransition)
HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )(
ICorProfilerCallback2 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )(
ICorProfilerCallback2 * This,
/* [in] */ COR_PRF_SUSPEND_REASON suspendReason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendAborted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadSuspended)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )(
ICorProfilerCallback2 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadResumed)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )(
ICorProfilerCallback2 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, MovedReferences)
HRESULT ( STDMETHODCALLTYPE *MovedReferences )(
ICorProfilerCallback2 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectAllocated)
HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )(
ICorProfilerCallback2 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectsAllocatedByClass)
HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )(
ICorProfilerCallback2 * This,
/* [in] */ ULONG cClassCount,
/* [size_is][in] */ ClassID classIds[ ],
/* [size_is][in] */ ULONG cObjects[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectReferences)
HRESULT ( STDMETHODCALLTYPE *ObjectReferences )(
ICorProfilerCallback2 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ULONG cObjectRefs,
/* [size_is][in] */ ObjectID objectRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RootReferences)
HRESULT ( STDMETHODCALLTYPE *RootReferences )(
ICorProfilerCallback2 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID rootRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionThrown)
HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )(
ICorProfilerCallback2 * This,
/* [in] */ ObjectID thrownObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )(
ICorProfilerCallback2 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )(
ICorProfilerCallback2 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )(
ICorProfilerCallback2 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )(
ICorProfilerCallback2 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )(
ICorProfilerCallback2 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )(
ICorProfilerCallback2 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )(
ICorProfilerCallback2 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )(
ICorProfilerCallback2 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ObjectID objectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableCreated)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )(
ICorProfilerCallback2 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ void *pVTable,
/* [in] */ ULONG cSlots);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableDestroyed)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )(
ICorProfilerCallback2 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ REFGUID implementedIID,
/* [in] */ void *pVTable);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherExecute)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, ThreadNameChanged)
HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )(
ICorProfilerCallback2 * This,
/* [in] */ ThreadID threadId,
/* [annotation][in] */
_In_reads_opt_(cchName) WCHAR name[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionStarted)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )(
ICorProfilerCallback2 * This,
/* [in] */ int cGenerations,
/* [size_is][in] */ BOOL generationCollected[ ],
/* [in] */ COR_PRF_GC_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, SurvivingReferences)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )(
ICorProfilerCallback2 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionFinished)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )(
ICorProfilerCallback2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, FinalizeableObjectQueued)
HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )(
ICorProfilerCallback2 * This,
/* [in] */ DWORD finalizerFlags,
/* [in] */ ObjectID objectID);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, RootReferences2)
HRESULT ( STDMETHODCALLTYPE *RootReferences2 )(
ICorProfilerCallback2 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ],
/* [size_is][in] */ UINT_PTR rootIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleCreated)
HRESULT ( STDMETHODCALLTYPE *HandleCreated )(
ICorProfilerCallback2 * This,
/* [in] */ GCHandleID handleId,
/* [in] */ ObjectID initialObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleDestroyed)
HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )(
ICorProfilerCallback2 * This,
/* [in] */ GCHandleID handleId);
#ifdef COBJMACROS
-#define ICorProfilerCallback2_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerCallback2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerCallback2_AddRef(This) \
+#define ICorProfilerCallback2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerCallback2_Release(This) \
+#define ICorProfilerCallback2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerCallback2_Initialize(This,pICorProfilerInfoUnk) \
+#define ICorProfilerCallback2_Initialize(This,pICorProfilerInfoUnk) \
( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) )
-#define ICorProfilerCallback2_Shutdown(This) \
+#define ICorProfilerCallback2_Shutdown(This) \
( (This)->lpVtbl -> Shutdown(This) )
-#define ICorProfilerCallback2_AppDomainCreationStarted(This,appDomainId) \
+#define ICorProfilerCallback2_AppDomainCreationStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) )
-#define ICorProfilerCallback2_AppDomainCreationFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback2_AppDomainCreationFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback2_AppDomainShutdownStarted(This,appDomainId) \
+#define ICorProfilerCallback2_AppDomainShutdownStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) )
-#define ICorProfilerCallback2_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback2_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback2_AssemblyLoadStarted(This,assemblyId) \
+#define ICorProfilerCallback2_AssemblyLoadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) )
-#define ICorProfilerCallback2_AssemblyLoadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback2_AssemblyLoadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback2_AssemblyUnloadStarted(This,assemblyId) \
+#define ICorProfilerCallback2_AssemblyUnloadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) )
-#define ICorProfilerCallback2_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback2_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback2_ModuleLoadStarted(This,moduleId) \
+#define ICorProfilerCallback2_ModuleLoadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) )
-#define ICorProfilerCallback2_ModuleLoadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback2_ModuleLoadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback2_ModuleUnloadStarted(This,moduleId) \
+#define ICorProfilerCallback2_ModuleUnloadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) )
-#define ICorProfilerCallback2_ModuleUnloadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback2_ModuleUnloadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback2_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
+#define ICorProfilerCallback2_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) )
-#define ICorProfilerCallback2_ClassLoadStarted(This,classId) \
+#define ICorProfilerCallback2_ClassLoadStarted(This,classId) \
( (This)->lpVtbl -> ClassLoadStarted(This,classId) )
-#define ICorProfilerCallback2_ClassLoadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback2_ClassLoadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback2_ClassUnloadStarted(This,classId) \
+#define ICorProfilerCallback2_ClassUnloadStarted(This,classId) \
( (This)->lpVtbl -> ClassUnloadStarted(This,classId) )
-#define ICorProfilerCallback2_ClassUnloadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback2_ClassUnloadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback2_FunctionUnloadStarted(This,functionId) \
+#define ICorProfilerCallback2_FunctionUnloadStarted(This,functionId) \
( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) )
-#define ICorProfilerCallback2_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
+#define ICorProfilerCallback2_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) )
-#define ICorProfilerCallback2_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback2_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback2_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
+#define ICorProfilerCallback2_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) )
-#define ICorProfilerCallback2_JITCachedFunctionSearchFinished(This,functionId,result) \
+#define ICorProfilerCallback2_JITCachedFunctionSearchFinished(This,functionId,result) \
( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) )
-#define ICorProfilerCallback2_JITFunctionPitched(This,functionId) \
+#define ICorProfilerCallback2_JITFunctionPitched(This,functionId) \
( (This)->lpVtbl -> JITFunctionPitched(This,functionId) )
-#define ICorProfilerCallback2_JITInlining(This,callerId,calleeId,pfShouldInline) \
+#define ICorProfilerCallback2_JITInlining(This,callerId,calleeId,pfShouldInline) \
( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) )
-#define ICorProfilerCallback2_ThreadCreated(This,threadId) \
+#define ICorProfilerCallback2_ThreadCreated(This,threadId) \
( (This)->lpVtbl -> ThreadCreated(This,threadId) )
-#define ICorProfilerCallback2_ThreadDestroyed(This,threadId) \
+#define ICorProfilerCallback2_ThreadDestroyed(This,threadId) \
( (This)->lpVtbl -> ThreadDestroyed(This,threadId) )
-#define ICorProfilerCallback2_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
+#define ICorProfilerCallback2_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) )
-#define ICorProfilerCallback2_RemotingClientInvocationStarted(This) \
+#define ICorProfilerCallback2_RemotingClientInvocationStarted(This) \
( (This)->lpVtbl -> RemotingClientInvocationStarted(This) )
-#define ICorProfilerCallback2_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback2_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback2_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback2_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback2_RemotingClientInvocationFinished(This) \
+#define ICorProfilerCallback2_RemotingClientInvocationFinished(This) \
( (This)->lpVtbl -> RemotingClientInvocationFinished(This) )
-#define ICorProfilerCallback2_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback2_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback2_RemotingServerInvocationStarted(This) \
+#define ICorProfilerCallback2_RemotingServerInvocationStarted(This) \
( (This)->lpVtbl -> RemotingServerInvocationStarted(This) )
-#define ICorProfilerCallback2_RemotingServerInvocationReturned(This) \
+#define ICorProfilerCallback2_RemotingServerInvocationReturned(This) \
( (This)->lpVtbl -> RemotingServerInvocationReturned(This) )
-#define ICorProfilerCallback2_RemotingServerSendingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback2_RemotingServerSendingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback2_UnmanagedToManagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback2_UnmanagedToManagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback2_ManagedToUnmanagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback2_ManagedToUnmanagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback2_RuntimeSuspendStarted(This,suspendReason) \
+#define ICorProfilerCallback2_RuntimeSuspendStarted(This,suspendReason) \
( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) )
-#define ICorProfilerCallback2_RuntimeSuspendFinished(This) \
+#define ICorProfilerCallback2_RuntimeSuspendFinished(This) \
( (This)->lpVtbl -> RuntimeSuspendFinished(This) )
-#define ICorProfilerCallback2_RuntimeSuspendAborted(This) \
+#define ICorProfilerCallback2_RuntimeSuspendAborted(This) \
( (This)->lpVtbl -> RuntimeSuspendAborted(This) )
-#define ICorProfilerCallback2_RuntimeResumeStarted(This) \
+#define ICorProfilerCallback2_RuntimeResumeStarted(This) \
( (This)->lpVtbl -> RuntimeResumeStarted(This) )
-#define ICorProfilerCallback2_RuntimeResumeFinished(This) \
+#define ICorProfilerCallback2_RuntimeResumeFinished(This) \
( (This)->lpVtbl -> RuntimeResumeFinished(This) )
-#define ICorProfilerCallback2_RuntimeThreadSuspended(This,threadId) \
+#define ICorProfilerCallback2_RuntimeThreadSuspended(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) )
-#define ICorProfilerCallback2_RuntimeThreadResumed(This,threadId) \
+#define ICorProfilerCallback2_RuntimeThreadResumed(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) )
-#define ICorProfilerCallback2_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback2_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback2_ObjectAllocated(This,objectId,classId) \
+#define ICorProfilerCallback2_ObjectAllocated(This,objectId,classId) \
( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) )
-#define ICorProfilerCallback2_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
+#define ICorProfilerCallback2_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) )
-#define ICorProfilerCallback2_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
+#define ICorProfilerCallback2_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) )
-#define ICorProfilerCallback2_RootReferences(This,cRootRefs,rootRefIds) \
+#define ICorProfilerCallback2_RootReferences(This,cRootRefs,rootRefIds) \
( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) )
-#define ICorProfilerCallback2_ExceptionThrown(This,thrownObjectId) \
+#define ICorProfilerCallback2_ExceptionThrown(This,thrownObjectId) \
( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) )
-#define ICorProfilerCallback2_ExceptionSearchFunctionEnter(This,functionId) \
+#define ICorProfilerCallback2_ExceptionSearchFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) )
-#define ICorProfilerCallback2_ExceptionSearchFunctionLeave(This) \
+#define ICorProfilerCallback2_ExceptionSearchFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) )
-#define ICorProfilerCallback2_ExceptionSearchFilterEnter(This,functionId) \
+#define ICorProfilerCallback2_ExceptionSearchFilterEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) )
-#define ICorProfilerCallback2_ExceptionSearchFilterLeave(This) \
+#define ICorProfilerCallback2_ExceptionSearchFilterLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) )
-#define ICorProfilerCallback2_ExceptionSearchCatcherFound(This,functionId) \
+#define ICorProfilerCallback2_ExceptionSearchCatcherFound(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) )
-#define ICorProfilerCallback2_ExceptionOSHandlerEnter(This,__unused) \
+#define ICorProfilerCallback2_ExceptionOSHandlerEnter(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) )
-#define ICorProfilerCallback2_ExceptionOSHandlerLeave(This,__unused) \
+#define ICorProfilerCallback2_ExceptionOSHandlerLeave(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) )
-#define ICorProfilerCallback2_ExceptionUnwindFunctionEnter(This,functionId) \
+#define ICorProfilerCallback2_ExceptionUnwindFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) )
-#define ICorProfilerCallback2_ExceptionUnwindFunctionLeave(This) \
+#define ICorProfilerCallback2_ExceptionUnwindFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) )
-#define ICorProfilerCallback2_ExceptionUnwindFinallyEnter(This,functionId) \
+#define ICorProfilerCallback2_ExceptionUnwindFinallyEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) )
-#define ICorProfilerCallback2_ExceptionUnwindFinallyLeave(This) \
+#define ICorProfilerCallback2_ExceptionUnwindFinallyLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) )
-#define ICorProfilerCallback2_ExceptionCatcherEnter(This,functionId,objectId) \
+#define ICorProfilerCallback2_ExceptionCatcherEnter(This,functionId,objectId) \
( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) )
-#define ICorProfilerCallback2_ExceptionCatcherLeave(This) \
+#define ICorProfilerCallback2_ExceptionCatcherLeave(This) \
( (This)->lpVtbl -> ExceptionCatcherLeave(This) )
-#define ICorProfilerCallback2_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
+#define ICorProfilerCallback2_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) )
-#define ICorProfilerCallback2_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
+#define ICorProfilerCallback2_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) )
-#define ICorProfilerCallback2_ExceptionCLRCatcherFound(This) \
+#define ICorProfilerCallback2_ExceptionCLRCatcherFound(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) )
-#define ICorProfilerCallback2_ExceptionCLRCatcherExecute(This) \
+#define ICorProfilerCallback2_ExceptionCLRCatcherExecute(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) )
-#define ICorProfilerCallback2_ThreadNameChanged(This,threadId,cchName,name) \
+#define ICorProfilerCallback2_ThreadNameChanged(This,threadId,cchName,name) \
( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) )
-#define ICorProfilerCallback2_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
+#define ICorProfilerCallback2_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) )
-#define ICorProfilerCallback2_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback2_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback2_GarbageCollectionFinished(This) \
+#define ICorProfilerCallback2_GarbageCollectionFinished(This) \
( (This)->lpVtbl -> GarbageCollectionFinished(This) )
-#define ICorProfilerCallback2_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
+#define ICorProfilerCallback2_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) )
-#define ICorProfilerCallback2_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
+#define ICorProfilerCallback2_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) )
-#define ICorProfilerCallback2_HandleCreated(This,handleId,initialObjectId) \
+#define ICorProfilerCallback2_HandleCreated(This,handleId,initialObjectId) \
( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) )
-#define ICorProfilerCallback2_HandleDestroyed(This,handleId) \
+#define ICorProfilerCallback2_HandleDestroyed(This,handleId) \
( (This)->lpVtbl -> HandleDestroyed(This,handleId) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerCallback2_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerCallback2_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerCallback3_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerCallback3Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerCallback3 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Initialize)
HRESULT ( STDMETHODCALLTYPE *Initialize )(
ICorProfilerCallback3 * This,
/* [in] */ IUnknown *pICorProfilerInfoUnk);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Shutdown)
HRESULT ( STDMETHODCALLTYPE *Shutdown )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )(
ICorProfilerCallback3 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )(
ICorProfilerCallback3 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )(
ICorProfilerCallback3 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )(
ICorProfilerCallback3 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )(
ICorProfilerCallback3 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )(
ICorProfilerCallback3 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )(
ICorProfilerCallback3 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )(
ICorProfilerCallback3 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )(
ICorProfilerCallback3 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )(
ICorProfilerCallback3 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )(
ICorProfilerCallback3 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )(
ICorProfilerCallback3 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleAttachedToAssembly)
HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )(
ICorProfilerCallback3 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ AssemblyID AssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )(
ICorProfilerCallback3 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )(
ICorProfilerCallback3 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )(
ICorProfilerCallback3 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )(
ICorProfilerCallback3 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, FunctionUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )(
ICorProfilerCallback3 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )(
ICorProfilerCallback3 * This,
/* [in] */ FunctionID functionId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )(
ICorProfilerCallback3 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchStarted)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )(
ICorProfilerCallback3 * This,
/* [in] */ FunctionID functionId,
/* [out] */ BOOL *pbUseCachedFunction);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchFinished)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )(
ICorProfilerCallback3 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_JIT_CACHE result);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITFunctionPitched)
HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )(
ICorProfilerCallback3 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITInlining)
HRESULT ( STDMETHODCALLTYPE *JITInlining )(
ICorProfilerCallback3 * This,
/* [in] */ FunctionID callerId,
/* [in] */ FunctionID calleeId,
/* [out] */ BOOL *pfShouldInline);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadCreated)
HRESULT ( STDMETHODCALLTYPE *ThreadCreated )(
ICorProfilerCallback3 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadDestroyed)
HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )(
ICorProfilerCallback3 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadAssignedToOSThread)
HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )(
ICorProfilerCallback3 * This,
/* [in] */ ThreadID managedThreadId,
/* [in] */ DWORD osThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientSendingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )(
ICorProfilerCallback3 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientReceivingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )(
ICorProfilerCallback3 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationFinished)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerReceivingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )(
ICorProfilerCallback3 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationReturned)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerSendingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )(
ICorProfilerCallback3 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, UnmanagedToManagedTransition)
HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )(
ICorProfilerCallback3 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ManagedToUnmanagedTransition)
HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )(
ICorProfilerCallback3 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )(
ICorProfilerCallback3 * This,
/* [in] */ COR_PRF_SUSPEND_REASON suspendReason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendAborted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadSuspended)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )(
ICorProfilerCallback3 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadResumed)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )(
ICorProfilerCallback3 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, MovedReferences)
HRESULT ( STDMETHODCALLTYPE *MovedReferences )(
ICorProfilerCallback3 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectAllocated)
HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )(
ICorProfilerCallback3 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectsAllocatedByClass)
HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )(
ICorProfilerCallback3 * This,
/* [in] */ ULONG cClassCount,
/* [size_is][in] */ ClassID classIds[ ],
/* [size_is][in] */ ULONG cObjects[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectReferences)
HRESULT ( STDMETHODCALLTYPE *ObjectReferences )(
ICorProfilerCallback3 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ULONG cObjectRefs,
/* [size_is][in] */ ObjectID objectRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RootReferences)
HRESULT ( STDMETHODCALLTYPE *RootReferences )(
ICorProfilerCallback3 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID rootRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionThrown)
HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )(
ICorProfilerCallback3 * This,
/* [in] */ ObjectID thrownObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )(
ICorProfilerCallback3 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )(
ICorProfilerCallback3 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )(
ICorProfilerCallback3 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )(
ICorProfilerCallback3 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )(
ICorProfilerCallback3 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )(
ICorProfilerCallback3 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )(
ICorProfilerCallback3 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )(
ICorProfilerCallback3 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ObjectID objectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableCreated)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )(
ICorProfilerCallback3 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ void *pVTable,
/* [in] */ ULONG cSlots);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableDestroyed)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )(
ICorProfilerCallback3 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ REFGUID implementedIID,
/* [in] */ void *pVTable);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherExecute)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, ThreadNameChanged)
HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )(
ICorProfilerCallback3 * This,
/* [in] */ ThreadID threadId,
/* [annotation][in] */
_In_reads_opt_(cchName) WCHAR name[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionStarted)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )(
ICorProfilerCallback3 * This,
/* [in] */ int cGenerations,
/* [size_is][in] */ BOOL generationCollected[ ],
/* [in] */ COR_PRF_GC_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, SurvivingReferences)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )(
ICorProfilerCallback3 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionFinished)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, FinalizeableObjectQueued)
HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )(
ICorProfilerCallback3 * This,
/* [in] */ DWORD finalizerFlags,
/* [in] */ ObjectID objectID);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, RootReferences2)
HRESULT ( STDMETHODCALLTYPE *RootReferences2 )(
ICorProfilerCallback3 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ],
/* [size_is][in] */ UINT_PTR rootIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleCreated)
HRESULT ( STDMETHODCALLTYPE *HandleCreated )(
ICorProfilerCallback3 * This,
/* [in] */ GCHandleID handleId,
/* [in] */ ObjectID initialObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleDestroyed)
HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )(
ICorProfilerCallback3 * This,
/* [in] */ GCHandleID handleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, InitializeForAttach)
HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )(
ICorProfilerCallback3 * This,
/* [in] */ IUnknown *pCorProfilerInfoUnk,
/* [in] */ void *pvClientData,
/* [in] */ UINT cbClientData);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerAttachComplete)
HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )(
ICorProfilerCallback3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerDetachSucceeded)
HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )(
ICorProfilerCallback3 * This);
#ifdef COBJMACROS
-#define ICorProfilerCallback3_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerCallback3_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerCallback3_AddRef(This) \
+#define ICorProfilerCallback3_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerCallback3_Release(This) \
+#define ICorProfilerCallback3_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerCallback3_Initialize(This,pICorProfilerInfoUnk) \
+#define ICorProfilerCallback3_Initialize(This,pICorProfilerInfoUnk) \
( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) )
-#define ICorProfilerCallback3_Shutdown(This) \
+#define ICorProfilerCallback3_Shutdown(This) \
( (This)->lpVtbl -> Shutdown(This) )
-#define ICorProfilerCallback3_AppDomainCreationStarted(This,appDomainId) \
+#define ICorProfilerCallback3_AppDomainCreationStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) )
-#define ICorProfilerCallback3_AppDomainCreationFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback3_AppDomainCreationFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback3_AppDomainShutdownStarted(This,appDomainId) \
+#define ICorProfilerCallback3_AppDomainShutdownStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) )
-#define ICorProfilerCallback3_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback3_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback3_AssemblyLoadStarted(This,assemblyId) \
+#define ICorProfilerCallback3_AssemblyLoadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) )
-#define ICorProfilerCallback3_AssemblyLoadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback3_AssemblyLoadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback3_AssemblyUnloadStarted(This,assemblyId) \
+#define ICorProfilerCallback3_AssemblyUnloadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) )
-#define ICorProfilerCallback3_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback3_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback3_ModuleLoadStarted(This,moduleId) \
+#define ICorProfilerCallback3_ModuleLoadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) )
-#define ICorProfilerCallback3_ModuleLoadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback3_ModuleLoadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback3_ModuleUnloadStarted(This,moduleId) \
+#define ICorProfilerCallback3_ModuleUnloadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) )
-#define ICorProfilerCallback3_ModuleUnloadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback3_ModuleUnloadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback3_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
+#define ICorProfilerCallback3_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) )
-#define ICorProfilerCallback3_ClassLoadStarted(This,classId) \
+#define ICorProfilerCallback3_ClassLoadStarted(This,classId) \
( (This)->lpVtbl -> ClassLoadStarted(This,classId) )
-#define ICorProfilerCallback3_ClassLoadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback3_ClassLoadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback3_ClassUnloadStarted(This,classId) \
+#define ICorProfilerCallback3_ClassUnloadStarted(This,classId) \
( (This)->lpVtbl -> ClassUnloadStarted(This,classId) )
-#define ICorProfilerCallback3_ClassUnloadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback3_ClassUnloadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback3_FunctionUnloadStarted(This,functionId) \
+#define ICorProfilerCallback3_FunctionUnloadStarted(This,functionId) \
( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) )
-#define ICorProfilerCallback3_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
+#define ICorProfilerCallback3_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) )
-#define ICorProfilerCallback3_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback3_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback3_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
+#define ICorProfilerCallback3_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) )
-#define ICorProfilerCallback3_JITCachedFunctionSearchFinished(This,functionId,result) \
+#define ICorProfilerCallback3_JITCachedFunctionSearchFinished(This,functionId,result) \
( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) )
-#define ICorProfilerCallback3_JITFunctionPitched(This,functionId) \
+#define ICorProfilerCallback3_JITFunctionPitched(This,functionId) \
( (This)->lpVtbl -> JITFunctionPitched(This,functionId) )
-#define ICorProfilerCallback3_JITInlining(This,callerId,calleeId,pfShouldInline) \
+#define ICorProfilerCallback3_JITInlining(This,callerId,calleeId,pfShouldInline) \
( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) )
-#define ICorProfilerCallback3_ThreadCreated(This,threadId) \
+#define ICorProfilerCallback3_ThreadCreated(This,threadId) \
( (This)->lpVtbl -> ThreadCreated(This,threadId) )
-#define ICorProfilerCallback3_ThreadDestroyed(This,threadId) \
+#define ICorProfilerCallback3_ThreadDestroyed(This,threadId) \
( (This)->lpVtbl -> ThreadDestroyed(This,threadId) )
-#define ICorProfilerCallback3_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
+#define ICorProfilerCallback3_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) )
-#define ICorProfilerCallback3_RemotingClientInvocationStarted(This) \
+#define ICorProfilerCallback3_RemotingClientInvocationStarted(This) \
( (This)->lpVtbl -> RemotingClientInvocationStarted(This) )
-#define ICorProfilerCallback3_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback3_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback3_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback3_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback3_RemotingClientInvocationFinished(This) \
+#define ICorProfilerCallback3_RemotingClientInvocationFinished(This) \
( (This)->lpVtbl -> RemotingClientInvocationFinished(This) )
-#define ICorProfilerCallback3_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback3_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback3_RemotingServerInvocationStarted(This) \
+#define ICorProfilerCallback3_RemotingServerInvocationStarted(This) \
( (This)->lpVtbl -> RemotingServerInvocationStarted(This) )
-#define ICorProfilerCallback3_RemotingServerInvocationReturned(This) \
+#define ICorProfilerCallback3_RemotingServerInvocationReturned(This) \
( (This)->lpVtbl -> RemotingServerInvocationReturned(This) )
-#define ICorProfilerCallback3_RemotingServerSendingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback3_RemotingServerSendingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback3_UnmanagedToManagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback3_UnmanagedToManagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback3_ManagedToUnmanagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback3_ManagedToUnmanagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback3_RuntimeSuspendStarted(This,suspendReason) \
+#define ICorProfilerCallback3_RuntimeSuspendStarted(This,suspendReason) \
( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) )
-#define ICorProfilerCallback3_RuntimeSuspendFinished(This) \
+#define ICorProfilerCallback3_RuntimeSuspendFinished(This) \
( (This)->lpVtbl -> RuntimeSuspendFinished(This) )
-#define ICorProfilerCallback3_RuntimeSuspendAborted(This) \
+#define ICorProfilerCallback3_RuntimeSuspendAborted(This) \
( (This)->lpVtbl -> RuntimeSuspendAborted(This) )
-#define ICorProfilerCallback3_RuntimeResumeStarted(This) \
+#define ICorProfilerCallback3_RuntimeResumeStarted(This) \
( (This)->lpVtbl -> RuntimeResumeStarted(This) )
-#define ICorProfilerCallback3_RuntimeResumeFinished(This) \
+#define ICorProfilerCallback3_RuntimeResumeFinished(This) \
( (This)->lpVtbl -> RuntimeResumeFinished(This) )
-#define ICorProfilerCallback3_RuntimeThreadSuspended(This,threadId) \
+#define ICorProfilerCallback3_RuntimeThreadSuspended(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) )
-#define ICorProfilerCallback3_RuntimeThreadResumed(This,threadId) \
+#define ICorProfilerCallback3_RuntimeThreadResumed(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) )
-#define ICorProfilerCallback3_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback3_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback3_ObjectAllocated(This,objectId,classId) \
+#define ICorProfilerCallback3_ObjectAllocated(This,objectId,classId) \
( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) )
-#define ICorProfilerCallback3_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
+#define ICorProfilerCallback3_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) )
-#define ICorProfilerCallback3_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
+#define ICorProfilerCallback3_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) )
-#define ICorProfilerCallback3_RootReferences(This,cRootRefs,rootRefIds) \
+#define ICorProfilerCallback3_RootReferences(This,cRootRefs,rootRefIds) \
( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) )
-#define ICorProfilerCallback3_ExceptionThrown(This,thrownObjectId) \
+#define ICorProfilerCallback3_ExceptionThrown(This,thrownObjectId) \
( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) )
-#define ICorProfilerCallback3_ExceptionSearchFunctionEnter(This,functionId) \
+#define ICorProfilerCallback3_ExceptionSearchFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) )
-#define ICorProfilerCallback3_ExceptionSearchFunctionLeave(This) \
+#define ICorProfilerCallback3_ExceptionSearchFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) )
-#define ICorProfilerCallback3_ExceptionSearchFilterEnter(This,functionId) \
+#define ICorProfilerCallback3_ExceptionSearchFilterEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) )
-#define ICorProfilerCallback3_ExceptionSearchFilterLeave(This) \
+#define ICorProfilerCallback3_ExceptionSearchFilterLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) )
-#define ICorProfilerCallback3_ExceptionSearchCatcherFound(This,functionId) \
+#define ICorProfilerCallback3_ExceptionSearchCatcherFound(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) )
-#define ICorProfilerCallback3_ExceptionOSHandlerEnter(This,__unused) \
+#define ICorProfilerCallback3_ExceptionOSHandlerEnter(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) )
-#define ICorProfilerCallback3_ExceptionOSHandlerLeave(This,__unused) \
+#define ICorProfilerCallback3_ExceptionOSHandlerLeave(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) )
-#define ICorProfilerCallback3_ExceptionUnwindFunctionEnter(This,functionId) \
+#define ICorProfilerCallback3_ExceptionUnwindFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) )
-#define ICorProfilerCallback3_ExceptionUnwindFunctionLeave(This) \
+#define ICorProfilerCallback3_ExceptionUnwindFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) )
-#define ICorProfilerCallback3_ExceptionUnwindFinallyEnter(This,functionId) \
+#define ICorProfilerCallback3_ExceptionUnwindFinallyEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) )
-#define ICorProfilerCallback3_ExceptionUnwindFinallyLeave(This) \
+#define ICorProfilerCallback3_ExceptionUnwindFinallyLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) )
-#define ICorProfilerCallback3_ExceptionCatcherEnter(This,functionId,objectId) \
+#define ICorProfilerCallback3_ExceptionCatcherEnter(This,functionId,objectId) \
( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) )
-#define ICorProfilerCallback3_ExceptionCatcherLeave(This) \
+#define ICorProfilerCallback3_ExceptionCatcherLeave(This) \
( (This)->lpVtbl -> ExceptionCatcherLeave(This) )
-#define ICorProfilerCallback3_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
+#define ICorProfilerCallback3_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) )
-#define ICorProfilerCallback3_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
+#define ICorProfilerCallback3_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) )
-#define ICorProfilerCallback3_ExceptionCLRCatcherFound(This) \
+#define ICorProfilerCallback3_ExceptionCLRCatcherFound(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) )
-#define ICorProfilerCallback3_ExceptionCLRCatcherExecute(This) \
+#define ICorProfilerCallback3_ExceptionCLRCatcherExecute(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) )
-#define ICorProfilerCallback3_ThreadNameChanged(This,threadId,cchName,name) \
+#define ICorProfilerCallback3_ThreadNameChanged(This,threadId,cchName,name) \
( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) )
-#define ICorProfilerCallback3_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
+#define ICorProfilerCallback3_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) )
-#define ICorProfilerCallback3_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback3_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback3_GarbageCollectionFinished(This) \
+#define ICorProfilerCallback3_GarbageCollectionFinished(This) \
( (This)->lpVtbl -> GarbageCollectionFinished(This) )
-#define ICorProfilerCallback3_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
+#define ICorProfilerCallback3_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) )
-#define ICorProfilerCallback3_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
+#define ICorProfilerCallback3_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) )
-#define ICorProfilerCallback3_HandleCreated(This,handleId,initialObjectId) \
+#define ICorProfilerCallback3_HandleCreated(This,handleId,initialObjectId) \
( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) )
-#define ICorProfilerCallback3_HandleDestroyed(This,handleId) \
+#define ICorProfilerCallback3_HandleDestroyed(This,handleId) \
( (This)->lpVtbl -> HandleDestroyed(This,handleId) )
-#define ICorProfilerCallback3_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
+#define ICorProfilerCallback3_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) )
-#define ICorProfilerCallback3_ProfilerAttachComplete(This) \
+#define ICorProfilerCallback3_ProfilerAttachComplete(This) \
( (This)->lpVtbl -> ProfilerAttachComplete(This) )
-#define ICorProfilerCallback3_ProfilerDetachSucceeded(This) \
+#define ICorProfilerCallback3_ProfilerDetachSucceeded(This) \
( (This)->lpVtbl -> ProfilerDetachSucceeded(This) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerCallback3_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerCallback3_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerCallback4_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerCallback4Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerCallback4 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Initialize)
HRESULT ( STDMETHODCALLTYPE *Initialize )(
ICorProfilerCallback4 * This,
/* [in] */ IUnknown *pICorProfilerInfoUnk);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Shutdown)
HRESULT ( STDMETHODCALLTYPE *Shutdown )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )(
ICorProfilerCallback4 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )(
ICorProfilerCallback4 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )(
ICorProfilerCallback4 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )(
ICorProfilerCallback4 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )(
ICorProfilerCallback4 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )(
ICorProfilerCallback4 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )(
ICorProfilerCallback4 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )(
ICorProfilerCallback4 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )(
ICorProfilerCallback4 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )(
ICorProfilerCallback4 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )(
ICorProfilerCallback4 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )(
ICorProfilerCallback4 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleAttachedToAssembly)
HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )(
ICorProfilerCallback4 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ AssemblyID AssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )(
ICorProfilerCallback4 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )(
ICorProfilerCallback4 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )(
ICorProfilerCallback4 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )(
ICorProfilerCallback4 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, FunctionUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID functionId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchStarted)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID functionId,
/* [out] */ BOOL *pbUseCachedFunction);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchFinished)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_JIT_CACHE result);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITFunctionPitched)
HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITInlining)
HRESULT ( STDMETHODCALLTYPE *JITInlining )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID callerId,
/* [in] */ FunctionID calleeId,
/* [out] */ BOOL *pfShouldInline);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadCreated)
HRESULT ( STDMETHODCALLTYPE *ThreadCreated )(
ICorProfilerCallback4 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadDestroyed)
HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )(
ICorProfilerCallback4 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadAssignedToOSThread)
HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )(
ICorProfilerCallback4 * This,
/* [in] */ ThreadID managedThreadId,
/* [in] */ DWORD osThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientSendingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )(
ICorProfilerCallback4 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientReceivingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )(
ICorProfilerCallback4 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationFinished)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerReceivingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )(
ICorProfilerCallback4 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationReturned)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerSendingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )(
ICorProfilerCallback4 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, UnmanagedToManagedTransition)
HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ManagedToUnmanagedTransition)
HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )(
ICorProfilerCallback4 * This,
/* [in] */ COR_PRF_SUSPEND_REASON suspendReason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendAborted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadSuspended)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )(
ICorProfilerCallback4 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadResumed)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )(
ICorProfilerCallback4 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, MovedReferences)
HRESULT ( STDMETHODCALLTYPE *MovedReferences )(
ICorProfilerCallback4 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectAllocated)
HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )(
ICorProfilerCallback4 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectsAllocatedByClass)
HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )(
ICorProfilerCallback4 * This,
/* [in] */ ULONG cClassCount,
/* [size_is][in] */ ClassID classIds[ ],
/* [size_is][in] */ ULONG cObjects[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectReferences)
HRESULT ( STDMETHODCALLTYPE *ObjectReferences )(
ICorProfilerCallback4 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ULONG cObjectRefs,
/* [size_is][in] */ ObjectID objectRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RootReferences)
HRESULT ( STDMETHODCALLTYPE *RootReferences )(
ICorProfilerCallback4 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID rootRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionThrown)
HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )(
ICorProfilerCallback4 * This,
/* [in] */ ObjectID thrownObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )(
ICorProfilerCallback4 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )(
ICorProfilerCallback4 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ObjectID objectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableCreated)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )(
ICorProfilerCallback4 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ void *pVTable,
/* [in] */ ULONG cSlots);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableDestroyed)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )(
ICorProfilerCallback4 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ REFGUID implementedIID,
/* [in] */ void *pVTable);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherExecute)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, ThreadNameChanged)
HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )(
ICorProfilerCallback4 * This,
/* [in] */ ThreadID threadId,
/* [annotation][in] */
_In_reads_opt_(cchName) WCHAR name[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionStarted)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )(
ICorProfilerCallback4 * This,
/* [in] */ int cGenerations,
/* [size_is][in] */ BOOL generationCollected[ ],
/* [in] */ COR_PRF_GC_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, SurvivingReferences)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )(
ICorProfilerCallback4 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionFinished)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, FinalizeableObjectQueued)
HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )(
ICorProfilerCallback4 * This,
/* [in] */ DWORD finalizerFlags,
/* [in] */ ObjectID objectID);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, RootReferences2)
HRESULT ( STDMETHODCALLTYPE *RootReferences2 )(
ICorProfilerCallback4 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ],
/* [size_is][in] */ UINT_PTR rootIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleCreated)
HRESULT ( STDMETHODCALLTYPE *HandleCreated )(
ICorProfilerCallback4 * This,
/* [in] */ GCHandleID handleId,
/* [in] */ ObjectID initialObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleDestroyed)
HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )(
ICorProfilerCallback4 * This,
/* [in] */ GCHandleID handleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, InitializeForAttach)
HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )(
ICorProfilerCallback4 * This,
/* [in] */ IUnknown *pCorProfilerInfoUnk,
/* [in] */ void *pvClientData,
/* [in] */ UINT cbClientData);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerAttachComplete)
HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerDetachSucceeded)
HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )(
ICorProfilerCallback4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ReJITID rejitId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, GetReJITParameters)
HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )(
ICorProfilerCallback4 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodId,
/* [in] */ ICorProfilerFunctionControl *pFunctionControl);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )(
ICorProfilerCallback4 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITError)
HRESULT ( STDMETHODCALLTYPE *ReJITError )(
ICorProfilerCallback4 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, MovedReferences2)
HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )(
ICorProfilerCallback4 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, SurvivingReferences2)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )(
ICorProfilerCallback4 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
#ifdef COBJMACROS
-#define ICorProfilerCallback4_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerCallback4_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerCallback4_AddRef(This) \
+#define ICorProfilerCallback4_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerCallback4_Release(This) \
+#define ICorProfilerCallback4_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerCallback4_Initialize(This,pICorProfilerInfoUnk) \
+#define ICorProfilerCallback4_Initialize(This,pICorProfilerInfoUnk) \
( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) )
-#define ICorProfilerCallback4_Shutdown(This) \
+#define ICorProfilerCallback4_Shutdown(This) \
( (This)->lpVtbl -> Shutdown(This) )
-#define ICorProfilerCallback4_AppDomainCreationStarted(This,appDomainId) \
+#define ICorProfilerCallback4_AppDomainCreationStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) )
-#define ICorProfilerCallback4_AppDomainCreationFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback4_AppDomainCreationFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback4_AppDomainShutdownStarted(This,appDomainId) \
+#define ICorProfilerCallback4_AppDomainShutdownStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) )
-#define ICorProfilerCallback4_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback4_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback4_AssemblyLoadStarted(This,assemblyId) \
+#define ICorProfilerCallback4_AssemblyLoadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) )
-#define ICorProfilerCallback4_AssemblyLoadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback4_AssemblyLoadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback4_AssemblyUnloadStarted(This,assemblyId) \
+#define ICorProfilerCallback4_AssemblyUnloadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) )
-#define ICorProfilerCallback4_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback4_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback4_ModuleLoadStarted(This,moduleId) \
+#define ICorProfilerCallback4_ModuleLoadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) )
-#define ICorProfilerCallback4_ModuleLoadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback4_ModuleLoadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback4_ModuleUnloadStarted(This,moduleId) \
+#define ICorProfilerCallback4_ModuleUnloadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) )
-#define ICorProfilerCallback4_ModuleUnloadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback4_ModuleUnloadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback4_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
+#define ICorProfilerCallback4_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) )
-#define ICorProfilerCallback4_ClassLoadStarted(This,classId) \
+#define ICorProfilerCallback4_ClassLoadStarted(This,classId) \
( (This)->lpVtbl -> ClassLoadStarted(This,classId) )
-#define ICorProfilerCallback4_ClassLoadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback4_ClassLoadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback4_ClassUnloadStarted(This,classId) \
+#define ICorProfilerCallback4_ClassUnloadStarted(This,classId) \
( (This)->lpVtbl -> ClassUnloadStarted(This,classId) )
-#define ICorProfilerCallback4_ClassUnloadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback4_ClassUnloadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback4_FunctionUnloadStarted(This,functionId) \
+#define ICorProfilerCallback4_FunctionUnloadStarted(This,functionId) \
( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) )
-#define ICorProfilerCallback4_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
+#define ICorProfilerCallback4_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) )
-#define ICorProfilerCallback4_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback4_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback4_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
+#define ICorProfilerCallback4_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) )
-#define ICorProfilerCallback4_JITCachedFunctionSearchFinished(This,functionId,result) \
+#define ICorProfilerCallback4_JITCachedFunctionSearchFinished(This,functionId,result) \
( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) )
-#define ICorProfilerCallback4_JITFunctionPitched(This,functionId) \
+#define ICorProfilerCallback4_JITFunctionPitched(This,functionId) \
( (This)->lpVtbl -> JITFunctionPitched(This,functionId) )
-#define ICorProfilerCallback4_JITInlining(This,callerId,calleeId,pfShouldInline) \
+#define ICorProfilerCallback4_JITInlining(This,callerId,calleeId,pfShouldInline) \
( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) )
-#define ICorProfilerCallback4_ThreadCreated(This,threadId) \
+#define ICorProfilerCallback4_ThreadCreated(This,threadId) \
( (This)->lpVtbl -> ThreadCreated(This,threadId) )
-#define ICorProfilerCallback4_ThreadDestroyed(This,threadId) \
+#define ICorProfilerCallback4_ThreadDestroyed(This,threadId) \
( (This)->lpVtbl -> ThreadDestroyed(This,threadId) )
-#define ICorProfilerCallback4_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
+#define ICorProfilerCallback4_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) )
-#define ICorProfilerCallback4_RemotingClientInvocationStarted(This) \
+#define ICorProfilerCallback4_RemotingClientInvocationStarted(This) \
( (This)->lpVtbl -> RemotingClientInvocationStarted(This) )
-#define ICorProfilerCallback4_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback4_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback4_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback4_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback4_RemotingClientInvocationFinished(This) \
+#define ICorProfilerCallback4_RemotingClientInvocationFinished(This) \
( (This)->lpVtbl -> RemotingClientInvocationFinished(This) )
-#define ICorProfilerCallback4_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback4_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback4_RemotingServerInvocationStarted(This) \
+#define ICorProfilerCallback4_RemotingServerInvocationStarted(This) \
( (This)->lpVtbl -> RemotingServerInvocationStarted(This) )
-#define ICorProfilerCallback4_RemotingServerInvocationReturned(This) \
+#define ICorProfilerCallback4_RemotingServerInvocationReturned(This) \
( (This)->lpVtbl -> RemotingServerInvocationReturned(This) )
-#define ICorProfilerCallback4_RemotingServerSendingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback4_RemotingServerSendingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback4_UnmanagedToManagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback4_UnmanagedToManagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback4_ManagedToUnmanagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback4_ManagedToUnmanagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback4_RuntimeSuspendStarted(This,suspendReason) \
+#define ICorProfilerCallback4_RuntimeSuspendStarted(This,suspendReason) \
( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) )
-#define ICorProfilerCallback4_RuntimeSuspendFinished(This) \
+#define ICorProfilerCallback4_RuntimeSuspendFinished(This) \
( (This)->lpVtbl -> RuntimeSuspendFinished(This) )
-#define ICorProfilerCallback4_RuntimeSuspendAborted(This) \
+#define ICorProfilerCallback4_RuntimeSuspendAborted(This) \
( (This)->lpVtbl -> RuntimeSuspendAborted(This) )
-#define ICorProfilerCallback4_RuntimeResumeStarted(This) \
+#define ICorProfilerCallback4_RuntimeResumeStarted(This) \
( (This)->lpVtbl -> RuntimeResumeStarted(This) )
-#define ICorProfilerCallback4_RuntimeResumeFinished(This) \
+#define ICorProfilerCallback4_RuntimeResumeFinished(This) \
( (This)->lpVtbl -> RuntimeResumeFinished(This) )
-#define ICorProfilerCallback4_RuntimeThreadSuspended(This,threadId) \
+#define ICorProfilerCallback4_RuntimeThreadSuspended(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) )
-#define ICorProfilerCallback4_RuntimeThreadResumed(This,threadId) \
+#define ICorProfilerCallback4_RuntimeThreadResumed(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) )
-#define ICorProfilerCallback4_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback4_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback4_ObjectAllocated(This,objectId,classId) \
+#define ICorProfilerCallback4_ObjectAllocated(This,objectId,classId) \
( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) )
-#define ICorProfilerCallback4_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
+#define ICorProfilerCallback4_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) )
-#define ICorProfilerCallback4_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
+#define ICorProfilerCallback4_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) )
-#define ICorProfilerCallback4_RootReferences(This,cRootRefs,rootRefIds) \
+#define ICorProfilerCallback4_RootReferences(This,cRootRefs,rootRefIds) \
( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) )
-#define ICorProfilerCallback4_ExceptionThrown(This,thrownObjectId) \
+#define ICorProfilerCallback4_ExceptionThrown(This,thrownObjectId) \
( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) )
-#define ICorProfilerCallback4_ExceptionSearchFunctionEnter(This,functionId) \
+#define ICorProfilerCallback4_ExceptionSearchFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) )
-#define ICorProfilerCallback4_ExceptionSearchFunctionLeave(This) \
+#define ICorProfilerCallback4_ExceptionSearchFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) )
-#define ICorProfilerCallback4_ExceptionSearchFilterEnter(This,functionId) \
+#define ICorProfilerCallback4_ExceptionSearchFilterEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) )
-#define ICorProfilerCallback4_ExceptionSearchFilterLeave(This) \
+#define ICorProfilerCallback4_ExceptionSearchFilterLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) )
-#define ICorProfilerCallback4_ExceptionSearchCatcherFound(This,functionId) \
+#define ICorProfilerCallback4_ExceptionSearchCatcherFound(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) )
-#define ICorProfilerCallback4_ExceptionOSHandlerEnter(This,__unused) \
+#define ICorProfilerCallback4_ExceptionOSHandlerEnter(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) )
-#define ICorProfilerCallback4_ExceptionOSHandlerLeave(This,__unused) \
+#define ICorProfilerCallback4_ExceptionOSHandlerLeave(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) )
-#define ICorProfilerCallback4_ExceptionUnwindFunctionEnter(This,functionId) \
+#define ICorProfilerCallback4_ExceptionUnwindFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) )
-#define ICorProfilerCallback4_ExceptionUnwindFunctionLeave(This) \
+#define ICorProfilerCallback4_ExceptionUnwindFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) )
-#define ICorProfilerCallback4_ExceptionUnwindFinallyEnter(This,functionId) \
+#define ICorProfilerCallback4_ExceptionUnwindFinallyEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) )
-#define ICorProfilerCallback4_ExceptionUnwindFinallyLeave(This) \
+#define ICorProfilerCallback4_ExceptionUnwindFinallyLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) )
-#define ICorProfilerCallback4_ExceptionCatcherEnter(This,functionId,objectId) \
+#define ICorProfilerCallback4_ExceptionCatcherEnter(This,functionId,objectId) \
( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) )
-#define ICorProfilerCallback4_ExceptionCatcherLeave(This) \
+#define ICorProfilerCallback4_ExceptionCatcherLeave(This) \
( (This)->lpVtbl -> ExceptionCatcherLeave(This) )
-#define ICorProfilerCallback4_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
+#define ICorProfilerCallback4_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) )
-#define ICorProfilerCallback4_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
+#define ICorProfilerCallback4_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) )
-#define ICorProfilerCallback4_ExceptionCLRCatcherFound(This) \
+#define ICorProfilerCallback4_ExceptionCLRCatcherFound(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) )
-#define ICorProfilerCallback4_ExceptionCLRCatcherExecute(This) \
+#define ICorProfilerCallback4_ExceptionCLRCatcherExecute(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) )
-#define ICorProfilerCallback4_ThreadNameChanged(This,threadId,cchName,name) \
+#define ICorProfilerCallback4_ThreadNameChanged(This,threadId,cchName,name) \
( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) )
-#define ICorProfilerCallback4_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
+#define ICorProfilerCallback4_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) )
-#define ICorProfilerCallback4_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback4_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback4_GarbageCollectionFinished(This) \
+#define ICorProfilerCallback4_GarbageCollectionFinished(This) \
( (This)->lpVtbl -> GarbageCollectionFinished(This) )
-#define ICorProfilerCallback4_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
+#define ICorProfilerCallback4_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) )
-#define ICorProfilerCallback4_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
+#define ICorProfilerCallback4_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) )
-#define ICorProfilerCallback4_HandleCreated(This,handleId,initialObjectId) \
+#define ICorProfilerCallback4_HandleCreated(This,handleId,initialObjectId) \
( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) )
-#define ICorProfilerCallback4_HandleDestroyed(This,handleId) \
+#define ICorProfilerCallback4_HandleDestroyed(This,handleId) \
( (This)->lpVtbl -> HandleDestroyed(This,handleId) )
-#define ICorProfilerCallback4_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
+#define ICorProfilerCallback4_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) )
-#define ICorProfilerCallback4_ProfilerAttachComplete(This) \
+#define ICorProfilerCallback4_ProfilerAttachComplete(This) \
( (This)->lpVtbl -> ProfilerAttachComplete(This) )
-#define ICorProfilerCallback4_ProfilerDetachSucceeded(This) \
+#define ICorProfilerCallback4_ProfilerDetachSucceeded(This) \
( (This)->lpVtbl -> ProfilerDetachSucceeded(This) )
-#define ICorProfilerCallback4_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \
+#define ICorProfilerCallback4_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \
( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) )
-#define ICorProfilerCallback4_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \
+#define ICorProfilerCallback4_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \
( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) )
-#define ICorProfilerCallback4_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback4_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback4_ReJITError(This,moduleId,methodId,functionId,hrStatus) \
+#define ICorProfilerCallback4_ReJITError(This,moduleId,methodId,functionId,hrStatus) \
( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) )
-#define ICorProfilerCallback4_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback4_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback4_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback4_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerCallback4_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerCallback4_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerCallback5_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerCallback5Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerCallback5 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Initialize)
HRESULT ( STDMETHODCALLTYPE *Initialize )(
ICorProfilerCallback5 * This,
/* [in] */ IUnknown *pICorProfilerInfoUnk);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Shutdown)
HRESULT ( STDMETHODCALLTYPE *Shutdown )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )(
ICorProfilerCallback5 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )(
ICorProfilerCallback5 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )(
ICorProfilerCallback5 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )(
ICorProfilerCallback5 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )(
ICorProfilerCallback5 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )(
ICorProfilerCallback5 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )(
ICorProfilerCallback5 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )(
ICorProfilerCallback5 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )(
ICorProfilerCallback5 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )(
ICorProfilerCallback5 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )(
ICorProfilerCallback5 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )(
ICorProfilerCallback5 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleAttachedToAssembly)
HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )(
ICorProfilerCallback5 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ AssemblyID AssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )(
ICorProfilerCallback5 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )(
ICorProfilerCallback5 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )(
ICorProfilerCallback5 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )(
ICorProfilerCallback5 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, FunctionUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID functionId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchStarted)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID functionId,
/* [out] */ BOOL *pbUseCachedFunction);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchFinished)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_JIT_CACHE result);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITFunctionPitched)
HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITInlining)
HRESULT ( STDMETHODCALLTYPE *JITInlining )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID callerId,
/* [in] */ FunctionID calleeId,
/* [out] */ BOOL *pfShouldInline);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadCreated)
HRESULT ( STDMETHODCALLTYPE *ThreadCreated )(
ICorProfilerCallback5 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadDestroyed)
HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )(
ICorProfilerCallback5 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadAssignedToOSThread)
HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )(
ICorProfilerCallback5 * This,
/* [in] */ ThreadID managedThreadId,
/* [in] */ DWORD osThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientSendingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )(
ICorProfilerCallback5 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientReceivingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )(
ICorProfilerCallback5 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationFinished)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerReceivingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )(
ICorProfilerCallback5 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationReturned)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerSendingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )(
ICorProfilerCallback5 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, UnmanagedToManagedTransition)
HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ManagedToUnmanagedTransition)
HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )(
ICorProfilerCallback5 * This,
/* [in] */ COR_PRF_SUSPEND_REASON suspendReason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendAborted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadSuspended)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )(
ICorProfilerCallback5 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadResumed)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )(
ICorProfilerCallback5 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, MovedReferences)
HRESULT ( STDMETHODCALLTYPE *MovedReferences )(
ICorProfilerCallback5 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectAllocated)
HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )(
ICorProfilerCallback5 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectsAllocatedByClass)
HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )(
ICorProfilerCallback5 * This,
/* [in] */ ULONG cClassCount,
/* [size_is][in] */ ClassID classIds[ ],
/* [size_is][in] */ ULONG cObjects[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectReferences)
HRESULT ( STDMETHODCALLTYPE *ObjectReferences )(
ICorProfilerCallback5 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ULONG cObjectRefs,
/* [size_is][in] */ ObjectID objectRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RootReferences)
HRESULT ( STDMETHODCALLTYPE *RootReferences )(
ICorProfilerCallback5 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID rootRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionThrown)
HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )(
ICorProfilerCallback5 * This,
/* [in] */ ObjectID thrownObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )(
ICorProfilerCallback5 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )(
ICorProfilerCallback5 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ObjectID objectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableCreated)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )(
ICorProfilerCallback5 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ void *pVTable,
/* [in] */ ULONG cSlots);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableDestroyed)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )(
ICorProfilerCallback5 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ REFGUID implementedIID,
/* [in] */ void *pVTable);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherExecute)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, ThreadNameChanged)
HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )(
ICorProfilerCallback5 * This,
/* [in] */ ThreadID threadId,
/* [annotation][in] */
_In_reads_opt_(cchName) WCHAR name[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionStarted)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )(
ICorProfilerCallback5 * This,
/* [in] */ int cGenerations,
/* [size_is][in] */ BOOL generationCollected[ ],
/* [in] */ COR_PRF_GC_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, SurvivingReferences)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )(
ICorProfilerCallback5 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionFinished)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, FinalizeableObjectQueued)
HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )(
ICorProfilerCallback5 * This,
/* [in] */ DWORD finalizerFlags,
/* [in] */ ObjectID objectID);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, RootReferences2)
HRESULT ( STDMETHODCALLTYPE *RootReferences2 )(
ICorProfilerCallback5 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ],
/* [size_is][in] */ UINT_PTR rootIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleCreated)
HRESULT ( STDMETHODCALLTYPE *HandleCreated )(
ICorProfilerCallback5 * This,
/* [in] */ GCHandleID handleId,
/* [in] */ ObjectID initialObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleDestroyed)
HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )(
ICorProfilerCallback5 * This,
/* [in] */ GCHandleID handleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, InitializeForAttach)
HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )(
ICorProfilerCallback5 * This,
/* [in] */ IUnknown *pCorProfilerInfoUnk,
/* [in] */ void *pvClientData,
/* [in] */ UINT cbClientData);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerAttachComplete)
HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerDetachSucceeded)
HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )(
ICorProfilerCallback5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ReJITID rejitId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, GetReJITParameters)
HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )(
ICorProfilerCallback5 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodId,
/* [in] */ ICorProfilerFunctionControl *pFunctionControl);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )(
ICorProfilerCallback5 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITError)
HRESULT ( STDMETHODCALLTYPE *ReJITError )(
ICorProfilerCallback5 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, MovedReferences2)
HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )(
ICorProfilerCallback5 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, SurvivingReferences2)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )(
ICorProfilerCallback5 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback5, ConditionalWeakTableElementReferences)
HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )(
ICorProfilerCallback5 * This,
/* [in] */ ULONG cRootRefs,
#ifdef COBJMACROS
-#define ICorProfilerCallback5_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerCallback5_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerCallback5_AddRef(This) \
+#define ICorProfilerCallback5_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerCallback5_Release(This) \
+#define ICorProfilerCallback5_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerCallback5_Initialize(This,pICorProfilerInfoUnk) \
+#define ICorProfilerCallback5_Initialize(This,pICorProfilerInfoUnk) \
( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) )
-#define ICorProfilerCallback5_Shutdown(This) \
+#define ICorProfilerCallback5_Shutdown(This) \
( (This)->lpVtbl -> Shutdown(This) )
-#define ICorProfilerCallback5_AppDomainCreationStarted(This,appDomainId) \
+#define ICorProfilerCallback5_AppDomainCreationStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) )
-#define ICorProfilerCallback5_AppDomainCreationFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback5_AppDomainCreationFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback5_AppDomainShutdownStarted(This,appDomainId) \
+#define ICorProfilerCallback5_AppDomainShutdownStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) )
-#define ICorProfilerCallback5_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback5_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback5_AssemblyLoadStarted(This,assemblyId) \
+#define ICorProfilerCallback5_AssemblyLoadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) )
-#define ICorProfilerCallback5_AssemblyLoadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback5_AssemblyLoadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback5_AssemblyUnloadStarted(This,assemblyId) \
+#define ICorProfilerCallback5_AssemblyUnloadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) )
-#define ICorProfilerCallback5_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback5_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback5_ModuleLoadStarted(This,moduleId) \
+#define ICorProfilerCallback5_ModuleLoadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) )
-#define ICorProfilerCallback5_ModuleLoadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback5_ModuleLoadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback5_ModuleUnloadStarted(This,moduleId) \
+#define ICorProfilerCallback5_ModuleUnloadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) )
-#define ICorProfilerCallback5_ModuleUnloadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback5_ModuleUnloadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback5_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
+#define ICorProfilerCallback5_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) )
-#define ICorProfilerCallback5_ClassLoadStarted(This,classId) \
+#define ICorProfilerCallback5_ClassLoadStarted(This,classId) \
( (This)->lpVtbl -> ClassLoadStarted(This,classId) )
-#define ICorProfilerCallback5_ClassLoadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback5_ClassLoadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback5_ClassUnloadStarted(This,classId) \
+#define ICorProfilerCallback5_ClassUnloadStarted(This,classId) \
( (This)->lpVtbl -> ClassUnloadStarted(This,classId) )
-#define ICorProfilerCallback5_ClassUnloadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback5_ClassUnloadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback5_FunctionUnloadStarted(This,functionId) \
+#define ICorProfilerCallback5_FunctionUnloadStarted(This,functionId) \
( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) )
-#define ICorProfilerCallback5_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
+#define ICorProfilerCallback5_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) )
-#define ICorProfilerCallback5_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback5_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback5_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
+#define ICorProfilerCallback5_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) )
-#define ICorProfilerCallback5_JITCachedFunctionSearchFinished(This,functionId,result) \
+#define ICorProfilerCallback5_JITCachedFunctionSearchFinished(This,functionId,result) \
( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) )
-#define ICorProfilerCallback5_JITFunctionPitched(This,functionId) \
+#define ICorProfilerCallback5_JITFunctionPitched(This,functionId) \
( (This)->lpVtbl -> JITFunctionPitched(This,functionId) )
-#define ICorProfilerCallback5_JITInlining(This,callerId,calleeId,pfShouldInline) \
+#define ICorProfilerCallback5_JITInlining(This,callerId,calleeId,pfShouldInline) \
( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) )
-#define ICorProfilerCallback5_ThreadCreated(This,threadId) \
+#define ICorProfilerCallback5_ThreadCreated(This,threadId) \
( (This)->lpVtbl -> ThreadCreated(This,threadId) )
-#define ICorProfilerCallback5_ThreadDestroyed(This,threadId) \
+#define ICorProfilerCallback5_ThreadDestroyed(This,threadId) \
( (This)->lpVtbl -> ThreadDestroyed(This,threadId) )
-#define ICorProfilerCallback5_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
+#define ICorProfilerCallback5_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) )
-#define ICorProfilerCallback5_RemotingClientInvocationStarted(This) \
+#define ICorProfilerCallback5_RemotingClientInvocationStarted(This) \
( (This)->lpVtbl -> RemotingClientInvocationStarted(This) )
-#define ICorProfilerCallback5_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback5_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback5_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback5_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback5_RemotingClientInvocationFinished(This) \
+#define ICorProfilerCallback5_RemotingClientInvocationFinished(This) \
( (This)->lpVtbl -> RemotingClientInvocationFinished(This) )
-#define ICorProfilerCallback5_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback5_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback5_RemotingServerInvocationStarted(This) \
+#define ICorProfilerCallback5_RemotingServerInvocationStarted(This) \
( (This)->lpVtbl -> RemotingServerInvocationStarted(This) )
-#define ICorProfilerCallback5_RemotingServerInvocationReturned(This) \
+#define ICorProfilerCallback5_RemotingServerInvocationReturned(This) \
( (This)->lpVtbl -> RemotingServerInvocationReturned(This) )
-#define ICorProfilerCallback5_RemotingServerSendingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback5_RemotingServerSendingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback5_UnmanagedToManagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback5_UnmanagedToManagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback5_ManagedToUnmanagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback5_ManagedToUnmanagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback5_RuntimeSuspendStarted(This,suspendReason) \
+#define ICorProfilerCallback5_RuntimeSuspendStarted(This,suspendReason) \
( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) )
-#define ICorProfilerCallback5_RuntimeSuspendFinished(This) \
+#define ICorProfilerCallback5_RuntimeSuspendFinished(This) \
( (This)->lpVtbl -> RuntimeSuspendFinished(This) )
-#define ICorProfilerCallback5_RuntimeSuspendAborted(This) \
+#define ICorProfilerCallback5_RuntimeSuspendAborted(This) \
( (This)->lpVtbl -> RuntimeSuspendAborted(This) )
-#define ICorProfilerCallback5_RuntimeResumeStarted(This) \
+#define ICorProfilerCallback5_RuntimeResumeStarted(This) \
( (This)->lpVtbl -> RuntimeResumeStarted(This) )
-#define ICorProfilerCallback5_RuntimeResumeFinished(This) \
+#define ICorProfilerCallback5_RuntimeResumeFinished(This) \
( (This)->lpVtbl -> RuntimeResumeFinished(This) )
-#define ICorProfilerCallback5_RuntimeThreadSuspended(This,threadId) \
+#define ICorProfilerCallback5_RuntimeThreadSuspended(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) )
-#define ICorProfilerCallback5_RuntimeThreadResumed(This,threadId) \
+#define ICorProfilerCallback5_RuntimeThreadResumed(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) )
-#define ICorProfilerCallback5_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback5_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback5_ObjectAllocated(This,objectId,classId) \
+#define ICorProfilerCallback5_ObjectAllocated(This,objectId,classId) \
( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) )
-#define ICorProfilerCallback5_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
+#define ICorProfilerCallback5_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) )
-#define ICorProfilerCallback5_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
+#define ICorProfilerCallback5_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) )
-#define ICorProfilerCallback5_RootReferences(This,cRootRefs,rootRefIds) \
+#define ICorProfilerCallback5_RootReferences(This,cRootRefs,rootRefIds) \
( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) )
-#define ICorProfilerCallback5_ExceptionThrown(This,thrownObjectId) \
+#define ICorProfilerCallback5_ExceptionThrown(This,thrownObjectId) \
( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) )
-#define ICorProfilerCallback5_ExceptionSearchFunctionEnter(This,functionId) \
+#define ICorProfilerCallback5_ExceptionSearchFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) )
-#define ICorProfilerCallback5_ExceptionSearchFunctionLeave(This) \
+#define ICorProfilerCallback5_ExceptionSearchFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) )
-#define ICorProfilerCallback5_ExceptionSearchFilterEnter(This,functionId) \
+#define ICorProfilerCallback5_ExceptionSearchFilterEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) )
-#define ICorProfilerCallback5_ExceptionSearchFilterLeave(This) \
+#define ICorProfilerCallback5_ExceptionSearchFilterLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) )
-#define ICorProfilerCallback5_ExceptionSearchCatcherFound(This,functionId) \
+#define ICorProfilerCallback5_ExceptionSearchCatcherFound(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) )
-#define ICorProfilerCallback5_ExceptionOSHandlerEnter(This,__unused) \
+#define ICorProfilerCallback5_ExceptionOSHandlerEnter(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) )
-#define ICorProfilerCallback5_ExceptionOSHandlerLeave(This,__unused) \
+#define ICorProfilerCallback5_ExceptionOSHandlerLeave(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) )
-#define ICorProfilerCallback5_ExceptionUnwindFunctionEnter(This,functionId) \
+#define ICorProfilerCallback5_ExceptionUnwindFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) )
-#define ICorProfilerCallback5_ExceptionUnwindFunctionLeave(This) \
+#define ICorProfilerCallback5_ExceptionUnwindFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) )
-#define ICorProfilerCallback5_ExceptionUnwindFinallyEnter(This,functionId) \
+#define ICorProfilerCallback5_ExceptionUnwindFinallyEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) )
-#define ICorProfilerCallback5_ExceptionUnwindFinallyLeave(This) \
+#define ICorProfilerCallback5_ExceptionUnwindFinallyLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) )
-#define ICorProfilerCallback5_ExceptionCatcherEnter(This,functionId,objectId) \
+#define ICorProfilerCallback5_ExceptionCatcherEnter(This,functionId,objectId) \
( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) )
-#define ICorProfilerCallback5_ExceptionCatcherLeave(This) \
+#define ICorProfilerCallback5_ExceptionCatcherLeave(This) \
( (This)->lpVtbl -> ExceptionCatcherLeave(This) )
-#define ICorProfilerCallback5_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
+#define ICorProfilerCallback5_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) )
-#define ICorProfilerCallback5_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
+#define ICorProfilerCallback5_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) )
-#define ICorProfilerCallback5_ExceptionCLRCatcherFound(This) \
+#define ICorProfilerCallback5_ExceptionCLRCatcherFound(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) )
-#define ICorProfilerCallback5_ExceptionCLRCatcherExecute(This) \
+#define ICorProfilerCallback5_ExceptionCLRCatcherExecute(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) )
-#define ICorProfilerCallback5_ThreadNameChanged(This,threadId,cchName,name) \
+#define ICorProfilerCallback5_ThreadNameChanged(This,threadId,cchName,name) \
( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) )
-#define ICorProfilerCallback5_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
+#define ICorProfilerCallback5_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) )
-#define ICorProfilerCallback5_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback5_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback5_GarbageCollectionFinished(This) \
+#define ICorProfilerCallback5_GarbageCollectionFinished(This) \
( (This)->lpVtbl -> GarbageCollectionFinished(This) )
-#define ICorProfilerCallback5_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
+#define ICorProfilerCallback5_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) )
-#define ICorProfilerCallback5_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
+#define ICorProfilerCallback5_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) )
-#define ICorProfilerCallback5_HandleCreated(This,handleId,initialObjectId) \
+#define ICorProfilerCallback5_HandleCreated(This,handleId,initialObjectId) \
( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) )
-#define ICorProfilerCallback5_HandleDestroyed(This,handleId) \
+#define ICorProfilerCallback5_HandleDestroyed(This,handleId) \
( (This)->lpVtbl -> HandleDestroyed(This,handleId) )
-#define ICorProfilerCallback5_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
+#define ICorProfilerCallback5_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) )
-#define ICorProfilerCallback5_ProfilerAttachComplete(This) \
+#define ICorProfilerCallback5_ProfilerAttachComplete(This) \
( (This)->lpVtbl -> ProfilerAttachComplete(This) )
-#define ICorProfilerCallback5_ProfilerDetachSucceeded(This) \
+#define ICorProfilerCallback5_ProfilerDetachSucceeded(This) \
( (This)->lpVtbl -> ProfilerDetachSucceeded(This) )
-#define ICorProfilerCallback5_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \
+#define ICorProfilerCallback5_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \
( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) )
-#define ICorProfilerCallback5_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \
+#define ICorProfilerCallback5_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \
( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) )
-#define ICorProfilerCallback5_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback5_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback5_ReJITError(This,moduleId,methodId,functionId,hrStatus) \
+#define ICorProfilerCallback5_ReJITError(This,moduleId,methodId,functionId,hrStatus) \
( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) )
-#define ICorProfilerCallback5_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback5_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback5_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback5_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback5_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \
+#define ICorProfilerCallback5_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \
( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerCallback5_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerCallback5_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerCallback6_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerCallback6Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerCallback6 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Initialize)
HRESULT ( STDMETHODCALLTYPE *Initialize )(
ICorProfilerCallback6 * This,
/* [in] */ IUnknown *pICorProfilerInfoUnk);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Shutdown)
HRESULT ( STDMETHODCALLTYPE *Shutdown )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )(
ICorProfilerCallback6 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )(
ICorProfilerCallback6 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )(
ICorProfilerCallback6 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )(
ICorProfilerCallback6 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )(
ICorProfilerCallback6 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )(
ICorProfilerCallback6 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )(
ICorProfilerCallback6 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )(
ICorProfilerCallback6 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )(
ICorProfilerCallback6 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )(
ICorProfilerCallback6 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )(
ICorProfilerCallback6 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )(
ICorProfilerCallback6 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleAttachedToAssembly)
HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )(
ICorProfilerCallback6 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ AssemblyID AssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )(
ICorProfilerCallback6 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )(
ICorProfilerCallback6 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )(
ICorProfilerCallback6 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )(
ICorProfilerCallback6 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, FunctionUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID functionId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchStarted)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID functionId,
/* [out] */ BOOL *pbUseCachedFunction);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchFinished)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_JIT_CACHE result);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITFunctionPitched)
HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITInlining)
HRESULT ( STDMETHODCALLTYPE *JITInlining )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID callerId,
/* [in] */ FunctionID calleeId,
/* [out] */ BOOL *pfShouldInline);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadCreated)
HRESULT ( STDMETHODCALLTYPE *ThreadCreated )(
ICorProfilerCallback6 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadDestroyed)
HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )(
ICorProfilerCallback6 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadAssignedToOSThread)
HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )(
ICorProfilerCallback6 * This,
/* [in] */ ThreadID managedThreadId,
/* [in] */ DWORD osThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientSendingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )(
ICorProfilerCallback6 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientReceivingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )(
ICorProfilerCallback6 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationFinished)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerReceivingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )(
ICorProfilerCallback6 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationReturned)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerSendingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )(
ICorProfilerCallback6 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, UnmanagedToManagedTransition)
HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ManagedToUnmanagedTransition)
HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )(
ICorProfilerCallback6 * This,
/* [in] */ COR_PRF_SUSPEND_REASON suspendReason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendAborted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadSuspended)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )(
ICorProfilerCallback6 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadResumed)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )(
ICorProfilerCallback6 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, MovedReferences)
HRESULT ( STDMETHODCALLTYPE *MovedReferences )(
ICorProfilerCallback6 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectAllocated)
HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )(
ICorProfilerCallback6 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectsAllocatedByClass)
HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )(
ICorProfilerCallback6 * This,
/* [in] */ ULONG cClassCount,
/* [size_is][in] */ ClassID classIds[ ],
/* [size_is][in] */ ULONG cObjects[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectReferences)
HRESULT ( STDMETHODCALLTYPE *ObjectReferences )(
ICorProfilerCallback6 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ULONG cObjectRefs,
/* [size_is][in] */ ObjectID objectRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RootReferences)
HRESULT ( STDMETHODCALLTYPE *RootReferences )(
ICorProfilerCallback6 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID rootRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionThrown)
HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )(
ICorProfilerCallback6 * This,
/* [in] */ ObjectID thrownObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )(
ICorProfilerCallback6 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )(
ICorProfilerCallback6 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ObjectID objectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableCreated)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )(
ICorProfilerCallback6 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ void *pVTable,
/* [in] */ ULONG cSlots);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableDestroyed)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )(
ICorProfilerCallback6 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ REFGUID implementedIID,
/* [in] */ void *pVTable);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherExecute)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, ThreadNameChanged)
HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )(
ICorProfilerCallback6 * This,
/* [in] */ ThreadID threadId,
/* [annotation][in] */
_In_reads_opt_(cchName) WCHAR name[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionStarted)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )(
ICorProfilerCallback6 * This,
/* [in] */ int cGenerations,
/* [size_is][in] */ BOOL generationCollected[ ],
/* [in] */ COR_PRF_GC_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, SurvivingReferences)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )(
ICorProfilerCallback6 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionFinished)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, FinalizeableObjectQueued)
HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )(
ICorProfilerCallback6 * This,
/* [in] */ DWORD finalizerFlags,
/* [in] */ ObjectID objectID);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, RootReferences2)
HRESULT ( STDMETHODCALLTYPE *RootReferences2 )(
ICorProfilerCallback6 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ],
/* [size_is][in] */ UINT_PTR rootIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleCreated)
HRESULT ( STDMETHODCALLTYPE *HandleCreated )(
ICorProfilerCallback6 * This,
/* [in] */ GCHandleID handleId,
/* [in] */ ObjectID initialObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleDestroyed)
HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )(
ICorProfilerCallback6 * This,
/* [in] */ GCHandleID handleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, InitializeForAttach)
HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )(
ICorProfilerCallback6 * This,
/* [in] */ IUnknown *pCorProfilerInfoUnk,
/* [in] */ void *pvClientData,
/* [in] */ UINT cbClientData);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerAttachComplete)
HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerDetachSucceeded)
HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )(
ICorProfilerCallback6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ReJITID rejitId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, GetReJITParameters)
HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )(
ICorProfilerCallback6 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodId,
/* [in] */ ICorProfilerFunctionControl *pFunctionControl);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )(
ICorProfilerCallback6 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITError)
HRESULT ( STDMETHODCALLTYPE *ReJITError )(
ICorProfilerCallback6 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, MovedReferences2)
HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )(
ICorProfilerCallback6 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, SurvivingReferences2)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )(
ICorProfilerCallback6 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback5, ConditionalWeakTableElementReferences)
HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )(
ICorProfilerCallback6 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID valueRefIds[ ],
/* [size_is][in] */ GCHandleID rootIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback6, GetAssemblyReferences)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyReferences )(
ICorProfilerCallback6 * This,
/* [string][in] */ const WCHAR *wszAssemblyPath,
#ifdef COBJMACROS
-#define ICorProfilerCallback6_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerCallback6_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerCallback6_AddRef(This) \
+#define ICorProfilerCallback6_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerCallback6_Release(This) \
+#define ICorProfilerCallback6_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerCallback6_Initialize(This,pICorProfilerInfoUnk) \
+#define ICorProfilerCallback6_Initialize(This,pICorProfilerInfoUnk) \
( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) )
-#define ICorProfilerCallback6_Shutdown(This) \
+#define ICorProfilerCallback6_Shutdown(This) \
( (This)->lpVtbl -> Shutdown(This) )
-#define ICorProfilerCallback6_AppDomainCreationStarted(This,appDomainId) \
+#define ICorProfilerCallback6_AppDomainCreationStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) )
-#define ICorProfilerCallback6_AppDomainCreationFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback6_AppDomainCreationFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback6_AppDomainShutdownStarted(This,appDomainId) \
+#define ICorProfilerCallback6_AppDomainShutdownStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) )
-#define ICorProfilerCallback6_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback6_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback6_AssemblyLoadStarted(This,assemblyId) \
+#define ICorProfilerCallback6_AssemblyLoadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) )
-#define ICorProfilerCallback6_AssemblyLoadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback6_AssemblyLoadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback6_AssemblyUnloadStarted(This,assemblyId) \
+#define ICorProfilerCallback6_AssemblyUnloadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) )
-#define ICorProfilerCallback6_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback6_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback6_ModuleLoadStarted(This,moduleId) \
+#define ICorProfilerCallback6_ModuleLoadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) )
-#define ICorProfilerCallback6_ModuleLoadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback6_ModuleLoadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback6_ModuleUnloadStarted(This,moduleId) \
+#define ICorProfilerCallback6_ModuleUnloadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) )
-#define ICorProfilerCallback6_ModuleUnloadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback6_ModuleUnloadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback6_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
+#define ICorProfilerCallback6_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) )
-#define ICorProfilerCallback6_ClassLoadStarted(This,classId) \
+#define ICorProfilerCallback6_ClassLoadStarted(This,classId) \
( (This)->lpVtbl -> ClassLoadStarted(This,classId) )
-#define ICorProfilerCallback6_ClassLoadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback6_ClassLoadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback6_ClassUnloadStarted(This,classId) \
+#define ICorProfilerCallback6_ClassUnloadStarted(This,classId) \
( (This)->lpVtbl -> ClassUnloadStarted(This,classId) )
-#define ICorProfilerCallback6_ClassUnloadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback6_ClassUnloadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback6_FunctionUnloadStarted(This,functionId) \
+#define ICorProfilerCallback6_FunctionUnloadStarted(This,functionId) \
( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) )
-#define ICorProfilerCallback6_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
+#define ICorProfilerCallback6_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) )
-#define ICorProfilerCallback6_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback6_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback6_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
+#define ICorProfilerCallback6_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) )
-#define ICorProfilerCallback6_JITCachedFunctionSearchFinished(This,functionId,result) \
+#define ICorProfilerCallback6_JITCachedFunctionSearchFinished(This,functionId,result) \
( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) )
-#define ICorProfilerCallback6_JITFunctionPitched(This,functionId) \
+#define ICorProfilerCallback6_JITFunctionPitched(This,functionId) \
( (This)->lpVtbl -> JITFunctionPitched(This,functionId) )
-#define ICorProfilerCallback6_JITInlining(This,callerId,calleeId,pfShouldInline) \
+#define ICorProfilerCallback6_JITInlining(This,callerId,calleeId,pfShouldInline) \
( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) )
-#define ICorProfilerCallback6_ThreadCreated(This,threadId) \
+#define ICorProfilerCallback6_ThreadCreated(This,threadId) \
( (This)->lpVtbl -> ThreadCreated(This,threadId) )
-#define ICorProfilerCallback6_ThreadDestroyed(This,threadId) \
+#define ICorProfilerCallback6_ThreadDestroyed(This,threadId) \
( (This)->lpVtbl -> ThreadDestroyed(This,threadId) )
-#define ICorProfilerCallback6_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
+#define ICorProfilerCallback6_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) )
-#define ICorProfilerCallback6_RemotingClientInvocationStarted(This) \
+#define ICorProfilerCallback6_RemotingClientInvocationStarted(This) \
( (This)->lpVtbl -> RemotingClientInvocationStarted(This) )
-#define ICorProfilerCallback6_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback6_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback6_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback6_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback6_RemotingClientInvocationFinished(This) \
+#define ICorProfilerCallback6_RemotingClientInvocationFinished(This) \
( (This)->lpVtbl -> RemotingClientInvocationFinished(This) )
-#define ICorProfilerCallback6_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback6_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback6_RemotingServerInvocationStarted(This) \
+#define ICorProfilerCallback6_RemotingServerInvocationStarted(This) \
( (This)->lpVtbl -> RemotingServerInvocationStarted(This) )
-#define ICorProfilerCallback6_RemotingServerInvocationReturned(This) \
+#define ICorProfilerCallback6_RemotingServerInvocationReturned(This) \
( (This)->lpVtbl -> RemotingServerInvocationReturned(This) )
-#define ICorProfilerCallback6_RemotingServerSendingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback6_RemotingServerSendingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback6_UnmanagedToManagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback6_UnmanagedToManagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback6_ManagedToUnmanagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback6_ManagedToUnmanagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback6_RuntimeSuspendStarted(This,suspendReason) \
+#define ICorProfilerCallback6_RuntimeSuspendStarted(This,suspendReason) \
( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) )
-#define ICorProfilerCallback6_RuntimeSuspendFinished(This) \
+#define ICorProfilerCallback6_RuntimeSuspendFinished(This) \
( (This)->lpVtbl -> RuntimeSuspendFinished(This) )
-#define ICorProfilerCallback6_RuntimeSuspendAborted(This) \
+#define ICorProfilerCallback6_RuntimeSuspendAborted(This) \
( (This)->lpVtbl -> RuntimeSuspendAborted(This) )
-#define ICorProfilerCallback6_RuntimeResumeStarted(This) \
+#define ICorProfilerCallback6_RuntimeResumeStarted(This) \
( (This)->lpVtbl -> RuntimeResumeStarted(This) )
-#define ICorProfilerCallback6_RuntimeResumeFinished(This) \
+#define ICorProfilerCallback6_RuntimeResumeFinished(This) \
( (This)->lpVtbl -> RuntimeResumeFinished(This) )
-#define ICorProfilerCallback6_RuntimeThreadSuspended(This,threadId) \
+#define ICorProfilerCallback6_RuntimeThreadSuspended(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) )
-#define ICorProfilerCallback6_RuntimeThreadResumed(This,threadId) \
+#define ICorProfilerCallback6_RuntimeThreadResumed(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) )
-#define ICorProfilerCallback6_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback6_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback6_ObjectAllocated(This,objectId,classId) \
+#define ICorProfilerCallback6_ObjectAllocated(This,objectId,classId) \
( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) )
-#define ICorProfilerCallback6_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
+#define ICorProfilerCallback6_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) )
-#define ICorProfilerCallback6_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
+#define ICorProfilerCallback6_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) )
-#define ICorProfilerCallback6_RootReferences(This,cRootRefs,rootRefIds) \
+#define ICorProfilerCallback6_RootReferences(This,cRootRefs,rootRefIds) \
( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) )
-#define ICorProfilerCallback6_ExceptionThrown(This,thrownObjectId) \
+#define ICorProfilerCallback6_ExceptionThrown(This,thrownObjectId) \
( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) )
-#define ICorProfilerCallback6_ExceptionSearchFunctionEnter(This,functionId) \
+#define ICorProfilerCallback6_ExceptionSearchFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) )
-#define ICorProfilerCallback6_ExceptionSearchFunctionLeave(This) \
+#define ICorProfilerCallback6_ExceptionSearchFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) )
-#define ICorProfilerCallback6_ExceptionSearchFilterEnter(This,functionId) \
+#define ICorProfilerCallback6_ExceptionSearchFilterEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) )
-#define ICorProfilerCallback6_ExceptionSearchFilterLeave(This) \
+#define ICorProfilerCallback6_ExceptionSearchFilterLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) )
-#define ICorProfilerCallback6_ExceptionSearchCatcherFound(This,functionId) \
+#define ICorProfilerCallback6_ExceptionSearchCatcherFound(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) )
-#define ICorProfilerCallback6_ExceptionOSHandlerEnter(This,__unused) \
+#define ICorProfilerCallback6_ExceptionOSHandlerEnter(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) )
-#define ICorProfilerCallback6_ExceptionOSHandlerLeave(This,__unused) \
+#define ICorProfilerCallback6_ExceptionOSHandlerLeave(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) )
-#define ICorProfilerCallback6_ExceptionUnwindFunctionEnter(This,functionId) \
+#define ICorProfilerCallback6_ExceptionUnwindFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) )
-#define ICorProfilerCallback6_ExceptionUnwindFunctionLeave(This) \
+#define ICorProfilerCallback6_ExceptionUnwindFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) )
-#define ICorProfilerCallback6_ExceptionUnwindFinallyEnter(This,functionId) \
+#define ICorProfilerCallback6_ExceptionUnwindFinallyEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) )
-#define ICorProfilerCallback6_ExceptionUnwindFinallyLeave(This) \
+#define ICorProfilerCallback6_ExceptionUnwindFinallyLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) )
-#define ICorProfilerCallback6_ExceptionCatcherEnter(This,functionId,objectId) \
+#define ICorProfilerCallback6_ExceptionCatcherEnter(This,functionId,objectId) \
( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) )
-#define ICorProfilerCallback6_ExceptionCatcherLeave(This) \
+#define ICorProfilerCallback6_ExceptionCatcherLeave(This) \
( (This)->lpVtbl -> ExceptionCatcherLeave(This) )
-#define ICorProfilerCallback6_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
+#define ICorProfilerCallback6_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) )
-#define ICorProfilerCallback6_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
+#define ICorProfilerCallback6_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) )
-#define ICorProfilerCallback6_ExceptionCLRCatcherFound(This) \
+#define ICorProfilerCallback6_ExceptionCLRCatcherFound(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) )
-#define ICorProfilerCallback6_ExceptionCLRCatcherExecute(This) \
+#define ICorProfilerCallback6_ExceptionCLRCatcherExecute(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) )
-#define ICorProfilerCallback6_ThreadNameChanged(This,threadId,cchName,name) \
+#define ICorProfilerCallback6_ThreadNameChanged(This,threadId,cchName,name) \
( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) )
-#define ICorProfilerCallback6_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
+#define ICorProfilerCallback6_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) )
-#define ICorProfilerCallback6_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback6_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback6_GarbageCollectionFinished(This) \
+#define ICorProfilerCallback6_GarbageCollectionFinished(This) \
( (This)->lpVtbl -> GarbageCollectionFinished(This) )
-#define ICorProfilerCallback6_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
+#define ICorProfilerCallback6_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) )
-#define ICorProfilerCallback6_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
+#define ICorProfilerCallback6_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) )
-#define ICorProfilerCallback6_HandleCreated(This,handleId,initialObjectId) \
+#define ICorProfilerCallback6_HandleCreated(This,handleId,initialObjectId) \
( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) )
-#define ICorProfilerCallback6_HandleDestroyed(This,handleId) \
+#define ICorProfilerCallback6_HandleDestroyed(This,handleId) \
( (This)->lpVtbl -> HandleDestroyed(This,handleId) )
-#define ICorProfilerCallback6_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
+#define ICorProfilerCallback6_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) )
-#define ICorProfilerCallback6_ProfilerAttachComplete(This) \
+#define ICorProfilerCallback6_ProfilerAttachComplete(This) \
( (This)->lpVtbl -> ProfilerAttachComplete(This) )
-#define ICorProfilerCallback6_ProfilerDetachSucceeded(This) \
+#define ICorProfilerCallback6_ProfilerDetachSucceeded(This) \
( (This)->lpVtbl -> ProfilerDetachSucceeded(This) )
-#define ICorProfilerCallback6_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \
+#define ICorProfilerCallback6_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \
( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) )
-#define ICorProfilerCallback6_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \
+#define ICorProfilerCallback6_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \
( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) )
-#define ICorProfilerCallback6_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback6_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback6_ReJITError(This,moduleId,methodId,functionId,hrStatus) \
+#define ICorProfilerCallback6_ReJITError(This,moduleId,methodId,functionId,hrStatus) \
( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) )
-#define ICorProfilerCallback6_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback6_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback6_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback6_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback6_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \
+#define ICorProfilerCallback6_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \
( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) )
-#define ICorProfilerCallback6_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \
+#define ICorProfilerCallback6_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \
( (This)->lpVtbl -> GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerCallback6_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerCallback6_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerCallback7_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerCallback7Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerCallback7 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Initialize)
HRESULT ( STDMETHODCALLTYPE *Initialize )(
ICorProfilerCallback7 * This,
/* [in] */ IUnknown *pICorProfilerInfoUnk);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Shutdown)
HRESULT ( STDMETHODCALLTYPE *Shutdown )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )(
ICorProfilerCallback7 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )(
ICorProfilerCallback7 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )(
ICorProfilerCallback7 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )(
ICorProfilerCallback7 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )(
ICorProfilerCallback7 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )(
ICorProfilerCallback7 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )(
ICorProfilerCallback7 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )(
ICorProfilerCallback7 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )(
ICorProfilerCallback7 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )(
ICorProfilerCallback7 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )(
ICorProfilerCallback7 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )(
ICorProfilerCallback7 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleAttachedToAssembly)
HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )(
ICorProfilerCallback7 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ AssemblyID AssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )(
ICorProfilerCallback7 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )(
ICorProfilerCallback7 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )(
ICorProfilerCallback7 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )(
ICorProfilerCallback7 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, FunctionUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID functionId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchStarted)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID functionId,
/* [out] */ BOOL *pbUseCachedFunction);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchFinished)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_JIT_CACHE result);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITFunctionPitched)
HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITInlining)
HRESULT ( STDMETHODCALLTYPE *JITInlining )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID callerId,
/* [in] */ FunctionID calleeId,
/* [out] */ BOOL *pfShouldInline);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadCreated)
HRESULT ( STDMETHODCALLTYPE *ThreadCreated )(
ICorProfilerCallback7 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadDestroyed)
HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )(
ICorProfilerCallback7 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadAssignedToOSThread)
HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )(
ICorProfilerCallback7 * This,
/* [in] */ ThreadID managedThreadId,
/* [in] */ DWORD osThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientSendingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )(
ICorProfilerCallback7 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientReceivingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )(
ICorProfilerCallback7 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationFinished)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerReceivingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )(
ICorProfilerCallback7 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationReturned)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerSendingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )(
ICorProfilerCallback7 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, UnmanagedToManagedTransition)
HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ManagedToUnmanagedTransition)
HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )(
ICorProfilerCallback7 * This,
/* [in] */ COR_PRF_SUSPEND_REASON suspendReason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendAborted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadSuspended)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )(
ICorProfilerCallback7 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadResumed)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )(
ICorProfilerCallback7 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, MovedReferences)
HRESULT ( STDMETHODCALLTYPE *MovedReferences )(
ICorProfilerCallback7 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectAllocated)
HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )(
ICorProfilerCallback7 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectsAllocatedByClass)
HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )(
ICorProfilerCallback7 * This,
/* [in] */ ULONG cClassCount,
/* [size_is][in] */ ClassID classIds[ ],
/* [size_is][in] */ ULONG cObjects[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectReferences)
HRESULT ( STDMETHODCALLTYPE *ObjectReferences )(
ICorProfilerCallback7 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ULONG cObjectRefs,
/* [size_is][in] */ ObjectID objectRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RootReferences)
HRESULT ( STDMETHODCALLTYPE *RootReferences )(
ICorProfilerCallback7 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID rootRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionThrown)
HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )(
ICorProfilerCallback7 * This,
/* [in] */ ObjectID thrownObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )(
ICorProfilerCallback7 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )(
ICorProfilerCallback7 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ObjectID objectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableCreated)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )(
ICorProfilerCallback7 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ void *pVTable,
/* [in] */ ULONG cSlots);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableDestroyed)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )(
ICorProfilerCallback7 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ REFGUID implementedIID,
/* [in] */ void *pVTable);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherExecute)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, ThreadNameChanged)
HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )(
ICorProfilerCallback7 * This,
/* [in] */ ThreadID threadId,
/* [annotation][in] */
_In_reads_opt_(cchName) WCHAR name[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionStarted)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )(
ICorProfilerCallback7 * This,
/* [in] */ int cGenerations,
/* [size_is][in] */ BOOL generationCollected[ ],
/* [in] */ COR_PRF_GC_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, SurvivingReferences)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )(
ICorProfilerCallback7 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionFinished)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, FinalizeableObjectQueued)
HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )(
ICorProfilerCallback7 * This,
/* [in] */ DWORD finalizerFlags,
/* [in] */ ObjectID objectID);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, RootReferences2)
HRESULT ( STDMETHODCALLTYPE *RootReferences2 )(
ICorProfilerCallback7 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ],
/* [size_is][in] */ UINT_PTR rootIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleCreated)
HRESULT ( STDMETHODCALLTYPE *HandleCreated )(
ICorProfilerCallback7 * This,
/* [in] */ GCHandleID handleId,
/* [in] */ ObjectID initialObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleDestroyed)
HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )(
ICorProfilerCallback7 * This,
/* [in] */ GCHandleID handleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, InitializeForAttach)
HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )(
ICorProfilerCallback7 * This,
/* [in] */ IUnknown *pCorProfilerInfoUnk,
/* [in] */ void *pvClientData,
/* [in] */ UINT cbClientData);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerAttachComplete)
HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerDetachSucceeded)
HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )(
ICorProfilerCallback7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ReJITID rejitId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, GetReJITParameters)
HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )(
ICorProfilerCallback7 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodId,
/* [in] */ ICorProfilerFunctionControl *pFunctionControl);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )(
ICorProfilerCallback7 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITError)
HRESULT ( STDMETHODCALLTYPE *ReJITError )(
ICorProfilerCallback7 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, MovedReferences2)
HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )(
ICorProfilerCallback7 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, SurvivingReferences2)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )(
ICorProfilerCallback7 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback5, ConditionalWeakTableElementReferences)
HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )(
ICorProfilerCallback7 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID valueRefIds[ ],
/* [size_is][in] */ GCHandleID rootIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback6, GetAssemblyReferences)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyReferences )(
ICorProfilerCallback7 * This,
/* [string][in] */ const WCHAR *wszAssemblyPath,
/* [in] */ ICorProfilerAssemblyReferenceProvider *pAsmRefProvider);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback7, ModuleInMemorySymbolsUpdated)
HRESULT ( STDMETHODCALLTYPE *ModuleInMemorySymbolsUpdated )(
ICorProfilerCallback7 * This,
ModuleID moduleId);
#ifdef COBJMACROS
-#define ICorProfilerCallback7_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerCallback7_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerCallback7_AddRef(This) \
+#define ICorProfilerCallback7_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerCallback7_Release(This) \
+#define ICorProfilerCallback7_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerCallback7_Initialize(This,pICorProfilerInfoUnk) \
+#define ICorProfilerCallback7_Initialize(This,pICorProfilerInfoUnk) \
( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) )
-#define ICorProfilerCallback7_Shutdown(This) \
+#define ICorProfilerCallback7_Shutdown(This) \
( (This)->lpVtbl -> Shutdown(This) )
-#define ICorProfilerCallback7_AppDomainCreationStarted(This,appDomainId) \
+#define ICorProfilerCallback7_AppDomainCreationStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) )
-#define ICorProfilerCallback7_AppDomainCreationFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback7_AppDomainCreationFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback7_AppDomainShutdownStarted(This,appDomainId) \
+#define ICorProfilerCallback7_AppDomainShutdownStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) )
-#define ICorProfilerCallback7_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback7_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback7_AssemblyLoadStarted(This,assemblyId) \
+#define ICorProfilerCallback7_AssemblyLoadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) )
-#define ICorProfilerCallback7_AssemblyLoadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback7_AssemblyLoadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback7_AssemblyUnloadStarted(This,assemblyId) \
+#define ICorProfilerCallback7_AssemblyUnloadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) )
-#define ICorProfilerCallback7_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback7_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback7_ModuleLoadStarted(This,moduleId) \
+#define ICorProfilerCallback7_ModuleLoadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) )
-#define ICorProfilerCallback7_ModuleLoadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback7_ModuleLoadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback7_ModuleUnloadStarted(This,moduleId) \
+#define ICorProfilerCallback7_ModuleUnloadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) )
-#define ICorProfilerCallback7_ModuleUnloadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback7_ModuleUnloadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback7_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
+#define ICorProfilerCallback7_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) )
-#define ICorProfilerCallback7_ClassLoadStarted(This,classId) \
+#define ICorProfilerCallback7_ClassLoadStarted(This,classId) \
( (This)->lpVtbl -> ClassLoadStarted(This,classId) )
-#define ICorProfilerCallback7_ClassLoadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback7_ClassLoadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback7_ClassUnloadStarted(This,classId) \
+#define ICorProfilerCallback7_ClassUnloadStarted(This,classId) \
( (This)->lpVtbl -> ClassUnloadStarted(This,classId) )
-#define ICorProfilerCallback7_ClassUnloadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback7_ClassUnloadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback7_FunctionUnloadStarted(This,functionId) \
+#define ICorProfilerCallback7_FunctionUnloadStarted(This,functionId) \
( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) )
-#define ICorProfilerCallback7_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
+#define ICorProfilerCallback7_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) )
-#define ICorProfilerCallback7_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback7_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback7_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
+#define ICorProfilerCallback7_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) )
-#define ICorProfilerCallback7_JITCachedFunctionSearchFinished(This,functionId,result) \
+#define ICorProfilerCallback7_JITCachedFunctionSearchFinished(This,functionId,result) \
( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) )
-#define ICorProfilerCallback7_JITFunctionPitched(This,functionId) \
+#define ICorProfilerCallback7_JITFunctionPitched(This,functionId) \
( (This)->lpVtbl -> JITFunctionPitched(This,functionId) )
-#define ICorProfilerCallback7_JITInlining(This,callerId,calleeId,pfShouldInline) \
+#define ICorProfilerCallback7_JITInlining(This,callerId,calleeId,pfShouldInline) \
( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) )
-#define ICorProfilerCallback7_ThreadCreated(This,threadId) \
+#define ICorProfilerCallback7_ThreadCreated(This,threadId) \
( (This)->lpVtbl -> ThreadCreated(This,threadId) )
-#define ICorProfilerCallback7_ThreadDestroyed(This,threadId) \
+#define ICorProfilerCallback7_ThreadDestroyed(This,threadId) \
( (This)->lpVtbl -> ThreadDestroyed(This,threadId) )
-#define ICorProfilerCallback7_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
+#define ICorProfilerCallback7_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) )
-#define ICorProfilerCallback7_RemotingClientInvocationStarted(This) \
+#define ICorProfilerCallback7_RemotingClientInvocationStarted(This) \
( (This)->lpVtbl -> RemotingClientInvocationStarted(This) )
-#define ICorProfilerCallback7_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback7_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback7_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback7_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback7_RemotingClientInvocationFinished(This) \
+#define ICorProfilerCallback7_RemotingClientInvocationFinished(This) \
( (This)->lpVtbl -> RemotingClientInvocationFinished(This) )
-#define ICorProfilerCallback7_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback7_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback7_RemotingServerInvocationStarted(This) \
+#define ICorProfilerCallback7_RemotingServerInvocationStarted(This) \
( (This)->lpVtbl -> RemotingServerInvocationStarted(This) )
-#define ICorProfilerCallback7_RemotingServerInvocationReturned(This) \
+#define ICorProfilerCallback7_RemotingServerInvocationReturned(This) \
( (This)->lpVtbl -> RemotingServerInvocationReturned(This) )
-#define ICorProfilerCallback7_RemotingServerSendingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback7_RemotingServerSendingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback7_UnmanagedToManagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback7_UnmanagedToManagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback7_ManagedToUnmanagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback7_ManagedToUnmanagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback7_RuntimeSuspendStarted(This,suspendReason) \
+#define ICorProfilerCallback7_RuntimeSuspendStarted(This,suspendReason) \
( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) )
-#define ICorProfilerCallback7_RuntimeSuspendFinished(This) \
+#define ICorProfilerCallback7_RuntimeSuspendFinished(This) \
( (This)->lpVtbl -> RuntimeSuspendFinished(This) )
-#define ICorProfilerCallback7_RuntimeSuspendAborted(This) \
+#define ICorProfilerCallback7_RuntimeSuspendAborted(This) \
( (This)->lpVtbl -> RuntimeSuspendAborted(This) )
-#define ICorProfilerCallback7_RuntimeResumeStarted(This) \
+#define ICorProfilerCallback7_RuntimeResumeStarted(This) \
( (This)->lpVtbl -> RuntimeResumeStarted(This) )
-#define ICorProfilerCallback7_RuntimeResumeFinished(This) \
+#define ICorProfilerCallback7_RuntimeResumeFinished(This) \
( (This)->lpVtbl -> RuntimeResumeFinished(This) )
-#define ICorProfilerCallback7_RuntimeThreadSuspended(This,threadId) \
+#define ICorProfilerCallback7_RuntimeThreadSuspended(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) )
-#define ICorProfilerCallback7_RuntimeThreadResumed(This,threadId) \
+#define ICorProfilerCallback7_RuntimeThreadResumed(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) )
-#define ICorProfilerCallback7_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback7_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback7_ObjectAllocated(This,objectId,classId) \
+#define ICorProfilerCallback7_ObjectAllocated(This,objectId,classId) \
( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) )
-#define ICorProfilerCallback7_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
+#define ICorProfilerCallback7_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) )
-#define ICorProfilerCallback7_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
+#define ICorProfilerCallback7_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) )
-#define ICorProfilerCallback7_RootReferences(This,cRootRefs,rootRefIds) \
+#define ICorProfilerCallback7_RootReferences(This,cRootRefs,rootRefIds) \
( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) )
-#define ICorProfilerCallback7_ExceptionThrown(This,thrownObjectId) \
+#define ICorProfilerCallback7_ExceptionThrown(This,thrownObjectId) \
( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) )
-#define ICorProfilerCallback7_ExceptionSearchFunctionEnter(This,functionId) \
+#define ICorProfilerCallback7_ExceptionSearchFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) )
-#define ICorProfilerCallback7_ExceptionSearchFunctionLeave(This) \
+#define ICorProfilerCallback7_ExceptionSearchFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) )
-#define ICorProfilerCallback7_ExceptionSearchFilterEnter(This,functionId) \
+#define ICorProfilerCallback7_ExceptionSearchFilterEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) )
-#define ICorProfilerCallback7_ExceptionSearchFilterLeave(This) \
+#define ICorProfilerCallback7_ExceptionSearchFilterLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) )
-#define ICorProfilerCallback7_ExceptionSearchCatcherFound(This,functionId) \
+#define ICorProfilerCallback7_ExceptionSearchCatcherFound(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) )
-#define ICorProfilerCallback7_ExceptionOSHandlerEnter(This,__unused) \
+#define ICorProfilerCallback7_ExceptionOSHandlerEnter(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) )
-#define ICorProfilerCallback7_ExceptionOSHandlerLeave(This,__unused) \
+#define ICorProfilerCallback7_ExceptionOSHandlerLeave(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) )
-#define ICorProfilerCallback7_ExceptionUnwindFunctionEnter(This,functionId) \
+#define ICorProfilerCallback7_ExceptionUnwindFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) )
-#define ICorProfilerCallback7_ExceptionUnwindFunctionLeave(This) \
+#define ICorProfilerCallback7_ExceptionUnwindFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) )
-#define ICorProfilerCallback7_ExceptionUnwindFinallyEnter(This,functionId) \
+#define ICorProfilerCallback7_ExceptionUnwindFinallyEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) )
-#define ICorProfilerCallback7_ExceptionUnwindFinallyLeave(This) \
+#define ICorProfilerCallback7_ExceptionUnwindFinallyLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) )
-#define ICorProfilerCallback7_ExceptionCatcherEnter(This,functionId,objectId) \
+#define ICorProfilerCallback7_ExceptionCatcherEnter(This,functionId,objectId) \
( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) )
-#define ICorProfilerCallback7_ExceptionCatcherLeave(This) \
+#define ICorProfilerCallback7_ExceptionCatcherLeave(This) \
( (This)->lpVtbl -> ExceptionCatcherLeave(This) )
-#define ICorProfilerCallback7_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
+#define ICorProfilerCallback7_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) )
-#define ICorProfilerCallback7_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
+#define ICorProfilerCallback7_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) )
-#define ICorProfilerCallback7_ExceptionCLRCatcherFound(This) \
+#define ICorProfilerCallback7_ExceptionCLRCatcherFound(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) )
-#define ICorProfilerCallback7_ExceptionCLRCatcherExecute(This) \
+#define ICorProfilerCallback7_ExceptionCLRCatcherExecute(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) )
-#define ICorProfilerCallback7_ThreadNameChanged(This,threadId,cchName,name) \
+#define ICorProfilerCallback7_ThreadNameChanged(This,threadId,cchName,name) \
( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) )
-#define ICorProfilerCallback7_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
+#define ICorProfilerCallback7_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) )
-#define ICorProfilerCallback7_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback7_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback7_GarbageCollectionFinished(This) \
+#define ICorProfilerCallback7_GarbageCollectionFinished(This) \
( (This)->lpVtbl -> GarbageCollectionFinished(This) )
-#define ICorProfilerCallback7_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
+#define ICorProfilerCallback7_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) )
-#define ICorProfilerCallback7_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
+#define ICorProfilerCallback7_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) )
-#define ICorProfilerCallback7_HandleCreated(This,handleId,initialObjectId) \
+#define ICorProfilerCallback7_HandleCreated(This,handleId,initialObjectId) \
( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) )
-#define ICorProfilerCallback7_HandleDestroyed(This,handleId) \
+#define ICorProfilerCallback7_HandleDestroyed(This,handleId) \
( (This)->lpVtbl -> HandleDestroyed(This,handleId) )
-#define ICorProfilerCallback7_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
+#define ICorProfilerCallback7_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) )
-#define ICorProfilerCallback7_ProfilerAttachComplete(This) \
+#define ICorProfilerCallback7_ProfilerAttachComplete(This) \
( (This)->lpVtbl -> ProfilerAttachComplete(This) )
-#define ICorProfilerCallback7_ProfilerDetachSucceeded(This) \
+#define ICorProfilerCallback7_ProfilerDetachSucceeded(This) \
( (This)->lpVtbl -> ProfilerDetachSucceeded(This) )
-#define ICorProfilerCallback7_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \
+#define ICorProfilerCallback7_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \
( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) )
-#define ICorProfilerCallback7_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \
+#define ICorProfilerCallback7_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \
( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) )
-#define ICorProfilerCallback7_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback7_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback7_ReJITError(This,moduleId,methodId,functionId,hrStatus) \
+#define ICorProfilerCallback7_ReJITError(This,moduleId,methodId,functionId,hrStatus) \
( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) )
-#define ICorProfilerCallback7_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback7_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback7_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback7_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback7_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \
+#define ICorProfilerCallback7_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \
( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) )
-#define ICorProfilerCallback7_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \
+#define ICorProfilerCallback7_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \
( (This)->lpVtbl -> GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) )
-#define ICorProfilerCallback7_ModuleInMemorySymbolsUpdated(This,moduleId) \
+#define ICorProfilerCallback7_ModuleInMemorySymbolsUpdated(This,moduleId) \
( (This)->lpVtbl -> ModuleInMemorySymbolsUpdated(This,moduleId) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerCallback7_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerCallback7_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerCallback8_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerCallback8Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerCallback8 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Initialize)
HRESULT ( STDMETHODCALLTYPE *Initialize )(
ICorProfilerCallback8 * This,
/* [in] */ IUnknown *pICorProfilerInfoUnk);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Shutdown)
HRESULT ( STDMETHODCALLTYPE *Shutdown )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )(
ICorProfilerCallback8 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )(
ICorProfilerCallback8 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )(
ICorProfilerCallback8 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )(
ICorProfilerCallback8 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )(
ICorProfilerCallback8 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )(
ICorProfilerCallback8 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )(
ICorProfilerCallback8 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )(
ICorProfilerCallback8 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )(
ICorProfilerCallback8 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )(
ICorProfilerCallback8 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )(
ICorProfilerCallback8 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )(
ICorProfilerCallback8 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleAttachedToAssembly)
HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )(
ICorProfilerCallback8 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ AssemblyID AssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )(
ICorProfilerCallback8 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )(
ICorProfilerCallback8 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )(
ICorProfilerCallback8 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )(
ICorProfilerCallback8 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, FunctionUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchStarted)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId,
/* [out] */ BOOL *pbUseCachedFunction);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchFinished)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_JIT_CACHE result);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITFunctionPitched)
HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITInlining)
HRESULT ( STDMETHODCALLTYPE *JITInlining )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID callerId,
/* [in] */ FunctionID calleeId,
/* [out] */ BOOL *pfShouldInline);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadCreated)
HRESULT ( STDMETHODCALLTYPE *ThreadCreated )(
ICorProfilerCallback8 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadDestroyed)
HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )(
ICorProfilerCallback8 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadAssignedToOSThread)
HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )(
ICorProfilerCallback8 * This,
/* [in] */ ThreadID managedThreadId,
/* [in] */ DWORD osThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientSendingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )(
ICorProfilerCallback8 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientReceivingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )(
ICorProfilerCallback8 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationFinished)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerReceivingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )(
ICorProfilerCallback8 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationReturned)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerSendingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )(
ICorProfilerCallback8 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, UnmanagedToManagedTransition)
HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ManagedToUnmanagedTransition)
HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )(
ICorProfilerCallback8 * This,
/* [in] */ COR_PRF_SUSPEND_REASON suspendReason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendAborted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadSuspended)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )(
ICorProfilerCallback8 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadResumed)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )(
ICorProfilerCallback8 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, MovedReferences)
HRESULT ( STDMETHODCALLTYPE *MovedReferences )(
ICorProfilerCallback8 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectAllocated)
HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )(
ICorProfilerCallback8 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectsAllocatedByClass)
HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )(
ICorProfilerCallback8 * This,
/* [in] */ ULONG cClassCount,
/* [size_is][in] */ ClassID classIds[ ],
/* [size_is][in] */ ULONG cObjects[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectReferences)
HRESULT ( STDMETHODCALLTYPE *ObjectReferences )(
ICorProfilerCallback8 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ULONG cObjectRefs,
/* [size_is][in] */ ObjectID objectRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RootReferences)
HRESULT ( STDMETHODCALLTYPE *RootReferences )(
ICorProfilerCallback8 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID rootRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionThrown)
HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )(
ICorProfilerCallback8 * This,
/* [in] */ ObjectID thrownObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )(
ICorProfilerCallback8 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )(
ICorProfilerCallback8 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ObjectID objectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableCreated)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )(
ICorProfilerCallback8 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ void *pVTable,
/* [in] */ ULONG cSlots);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableDestroyed)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )(
ICorProfilerCallback8 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ REFGUID implementedIID,
/* [in] */ void *pVTable);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherExecute)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, ThreadNameChanged)
HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )(
ICorProfilerCallback8 * This,
/* [in] */ ThreadID threadId,
/* [annotation][in] */
_In_reads_opt_(cchName) WCHAR name[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionStarted)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )(
ICorProfilerCallback8 * This,
/* [in] */ int cGenerations,
/* [size_is][in] */ BOOL generationCollected[ ],
/* [in] */ COR_PRF_GC_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, SurvivingReferences)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )(
ICorProfilerCallback8 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionFinished)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, FinalizeableObjectQueued)
HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )(
ICorProfilerCallback8 * This,
/* [in] */ DWORD finalizerFlags,
/* [in] */ ObjectID objectID);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, RootReferences2)
HRESULT ( STDMETHODCALLTYPE *RootReferences2 )(
ICorProfilerCallback8 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ],
/* [size_is][in] */ UINT_PTR rootIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleCreated)
HRESULT ( STDMETHODCALLTYPE *HandleCreated )(
ICorProfilerCallback8 * This,
/* [in] */ GCHandleID handleId,
/* [in] */ ObjectID initialObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleDestroyed)
HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )(
ICorProfilerCallback8 * This,
/* [in] */ GCHandleID handleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, InitializeForAttach)
HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )(
ICorProfilerCallback8 * This,
/* [in] */ IUnknown *pCorProfilerInfoUnk,
/* [in] */ void *pvClientData,
/* [in] */ UINT cbClientData);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerAttachComplete)
HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerDetachSucceeded)
HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )(
ICorProfilerCallback8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ReJITID rejitId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, GetReJITParameters)
HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )(
ICorProfilerCallback8 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodId,
/* [in] */ ICorProfilerFunctionControl *pFunctionControl);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITError)
HRESULT ( STDMETHODCALLTYPE *ReJITError )(
ICorProfilerCallback8 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, MovedReferences2)
HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )(
ICorProfilerCallback8 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, SurvivingReferences2)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )(
ICorProfilerCallback8 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback5, ConditionalWeakTableElementReferences)
HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )(
ICorProfilerCallback8 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID valueRefIds[ ],
/* [size_is][in] */ GCHandleID rootIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback6, GetAssemblyReferences)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyReferences )(
ICorProfilerCallback8 * This,
/* [string][in] */ const WCHAR *wszAssemblyPath,
/* [in] */ ICorProfilerAssemblyReferenceProvider *pAsmRefProvider);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback7, ModuleInMemorySymbolsUpdated)
HRESULT ( STDMETHODCALLTYPE *ModuleInMemorySymbolsUpdated )(
ICorProfilerCallback8 * This,
ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback8, DynamicMethodJITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationStarted )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId,
/* [in] */ LPCBYTE pILHeader,
/* [in] */ ULONG cbILHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback8, DynamicMethodJITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationFinished )(
ICorProfilerCallback8 * This,
/* [in] */ FunctionID functionId,
#ifdef COBJMACROS
-#define ICorProfilerCallback8_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerCallback8_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerCallback8_AddRef(This) \
+#define ICorProfilerCallback8_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerCallback8_Release(This) \
+#define ICorProfilerCallback8_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerCallback8_Initialize(This,pICorProfilerInfoUnk) \
+#define ICorProfilerCallback8_Initialize(This,pICorProfilerInfoUnk) \
( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) )
-#define ICorProfilerCallback8_Shutdown(This) \
+#define ICorProfilerCallback8_Shutdown(This) \
( (This)->lpVtbl -> Shutdown(This) )
-#define ICorProfilerCallback8_AppDomainCreationStarted(This,appDomainId) \
+#define ICorProfilerCallback8_AppDomainCreationStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) )
-#define ICorProfilerCallback8_AppDomainCreationFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback8_AppDomainCreationFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback8_AppDomainShutdownStarted(This,appDomainId) \
+#define ICorProfilerCallback8_AppDomainShutdownStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) )
-#define ICorProfilerCallback8_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback8_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback8_AssemblyLoadStarted(This,assemblyId) \
+#define ICorProfilerCallback8_AssemblyLoadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) )
-#define ICorProfilerCallback8_AssemblyLoadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback8_AssemblyLoadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback8_AssemblyUnloadStarted(This,assemblyId) \
+#define ICorProfilerCallback8_AssemblyUnloadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) )
-#define ICorProfilerCallback8_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback8_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback8_ModuleLoadStarted(This,moduleId) \
+#define ICorProfilerCallback8_ModuleLoadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) )
-#define ICorProfilerCallback8_ModuleLoadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback8_ModuleLoadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback8_ModuleUnloadStarted(This,moduleId) \
+#define ICorProfilerCallback8_ModuleUnloadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) )
-#define ICorProfilerCallback8_ModuleUnloadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback8_ModuleUnloadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback8_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
+#define ICorProfilerCallback8_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) )
-#define ICorProfilerCallback8_ClassLoadStarted(This,classId) \
+#define ICorProfilerCallback8_ClassLoadStarted(This,classId) \
( (This)->lpVtbl -> ClassLoadStarted(This,classId) )
-#define ICorProfilerCallback8_ClassLoadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback8_ClassLoadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback8_ClassUnloadStarted(This,classId) \
+#define ICorProfilerCallback8_ClassUnloadStarted(This,classId) \
( (This)->lpVtbl -> ClassUnloadStarted(This,classId) )
-#define ICorProfilerCallback8_ClassUnloadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback8_ClassUnloadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback8_FunctionUnloadStarted(This,functionId) \
+#define ICorProfilerCallback8_FunctionUnloadStarted(This,functionId) \
( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) )
-#define ICorProfilerCallback8_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
+#define ICorProfilerCallback8_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) )
-#define ICorProfilerCallback8_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback8_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback8_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
+#define ICorProfilerCallback8_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) )
-#define ICorProfilerCallback8_JITCachedFunctionSearchFinished(This,functionId,result) \
+#define ICorProfilerCallback8_JITCachedFunctionSearchFinished(This,functionId,result) \
( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) )
-#define ICorProfilerCallback8_JITFunctionPitched(This,functionId) \
+#define ICorProfilerCallback8_JITFunctionPitched(This,functionId) \
( (This)->lpVtbl -> JITFunctionPitched(This,functionId) )
-#define ICorProfilerCallback8_JITInlining(This,callerId,calleeId,pfShouldInline) \
+#define ICorProfilerCallback8_JITInlining(This,callerId,calleeId,pfShouldInline) \
( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) )
-#define ICorProfilerCallback8_ThreadCreated(This,threadId) \
+#define ICorProfilerCallback8_ThreadCreated(This,threadId) \
( (This)->lpVtbl -> ThreadCreated(This,threadId) )
-#define ICorProfilerCallback8_ThreadDestroyed(This,threadId) \
+#define ICorProfilerCallback8_ThreadDestroyed(This,threadId) \
( (This)->lpVtbl -> ThreadDestroyed(This,threadId) )
-#define ICorProfilerCallback8_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
+#define ICorProfilerCallback8_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) )
-#define ICorProfilerCallback8_RemotingClientInvocationStarted(This) \
+#define ICorProfilerCallback8_RemotingClientInvocationStarted(This) \
( (This)->lpVtbl -> RemotingClientInvocationStarted(This) )
-#define ICorProfilerCallback8_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback8_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback8_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback8_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback8_RemotingClientInvocationFinished(This) \
+#define ICorProfilerCallback8_RemotingClientInvocationFinished(This) \
( (This)->lpVtbl -> RemotingClientInvocationFinished(This) )
-#define ICorProfilerCallback8_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback8_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback8_RemotingServerInvocationStarted(This) \
+#define ICorProfilerCallback8_RemotingServerInvocationStarted(This) \
( (This)->lpVtbl -> RemotingServerInvocationStarted(This) )
-#define ICorProfilerCallback8_RemotingServerInvocationReturned(This) \
+#define ICorProfilerCallback8_RemotingServerInvocationReturned(This) \
( (This)->lpVtbl -> RemotingServerInvocationReturned(This) )
-#define ICorProfilerCallback8_RemotingServerSendingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback8_RemotingServerSendingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback8_UnmanagedToManagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback8_UnmanagedToManagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback8_ManagedToUnmanagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback8_ManagedToUnmanagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback8_RuntimeSuspendStarted(This,suspendReason) \
+#define ICorProfilerCallback8_RuntimeSuspendStarted(This,suspendReason) \
( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) )
-#define ICorProfilerCallback8_RuntimeSuspendFinished(This) \
+#define ICorProfilerCallback8_RuntimeSuspendFinished(This) \
( (This)->lpVtbl -> RuntimeSuspendFinished(This) )
-#define ICorProfilerCallback8_RuntimeSuspendAborted(This) \
+#define ICorProfilerCallback8_RuntimeSuspendAborted(This) \
( (This)->lpVtbl -> RuntimeSuspendAborted(This) )
-#define ICorProfilerCallback8_RuntimeResumeStarted(This) \
+#define ICorProfilerCallback8_RuntimeResumeStarted(This) \
( (This)->lpVtbl -> RuntimeResumeStarted(This) )
-#define ICorProfilerCallback8_RuntimeResumeFinished(This) \
+#define ICorProfilerCallback8_RuntimeResumeFinished(This) \
( (This)->lpVtbl -> RuntimeResumeFinished(This) )
-#define ICorProfilerCallback8_RuntimeThreadSuspended(This,threadId) \
+#define ICorProfilerCallback8_RuntimeThreadSuspended(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) )
-#define ICorProfilerCallback8_RuntimeThreadResumed(This,threadId) \
+#define ICorProfilerCallback8_RuntimeThreadResumed(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) )
-#define ICorProfilerCallback8_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback8_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback8_ObjectAllocated(This,objectId,classId) \
+#define ICorProfilerCallback8_ObjectAllocated(This,objectId,classId) \
( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) )
-#define ICorProfilerCallback8_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
+#define ICorProfilerCallback8_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) )
-#define ICorProfilerCallback8_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
+#define ICorProfilerCallback8_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) )
-#define ICorProfilerCallback8_RootReferences(This,cRootRefs,rootRefIds) \
+#define ICorProfilerCallback8_RootReferences(This,cRootRefs,rootRefIds) \
( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) )
-#define ICorProfilerCallback8_ExceptionThrown(This,thrownObjectId) \
+#define ICorProfilerCallback8_ExceptionThrown(This,thrownObjectId) \
( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) )
-#define ICorProfilerCallback8_ExceptionSearchFunctionEnter(This,functionId) \
+#define ICorProfilerCallback8_ExceptionSearchFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) )
-#define ICorProfilerCallback8_ExceptionSearchFunctionLeave(This) \
+#define ICorProfilerCallback8_ExceptionSearchFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) )
-#define ICorProfilerCallback8_ExceptionSearchFilterEnter(This,functionId) \
+#define ICorProfilerCallback8_ExceptionSearchFilterEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) )
-#define ICorProfilerCallback8_ExceptionSearchFilterLeave(This) \
+#define ICorProfilerCallback8_ExceptionSearchFilterLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) )
-#define ICorProfilerCallback8_ExceptionSearchCatcherFound(This,functionId) \
+#define ICorProfilerCallback8_ExceptionSearchCatcherFound(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) )
-#define ICorProfilerCallback8_ExceptionOSHandlerEnter(This,__unused) \
+#define ICorProfilerCallback8_ExceptionOSHandlerEnter(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) )
-#define ICorProfilerCallback8_ExceptionOSHandlerLeave(This,__unused) \
+#define ICorProfilerCallback8_ExceptionOSHandlerLeave(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) )
-#define ICorProfilerCallback8_ExceptionUnwindFunctionEnter(This,functionId) \
+#define ICorProfilerCallback8_ExceptionUnwindFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) )
-#define ICorProfilerCallback8_ExceptionUnwindFunctionLeave(This) \
+#define ICorProfilerCallback8_ExceptionUnwindFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) )
-#define ICorProfilerCallback8_ExceptionUnwindFinallyEnter(This,functionId) \
+#define ICorProfilerCallback8_ExceptionUnwindFinallyEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) )
-#define ICorProfilerCallback8_ExceptionUnwindFinallyLeave(This) \
+#define ICorProfilerCallback8_ExceptionUnwindFinallyLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) )
-#define ICorProfilerCallback8_ExceptionCatcherEnter(This,functionId,objectId) \
+#define ICorProfilerCallback8_ExceptionCatcherEnter(This,functionId,objectId) \
( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) )
-#define ICorProfilerCallback8_ExceptionCatcherLeave(This) \
+#define ICorProfilerCallback8_ExceptionCatcherLeave(This) \
( (This)->lpVtbl -> ExceptionCatcherLeave(This) )
-#define ICorProfilerCallback8_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
+#define ICorProfilerCallback8_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) )
-#define ICorProfilerCallback8_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
+#define ICorProfilerCallback8_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) )
-#define ICorProfilerCallback8_ExceptionCLRCatcherFound(This) \
+#define ICorProfilerCallback8_ExceptionCLRCatcherFound(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) )
-#define ICorProfilerCallback8_ExceptionCLRCatcherExecute(This) \
+#define ICorProfilerCallback8_ExceptionCLRCatcherExecute(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) )
-#define ICorProfilerCallback8_ThreadNameChanged(This,threadId,cchName,name) \
+#define ICorProfilerCallback8_ThreadNameChanged(This,threadId,cchName,name) \
( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) )
-#define ICorProfilerCallback8_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
+#define ICorProfilerCallback8_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) )
-#define ICorProfilerCallback8_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback8_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback8_GarbageCollectionFinished(This) \
+#define ICorProfilerCallback8_GarbageCollectionFinished(This) \
( (This)->lpVtbl -> GarbageCollectionFinished(This) )
-#define ICorProfilerCallback8_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
+#define ICorProfilerCallback8_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) )
-#define ICorProfilerCallback8_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
+#define ICorProfilerCallback8_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) )
-#define ICorProfilerCallback8_HandleCreated(This,handleId,initialObjectId) \
+#define ICorProfilerCallback8_HandleCreated(This,handleId,initialObjectId) \
( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) )
-#define ICorProfilerCallback8_HandleDestroyed(This,handleId) \
+#define ICorProfilerCallback8_HandleDestroyed(This,handleId) \
( (This)->lpVtbl -> HandleDestroyed(This,handleId) )
-#define ICorProfilerCallback8_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
+#define ICorProfilerCallback8_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) )
-#define ICorProfilerCallback8_ProfilerAttachComplete(This) \
+#define ICorProfilerCallback8_ProfilerAttachComplete(This) \
( (This)->lpVtbl -> ProfilerAttachComplete(This) )
-#define ICorProfilerCallback8_ProfilerDetachSucceeded(This) \
+#define ICorProfilerCallback8_ProfilerDetachSucceeded(This) \
( (This)->lpVtbl -> ProfilerDetachSucceeded(This) )
-#define ICorProfilerCallback8_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \
+#define ICorProfilerCallback8_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \
( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) )
-#define ICorProfilerCallback8_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \
+#define ICorProfilerCallback8_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \
( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) )
-#define ICorProfilerCallback8_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback8_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback8_ReJITError(This,moduleId,methodId,functionId,hrStatus) \
+#define ICorProfilerCallback8_ReJITError(This,moduleId,methodId,functionId,hrStatus) \
( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) )
-#define ICorProfilerCallback8_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback8_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback8_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback8_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback8_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \
+#define ICorProfilerCallback8_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \
( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) )
-#define ICorProfilerCallback8_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \
+#define ICorProfilerCallback8_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \
( (This)->lpVtbl -> GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) )
-#define ICorProfilerCallback8_ModuleInMemorySymbolsUpdated(This,moduleId) \
+#define ICorProfilerCallback8_ModuleInMemorySymbolsUpdated(This,moduleId) \
( (This)->lpVtbl -> ModuleInMemorySymbolsUpdated(This,moduleId) )
-#define ICorProfilerCallback8_DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) \
+#define ICorProfilerCallback8_DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) \
( (This)->lpVtbl -> DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) )
-#define ICorProfilerCallback8_DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback8_DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerCallback8_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerCallback8_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerCallback9_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerCallback9Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerCallback9 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Initialize)
HRESULT ( STDMETHODCALLTYPE *Initialize )(
ICorProfilerCallback9 * This,
/* [in] */ IUnknown *pICorProfilerInfoUnk);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Shutdown)
HRESULT ( STDMETHODCALLTYPE *Shutdown )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )(
ICorProfilerCallback9 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )(
ICorProfilerCallback9 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )(
ICorProfilerCallback9 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )(
ICorProfilerCallback9 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )(
ICorProfilerCallback9 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )(
ICorProfilerCallback9 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )(
ICorProfilerCallback9 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )(
ICorProfilerCallback9 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )(
ICorProfilerCallback9 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )(
ICorProfilerCallback9 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )(
ICorProfilerCallback9 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )(
ICorProfilerCallback9 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleAttachedToAssembly)
HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )(
ICorProfilerCallback9 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ AssemblyID AssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )(
ICorProfilerCallback9 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )(
ICorProfilerCallback9 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )(
ICorProfilerCallback9 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )(
ICorProfilerCallback9 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, FunctionUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchStarted)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId,
/* [out] */ BOOL *pbUseCachedFunction);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchFinished)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_JIT_CACHE result);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITFunctionPitched)
HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITInlining)
HRESULT ( STDMETHODCALLTYPE *JITInlining )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID callerId,
/* [in] */ FunctionID calleeId,
/* [out] */ BOOL *pfShouldInline);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadCreated)
HRESULT ( STDMETHODCALLTYPE *ThreadCreated )(
ICorProfilerCallback9 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadDestroyed)
HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )(
ICorProfilerCallback9 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadAssignedToOSThread)
HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )(
ICorProfilerCallback9 * This,
/* [in] */ ThreadID managedThreadId,
/* [in] */ DWORD osThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientSendingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )(
ICorProfilerCallback9 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientReceivingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )(
ICorProfilerCallback9 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationFinished)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerReceivingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )(
ICorProfilerCallback9 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationReturned)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerSendingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )(
ICorProfilerCallback9 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, UnmanagedToManagedTransition)
HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ManagedToUnmanagedTransition)
HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )(
ICorProfilerCallback9 * This,
/* [in] */ COR_PRF_SUSPEND_REASON suspendReason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendAborted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadSuspended)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )(
ICorProfilerCallback9 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadResumed)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )(
ICorProfilerCallback9 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, MovedReferences)
HRESULT ( STDMETHODCALLTYPE *MovedReferences )(
ICorProfilerCallback9 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectAllocated)
HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )(
ICorProfilerCallback9 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectsAllocatedByClass)
HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )(
ICorProfilerCallback9 * This,
/* [in] */ ULONG cClassCount,
/* [size_is][in] */ ClassID classIds[ ],
/* [size_is][in] */ ULONG cObjects[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectReferences)
HRESULT ( STDMETHODCALLTYPE *ObjectReferences )(
ICorProfilerCallback9 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ULONG cObjectRefs,
/* [size_is][in] */ ObjectID objectRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RootReferences)
HRESULT ( STDMETHODCALLTYPE *RootReferences )(
ICorProfilerCallback9 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID rootRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionThrown)
HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )(
ICorProfilerCallback9 * This,
/* [in] */ ObjectID thrownObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )(
ICorProfilerCallback9 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )(
ICorProfilerCallback9 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ObjectID objectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableCreated)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )(
ICorProfilerCallback9 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ void *pVTable,
/* [in] */ ULONG cSlots);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableDestroyed)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )(
ICorProfilerCallback9 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ REFGUID implementedIID,
/* [in] */ void *pVTable);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherExecute)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, ThreadNameChanged)
HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )(
ICorProfilerCallback9 * This,
/* [in] */ ThreadID threadId,
/* [annotation][in] */
_In_reads_opt_(cchName) WCHAR name[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionStarted)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )(
ICorProfilerCallback9 * This,
/* [in] */ int cGenerations,
/* [size_is][in] */ BOOL generationCollected[ ],
/* [in] */ COR_PRF_GC_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, SurvivingReferences)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )(
ICorProfilerCallback9 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionFinished)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, FinalizeableObjectQueued)
HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )(
ICorProfilerCallback9 * This,
/* [in] */ DWORD finalizerFlags,
/* [in] */ ObjectID objectID);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, RootReferences2)
HRESULT ( STDMETHODCALLTYPE *RootReferences2 )(
ICorProfilerCallback9 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ],
/* [size_is][in] */ UINT_PTR rootIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleCreated)
HRESULT ( STDMETHODCALLTYPE *HandleCreated )(
ICorProfilerCallback9 * This,
/* [in] */ GCHandleID handleId,
/* [in] */ ObjectID initialObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleDestroyed)
HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )(
ICorProfilerCallback9 * This,
/* [in] */ GCHandleID handleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, InitializeForAttach)
HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )(
ICorProfilerCallback9 * This,
/* [in] */ IUnknown *pCorProfilerInfoUnk,
/* [in] */ void *pvClientData,
/* [in] */ UINT cbClientData);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerAttachComplete)
HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerDetachSucceeded)
HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )(
ICorProfilerCallback9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ReJITID rejitId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, GetReJITParameters)
HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )(
ICorProfilerCallback9 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodId,
/* [in] */ ICorProfilerFunctionControl *pFunctionControl);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITError)
HRESULT ( STDMETHODCALLTYPE *ReJITError )(
ICorProfilerCallback9 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, MovedReferences2)
HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )(
ICorProfilerCallback9 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, SurvivingReferences2)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )(
ICorProfilerCallback9 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback5, ConditionalWeakTableElementReferences)
HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )(
ICorProfilerCallback9 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID valueRefIds[ ],
/* [size_is][in] */ GCHandleID rootIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback6, GetAssemblyReferences)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyReferences )(
ICorProfilerCallback9 * This,
/* [string][in] */ const WCHAR *wszAssemblyPath,
/* [in] */ ICorProfilerAssemblyReferenceProvider *pAsmRefProvider);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback7, ModuleInMemorySymbolsUpdated)
HRESULT ( STDMETHODCALLTYPE *ModuleInMemorySymbolsUpdated )(
ICorProfilerCallback9 * This,
ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback8, DynamicMethodJITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationStarted )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId,
/* [in] */ LPCBYTE pILHeader,
/* [in] */ ULONG cbILHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback8, DynamicMethodJITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationFinished )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback9, DynamicMethodUnloaded)
HRESULT ( STDMETHODCALLTYPE *DynamicMethodUnloaded )(
ICorProfilerCallback9 * This,
/* [in] */ FunctionID functionId);
#ifdef COBJMACROS
-#define ICorProfilerCallback9_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerCallback9_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerCallback9_AddRef(This) \
+#define ICorProfilerCallback9_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerCallback9_Release(This) \
+#define ICorProfilerCallback9_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerCallback9_Initialize(This,pICorProfilerInfoUnk) \
+#define ICorProfilerCallback9_Initialize(This,pICorProfilerInfoUnk) \
( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) )
-#define ICorProfilerCallback9_Shutdown(This) \
+#define ICorProfilerCallback9_Shutdown(This) \
( (This)->lpVtbl -> Shutdown(This) )
-#define ICorProfilerCallback9_AppDomainCreationStarted(This,appDomainId) \
+#define ICorProfilerCallback9_AppDomainCreationStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) )
-#define ICorProfilerCallback9_AppDomainCreationFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback9_AppDomainCreationFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback9_AppDomainShutdownStarted(This,appDomainId) \
+#define ICorProfilerCallback9_AppDomainShutdownStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) )
-#define ICorProfilerCallback9_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback9_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback9_AssemblyLoadStarted(This,assemblyId) \
+#define ICorProfilerCallback9_AssemblyLoadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) )
-#define ICorProfilerCallback9_AssemblyLoadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback9_AssemblyLoadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback9_AssemblyUnloadStarted(This,assemblyId) \
+#define ICorProfilerCallback9_AssemblyUnloadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) )
-#define ICorProfilerCallback9_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback9_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback9_ModuleLoadStarted(This,moduleId) \
+#define ICorProfilerCallback9_ModuleLoadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) )
-#define ICorProfilerCallback9_ModuleLoadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback9_ModuleLoadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback9_ModuleUnloadStarted(This,moduleId) \
+#define ICorProfilerCallback9_ModuleUnloadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) )
-#define ICorProfilerCallback9_ModuleUnloadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback9_ModuleUnloadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback9_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
+#define ICorProfilerCallback9_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) )
-#define ICorProfilerCallback9_ClassLoadStarted(This,classId) \
+#define ICorProfilerCallback9_ClassLoadStarted(This,classId) \
( (This)->lpVtbl -> ClassLoadStarted(This,classId) )
-#define ICorProfilerCallback9_ClassLoadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback9_ClassLoadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback9_ClassUnloadStarted(This,classId) \
+#define ICorProfilerCallback9_ClassUnloadStarted(This,classId) \
( (This)->lpVtbl -> ClassUnloadStarted(This,classId) )
-#define ICorProfilerCallback9_ClassUnloadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback9_ClassUnloadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback9_FunctionUnloadStarted(This,functionId) \
+#define ICorProfilerCallback9_FunctionUnloadStarted(This,functionId) \
( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) )
-#define ICorProfilerCallback9_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
+#define ICorProfilerCallback9_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) )
-#define ICorProfilerCallback9_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback9_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback9_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
+#define ICorProfilerCallback9_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) )
-#define ICorProfilerCallback9_JITCachedFunctionSearchFinished(This,functionId,result) \
+#define ICorProfilerCallback9_JITCachedFunctionSearchFinished(This,functionId,result) \
( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) )
-#define ICorProfilerCallback9_JITFunctionPitched(This,functionId) \
+#define ICorProfilerCallback9_JITFunctionPitched(This,functionId) \
( (This)->lpVtbl -> JITFunctionPitched(This,functionId) )
-#define ICorProfilerCallback9_JITInlining(This,callerId,calleeId,pfShouldInline) \
+#define ICorProfilerCallback9_JITInlining(This,callerId,calleeId,pfShouldInline) \
( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) )
-#define ICorProfilerCallback9_ThreadCreated(This,threadId) \
+#define ICorProfilerCallback9_ThreadCreated(This,threadId) \
( (This)->lpVtbl -> ThreadCreated(This,threadId) )
-#define ICorProfilerCallback9_ThreadDestroyed(This,threadId) \
+#define ICorProfilerCallback9_ThreadDestroyed(This,threadId) \
( (This)->lpVtbl -> ThreadDestroyed(This,threadId) )
-#define ICorProfilerCallback9_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
+#define ICorProfilerCallback9_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) )
-#define ICorProfilerCallback9_RemotingClientInvocationStarted(This) \
+#define ICorProfilerCallback9_RemotingClientInvocationStarted(This) \
( (This)->lpVtbl -> RemotingClientInvocationStarted(This) )
-#define ICorProfilerCallback9_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback9_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback9_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback9_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback9_RemotingClientInvocationFinished(This) \
+#define ICorProfilerCallback9_RemotingClientInvocationFinished(This) \
( (This)->lpVtbl -> RemotingClientInvocationFinished(This) )
-#define ICorProfilerCallback9_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback9_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback9_RemotingServerInvocationStarted(This) \
+#define ICorProfilerCallback9_RemotingServerInvocationStarted(This) \
( (This)->lpVtbl -> RemotingServerInvocationStarted(This) )
-#define ICorProfilerCallback9_RemotingServerInvocationReturned(This) \
+#define ICorProfilerCallback9_RemotingServerInvocationReturned(This) \
( (This)->lpVtbl -> RemotingServerInvocationReturned(This) )
-#define ICorProfilerCallback9_RemotingServerSendingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback9_RemotingServerSendingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback9_UnmanagedToManagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback9_UnmanagedToManagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback9_ManagedToUnmanagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback9_ManagedToUnmanagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback9_RuntimeSuspendStarted(This,suspendReason) \
+#define ICorProfilerCallback9_RuntimeSuspendStarted(This,suspendReason) \
( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) )
-#define ICorProfilerCallback9_RuntimeSuspendFinished(This) \
+#define ICorProfilerCallback9_RuntimeSuspendFinished(This) \
( (This)->lpVtbl -> RuntimeSuspendFinished(This) )
-#define ICorProfilerCallback9_RuntimeSuspendAborted(This) \
+#define ICorProfilerCallback9_RuntimeSuspendAborted(This) \
( (This)->lpVtbl -> RuntimeSuspendAborted(This) )
-#define ICorProfilerCallback9_RuntimeResumeStarted(This) \
+#define ICorProfilerCallback9_RuntimeResumeStarted(This) \
( (This)->lpVtbl -> RuntimeResumeStarted(This) )
-#define ICorProfilerCallback9_RuntimeResumeFinished(This) \
+#define ICorProfilerCallback9_RuntimeResumeFinished(This) \
( (This)->lpVtbl -> RuntimeResumeFinished(This) )
-#define ICorProfilerCallback9_RuntimeThreadSuspended(This,threadId) \
+#define ICorProfilerCallback9_RuntimeThreadSuspended(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) )
-#define ICorProfilerCallback9_RuntimeThreadResumed(This,threadId) \
+#define ICorProfilerCallback9_RuntimeThreadResumed(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) )
-#define ICorProfilerCallback9_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback9_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback9_ObjectAllocated(This,objectId,classId) \
+#define ICorProfilerCallback9_ObjectAllocated(This,objectId,classId) \
( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) )
-#define ICorProfilerCallback9_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
+#define ICorProfilerCallback9_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) )
-#define ICorProfilerCallback9_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
+#define ICorProfilerCallback9_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) )
-#define ICorProfilerCallback9_RootReferences(This,cRootRefs,rootRefIds) \
+#define ICorProfilerCallback9_RootReferences(This,cRootRefs,rootRefIds) \
( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) )
-#define ICorProfilerCallback9_ExceptionThrown(This,thrownObjectId) \
+#define ICorProfilerCallback9_ExceptionThrown(This,thrownObjectId) \
( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) )
-#define ICorProfilerCallback9_ExceptionSearchFunctionEnter(This,functionId) \
+#define ICorProfilerCallback9_ExceptionSearchFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) )
-#define ICorProfilerCallback9_ExceptionSearchFunctionLeave(This) \
+#define ICorProfilerCallback9_ExceptionSearchFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) )
-#define ICorProfilerCallback9_ExceptionSearchFilterEnter(This,functionId) \
+#define ICorProfilerCallback9_ExceptionSearchFilterEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) )
-#define ICorProfilerCallback9_ExceptionSearchFilterLeave(This) \
+#define ICorProfilerCallback9_ExceptionSearchFilterLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) )
-#define ICorProfilerCallback9_ExceptionSearchCatcherFound(This,functionId) \
+#define ICorProfilerCallback9_ExceptionSearchCatcherFound(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) )
-#define ICorProfilerCallback9_ExceptionOSHandlerEnter(This,__unused) \
+#define ICorProfilerCallback9_ExceptionOSHandlerEnter(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) )
-#define ICorProfilerCallback9_ExceptionOSHandlerLeave(This,__unused) \
+#define ICorProfilerCallback9_ExceptionOSHandlerLeave(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) )
-#define ICorProfilerCallback9_ExceptionUnwindFunctionEnter(This,functionId) \
+#define ICorProfilerCallback9_ExceptionUnwindFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) )
-#define ICorProfilerCallback9_ExceptionUnwindFunctionLeave(This) \
+#define ICorProfilerCallback9_ExceptionUnwindFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) )
-#define ICorProfilerCallback9_ExceptionUnwindFinallyEnter(This,functionId) \
+#define ICorProfilerCallback9_ExceptionUnwindFinallyEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) )
-#define ICorProfilerCallback9_ExceptionUnwindFinallyLeave(This) \
+#define ICorProfilerCallback9_ExceptionUnwindFinallyLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) )
-#define ICorProfilerCallback9_ExceptionCatcherEnter(This,functionId,objectId) \
+#define ICorProfilerCallback9_ExceptionCatcherEnter(This,functionId,objectId) \
( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) )
-#define ICorProfilerCallback9_ExceptionCatcherLeave(This) \
+#define ICorProfilerCallback9_ExceptionCatcherLeave(This) \
( (This)->lpVtbl -> ExceptionCatcherLeave(This) )
-#define ICorProfilerCallback9_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
+#define ICorProfilerCallback9_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) )
-#define ICorProfilerCallback9_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
+#define ICorProfilerCallback9_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) )
-#define ICorProfilerCallback9_ExceptionCLRCatcherFound(This) \
+#define ICorProfilerCallback9_ExceptionCLRCatcherFound(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) )
-#define ICorProfilerCallback9_ExceptionCLRCatcherExecute(This) \
+#define ICorProfilerCallback9_ExceptionCLRCatcherExecute(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) )
-#define ICorProfilerCallback9_ThreadNameChanged(This,threadId,cchName,name) \
+#define ICorProfilerCallback9_ThreadNameChanged(This,threadId,cchName,name) \
( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) )
-#define ICorProfilerCallback9_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
+#define ICorProfilerCallback9_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) )
-#define ICorProfilerCallback9_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback9_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback9_GarbageCollectionFinished(This) \
+#define ICorProfilerCallback9_GarbageCollectionFinished(This) \
( (This)->lpVtbl -> GarbageCollectionFinished(This) )
-#define ICorProfilerCallback9_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
+#define ICorProfilerCallback9_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) )
-#define ICorProfilerCallback9_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
+#define ICorProfilerCallback9_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) )
-#define ICorProfilerCallback9_HandleCreated(This,handleId,initialObjectId) \
+#define ICorProfilerCallback9_HandleCreated(This,handleId,initialObjectId) \
( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) )
-#define ICorProfilerCallback9_HandleDestroyed(This,handleId) \
+#define ICorProfilerCallback9_HandleDestroyed(This,handleId) \
( (This)->lpVtbl -> HandleDestroyed(This,handleId) )
-#define ICorProfilerCallback9_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
+#define ICorProfilerCallback9_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) )
-#define ICorProfilerCallback9_ProfilerAttachComplete(This) \
+#define ICorProfilerCallback9_ProfilerAttachComplete(This) \
( (This)->lpVtbl -> ProfilerAttachComplete(This) )
-#define ICorProfilerCallback9_ProfilerDetachSucceeded(This) \
+#define ICorProfilerCallback9_ProfilerDetachSucceeded(This) \
( (This)->lpVtbl -> ProfilerDetachSucceeded(This) )
-#define ICorProfilerCallback9_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \
+#define ICorProfilerCallback9_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \
( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) )
-#define ICorProfilerCallback9_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \
+#define ICorProfilerCallback9_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \
( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) )
-#define ICorProfilerCallback9_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback9_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback9_ReJITError(This,moduleId,methodId,functionId,hrStatus) \
+#define ICorProfilerCallback9_ReJITError(This,moduleId,methodId,functionId,hrStatus) \
( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) )
-#define ICorProfilerCallback9_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback9_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback9_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback9_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback9_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \
+#define ICorProfilerCallback9_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \
( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) )
-#define ICorProfilerCallback9_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \
+#define ICorProfilerCallback9_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \
( (This)->lpVtbl -> GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) )
-#define ICorProfilerCallback9_ModuleInMemorySymbolsUpdated(This,moduleId) \
+#define ICorProfilerCallback9_ModuleInMemorySymbolsUpdated(This,moduleId) \
( (This)->lpVtbl -> ModuleInMemorySymbolsUpdated(This,moduleId) )
-#define ICorProfilerCallback9_DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) \
+#define ICorProfilerCallback9_DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) \
( (This)->lpVtbl -> DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) )
-#define ICorProfilerCallback9_DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback9_DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback9_DynamicMethodUnloaded(This,functionId) \
+#define ICorProfilerCallback9_DynamicMethodUnloaded(This,functionId) \
( (This)->lpVtbl -> DynamicMethodUnloaded(This,functionId) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerCallback9_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerCallback9_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerCallback10_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerCallback10Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerCallback10 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Initialize)
HRESULT ( STDMETHODCALLTYPE *Initialize )(
ICorProfilerCallback10 * This,
/* [in] */ IUnknown *pICorProfilerInfoUnk);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Shutdown)
HRESULT ( STDMETHODCALLTYPE *Shutdown )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )(
ICorProfilerCallback10 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )(
ICorProfilerCallback10 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )(
ICorProfilerCallback10 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )(
ICorProfilerCallback10 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )(
ICorProfilerCallback10 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )(
ICorProfilerCallback10 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )(
ICorProfilerCallback10 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )(
ICorProfilerCallback10 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )(
ICorProfilerCallback10 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )(
ICorProfilerCallback10 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )(
ICorProfilerCallback10 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )(
ICorProfilerCallback10 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleAttachedToAssembly)
HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )(
ICorProfilerCallback10 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ AssemblyID AssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )(
ICorProfilerCallback10 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )(
ICorProfilerCallback10 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )(
ICorProfilerCallback10 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )(
ICorProfilerCallback10 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, FunctionUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchStarted)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId,
/* [out] */ BOOL *pbUseCachedFunction);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchFinished)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_JIT_CACHE result);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITFunctionPitched)
HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITInlining)
HRESULT ( STDMETHODCALLTYPE *JITInlining )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID callerId,
/* [in] */ FunctionID calleeId,
/* [out] */ BOOL *pfShouldInline);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadCreated)
HRESULT ( STDMETHODCALLTYPE *ThreadCreated )(
ICorProfilerCallback10 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadDestroyed)
HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )(
ICorProfilerCallback10 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadAssignedToOSThread)
HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )(
ICorProfilerCallback10 * This,
/* [in] */ ThreadID managedThreadId,
/* [in] */ DWORD osThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientSendingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )(
ICorProfilerCallback10 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientReceivingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )(
ICorProfilerCallback10 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationFinished)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerReceivingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )(
ICorProfilerCallback10 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationReturned)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerSendingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )(
ICorProfilerCallback10 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, UnmanagedToManagedTransition)
HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ManagedToUnmanagedTransition)
HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )(
ICorProfilerCallback10 * This,
/* [in] */ COR_PRF_SUSPEND_REASON suspendReason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendAborted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadSuspended)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )(
ICorProfilerCallback10 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadResumed)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )(
ICorProfilerCallback10 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, MovedReferences)
HRESULT ( STDMETHODCALLTYPE *MovedReferences )(
ICorProfilerCallback10 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectAllocated)
HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )(
ICorProfilerCallback10 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectsAllocatedByClass)
HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )(
ICorProfilerCallback10 * This,
/* [in] */ ULONG cClassCount,
/* [size_is][in] */ ClassID classIds[ ],
/* [size_is][in] */ ULONG cObjects[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectReferences)
HRESULT ( STDMETHODCALLTYPE *ObjectReferences )(
ICorProfilerCallback10 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ULONG cObjectRefs,
/* [size_is][in] */ ObjectID objectRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RootReferences)
HRESULT ( STDMETHODCALLTYPE *RootReferences )(
ICorProfilerCallback10 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID rootRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionThrown)
HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )(
ICorProfilerCallback10 * This,
/* [in] */ ObjectID thrownObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )(
ICorProfilerCallback10 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )(
ICorProfilerCallback10 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ObjectID objectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableCreated)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )(
ICorProfilerCallback10 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ void *pVTable,
/* [in] */ ULONG cSlots);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableDestroyed)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )(
ICorProfilerCallback10 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ REFGUID implementedIID,
/* [in] */ void *pVTable);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherExecute)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, ThreadNameChanged)
HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )(
ICorProfilerCallback10 * This,
/* [in] */ ThreadID threadId,
/* [annotation][in] */
_In_reads_opt_(cchName) WCHAR name[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionStarted)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )(
ICorProfilerCallback10 * This,
/* [in] */ int cGenerations,
/* [size_is][in] */ BOOL generationCollected[ ],
/* [in] */ COR_PRF_GC_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, SurvivingReferences)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )(
ICorProfilerCallback10 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionFinished)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, FinalizeableObjectQueued)
HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )(
ICorProfilerCallback10 * This,
/* [in] */ DWORD finalizerFlags,
/* [in] */ ObjectID objectID);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, RootReferences2)
HRESULT ( STDMETHODCALLTYPE *RootReferences2 )(
ICorProfilerCallback10 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ],
/* [size_is][in] */ UINT_PTR rootIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleCreated)
HRESULT ( STDMETHODCALLTYPE *HandleCreated )(
ICorProfilerCallback10 * This,
/* [in] */ GCHandleID handleId,
/* [in] */ ObjectID initialObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleDestroyed)
HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )(
ICorProfilerCallback10 * This,
/* [in] */ GCHandleID handleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, InitializeForAttach)
HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )(
ICorProfilerCallback10 * This,
/* [in] */ IUnknown *pCorProfilerInfoUnk,
/* [in] */ void *pvClientData,
/* [in] */ UINT cbClientData);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerAttachComplete)
HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerDetachSucceeded)
HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )(
ICorProfilerCallback10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ReJITID rejitId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, GetReJITParameters)
HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )(
ICorProfilerCallback10 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodId,
/* [in] */ ICorProfilerFunctionControl *pFunctionControl);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITError)
HRESULT ( STDMETHODCALLTYPE *ReJITError )(
ICorProfilerCallback10 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, MovedReferences2)
HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )(
ICorProfilerCallback10 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, SurvivingReferences2)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )(
ICorProfilerCallback10 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback5, ConditionalWeakTableElementReferences)
HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )(
ICorProfilerCallback10 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID valueRefIds[ ],
/* [size_is][in] */ GCHandleID rootIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback6, GetAssemblyReferences)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyReferences )(
ICorProfilerCallback10 * This,
/* [string][in] */ const WCHAR *wszAssemblyPath,
/* [in] */ ICorProfilerAssemblyReferenceProvider *pAsmRefProvider);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback7, ModuleInMemorySymbolsUpdated)
HRESULT ( STDMETHODCALLTYPE *ModuleInMemorySymbolsUpdated )(
ICorProfilerCallback10 * This,
ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback8, DynamicMethodJITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationStarted )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId,
/* [in] */ LPCBYTE pILHeader,
/* [in] */ ULONG cbILHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback8, DynamicMethodJITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationFinished )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback9, DynamicMethodUnloaded)
HRESULT ( STDMETHODCALLTYPE *DynamicMethodUnloaded )(
ICorProfilerCallback10 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback10, EventPipeEventDelivered)
HRESULT ( STDMETHODCALLTYPE *EventPipeEventDelivered )(
ICorProfilerCallback10 * This,
/* [in] */ EVENTPIPE_PROVIDER provider,
/* [in] */ ULONG numStackFrames,
/* [length_is][in] */ UINT_PTR stackFrames[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback10, EventPipeProviderCreated)
HRESULT ( STDMETHODCALLTYPE *EventPipeProviderCreated )(
ICorProfilerCallback10 * This,
/* [in] */ EVENTPIPE_PROVIDER provider);
#ifdef COBJMACROS
-#define ICorProfilerCallback10_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerCallback10_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerCallback10_AddRef(This) \
+#define ICorProfilerCallback10_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerCallback10_Release(This) \
+#define ICorProfilerCallback10_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerCallback10_Initialize(This,pICorProfilerInfoUnk) \
+#define ICorProfilerCallback10_Initialize(This,pICorProfilerInfoUnk) \
( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) )
-#define ICorProfilerCallback10_Shutdown(This) \
+#define ICorProfilerCallback10_Shutdown(This) \
( (This)->lpVtbl -> Shutdown(This) )
-#define ICorProfilerCallback10_AppDomainCreationStarted(This,appDomainId) \
+#define ICorProfilerCallback10_AppDomainCreationStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) )
-#define ICorProfilerCallback10_AppDomainCreationFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback10_AppDomainCreationFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback10_AppDomainShutdownStarted(This,appDomainId) \
+#define ICorProfilerCallback10_AppDomainShutdownStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) )
-#define ICorProfilerCallback10_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback10_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback10_AssemblyLoadStarted(This,assemblyId) \
+#define ICorProfilerCallback10_AssemblyLoadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) )
-#define ICorProfilerCallback10_AssemblyLoadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback10_AssemblyLoadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback10_AssemblyUnloadStarted(This,assemblyId) \
+#define ICorProfilerCallback10_AssemblyUnloadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) )
-#define ICorProfilerCallback10_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback10_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback10_ModuleLoadStarted(This,moduleId) \
+#define ICorProfilerCallback10_ModuleLoadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) )
-#define ICorProfilerCallback10_ModuleLoadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback10_ModuleLoadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback10_ModuleUnloadStarted(This,moduleId) \
+#define ICorProfilerCallback10_ModuleUnloadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) )
-#define ICorProfilerCallback10_ModuleUnloadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback10_ModuleUnloadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback10_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
+#define ICorProfilerCallback10_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) )
-#define ICorProfilerCallback10_ClassLoadStarted(This,classId) \
+#define ICorProfilerCallback10_ClassLoadStarted(This,classId) \
( (This)->lpVtbl -> ClassLoadStarted(This,classId) )
-#define ICorProfilerCallback10_ClassLoadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback10_ClassLoadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback10_ClassUnloadStarted(This,classId) \
+#define ICorProfilerCallback10_ClassUnloadStarted(This,classId) \
( (This)->lpVtbl -> ClassUnloadStarted(This,classId) )
-#define ICorProfilerCallback10_ClassUnloadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback10_ClassUnloadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback10_FunctionUnloadStarted(This,functionId) \
+#define ICorProfilerCallback10_FunctionUnloadStarted(This,functionId) \
( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) )
-#define ICorProfilerCallback10_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
+#define ICorProfilerCallback10_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) )
-#define ICorProfilerCallback10_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback10_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback10_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
+#define ICorProfilerCallback10_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) )
-#define ICorProfilerCallback10_JITCachedFunctionSearchFinished(This,functionId,result) \
+#define ICorProfilerCallback10_JITCachedFunctionSearchFinished(This,functionId,result) \
( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) )
-#define ICorProfilerCallback10_JITFunctionPitched(This,functionId) \
+#define ICorProfilerCallback10_JITFunctionPitched(This,functionId) \
( (This)->lpVtbl -> JITFunctionPitched(This,functionId) )
-#define ICorProfilerCallback10_JITInlining(This,callerId,calleeId,pfShouldInline) \
+#define ICorProfilerCallback10_JITInlining(This,callerId,calleeId,pfShouldInline) \
( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) )
-#define ICorProfilerCallback10_ThreadCreated(This,threadId) \
+#define ICorProfilerCallback10_ThreadCreated(This,threadId) \
( (This)->lpVtbl -> ThreadCreated(This,threadId) )
-#define ICorProfilerCallback10_ThreadDestroyed(This,threadId) \
+#define ICorProfilerCallback10_ThreadDestroyed(This,threadId) \
( (This)->lpVtbl -> ThreadDestroyed(This,threadId) )
-#define ICorProfilerCallback10_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
+#define ICorProfilerCallback10_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) )
-#define ICorProfilerCallback10_RemotingClientInvocationStarted(This) \
+#define ICorProfilerCallback10_RemotingClientInvocationStarted(This) \
( (This)->lpVtbl -> RemotingClientInvocationStarted(This) )
-#define ICorProfilerCallback10_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback10_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback10_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback10_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback10_RemotingClientInvocationFinished(This) \
+#define ICorProfilerCallback10_RemotingClientInvocationFinished(This) \
( (This)->lpVtbl -> RemotingClientInvocationFinished(This) )
-#define ICorProfilerCallback10_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback10_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback10_RemotingServerInvocationStarted(This) \
+#define ICorProfilerCallback10_RemotingServerInvocationStarted(This) \
( (This)->lpVtbl -> RemotingServerInvocationStarted(This) )
-#define ICorProfilerCallback10_RemotingServerInvocationReturned(This) \
+#define ICorProfilerCallback10_RemotingServerInvocationReturned(This) \
( (This)->lpVtbl -> RemotingServerInvocationReturned(This) )
-#define ICorProfilerCallback10_RemotingServerSendingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback10_RemotingServerSendingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback10_UnmanagedToManagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback10_UnmanagedToManagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback10_ManagedToUnmanagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback10_ManagedToUnmanagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback10_RuntimeSuspendStarted(This,suspendReason) \
+#define ICorProfilerCallback10_RuntimeSuspendStarted(This,suspendReason) \
( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) )
-#define ICorProfilerCallback10_RuntimeSuspendFinished(This) \
+#define ICorProfilerCallback10_RuntimeSuspendFinished(This) \
( (This)->lpVtbl -> RuntimeSuspendFinished(This) )
-#define ICorProfilerCallback10_RuntimeSuspendAborted(This) \
+#define ICorProfilerCallback10_RuntimeSuspendAborted(This) \
( (This)->lpVtbl -> RuntimeSuspendAborted(This) )
-#define ICorProfilerCallback10_RuntimeResumeStarted(This) \
+#define ICorProfilerCallback10_RuntimeResumeStarted(This) \
( (This)->lpVtbl -> RuntimeResumeStarted(This) )
-#define ICorProfilerCallback10_RuntimeResumeFinished(This) \
+#define ICorProfilerCallback10_RuntimeResumeFinished(This) \
( (This)->lpVtbl -> RuntimeResumeFinished(This) )
-#define ICorProfilerCallback10_RuntimeThreadSuspended(This,threadId) \
+#define ICorProfilerCallback10_RuntimeThreadSuspended(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) )
-#define ICorProfilerCallback10_RuntimeThreadResumed(This,threadId) \
+#define ICorProfilerCallback10_RuntimeThreadResumed(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) )
-#define ICorProfilerCallback10_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback10_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback10_ObjectAllocated(This,objectId,classId) \
+#define ICorProfilerCallback10_ObjectAllocated(This,objectId,classId) \
( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) )
-#define ICorProfilerCallback10_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
+#define ICorProfilerCallback10_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) )
-#define ICorProfilerCallback10_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
+#define ICorProfilerCallback10_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) )
-#define ICorProfilerCallback10_RootReferences(This,cRootRefs,rootRefIds) \
+#define ICorProfilerCallback10_RootReferences(This,cRootRefs,rootRefIds) \
( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) )
-#define ICorProfilerCallback10_ExceptionThrown(This,thrownObjectId) \
+#define ICorProfilerCallback10_ExceptionThrown(This,thrownObjectId) \
( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) )
-#define ICorProfilerCallback10_ExceptionSearchFunctionEnter(This,functionId) \
+#define ICorProfilerCallback10_ExceptionSearchFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) )
-#define ICorProfilerCallback10_ExceptionSearchFunctionLeave(This) \
+#define ICorProfilerCallback10_ExceptionSearchFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) )
-#define ICorProfilerCallback10_ExceptionSearchFilterEnter(This,functionId) \
+#define ICorProfilerCallback10_ExceptionSearchFilterEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) )
-#define ICorProfilerCallback10_ExceptionSearchFilterLeave(This) \
+#define ICorProfilerCallback10_ExceptionSearchFilterLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) )
-#define ICorProfilerCallback10_ExceptionSearchCatcherFound(This,functionId) \
+#define ICorProfilerCallback10_ExceptionSearchCatcherFound(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) )
-#define ICorProfilerCallback10_ExceptionOSHandlerEnter(This,__unused) \
+#define ICorProfilerCallback10_ExceptionOSHandlerEnter(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) )
-#define ICorProfilerCallback10_ExceptionOSHandlerLeave(This,__unused) \
+#define ICorProfilerCallback10_ExceptionOSHandlerLeave(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) )
-#define ICorProfilerCallback10_ExceptionUnwindFunctionEnter(This,functionId) \
+#define ICorProfilerCallback10_ExceptionUnwindFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) )
-#define ICorProfilerCallback10_ExceptionUnwindFunctionLeave(This) \
+#define ICorProfilerCallback10_ExceptionUnwindFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) )
-#define ICorProfilerCallback10_ExceptionUnwindFinallyEnter(This,functionId) \
+#define ICorProfilerCallback10_ExceptionUnwindFinallyEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) )
-#define ICorProfilerCallback10_ExceptionUnwindFinallyLeave(This) \
+#define ICorProfilerCallback10_ExceptionUnwindFinallyLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) )
-#define ICorProfilerCallback10_ExceptionCatcherEnter(This,functionId,objectId) \
+#define ICorProfilerCallback10_ExceptionCatcherEnter(This,functionId,objectId) \
( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) )
-#define ICorProfilerCallback10_ExceptionCatcherLeave(This) \
+#define ICorProfilerCallback10_ExceptionCatcherLeave(This) \
( (This)->lpVtbl -> ExceptionCatcherLeave(This) )
-#define ICorProfilerCallback10_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
+#define ICorProfilerCallback10_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) )
-#define ICorProfilerCallback10_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
+#define ICorProfilerCallback10_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) )
-#define ICorProfilerCallback10_ExceptionCLRCatcherFound(This) \
+#define ICorProfilerCallback10_ExceptionCLRCatcherFound(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) )
-#define ICorProfilerCallback10_ExceptionCLRCatcherExecute(This) \
+#define ICorProfilerCallback10_ExceptionCLRCatcherExecute(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) )
-#define ICorProfilerCallback10_ThreadNameChanged(This,threadId,cchName,name) \
+#define ICorProfilerCallback10_ThreadNameChanged(This,threadId,cchName,name) \
( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) )
-#define ICorProfilerCallback10_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
+#define ICorProfilerCallback10_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) )
-#define ICorProfilerCallback10_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback10_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback10_GarbageCollectionFinished(This) \
+#define ICorProfilerCallback10_GarbageCollectionFinished(This) \
( (This)->lpVtbl -> GarbageCollectionFinished(This) )
-#define ICorProfilerCallback10_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
+#define ICorProfilerCallback10_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) )
-#define ICorProfilerCallback10_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
+#define ICorProfilerCallback10_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) )
-#define ICorProfilerCallback10_HandleCreated(This,handleId,initialObjectId) \
+#define ICorProfilerCallback10_HandleCreated(This,handleId,initialObjectId) \
( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) )
-#define ICorProfilerCallback10_HandleDestroyed(This,handleId) \
+#define ICorProfilerCallback10_HandleDestroyed(This,handleId) \
( (This)->lpVtbl -> HandleDestroyed(This,handleId) )
-#define ICorProfilerCallback10_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
+#define ICorProfilerCallback10_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) )
-#define ICorProfilerCallback10_ProfilerAttachComplete(This) \
+#define ICorProfilerCallback10_ProfilerAttachComplete(This) \
( (This)->lpVtbl -> ProfilerAttachComplete(This) )
-#define ICorProfilerCallback10_ProfilerDetachSucceeded(This) \
+#define ICorProfilerCallback10_ProfilerDetachSucceeded(This) \
( (This)->lpVtbl -> ProfilerDetachSucceeded(This) )
-#define ICorProfilerCallback10_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \
+#define ICorProfilerCallback10_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \
( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) )
-#define ICorProfilerCallback10_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \
+#define ICorProfilerCallback10_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \
( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) )
-#define ICorProfilerCallback10_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback10_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback10_ReJITError(This,moduleId,methodId,functionId,hrStatus) \
+#define ICorProfilerCallback10_ReJITError(This,moduleId,methodId,functionId,hrStatus) \
( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) )
-#define ICorProfilerCallback10_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback10_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback10_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback10_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback10_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \
+#define ICorProfilerCallback10_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \
( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) )
-#define ICorProfilerCallback10_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \
+#define ICorProfilerCallback10_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \
( (This)->lpVtbl -> GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) )
-#define ICorProfilerCallback10_ModuleInMemorySymbolsUpdated(This,moduleId) \
+#define ICorProfilerCallback10_ModuleInMemorySymbolsUpdated(This,moduleId) \
( (This)->lpVtbl -> ModuleInMemorySymbolsUpdated(This,moduleId) )
-#define ICorProfilerCallback10_DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) \
+#define ICorProfilerCallback10_DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) \
( (This)->lpVtbl -> DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) )
-#define ICorProfilerCallback10_DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback10_DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback10_DynamicMethodUnloaded(This,functionId) \
+#define ICorProfilerCallback10_DynamicMethodUnloaded(This,functionId) \
( (This)->lpVtbl -> DynamicMethodUnloaded(This,functionId) )
-#define ICorProfilerCallback10_EventPipeEventDelivered(This,provider,eventId,eventVersion,cbMetadataBlob,metadataBlob,cbEventData,eventData,pActivityId,pRelatedActivityId,eventThread,numStackFrames,stackFrames) \
+#define ICorProfilerCallback10_EventPipeEventDelivered(This,provider,eventId,eventVersion,cbMetadataBlob,metadataBlob,cbEventData,eventData,pActivityId,pRelatedActivityId,eventThread,numStackFrames,stackFrames) \
( (This)->lpVtbl -> EventPipeEventDelivered(This,provider,eventId,eventVersion,cbMetadataBlob,metadataBlob,cbEventData,eventData,pActivityId,pRelatedActivityId,eventThread,numStackFrames,stackFrames) )
-#define ICorProfilerCallback10_EventPipeProviderCreated(This,provider) \
+#define ICorProfilerCallback10_EventPipeProviderCreated(This,provider) \
( (This)->lpVtbl -> EventPipeProviderCreated(This,provider) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerCallback10_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerCallback10_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerCallback11_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerCallback11Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerCallback11 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Initialize)
HRESULT ( STDMETHODCALLTYPE *Initialize )(
ICorProfilerCallback11 * This,
/* [in] */ IUnknown *pICorProfilerInfoUnk);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, Shutdown)
HRESULT ( STDMETHODCALLTYPE *Shutdown )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationStarted )(
ICorProfilerCallback11 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainCreationFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainCreationFinished )(
ICorProfilerCallback11 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownStarted)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownStarted )(
ICorProfilerCallback11 * This,
/* [in] */ AppDomainID appDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AppDomainShutdownFinished)
HRESULT ( STDMETHODCALLTYPE *AppDomainShutdownFinished )(
ICorProfilerCallback11 * This,
/* [in] */ AppDomainID appDomainId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadStarted )(
ICorProfilerCallback11 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyLoadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyLoadFinished )(
ICorProfilerCallback11 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadStarted )(
ICorProfilerCallback11 * This,
/* [in] */ AssemblyID assemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, AssemblyUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *AssemblyUnloadFinished )(
ICorProfilerCallback11 * This,
/* [in] */ AssemblyID assemblyId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadStarted )(
ICorProfilerCallback11 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleLoadFinished )(
ICorProfilerCallback11 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadStarted )(
ICorProfilerCallback11 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ModuleUnloadFinished )(
ICorProfilerCallback11 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ModuleAttachedToAssembly)
HRESULT ( STDMETHODCALLTYPE *ModuleAttachedToAssembly )(
ICorProfilerCallback11 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ AssemblyID AssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassLoadStarted )(
ICorProfilerCallback11 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassLoadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassLoadFinished )(
ICorProfilerCallback11 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadStarted )(
ICorProfilerCallback11 * This,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ClassUnloadFinished)
HRESULT ( STDMETHODCALLTYPE *ClassUnloadFinished )(
ICorProfilerCallback11 * This,
/* [in] */ ClassID classId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, FunctionUnloadStarted)
HRESULT ( STDMETHODCALLTYPE *FunctionUnloadStarted )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *JITCompilationStarted )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *JITCompilationFinished )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchStarted)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchStarted )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId,
/* [out] */ BOOL *pbUseCachedFunction);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITCachedFunctionSearchFinished)
HRESULT ( STDMETHODCALLTYPE *JITCachedFunctionSearchFinished )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_JIT_CACHE result);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITFunctionPitched)
HRESULT ( STDMETHODCALLTYPE *JITFunctionPitched )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, JITInlining)
HRESULT ( STDMETHODCALLTYPE *JITInlining )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID callerId,
/* [in] */ FunctionID calleeId,
/* [out] */ BOOL *pfShouldInline);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadCreated)
HRESULT ( STDMETHODCALLTYPE *ThreadCreated )(
ICorProfilerCallback11 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadDestroyed)
HRESULT ( STDMETHODCALLTYPE *ThreadDestroyed )(
ICorProfilerCallback11 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ThreadAssignedToOSThread)
HRESULT ( STDMETHODCALLTYPE *ThreadAssignedToOSThread )(
ICorProfilerCallback11 * This,
/* [in] */ ThreadID managedThreadId,
/* [in] */ DWORD osThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationStarted )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientSendingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingClientSendingMessage )(
ICorProfilerCallback11 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientReceivingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingClientReceivingReply )(
ICorProfilerCallback11 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingClientInvocationFinished)
HRESULT ( STDMETHODCALLTYPE *RemotingClientInvocationFinished )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerReceivingMessage)
HRESULT ( STDMETHODCALLTYPE *RemotingServerReceivingMessage )(
ICorProfilerCallback11 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationStarted)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationStarted )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerInvocationReturned)
HRESULT ( STDMETHODCALLTYPE *RemotingServerInvocationReturned )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RemotingServerSendingReply)
HRESULT ( STDMETHODCALLTYPE *RemotingServerSendingReply )(
ICorProfilerCallback11 * This,
/* [in] */ GUID *pCookie,
/* [in] */ BOOL fIsAsync);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, UnmanagedToManagedTransition)
HRESULT ( STDMETHODCALLTYPE *UnmanagedToManagedTransition )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ManagedToUnmanagedTransition)
HRESULT ( STDMETHODCALLTYPE *ManagedToUnmanagedTransition )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_TRANSITION_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendStarted )(
ICorProfilerCallback11 * This,
/* [in] */ COR_PRF_SUSPEND_REASON suspendReason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendFinished )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeSuspendAborted)
HRESULT ( STDMETHODCALLTYPE *RuntimeSuspendAborted )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeStarted)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeStarted )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeResumeFinished)
HRESULT ( STDMETHODCALLTYPE *RuntimeResumeFinished )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadSuspended)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadSuspended )(
ICorProfilerCallback11 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RuntimeThreadResumed)
HRESULT ( STDMETHODCALLTYPE *RuntimeThreadResumed )(
ICorProfilerCallback11 * This,
/* [in] */ ThreadID threadId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, MovedReferences)
HRESULT ( STDMETHODCALLTYPE *MovedReferences )(
ICorProfilerCallback11 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectAllocated)
HRESULT ( STDMETHODCALLTYPE *ObjectAllocated )(
ICorProfilerCallback11 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ClassID classId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectsAllocatedByClass)
HRESULT ( STDMETHODCALLTYPE *ObjectsAllocatedByClass )(
ICorProfilerCallback11 * This,
/* [in] */ ULONG cClassCount,
/* [size_is][in] */ ClassID classIds[ ],
/* [size_is][in] */ ULONG cObjects[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ObjectReferences)
HRESULT ( STDMETHODCALLTYPE *ObjectReferences )(
ICorProfilerCallback11 * This,
/* [in] */ ObjectID objectId,
/* [in] */ ULONG cObjectRefs,
/* [size_is][in] */ ObjectID objectRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, RootReferences)
HRESULT ( STDMETHODCALLTYPE *RootReferences )(
ICorProfilerCallback11 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID rootRefIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionThrown)
HRESULT ( STDMETHODCALLTYPE *ExceptionThrown )(
ICorProfilerCallback11 * This,
/* [in] */ ObjectID thrownObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionEnter )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFunctionLeave )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterEnter )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchFilterLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchFilterLeave )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionSearchCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionSearchCatcherFound )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerEnter )(
ICorProfilerCallback11 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionOSHandlerLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionOSHandlerLeave )(
ICorProfilerCallback11 * This,
/* [in] */ UINT_PTR __unused);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionEnter )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFunctionLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFunctionLeave )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyEnter )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionUnwindFinallyLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionUnwindFinallyLeave )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherEnter)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherEnter )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ObjectID objectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCatcherLeave)
HRESULT ( STDMETHODCALLTYPE *ExceptionCatcherLeave )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableCreated)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableCreated )(
ICorProfilerCallback11 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ void *pVTable,
/* [in] */ ULONG cSlots);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, COMClassicVTableDestroyed)
HRESULT ( STDMETHODCALLTYPE *COMClassicVTableDestroyed )(
ICorProfilerCallback11 * This,
/* [in] */ ClassID wrappedClassId,
/* [in] */ REFGUID implementedIID,
/* [in] */ void *pVTable);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherFound)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherFound )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback, ExceptionCLRCatcherExecute)
HRESULT ( STDMETHODCALLTYPE *ExceptionCLRCatcherExecute )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, ThreadNameChanged)
HRESULT ( STDMETHODCALLTYPE *ThreadNameChanged )(
ICorProfilerCallback11 * This,
/* [in] */ ThreadID threadId,
/* [annotation][in] */
_In_reads_opt_(cchName) WCHAR name[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionStarted)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionStarted )(
ICorProfilerCallback11 * This,
/* [in] */ int cGenerations,
/* [size_is][in] */ BOOL generationCollected[ ],
/* [in] */ COR_PRF_GC_REASON reason);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, SurvivingReferences)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences )(
ICorProfilerCallback11 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ ULONG cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, GarbageCollectionFinished)
HRESULT ( STDMETHODCALLTYPE *GarbageCollectionFinished )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, FinalizeableObjectQueued)
HRESULT ( STDMETHODCALLTYPE *FinalizeableObjectQueued )(
ICorProfilerCallback11 * This,
/* [in] */ DWORD finalizerFlags,
/* [in] */ ObjectID objectID);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, RootReferences2)
HRESULT ( STDMETHODCALLTYPE *RootReferences2 )(
ICorProfilerCallback11 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ COR_PRF_GC_ROOT_FLAGS rootFlags[ ],
/* [size_is][in] */ UINT_PTR rootIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleCreated)
HRESULT ( STDMETHODCALLTYPE *HandleCreated )(
ICorProfilerCallback11 * This,
/* [in] */ GCHandleID handleId,
/* [in] */ ObjectID initialObjectId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback2, HandleDestroyed)
HRESULT ( STDMETHODCALLTYPE *HandleDestroyed )(
ICorProfilerCallback11 * This,
/* [in] */ GCHandleID handleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, InitializeForAttach)
HRESULT ( STDMETHODCALLTYPE *InitializeForAttach )(
ICorProfilerCallback11 * This,
/* [in] */ IUnknown *pCorProfilerInfoUnk,
/* [in] */ void *pvClientData,
/* [in] */ UINT cbClientData);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerAttachComplete)
HRESULT ( STDMETHODCALLTYPE *ProfilerAttachComplete )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback3, ProfilerDetachSucceeded)
HRESULT ( STDMETHODCALLTYPE *ProfilerDetachSucceeded )(
ICorProfilerCallback11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *ReJITCompilationStarted )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ReJITID rejitId,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, GetReJITParameters)
HRESULT ( STDMETHODCALLTYPE *GetReJITParameters )(
ICorProfilerCallback11 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodId,
/* [in] */ ICorProfilerFunctionControl *pFunctionControl);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *ReJITCompilationFinished )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, ReJITError)
HRESULT ( STDMETHODCALLTYPE *ReJITError )(
ICorProfilerCallback11 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, MovedReferences2)
HRESULT ( STDMETHODCALLTYPE *MovedReferences2 )(
ICorProfilerCallback11 * This,
/* [in] */ ULONG cMovedObjectIDRanges,
/* [size_is][in] */ ObjectID newObjectIDRangeStart[ ],
/* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback4, SurvivingReferences2)
HRESULT ( STDMETHODCALLTYPE *SurvivingReferences2 )(
ICorProfilerCallback11 * This,
/* [in] */ ULONG cSurvivingObjectIDRanges,
/* [size_is][in] */ ObjectID objectIDRangeStart[ ],
/* [size_is][in] */ SIZE_T cObjectIDRangeLength[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback5, ConditionalWeakTableElementReferences)
HRESULT ( STDMETHODCALLTYPE *ConditionalWeakTableElementReferences )(
ICorProfilerCallback11 * This,
/* [in] */ ULONG cRootRefs,
/* [size_is][in] */ ObjectID valueRefIds[ ],
/* [size_is][in] */ GCHandleID rootIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback6, GetAssemblyReferences)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyReferences )(
ICorProfilerCallback11 * This,
/* [string][in] */ const WCHAR *wszAssemblyPath,
/* [in] */ ICorProfilerAssemblyReferenceProvider *pAsmRefProvider);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback7, ModuleInMemorySymbolsUpdated)
HRESULT ( STDMETHODCALLTYPE *ModuleInMemorySymbolsUpdated )(
ICorProfilerCallback11 * This,
ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback8, DynamicMethodJITCompilationStarted)
HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationStarted )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId,
/* [in] */ LPCBYTE pILHeader,
/* [in] */ ULONG cbILHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback8, DynamicMethodJITCompilationFinished)
HRESULT ( STDMETHODCALLTYPE *DynamicMethodJITCompilationFinished )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId,
/* [in] */ HRESULT hrStatus,
/* [in] */ BOOL fIsSafeToBlock);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback9, DynamicMethodUnloaded)
HRESULT ( STDMETHODCALLTYPE *DynamicMethodUnloaded )(
ICorProfilerCallback11 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback10, EventPipeEventDelivered)
HRESULT ( STDMETHODCALLTYPE *EventPipeEventDelivered )(
ICorProfilerCallback11 * This,
/* [in] */ EVENTPIPE_PROVIDER provider,
/* [in] */ ULONG numStackFrames,
/* [length_is][in] */ UINT_PTR stackFrames[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback10, EventPipeProviderCreated)
HRESULT ( STDMETHODCALLTYPE *EventPipeProviderCreated )(
ICorProfilerCallback11 * This,
/* [in] */ EVENTPIPE_PROVIDER provider);
+ DECLSPEC_XFGVIRT(ICorProfilerCallback11, LoadAsNotificationOnly)
HRESULT ( STDMETHODCALLTYPE *LoadAsNotificationOnly )(
ICorProfilerCallback11 * This,
BOOL *pbNotificationOnly);
#ifdef COBJMACROS
-#define ICorProfilerCallback11_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerCallback11_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerCallback11_AddRef(This) \
+#define ICorProfilerCallback11_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerCallback11_Release(This) \
+#define ICorProfilerCallback11_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerCallback11_Initialize(This,pICorProfilerInfoUnk) \
+#define ICorProfilerCallback11_Initialize(This,pICorProfilerInfoUnk) \
( (This)->lpVtbl -> Initialize(This,pICorProfilerInfoUnk) )
-#define ICorProfilerCallback11_Shutdown(This) \
+#define ICorProfilerCallback11_Shutdown(This) \
( (This)->lpVtbl -> Shutdown(This) )
-#define ICorProfilerCallback11_AppDomainCreationStarted(This,appDomainId) \
+#define ICorProfilerCallback11_AppDomainCreationStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainCreationStarted(This,appDomainId) )
-#define ICorProfilerCallback11_AppDomainCreationFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback11_AppDomainCreationFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainCreationFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback11_AppDomainShutdownStarted(This,appDomainId) \
+#define ICorProfilerCallback11_AppDomainShutdownStarted(This,appDomainId) \
( (This)->lpVtbl -> AppDomainShutdownStarted(This,appDomainId) )
-#define ICorProfilerCallback11_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
+#define ICorProfilerCallback11_AppDomainShutdownFinished(This,appDomainId,hrStatus) \
( (This)->lpVtbl -> AppDomainShutdownFinished(This,appDomainId,hrStatus) )
-#define ICorProfilerCallback11_AssemblyLoadStarted(This,assemblyId) \
+#define ICorProfilerCallback11_AssemblyLoadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyLoadStarted(This,assemblyId) )
-#define ICorProfilerCallback11_AssemblyLoadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback11_AssemblyLoadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyLoadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback11_AssemblyUnloadStarted(This,assemblyId) \
+#define ICorProfilerCallback11_AssemblyUnloadStarted(This,assemblyId) \
( (This)->lpVtbl -> AssemblyUnloadStarted(This,assemblyId) )
-#define ICorProfilerCallback11_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
+#define ICorProfilerCallback11_AssemblyUnloadFinished(This,assemblyId,hrStatus) \
( (This)->lpVtbl -> AssemblyUnloadFinished(This,assemblyId,hrStatus) )
-#define ICorProfilerCallback11_ModuleLoadStarted(This,moduleId) \
+#define ICorProfilerCallback11_ModuleLoadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleLoadStarted(This,moduleId) )
-#define ICorProfilerCallback11_ModuleLoadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback11_ModuleLoadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleLoadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback11_ModuleUnloadStarted(This,moduleId) \
+#define ICorProfilerCallback11_ModuleUnloadStarted(This,moduleId) \
( (This)->lpVtbl -> ModuleUnloadStarted(This,moduleId) )
-#define ICorProfilerCallback11_ModuleUnloadFinished(This,moduleId,hrStatus) \
+#define ICorProfilerCallback11_ModuleUnloadFinished(This,moduleId,hrStatus) \
( (This)->lpVtbl -> ModuleUnloadFinished(This,moduleId,hrStatus) )
-#define ICorProfilerCallback11_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
+#define ICorProfilerCallback11_ModuleAttachedToAssembly(This,moduleId,AssemblyId) \
( (This)->lpVtbl -> ModuleAttachedToAssembly(This,moduleId,AssemblyId) )
-#define ICorProfilerCallback11_ClassLoadStarted(This,classId) \
+#define ICorProfilerCallback11_ClassLoadStarted(This,classId) \
( (This)->lpVtbl -> ClassLoadStarted(This,classId) )
-#define ICorProfilerCallback11_ClassLoadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback11_ClassLoadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassLoadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback11_ClassUnloadStarted(This,classId) \
+#define ICorProfilerCallback11_ClassUnloadStarted(This,classId) \
( (This)->lpVtbl -> ClassUnloadStarted(This,classId) )
-#define ICorProfilerCallback11_ClassUnloadFinished(This,classId,hrStatus) \
+#define ICorProfilerCallback11_ClassUnloadFinished(This,classId,hrStatus) \
( (This)->lpVtbl -> ClassUnloadFinished(This,classId,hrStatus) )
-#define ICorProfilerCallback11_FunctionUnloadStarted(This,functionId) \
+#define ICorProfilerCallback11_FunctionUnloadStarted(This,functionId) \
( (This)->lpVtbl -> FunctionUnloadStarted(This,functionId) )
-#define ICorProfilerCallback11_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
+#define ICorProfilerCallback11_JITCompilationStarted(This,functionId,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationStarted(This,functionId,fIsSafeToBlock) )
-#define ICorProfilerCallback11_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback11_JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> JITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback11_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
+#define ICorProfilerCallback11_JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) \
( (This)->lpVtbl -> JITCachedFunctionSearchStarted(This,functionId,pbUseCachedFunction) )
-#define ICorProfilerCallback11_JITCachedFunctionSearchFinished(This,functionId,result) \
+#define ICorProfilerCallback11_JITCachedFunctionSearchFinished(This,functionId,result) \
( (This)->lpVtbl -> JITCachedFunctionSearchFinished(This,functionId,result) )
-#define ICorProfilerCallback11_JITFunctionPitched(This,functionId) \
+#define ICorProfilerCallback11_JITFunctionPitched(This,functionId) \
( (This)->lpVtbl -> JITFunctionPitched(This,functionId) )
-#define ICorProfilerCallback11_JITInlining(This,callerId,calleeId,pfShouldInline) \
+#define ICorProfilerCallback11_JITInlining(This,callerId,calleeId,pfShouldInline) \
( (This)->lpVtbl -> JITInlining(This,callerId,calleeId,pfShouldInline) )
-#define ICorProfilerCallback11_ThreadCreated(This,threadId) \
+#define ICorProfilerCallback11_ThreadCreated(This,threadId) \
( (This)->lpVtbl -> ThreadCreated(This,threadId) )
-#define ICorProfilerCallback11_ThreadDestroyed(This,threadId) \
+#define ICorProfilerCallback11_ThreadDestroyed(This,threadId) \
( (This)->lpVtbl -> ThreadDestroyed(This,threadId) )
-#define ICorProfilerCallback11_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
+#define ICorProfilerCallback11_ThreadAssignedToOSThread(This,managedThreadId,osThreadId) \
( (This)->lpVtbl -> ThreadAssignedToOSThread(This,managedThreadId,osThreadId) )
-#define ICorProfilerCallback11_RemotingClientInvocationStarted(This) \
+#define ICorProfilerCallback11_RemotingClientInvocationStarted(This) \
( (This)->lpVtbl -> RemotingClientInvocationStarted(This) )
-#define ICorProfilerCallback11_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback11_RemotingClientSendingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientSendingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback11_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback11_RemotingClientReceivingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingClientReceivingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback11_RemotingClientInvocationFinished(This) \
+#define ICorProfilerCallback11_RemotingClientInvocationFinished(This) \
( (This)->lpVtbl -> RemotingClientInvocationFinished(This) )
-#define ICorProfilerCallback11_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback11_RemotingServerReceivingMessage(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerReceivingMessage(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback11_RemotingServerInvocationStarted(This) \
+#define ICorProfilerCallback11_RemotingServerInvocationStarted(This) \
( (This)->lpVtbl -> RemotingServerInvocationStarted(This) )
-#define ICorProfilerCallback11_RemotingServerInvocationReturned(This) \
+#define ICorProfilerCallback11_RemotingServerInvocationReturned(This) \
( (This)->lpVtbl -> RemotingServerInvocationReturned(This) )
-#define ICorProfilerCallback11_RemotingServerSendingReply(This,pCookie,fIsAsync) \
+#define ICorProfilerCallback11_RemotingServerSendingReply(This,pCookie,fIsAsync) \
( (This)->lpVtbl -> RemotingServerSendingReply(This,pCookie,fIsAsync) )
-#define ICorProfilerCallback11_UnmanagedToManagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback11_UnmanagedToManagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> UnmanagedToManagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback11_ManagedToUnmanagedTransition(This,functionId,reason) \
+#define ICorProfilerCallback11_ManagedToUnmanagedTransition(This,functionId,reason) \
( (This)->lpVtbl -> ManagedToUnmanagedTransition(This,functionId,reason) )
-#define ICorProfilerCallback11_RuntimeSuspendStarted(This,suspendReason) \
+#define ICorProfilerCallback11_RuntimeSuspendStarted(This,suspendReason) \
( (This)->lpVtbl -> RuntimeSuspendStarted(This,suspendReason) )
-#define ICorProfilerCallback11_RuntimeSuspendFinished(This) \
+#define ICorProfilerCallback11_RuntimeSuspendFinished(This) \
( (This)->lpVtbl -> RuntimeSuspendFinished(This) )
-#define ICorProfilerCallback11_RuntimeSuspendAborted(This) \
+#define ICorProfilerCallback11_RuntimeSuspendAborted(This) \
( (This)->lpVtbl -> RuntimeSuspendAborted(This) )
-#define ICorProfilerCallback11_RuntimeResumeStarted(This) \
+#define ICorProfilerCallback11_RuntimeResumeStarted(This) \
( (This)->lpVtbl -> RuntimeResumeStarted(This) )
-#define ICorProfilerCallback11_RuntimeResumeFinished(This) \
+#define ICorProfilerCallback11_RuntimeResumeFinished(This) \
( (This)->lpVtbl -> RuntimeResumeFinished(This) )
-#define ICorProfilerCallback11_RuntimeThreadSuspended(This,threadId) \
+#define ICorProfilerCallback11_RuntimeThreadSuspended(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadSuspended(This,threadId) )
-#define ICorProfilerCallback11_RuntimeThreadResumed(This,threadId) \
+#define ICorProfilerCallback11_RuntimeThreadResumed(This,threadId) \
( (This)->lpVtbl -> RuntimeThreadResumed(This,threadId) )
-#define ICorProfilerCallback11_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback11_MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback11_ObjectAllocated(This,objectId,classId) \
+#define ICorProfilerCallback11_ObjectAllocated(This,objectId,classId) \
( (This)->lpVtbl -> ObjectAllocated(This,objectId,classId) )
-#define ICorProfilerCallback11_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
+#define ICorProfilerCallback11_ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) \
( (This)->lpVtbl -> ObjectsAllocatedByClass(This,cClassCount,classIds,cObjects) )
-#define ICorProfilerCallback11_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
+#define ICorProfilerCallback11_ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) \
( (This)->lpVtbl -> ObjectReferences(This,objectId,classId,cObjectRefs,objectRefIds) )
-#define ICorProfilerCallback11_RootReferences(This,cRootRefs,rootRefIds) \
+#define ICorProfilerCallback11_RootReferences(This,cRootRefs,rootRefIds) \
( (This)->lpVtbl -> RootReferences(This,cRootRefs,rootRefIds) )
-#define ICorProfilerCallback11_ExceptionThrown(This,thrownObjectId) \
+#define ICorProfilerCallback11_ExceptionThrown(This,thrownObjectId) \
( (This)->lpVtbl -> ExceptionThrown(This,thrownObjectId) )
-#define ICorProfilerCallback11_ExceptionSearchFunctionEnter(This,functionId) \
+#define ICorProfilerCallback11_ExceptionSearchFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFunctionEnter(This,functionId) )
-#define ICorProfilerCallback11_ExceptionSearchFunctionLeave(This) \
+#define ICorProfilerCallback11_ExceptionSearchFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFunctionLeave(This) )
-#define ICorProfilerCallback11_ExceptionSearchFilterEnter(This,functionId) \
+#define ICorProfilerCallback11_ExceptionSearchFilterEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchFilterEnter(This,functionId) )
-#define ICorProfilerCallback11_ExceptionSearchFilterLeave(This) \
+#define ICorProfilerCallback11_ExceptionSearchFilterLeave(This) \
( (This)->lpVtbl -> ExceptionSearchFilterLeave(This) )
-#define ICorProfilerCallback11_ExceptionSearchCatcherFound(This,functionId) \
+#define ICorProfilerCallback11_ExceptionSearchCatcherFound(This,functionId) \
( (This)->lpVtbl -> ExceptionSearchCatcherFound(This,functionId) )
-#define ICorProfilerCallback11_ExceptionOSHandlerEnter(This,__unused) \
+#define ICorProfilerCallback11_ExceptionOSHandlerEnter(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerEnter(This,__unused) )
-#define ICorProfilerCallback11_ExceptionOSHandlerLeave(This,__unused) \
+#define ICorProfilerCallback11_ExceptionOSHandlerLeave(This,__unused) \
( (This)->lpVtbl -> ExceptionOSHandlerLeave(This,__unused) )
-#define ICorProfilerCallback11_ExceptionUnwindFunctionEnter(This,functionId) \
+#define ICorProfilerCallback11_ExceptionUnwindFunctionEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFunctionEnter(This,functionId) )
-#define ICorProfilerCallback11_ExceptionUnwindFunctionLeave(This) \
+#define ICorProfilerCallback11_ExceptionUnwindFunctionLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFunctionLeave(This) )
-#define ICorProfilerCallback11_ExceptionUnwindFinallyEnter(This,functionId) \
+#define ICorProfilerCallback11_ExceptionUnwindFinallyEnter(This,functionId) \
( (This)->lpVtbl -> ExceptionUnwindFinallyEnter(This,functionId) )
-#define ICorProfilerCallback11_ExceptionUnwindFinallyLeave(This) \
+#define ICorProfilerCallback11_ExceptionUnwindFinallyLeave(This) \
( (This)->lpVtbl -> ExceptionUnwindFinallyLeave(This) )
-#define ICorProfilerCallback11_ExceptionCatcherEnter(This,functionId,objectId) \
+#define ICorProfilerCallback11_ExceptionCatcherEnter(This,functionId,objectId) \
( (This)->lpVtbl -> ExceptionCatcherEnter(This,functionId,objectId) )
-#define ICorProfilerCallback11_ExceptionCatcherLeave(This) \
+#define ICorProfilerCallback11_ExceptionCatcherLeave(This) \
( (This)->lpVtbl -> ExceptionCatcherLeave(This) )
-#define ICorProfilerCallback11_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
+#define ICorProfilerCallback11_COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) \
( (This)->lpVtbl -> COMClassicVTableCreated(This,wrappedClassId,implementedIID,pVTable,cSlots) )
-#define ICorProfilerCallback11_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
+#define ICorProfilerCallback11_COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) \
( (This)->lpVtbl -> COMClassicVTableDestroyed(This,wrappedClassId,implementedIID,pVTable) )
-#define ICorProfilerCallback11_ExceptionCLRCatcherFound(This) \
+#define ICorProfilerCallback11_ExceptionCLRCatcherFound(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherFound(This) )
-#define ICorProfilerCallback11_ExceptionCLRCatcherExecute(This) \
+#define ICorProfilerCallback11_ExceptionCLRCatcherExecute(This) \
( (This)->lpVtbl -> ExceptionCLRCatcherExecute(This) )
-#define ICorProfilerCallback11_ThreadNameChanged(This,threadId,cchName,name) \
+#define ICorProfilerCallback11_ThreadNameChanged(This,threadId,cchName,name) \
( (This)->lpVtbl -> ThreadNameChanged(This,threadId,cchName,name) )
-#define ICorProfilerCallback11_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
+#define ICorProfilerCallback11_GarbageCollectionStarted(This,cGenerations,generationCollected,reason) \
( (This)->lpVtbl -> GarbageCollectionStarted(This,cGenerations,generationCollected,reason) )
-#define ICorProfilerCallback11_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback11_SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback11_GarbageCollectionFinished(This) \
+#define ICorProfilerCallback11_GarbageCollectionFinished(This) \
( (This)->lpVtbl -> GarbageCollectionFinished(This) )
-#define ICorProfilerCallback11_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
+#define ICorProfilerCallback11_FinalizeableObjectQueued(This,finalizerFlags,objectID) \
( (This)->lpVtbl -> FinalizeableObjectQueued(This,finalizerFlags,objectID) )
-#define ICorProfilerCallback11_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
+#define ICorProfilerCallback11_RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) \
( (This)->lpVtbl -> RootReferences2(This,cRootRefs,rootRefIds,rootKinds,rootFlags,rootIds) )
-#define ICorProfilerCallback11_HandleCreated(This,handleId,initialObjectId) \
+#define ICorProfilerCallback11_HandleCreated(This,handleId,initialObjectId) \
( (This)->lpVtbl -> HandleCreated(This,handleId,initialObjectId) )
-#define ICorProfilerCallback11_HandleDestroyed(This,handleId) \
+#define ICorProfilerCallback11_HandleDestroyed(This,handleId) \
( (This)->lpVtbl -> HandleDestroyed(This,handleId) )
-#define ICorProfilerCallback11_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
+#define ICorProfilerCallback11_InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) \
( (This)->lpVtbl -> InitializeForAttach(This,pCorProfilerInfoUnk,pvClientData,cbClientData) )
-#define ICorProfilerCallback11_ProfilerAttachComplete(This) \
+#define ICorProfilerCallback11_ProfilerAttachComplete(This) \
( (This)->lpVtbl -> ProfilerAttachComplete(This) )
-#define ICorProfilerCallback11_ProfilerDetachSucceeded(This) \
+#define ICorProfilerCallback11_ProfilerDetachSucceeded(This) \
( (This)->lpVtbl -> ProfilerDetachSucceeded(This) )
-#define ICorProfilerCallback11_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \
+#define ICorProfilerCallback11_ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) \
( (This)->lpVtbl -> ReJITCompilationStarted(This,functionId,rejitId,fIsSafeToBlock) )
-#define ICorProfilerCallback11_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \
+#define ICorProfilerCallback11_GetReJITParameters(This,moduleId,methodId,pFunctionControl) \
( (This)->lpVtbl -> GetReJITParameters(This,moduleId,methodId,pFunctionControl) )
-#define ICorProfilerCallback11_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback11_ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> ReJITCompilationFinished(This,functionId,rejitId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback11_ReJITError(This,moduleId,methodId,functionId,hrStatus) \
+#define ICorProfilerCallback11_ReJITError(This,moduleId,methodId,functionId,hrStatus) \
( (This)->lpVtbl -> ReJITError(This,moduleId,methodId,functionId,hrStatus) )
-#define ICorProfilerCallback11_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback11_MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> MovedReferences2(This,cMovedObjectIDRanges,oldObjectIDRangeStart,newObjectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback11_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
+#define ICorProfilerCallback11_SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) \
( (This)->lpVtbl -> SurvivingReferences2(This,cSurvivingObjectIDRanges,objectIDRangeStart,cObjectIDRangeLength) )
-#define ICorProfilerCallback11_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \
+#define ICorProfilerCallback11_ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) \
( (This)->lpVtbl -> ConditionalWeakTableElementReferences(This,cRootRefs,keyRefIds,valueRefIds,rootIds) )
-#define ICorProfilerCallback11_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \
+#define ICorProfilerCallback11_GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) \
( (This)->lpVtbl -> GetAssemblyReferences(This,wszAssemblyPath,pAsmRefProvider) )
-#define ICorProfilerCallback11_ModuleInMemorySymbolsUpdated(This,moduleId) \
+#define ICorProfilerCallback11_ModuleInMemorySymbolsUpdated(This,moduleId) \
( (This)->lpVtbl -> ModuleInMemorySymbolsUpdated(This,moduleId) )
-#define ICorProfilerCallback11_DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) \
+#define ICorProfilerCallback11_DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) \
( (This)->lpVtbl -> DynamicMethodJITCompilationStarted(This,functionId,fIsSafeToBlock,pILHeader,cbILHeader) )
-#define ICorProfilerCallback11_DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
+#define ICorProfilerCallback11_DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) \
( (This)->lpVtbl -> DynamicMethodJITCompilationFinished(This,functionId,hrStatus,fIsSafeToBlock) )
-#define ICorProfilerCallback11_DynamicMethodUnloaded(This,functionId) \
+#define ICorProfilerCallback11_DynamicMethodUnloaded(This,functionId) \
( (This)->lpVtbl -> DynamicMethodUnloaded(This,functionId) )
-#define ICorProfilerCallback11_EventPipeEventDelivered(This,provider,eventId,eventVersion,cbMetadataBlob,metadataBlob,cbEventData,eventData,pActivityId,pRelatedActivityId,eventThread,numStackFrames,stackFrames) \
+#define ICorProfilerCallback11_EventPipeEventDelivered(This,provider,eventId,eventVersion,cbMetadataBlob,metadataBlob,cbEventData,eventData,pActivityId,pRelatedActivityId,eventThread,numStackFrames,stackFrames) \
( (This)->lpVtbl -> EventPipeEventDelivered(This,provider,eventId,eventVersion,cbMetadataBlob,metadataBlob,cbEventData,eventData,pActivityId,pRelatedActivityId,eventThread,numStackFrames,stackFrames) )
-#define ICorProfilerCallback11_EventPipeProviderCreated(This,provider) \
+#define ICorProfilerCallback11_EventPipeProviderCreated(This,provider) \
( (This)->lpVtbl -> EventPipeProviderCreated(This,provider) )
-#define ICorProfilerCallback11_LoadAsNotificationOnly(This,pbNotificationOnly) \
+#define ICorProfilerCallback11_LoadAsNotificationOnly(This,pbNotificationOnly) \
( (This)->lpVtbl -> LoadAsNotificationOnly(This,pbNotificationOnly) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerCallback11_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerCallback11_INTERFACE_DEFINED__ */
/* interface __MIDL_itf_corprof_0000_0011 */
typedef /* [public] */
enum __MIDL___MIDL_itf_corprof_0000_0011_0001
{
- COR_PRF_CODEGEN_DISABLE_INLINING = 0x1,
- COR_PRF_CODEGEN_DISABLE_ALL_OPTIMIZATIONS = 0x2
- } COR_PRF_CODEGEN_FLAGS;
+ COR_PRF_CODEGEN_DISABLE_INLINING = 0x1,
+ COR_PRF_CODEGEN_DISABLE_ALL_OPTIMIZATIONS = 0x2,
+ COR_PRF_CODEGEN_DEBUG_INFO = 0x3
+ } COR_PRF_CODEGEN_FLAGS;
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerInfoVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerInfo * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerInfo * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerInfo * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromObject)
HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )(
ICorProfilerInfo * This,
/* [in] */ ObjectID objectId,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromToken)
HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )(
ICorProfilerInfo * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdTypeDef typeDef,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCodeInfo)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )(
ICorProfilerInfo * This,
/* [in] */ FunctionID functionId,
/* [out] */ LPCBYTE *pStart,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetEventMask)
HRESULT ( STDMETHODCALLTYPE *GetEventMask )(
ICorProfilerInfo * This,
/* [out] */ DWORD *pdwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromIP)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )(
ICorProfilerInfo * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )(
ICorProfilerInfo * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdToken token,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetHandleFromThread)
HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )(
ICorProfilerInfo * This,
/* [in] */ ThreadID threadId,
/* [out] */ HANDLE *phThread);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetObjectSize)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize )(
ICorProfilerInfo * This,
/* [in] */ ObjectID objectId,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, IsArrayClass)
HRESULT ( STDMETHODCALLTYPE *IsArrayClass )(
ICorProfilerInfo * This,
/* [in] */ ClassID classId,
/* [out] */ ClassID *pBaseClassId,
/* [out] */ ULONG *pcRank);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadInfo)
HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )(
ICorProfilerInfo * This,
/* [in] */ ThreadID threadId,
/* [out] */ DWORD *pdwWin32ThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCurrentThreadID)
HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )(
ICorProfilerInfo * This,
/* [out] */ ThreadID *pThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassIDInfo)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )(
ICorProfilerInfo * This,
/* [in] */ ClassID classId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdTypeDef *pTypeDefToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )(
ICorProfilerInfo * This,
/* [in] */ FunctionID functionId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEventMask)
HRESULT ( STDMETHODCALLTYPE *SetEventMask )(
ICorProfilerInfo * This,
/* [in] */ DWORD dwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEnterLeaveFunctionHooks)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )(
ICorProfilerInfo * This,
/* [in] */ FunctionEnter *pFuncEnter,
/* [in] */ FunctionLeave *pFuncLeave,
/* [in] */ FunctionTailcall *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionIDMapper)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )(
ICorProfilerInfo * This,
/* [in] */ FunctionIDMapper *pFunc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetTokenAndMetaDataFromFunction)
HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )(
ICorProfilerInfo * This,
/* [in] */ FunctionID functionId,
/* [out] */ IUnknown **ppImport,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleInfo)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )(
ICorProfilerInfo * This,
/* [in] */ ModuleID moduleId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ AssemblyID *pAssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleMetaData)
HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )(
ICorProfilerInfo * This,
/* [in] */ ModuleID moduleId,
/* [in] */ REFIID riid,
/* [out] */ IUnknown **ppOut);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )(
ICorProfilerInfo * This,
/* [in] */ ModuleID moduleId,
/* [out] */ LPCBYTE *ppMethodHeader,
/* [out] */ ULONG *pcbMethodSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBodyAllocator)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )(
ICorProfilerInfo * This,
/* [in] */ ModuleID moduleId,
/* [out] */ IMethodMalloc **ppMalloc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )(
ICorProfilerInfo * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodid,
/* [in] */ LPCBYTE pbNewILMethodHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAppDomainInfo)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )(
ICorProfilerInfo * This,
/* [in] */ AppDomainID appDomainId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ ProcessID *pProcessId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAssemblyInfo)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )(
ICorProfilerInfo * This,
/* [in] */ AssemblyID assemblyId,
/* [out] */ AppDomainID *pAppDomainId,
/* [out] */ ModuleID *pModuleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionReJIT)
HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )(
ICorProfilerInfo * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, ForceGC)
HRESULT ( STDMETHODCALLTYPE *ForceGC )(
ICorProfilerInfo * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILInstrumentedCodeMap)
HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )(
ICorProfilerInfo * This,
/* [in] */ FunctionID functionId,
/* [in] */ ULONG cILMapEntries,
/* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionInterface)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )(
ICorProfilerInfo * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionIThisThread)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )(
ICorProfilerInfo * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadContext)
HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
ICorProfilerInfo * This,
/* [in] */ ThreadID threadId,
/* [out] */ ContextID *pContextId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, BeginInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )(
ICorProfilerInfo * This,
/* [in] */ BOOL fThisThreadOnly,
/* [out] */ DWORD *pdwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, EndInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )(
ICorProfilerInfo * This,
/* [in] */ DWORD dwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILToNativeMapping)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )(
ICorProfilerInfo * This,
/* [in] */ FunctionID functionId,
#ifdef COBJMACROS
-#define ICorProfilerInfo_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerInfo_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerInfo_AddRef(This) \
+#define ICorProfilerInfo_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerInfo_Release(This) \
+#define ICorProfilerInfo_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerInfo_GetClassFromObject(This,objectId,pClassId) \
+#define ICorProfilerInfo_GetClassFromObject(This,objectId,pClassId) \
( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) )
-#define ICorProfilerInfo_GetClassFromToken(This,moduleId,typeDef,pClassId) \
+#define ICorProfilerInfo_GetClassFromToken(This,moduleId,typeDef,pClassId) \
( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) )
-#define ICorProfilerInfo_GetCodeInfo(This,functionId,pStart,pcSize) \
+#define ICorProfilerInfo_GetCodeInfo(This,functionId,pStart,pcSize) \
( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) )
-#define ICorProfilerInfo_GetEventMask(This,pdwEvents) \
+#define ICorProfilerInfo_GetEventMask(This,pdwEvents) \
( (This)->lpVtbl -> GetEventMask(This,pdwEvents) )
-#define ICorProfilerInfo_GetFunctionFromIP(This,ip,pFunctionId) \
+#define ICorProfilerInfo_GetFunctionFromIP(This,ip,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) )
-#define ICorProfilerInfo_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
+#define ICorProfilerInfo_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) )
-#define ICorProfilerInfo_GetHandleFromThread(This,threadId,phThread) \
+#define ICorProfilerInfo_GetHandleFromThread(This,threadId,phThread) \
( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) )
-#define ICorProfilerInfo_GetObjectSize(This,objectId,pcSize) \
+#define ICorProfilerInfo_GetObjectSize(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) )
-#define ICorProfilerInfo_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
+#define ICorProfilerInfo_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) )
-#define ICorProfilerInfo_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
+#define ICorProfilerInfo_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) )
-#define ICorProfilerInfo_GetCurrentThreadID(This,pThreadId) \
+#define ICorProfilerInfo_GetCurrentThreadID(This,pThreadId) \
( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) )
-#define ICorProfilerInfo_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
+#define ICorProfilerInfo_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) )
-#define ICorProfilerInfo_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
+#define ICorProfilerInfo_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) )
-#define ICorProfilerInfo_SetEventMask(This,dwEvents) \
+#define ICorProfilerInfo_SetEventMask(This,dwEvents) \
( (This)->lpVtbl -> SetEventMask(This,dwEvents) )
-#define ICorProfilerInfo_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo_SetFunctionIDMapper(This,pFunc) \
+#define ICorProfilerInfo_SetFunctionIDMapper(This,pFunc) \
( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) )
-#define ICorProfilerInfo_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
+#define ICorProfilerInfo_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) )
-#define ICorProfilerInfo_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
+#define ICorProfilerInfo_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) )
-#define ICorProfilerInfo_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
+#define ICorProfilerInfo_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) )
-#define ICorProfilerInfo_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
+#define ICorProfilerInfo_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) )
-#define ICorProfilerInfo_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
+#define ICorProfilerInfo_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) )
-#define ICorProfilerInfo_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
+#define ICorProfilerInfo_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) )
-#define ICorProfilerInfo_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
+#define ICorProfilerInfo_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) )
-#define ICorProfilerInfo_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
+#define ICorProfilerInfo_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) )
-#define ICorProfilerInfo_SetFunctionReJIT(This,functionId) \
+#define ICorProfilerInfo_SetFunctionReJIT(This,functionId) \
( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) )
-#define ICorProfilerInfo_ForceGC(This) \
+#define ICorProfilerInfo_ForceGC(This) \
( (This)->lpVtbl -> ForceGC(This) )
-#define ICorProfilerInfo_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
+#define ICorProfilerInfo_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) )
-#define ICorProfilerInfo_GetInprocInspectionInterface(This,ppicd) \
+#define ICorProfilerInfo_GetInprocInspectionInterface(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) )
-#define ICorProfilerInfo_GetInprocInspectionIThisThread(This,ppicd) \
+#define ICorProfilerInfo_GetInprocInspectionIThisThread(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) )
-#define ICorProfilerInfo_GetThreadContext(This,threadId,pContextId) \
+#define ICorProfilerInfo_GetThreadContext(This,threadId,pContextId) \
( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) )
-#define ICorProfilerInfo_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
+#define ICorProfilerInfo_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) )
-#define ICorProfilerInfo_EndInprocDebugging(This,dwProfilerContext) \
+#define ICorProfilerInfo_EndInprocDebugging(This,dwProfilerContext) \
( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) )
-#define ICorProfilerInfo_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
+#define ICorProfilerInfo_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerInfo_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerInfo_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerInfo2_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerInfo2Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerInfo2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerInfo2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerInfo2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromObject)
HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )(
ICorProfilerInfo2 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromToken)
HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )(
ICorProfilerInfo2 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdTypeDef typeDef,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCodeInfo)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )(
ICorProfilerInfo2 * This,
/* [in] */ FunctionID functionId,
/* [out] */ LPCBYTE *pStart,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetEventMask)
HRESULT ( STDMETHODCALLTYPE *GetEventMask )(
ICorProfilerInfo2 * This,
/* [out] */ DWORD *pdwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromIP)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )(
ICorProfilerInfo2 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )(
ICorProfilerInfo2 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdToken token,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetHandleFromThread)
HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )(
ICorProfilerInfo2 * This,
/* [in] */ ThreadID threadId,
/* [out] */ HANDLE *phThread);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetObjectSize)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize )(
ICorProfilerInfo2 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, IsArrayClass)
HRESULT ( STDMETHODCALLTYPE *IsArrayClass )(
ICorProfilerInfo2 * This,
/* [in] */ ClassID classId,
/* [out] */ ClassID *pBaseClassId,
/* [out] */ ULONG *pcRank);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadInfo)
HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )(
ICorProfilerInfo2 * This,
/* [in] */ ThreadID threadId,
/* [out] */ DWORD *pdwWin32ThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCurrentThreadID)
HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )(
ICorProfilerInfo2 * This,
/* [out] */ ThreadID *pThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassIDInfo)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )(
ICorProfilerInfo2 * This,
/* [in] */ ClassID classId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdTypeDef *pTypeDefToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )(
ICorProfilerInfo2 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEventMask)
HRESULT ( STDMETHODCALLTYPE *SetEventMask )(
ICorProfilerInfo2 * This,
/* [in] */ DWORD dwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEnterLeaveFunctionHooks)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )(
ICorProfilerInfo2 * This,
/* [in] */ FunctionEnter *pFuncEnter,
/* [in] */ FunctionLeave *pFuncLeave,
/* [in] */ FunctionTailcall *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionIDMapper)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )(
ICorProfilerInfo2 * This,
/* [in] */ FunctionIDMapper *pFunc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetTokenAndMetaDataFromFunction)
HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )(
ICorProfilerInfo2 * This,
/* [in] */ FunctionID functionId,
/* [out] */ IUnknown **ppImport,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleInfo)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )(
ICorProfilerInfo2 * This,
/* [in] */ ModuleID moduleId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ AssemblyID *pAssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleMetaData)
HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )(
ICorProfilerInfo2 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ REFIID riid,
/* [out] */ IUnknown **ppOut);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )(
ICorProfilerInfo2 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ LPCBYTE *ppMethodHeader,
/* [out] */ ULONG *pcbMethodSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBodyAllocator)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )(
ICorProfilerInfo2 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ IMethodMalloc **ppMalloc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )(
ICorProfilerInfo2 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodid,
/* [in] */ LPCBYTE pbNewILMethodHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAppDomainInfo)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )(
ICorProfilerInfo2 * This,
/* [in] */ AppDomainID appDomainId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ ProcessID *pProcessId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAssemblyInfo)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )(
ICorProfilerInfo2 * This,
/* [in] */ AssemblyID assemblyId,
/* [out] */ AppDomainID *pAppDomainId,
/* [out] */ ModuleID *pModuleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionReJIT)
HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )(
ICorProfilerInfo2 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, ForceGC)
HRESULT ( STDMETHODCALLTYPE *ForceGC )(
ICorProfilerInfo2 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILInstrumentedCodeMap)
HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )(
ICorProfilerInfo2 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ULONG cILMapEntries,
/* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionInterface)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )(
ICorProfilerInfo2 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionIThisThread)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )(
ICorProfilerInfo2 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadContext)
HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
ICorProfilerInfo2 * This,
/* [in] */ ThreadID threadId,
/* [out] */ ContextID *pContextId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, BeginInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )(
ICorProfilerInfo2 * This,
/* [in] */ BOOL fThisThreadOnly,
/* [out] */ DWORD *pdwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, EndInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )(
ICorProfilerInfo2 * This,
/* [in] */ DWORD dwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILToNativeMapping)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )(
ICorProfilerInfo2 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, DoStackSnapshot)
HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )(
ICorProfilerInfo2 * This,
/* [in] */ ThreadID thread,
/* [size_is][in] */ BYTE context[ ],
/* [in] */ ULONG32 contextSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, SetEnterLeaveFunctionHooks2)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )(
ICorProfilerInfo2 * This,
/* [in] */ FunctionEnter2 *pFuncEnter,
/* [in] */ FunctionLeave2 *pFuncLeave,
/* [in] */ FunctionTailcall2 *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionInfo2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )(
ICorProfilerInfo2 * This,
/* [in] */ FunctionID funcId,
/* [out] */ ULONG32 *pcTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStringLayout)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout )(
ICorProfilerInfo2 * This,
/* [out] */ ULONG *pBufferLengthOffset,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetClassLayout )(
ICorProfilerInfo2 * This,
/* [in] */ ClassID classID,
/* [out] */ ULONG *pcFieldOffset,
/* [out] */ ULONG *pulClassSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassIDInfo2)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )(
ICorProfilerInfo2 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pcNumTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetCodeInfo2)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )(
ICorProfilerInfo2 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )(
ICorProfilerInfo2 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ ClassID *pClassID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )(
ICorProfilerInfo2 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ FunctionID *pFunctionID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, EnumModuleFrozenObjects)
HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )(
ICorProfilerInfo2 * This,
/* [in] */ ModuleID moduleID,
/* [out] */ ICorProfilerObjectEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetArrayObjectInfo)
HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )(
ICorProfilerInfo2 * This,
/* [in] */ ObjectID objectId,
/* [size_is][out] */ int pDimensionLowerBounds[ ],
/* [out] */ BYTE **ppData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetBoxClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )(
ICorProfilerInfo2 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadAppDomain)
HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )(
ICorProfilerInfo2 * This,
/* [in] */ ThreadID threadId,
/* [out] */ AppDomainID *pAppDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetRVAStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )(
ICorProfilerInfo2 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetAppDomainStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )(
ICorProfilerInfo2 * This,
/* [in] */ ClassID classId,
/* [in] */ AppDomainID appDomainId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )(
ICorProfilerInfo2 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetContextStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )(
ICorProfilerInfo2 * This,
/* [in] */ ClassID classId,
/* [in] */ ContextID contextId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStaticFieldInfo)
HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )(
ICorProfilerInfo2 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetGenerationBounds)
HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )(
ICorProfilerInfo2 * This,
/* [in] */ ULONG cObjectRanges,
/* [out] */ ULONG *pcObjectRanges,
/* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetObjectGeneration)
HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )(
ICorProfilerInfo2 * This,
/* [in] */ ObjectID objectId,
/* [out] */ COR_PRF_GC_GENERATION_RANGE *range);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetNotifiedExceptionClauseInfo)
HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )(
ICorProfilerInfo2 * This,
/* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo);
#ifdef COBJMACROS
-#define ICorProfilerInfo2_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerInfo2_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerInfo2_AddRef(This) \
+#define ICorProfilerInfo2_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerInfo2_Release(This) \
+#define ICorProfilerInfo2_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerInfo2_GetClassFromObject(This,objectId,pClassId) \
+#define ICorProfilerInfo2_GetClassFromObject(This,objectId,pClassId) \
( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) )
-#define ICorProfilerInfo2_GetClassFromToken(This,moduleId,typeDef,pClassId) \
+#define ICorProfilerInfo2_GetClassFromToken(This,moduleId,typeDef,pClassId) \
( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) )
-#define ICorProfilerInfo2_GetCodeInfo(This,functionId,pStart,pcSize) \
+#define ICorProfilerInfo2_GetCodeInfo(This,functionId,pStart,pcSize) \
( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) )
-#define ICorProfilerInfo2_GetEventMask(This,pdwEvents) \
+#define ICorProfilerInfo2_GetEventMask(This,pdwEvents) \
( (This)->lpVtbl -> GetEventMask(This,pdwEvents) )
-#define ICorProfilerInfo2_GetFunctionFromIP(This,ip,pFunctionId) \
+#define ICorProfilerInfo2_GetFunctionFromIP(This,ip,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) )
-#define ICorProfilerInfo2_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
+#define ICorProfilerInfo2_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) )
-#define ICorProfilerInfo2_GetHandleFromThread(This,threadId,phThread) \
+#define ICorProfilerInfo2_GetHandleFromThread(This,threadId,phThread) \
( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) )
-#define ICorProfilerInfo2_GetObjectSize(This,objectId,pcSize) \
+#define ICorProfilerInfo2_GetObjectSize(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) )
-#define ICorProfilerInfo2_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
+#define ICorProfilerInfo2_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) )
-#define ICorProfilerInfo2_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
+#define ICorProfilerInfo2_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) )
-#define ICorProfilerInfo2_GetCurrentThreadID(This,pThreadId) \
+#define ICorProfilerInfo2_GetCurrentThreadID(This,pThreadId) \
( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) )
-#define ICorProfilerInfo2_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
+#define ICorProfilerInfo2_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) )
-#define ICorProfilerInfo2_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
+#define ICorProfilerInfo2_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) )
-#define ICorProfilerInfo2_SetEventMask(This,dwEvents) \
+#define ICorProfilerInfo2_SetEventMask(This,dwEvents) \
( (This)->lpVtbl -> SetEventMask(This,dwEvents) )
-#define ICorProfilerInfo2_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo2_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo2_SetFunctionIDMapper(This,pFunc) \
+#define ICorProfilerInfo2_SetFunctionIDMapper(This,pFunc) \
( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) )
-#define ICorProfilerInfo2_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
+#define ICorProfilerInfo2_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) )
-#define ICorProfilerInfo2_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
+#define ICorProfilerInfo2_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) )
-#define ICorProfilerInfo2_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
+#define ICorProfilerInfo2_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) )
-#define ICorProfilerInfo2_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
+#define ICorProfilerInfo2_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) )
-#define ICorProfilerInfo2_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
+#define ICorProfilerInfo2_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) )
-#define ICorProfilerInfo2_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
+#define ICorProfilerInfo2_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) )
-#define ICorProfilerInfo2_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
+#define ICorProfilerInfo2_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) )
-#define ICorProfilerInfo2_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
+#define ICorProfilerInfo2_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) )
-#define ICorProfilerInfo2_SetFunctionReJIT(This,functionId) \
+#define ICorProfilerInfo2_SetFunctionReJIT(This,functionId) \
( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) )
-#define ICorProfilerInfo2_ForceGC(This) \
+#define ICorProfilerInfo2_ForceGC(This) \
( (This)->lpVtbl -> ForceGC(This) )
-#define ICorProfilerInfo2_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
+#define ICorProfilerInfo2_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) )
-#define ICorProfilerInfo2_GetInprocInspectionInterface(This,ppicd) \
+#define ICorProfilerInfo2_GetInprocInspectionInterface(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) )
-#define ICorProfilerInfo2_GetInprocInspectionIThisThread(This,ppicd) \
+#define ICorProfilerInfo2_GetInprocInspectionIThisThread(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) )
-#define ICorProfilerInfo2_GetThreadContext(This,threadId,pContextId) \
+#define ICorProfilerInfo2_GetThreadContext(This,threadId,pContextId) \
( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) )
-#define ICorProfilerInfo2_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
+#define ICorProfilerInfo2_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) )
-#define ICorProfilerInfo2_EndInprocDebugging(This,dwProfilerContext) \
+#define ICorProfilerInfo2_EndInprocDebugging(This,dwProfilerContext) \
( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) )
-#define ICorProfilerInfo2_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
+#define ICorProfilerInfo2_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) )
-#define ICorProfilerInfo2_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
+#define ICorProfilerInfo2_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) )
-#define ICorProfilerInfo2_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo2_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo2_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
+#define ICorProfilerInfo2_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) )
-#define ICorProfilerInfo2_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo2_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo2_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
+#define ICorProfilerInfo2_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) )
-#define ICorProfilerInfo2_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
+#define ICorProfilerInfo2_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) )
-#define ICorProfilerInfo2_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo2_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo2_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
+#define ICorProfilerInfo2_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) )
-#define ICorProfilerInfo2_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
+#define ICorProfilerInfo2_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) )
-#define ICorProfilerInfo2_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
+#define ICorProfilerInfo2_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) )
-#define ICorProfilerInfo2_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
+#define ICorProfilerInfo2_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) )
-#define ICorProfilerInfo2_GetBoxClassLayout(This,classId,pBufferOffset) \
+#define ICorProfilerInfo2_GetBoxClassLayout(This,classId,pBufferOffset) \
( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) )
-#define ICorProfilerInfo2_GetThreadAppDomain(This,threadId,pAppDomainId) \
+#define ICorProfilerInfo2_GetThreadAppDomain(This,threadId,pAppDomainId) \
( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) )
-#define ICorProfilerInfo2_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
+#define ICorProfilerInfo2_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) )
-#define ICorProfilerInfo2_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
+#define ICorProfilerInfo2_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) )
-#define ICorProfilerInfo2_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
+#define ICorProfilerInfo2_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) )
-#define ICorProfilerInfo2_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
+#define ICorProfilerInfo2_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) )
-#define ICorProfilerInfo2_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
+#define ICorProfilerInfo2_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) )
-#define ICorProfilerInfo2_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
+#define ICorProfilerInfo2_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) )
-#define ICorProfilerInfo2_GetObjectGeneration(This,objectId,range) \
+#define ICorProfilerInfo2_GetObjectGeneration(This,objectId,range) \
( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) )
-#define ICorProfilerInfo2_GetNotifiedExceptionClauseInfo(This,pinfo) \
+#define ICorProfilerInfo2_GetNotifiedExceptionClauseInfo(This,pinfo) \
( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerInfo2_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerInfo2_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerInfo3_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerInfo3Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerInfo3 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerInfo3 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerInfo3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromObject)
HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )(
ICorProfilerInfo3 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromToken)
HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )(
ICorProfilerInfo3 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdTypeDef typeDef,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCodeInfo)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionID functionId,
/* [out] */ LPCBYTE *pStart,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetEventMask)
HRESULT ( STDMETHODCALLTYPE *GetEventMask )(
ICorProfilerInfo3 * This,
/* [out] */ DWORD *pdwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromIP)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )(
ICorProfilerInfo3 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )(
ICorProfilerInfo3 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdToken token,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetHandleFromThread)
HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )(
ICorProfilerInfo3 * This,
/* [in] */ ThreadID threadId,
/* [out] */ HANDLE *phThread);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetObjectSize)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize )(
ICorProfilerInfo3 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, IsArrayClass)
HRESULT ( STDMETHODCALLTYPE *IsArrayClass )(
ICorProfilerInfo3 * This,
/* [in] */ ClassID classId,
/* [out] */ ClassID *pBaseClassId,
/* [out] */ ULONG *pcRank);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadInfo)
HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )(
ICorProfilerInfo3 * This,
/* [in] */ ThreadID threadId,
/* [out] */ DWORD *pdwWin32ThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCurrentThreadID)
HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )(
ICorProfilerInfo3 * This,
/* [out] */ ThreadID *pThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassIDInfo)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )(
ICorProfilerInfo3 * This,
/* [in] */ ClassID classId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdTypeDef *pTypeDefToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEventMask)
HRESULT ( STDMETHODCALLTYPE *SetEventMask )(
ICorProfilerInfo3 * This,
/* [in] */ DWORD dwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEnterLeaveFunctionHooks)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionEnter *pFuncEnter,
/* [in] */ FunctionLeave *pFuncLeave,
/* [in] */ FunctionTailcall *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionIDMapper)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionIDMapper *pFunc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetTokenAndMetaDataFromFunction)
HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionID functionId,
/* [out] */ IUnknown **ppImport,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleInfo)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )(
ICorProfilerInfo3 * This,
/* [in] */ ModuleID moduleId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ AssemblyID *pAssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleMetaData)
HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )(
ICorProfilerInfo3 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ REFIID riid,
/* [out] */ IUnknown **ppOut);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )(
ICorProfilerInfo3 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ LPCBYTE *ppMethodHeader,
/* [out] */ ULONG *pcbMethodSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBodyAllocator)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )(
ICorProfilerInfo3 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ IMethodMalloc **ppMalloc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )(
ICorProfilerInfo3 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodid,
/* [in] */ LPCBYTE pbNewILMethodHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAppDomainInfo)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )(
ICorProfilerInfo3 * This,
/* [in] */ AppDomainID appDomainId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ ProcessID *pProcessId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAssemblyInfo)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )(
ICorProfilerInfo3 * This,
/* [in] */ AssemblyID assemblyId,
/* [out] */ AppDomainID *pAppDomainId,
/* [out] */ ModuleID *pModuleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionReJIT)
HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, ForceGC)
HRESULT ( STDMETHODCALLTYPE *ForceGC )(
ICorProfilerInfo3 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILInstrumentedCodeMap)
HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ULONG cILMapEntries,
/* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionInterface)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )(
ICorProfilerInfo3 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionIThisThread)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )(
ICorProfilerInfo3 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadContext)
HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
ICorProfilerInfo3 * This,
/* [in] */ ThreadID threadId,
/* [out] */ ContextID *pContextId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, BeginInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )(
ICorProfilerInfo3 * This,
/* [in] */ BOOL fThisThreadOnly,
/* [out] */ DWORD *pdwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, EndInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )(
ICorProfilerInfo3 * This,
/* [in] */ DWORD dwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILToNativeMapping)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, DoStackSnapshot)
HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )(
ICorProfilerInfo3 * This,
/* [in] */ ThreadID thread,
/* [size_is][in] */ BYTE context[ ],
/* [in] */ ULONG32 contextSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, SetEnterLeaveFunctionHooks2)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionEnter2 *pFuncEnter,
/* [in] */ FunctionLeave2 *pFuncLeave,
/* [in] */ FunctionTailcall2 *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionInfo2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionID funcId,
/* [out] */ ULONG32 *pcTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStringLayout)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout )(
ICorProfilerInfo3 * This,
/* [out] */ ULONG *pBufferLengthOffset,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetClassLayout )(
ICorProfilerInfo3 * This,
/* [in] */ ClassID classID,
/* [out] */ ULONG *pcFieldOffset,
/* [out] */ ULONG *pulClassSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassIDInfo2)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )(
ICorProfilerInfo3 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pcNumTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetCodeInfo2)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )(
ICorProfilerInfo3 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ ClassID *pClassID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )(
ICorProfilerInfo3 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ FunctionID *pFunctionID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, EnumModuleFrozenObjects)
HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )(
ICorProfilerInfo3 * This,
/* [in] */ ModuleID moduleID,
/* [out] */ ICorProfilerObjectEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetArrayObjectInfo)
HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )(
ICorProfilerInfo3 * This,
/* [in] */ ObjectID objectId,
/* [size_is][out] */ int pDimensionLowerBounds[ ],
/* [out] */ BYTE **ppData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetBoxClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )(
ICorProfilerInfo3 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadAppDomain)
HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )(
ICorProfilerInfo3 * This,
/* [in] */ ThreadID threadId,
/* [out] */ AppDomainID *pAppDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetRVAStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )(
ICorProfilerInfo3 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetAppDomainStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )(
ICorProfilerInfo3 * This,
/* [in] */ ClassID classId,
/* [in] */ AppDomainID appDomainId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )(
ICorProfilerInfo3 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetContextStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )(
ICorProfilerInfo3 * This,
/* [in] */ ClassID classId,
/* [in] */ ContextID contextId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStaticFieldInfo)
HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )(
ICorProfilerInfo3 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetGenerationBounds)
HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )(
ICorProfilerInfo3 * This,
/* [in] */ ULONG cObjectRanges,
/* [out] */ ULONG *pcObjectRanges,
/* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetObjectGeneration)
HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )(
ICorProfilerInfo3 * This,
/* [in] */ ObjectID objectId,
/* [out] */ COR_PRF_GC_GENERATION_RANGE *range);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetNotifiedExceptionClauseInfo)
HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )(
ICorProfilerInfo3 * This,
/* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumJITedFunctions)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )(
ICorProfilerInfo3 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, RequestProfilerDetach)
HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )(
ICorProfilerInfo3 * This,
/* [in] */ DWORD dwExpectedCompletionMilliseconds);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetFunctionIDMapper2)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionIDMapper2 *pFunc,
/* [in] */ void *clientData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetStringLayout2)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )(
ICorProfilerInfo3 * This,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionEnter3 *pFuncEnter3,
/* [in] */ FunctionLeave3 *pFuncLeave3,
/* [in] */ FunctionTailcall3 *pFuncTailcall3);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3WithInfo)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo,
/* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo,
/* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionEnter3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionID functionId,
/* [out][in] */ ULONG *pcbArgumentInfo,
/* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionLeave3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionID functionId,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo,
/* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionTailcall3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )(
ICorProfilerInfo3 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_ELT_INFO eltInfo,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumModules)
HRESULT ( STDMETHODCALLTYPE *EnumModules )(
ICorProfilerInfo3 * This,
/* [out] */ ICorProfilerModuleEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetRuntimeInformation)
HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )(
ICorProfilerInfo3 * This,
/* [out] */ USHORT *pClrInstanceId,
/* [annotation][out] */
_Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetThreadStaticAddress2)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )(
ICorProfilerInfo3 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetAppDomainsContainingModule)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )(
ICorProfilerInfo3 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ ULONG32 *pcAppDomainIds,
/* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetModuleInfo2)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )(
ICorProfilerInfo3 * This,
/* [in] */ ModuleID moduleId,
#ifdef COBJMACROS
-#define ICorProfilerInfo3_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerInfo3_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerInfo3_AddRef(This) \
+#define ICorProfilerInfo3_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerInfo3_Release(This) \
+#define ICorProfilerInfo3_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerInfo3_GetClassFromObject(This,objectId,pClassId) \
+#define ICorProfilerInfo3_GetClassFromObject(This,objectId,pClassId) \
( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) )
-#define ICorProfilerInfo3_GetClassFromToken(This,moduleId,typeDef,pClassId) \
+#define ICorProfilerInfo3_GetClassFromToken(This,moduleId,typeDef,pClassId) \
( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) )
-#define ICorProfilerInfo3_GetCodeInfo(This,functionId,pStart,pcSize) \
+#define ICorProfilerInfo3_GetCodeInfo(This,functionId,pStart,pcSize) \
( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) )
-#define ICorProfilerInfo3_GetEventMask(This,pdwEvents) \
+#define ICorProfilerInfo3_GetEventMask(This,pdwEvents) \
( (This)->lpVtbl -> GetEventMask(This,pdwEvents) )
-#define ICorProfilerInfo3_GetFunctionFromIP(This,ip,pFunctionId) \
+#define ICorProfilerInfo3_GetFunctionFromIP(This,ip,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) )
-#define ICorProfilerInfo3_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
+#define ICorProfilerInfo3_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) )
-#define ICorProfilerInfo3_GetHandleFromThread(This,threadId,phThread) \
+#define ICorProfilerInfo3_GetHandleFromThread(This,threadId,phThread) \
( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) )
-#define ICorProfilerInfo3_GetObjectSize(This,objectId,pcSize) \
+#define ICorProfilerInfo3_GetObjectSize(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) )
-#define ICorProfilerInfo3_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
+#define ICorProfilerInfo3_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) )
-#define ICorProfilerInfo3_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
+#define ICorProfilerInfo3_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) )
-#define ICorProfilerInfo3_GetCurrentThreadID(This,pThreadId) \
+#define ICorProfilerInfo3_GetCurrentThreadID(This,pThreadId) \
( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) )
-#define ICorProfilerInfo3_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
+#define ICorProfilerInfo3_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) )
-#define ICorProfilerInfo3_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
+#define ICorProfilerInfo3_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) )
-#define ICorProfilerInfo3_SetEventMask(This,dwEvents) \
+#define ICorProfilerInfo3_SetEventMask(This,dwEvents) \
( (This)->lpVtbl -> SetEventMask(This,dwEvents) )
-#define ICorProfilerInfo3_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo3_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo3_SetFunctionIDMapper(This,pFunc) \
+#define ICorProfilerInfo3_SetFunctionIDMapper(This,pFunc) \
( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) )
-#define ICorProfilerInfo3_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
+#define ICorProfilerInfo3_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) )
-#define ICorProfilerInfo3_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
+#define ICorProfilerInfo3_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) )
-#define ICorProfilerInfo3_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
+#define ICorProfilerInfo3_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) )
-#define ICorProfilerInfo3_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
+#define ICorProfilerInfo3_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) )
-#define ICorProfilerInfo3_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
+#define ICorProfilerInfo3_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) )
-#define ICorProfilerInfo3_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
+#define ICorProfilerInfo3_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) )
-#define ICorProfilerInfo3_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
+#define ICorProfilerInfo3_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) )
-#define ICorProfilerInfo3_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
+#define ICorProfilerInfo3_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) )
-#define ICorProfilerInfo3_SetFunctionReJIT(This,functionId) \
+#define ICorProfilerInfo3_SetFunctionReJIT(This,functionId) \
( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) )
-#define ICorProfilerInfo3_ForceGC(This) \
+#define ICorProfilerInfo3_ForceGC(This) \
( (This)->lpVtbl -> ForceGC(This) )
-#define ICorProfilerInfo3_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
+#define ICorProfilerInfo3_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) )
-#define ICorProfilerInfo3_GetInprocInspectionInterface(This,ppicd) \
+#define ICorProfilerInfo3_GetInprocInspectionInterface(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) )
-#define ICorProfilerInfo3_GetInprocInspectionIThisThread(This,ppicd) \
+#define ICorProfilerInfo3_GetInprocInspectionIThisThread(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) )
-#define ICorProfilerInfo3_GetThreadContext(This,threadId,pContextId) \
+#define ICorProfilerInfo3_GetThreadContext(This,threadId,pContextId) \
( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) )
-#define ICorProfilerInfo3_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
+#define ICorProfilerInfo3_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) )
-#define ICorProfilerInfo3_EndInprocDebugging(This,dwProfilerContext) \
+#define ICorProfilerInfo3_EndInprocDebugging(This,dwProfilerContext) \
( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) )
-#define ICorProfilerInfo3_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
+#define ICorProfilerInfo3_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) )
-#define ICorProfilerInfo3_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
+#define ICorProfilerInfo3_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) )
-#define ICorProfilerInfo3_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo3_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo3_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
+#define ICorProfilerInfo3_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) )
-#define ICorProfilerInfo3_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo3_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo3_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
+#define ICorProfilerInfo3_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) )
-#define ICorProfilerInfo3_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
+#define ICorProfilerInfo3_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) )
-#define ICorProfilerInfo3_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo3_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo3_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
+#define ICorProfilerInfo3_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) )
-#define ICorProfilerInfo3_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
+#define ICorProfilerInfo3_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) )
-#define ICorProfilerInfo3_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
+#define ICorProfilerInfo3_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) )
-#define ICorProfilerInfo3_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
+#define ICorProfilerInfo3_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) )
-#define ICorProfilerInfo3_GetBoxClassLayout(This,classId,pBufferOffset) \
+#define ICorProfilerInfo3_GetBoxClassLayout(This,classId,pBufferOffset) \
( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) )
-#define ICorProfilerInfo3_GetThreadAppDomain(This,threadId,pAppDomainId) \
+#define ICorProfilerInfo3_GetThreadAppDomain(This,threadId,pAppDomainId) \
( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) )
-#define ICorProfilerInfo3_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
+#define ICorProfilerInfo3_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) )
-#define ICorProfilerInfo3_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
+#define ICorProfilerInfo3_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) )
-#define ICorProfilerInfo3_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
+#define ICorProfilerInfo3_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) )
-#define ICorProfilerInfo3_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
+#define ICorProfilerInfo3_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) )
-#define ICorProfilerInfo3_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
+#define ICorProfilerInfo3_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) )
-#define ICorProfilerInfo3_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
+#define ICorProfilerInfo3_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) )
-#define ICorProfilerInfo3_GetObjectGeneration(This,objectId,range) \
+#define ICorProfilerInfo3_GetObjectGeneration(This,objectId,range) \
( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) )
-#define ICorProfilerInfo3_GetNotifiedExceptionClauseInfo(This,pinfo) \
+#define ICorProfilerInfo3_GetNotifiedExceptionClauseInfo(This,pinfo) \
( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) )
-#define ICorProfilerInfo3_EnumJITedFunctions(This,ppEnum) \
+#define ICorProfilerInfo3_EnumJITedFunctions(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) )
-#define ICorProfilerInfo3_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
+#define ICorProfilerInfo3_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) )
-#define ICorProfilerInfo3_SetFunctionIDMapper2(This,pFunc,clientData) \
+#define ICorProfilerInfo3_SetFunctionIDMapper2(This,pFunc,clientData) \
( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) )
-#define ICorProfilerInfo3_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo3_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo3_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
+#define ICorProfilerInfo3_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) )
-#define ICorProfilerInfo3_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
+#define ICorProfilerInfo3_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) )
-#define ICorProfilerInfo3_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
+#define ICorProfilerInfo3_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) )
-#define ICorProfilerInfo3_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
+#define ICorProfilerInfo3_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) )
-#define ICorProfilerInfo3_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
+#define ICorProfilerInfo3_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) )
-#define ICorProfilerInfo3_EnumModules(This,ppEnum) \
+#define ICorProfilerInfo3_EnumModules(This,ppEnum) \
( (This)->lpVtbl -> EnumModules(This,ppEnum) )
-#define ICorProfilerInfo3_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
+#define ICorProfilerInfo3_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) )
-#define ICorProfilerInfo3_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
+#define ICorProfilerInfo3_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) )
-#define ICorProfilerInfo3_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
+#define ICorProfilerInfo3_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) )
-#define ICorProfilerInfo3_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
+#define ICorProfilerInfo3_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerInfo3_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerInfo3_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerObjectEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerObjectEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerObjectEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerObjectEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerObjectEnum * This);
+ DECLSPEC_XFGVIRT(ICorProfilerObjectEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorProfilerObjectEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorProfilerObjectEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorProfilerObjectEnum * This);
+ DECLSPEC_XFGVIRT(ICorProfilerObjectEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorProfilerObjectEnum * This,
/* [out] */ ICorProfilerObjectEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerObjectEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorProfilerObjectEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorProfilerObjectEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorProfilerObjectEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorProfilerObjectEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerObjectEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerObjectEnum_AddRef(This) \
+#define ICorProfilerObjectEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerObjectEnum_Release(This) \
+#define ICorProfilerObjectEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerObjectEnum_Skip(This,celt) \
+#define ICorProfilerObjectEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorProfilerObjectEnum_Reset(This) \
+#define ICorProfilerObjectEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorProfilerObjectEnum_Clone(This,ppEnum) \
+#define ICorProfilerObjectEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorProfilerObjectEnum_GetCount(This,pcelt) \
+#define ICorProfilerObjectEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorProfilerObjectEnum_Next(This,celt,objects,pceltFetched) \
+#define ICorProfilerObjectEnum_Next(This,celt,objects,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,objects,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerObjectEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerObjectEnum_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerFunctionEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerFunctionEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerFunctionEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerFunctionEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerFunctionEnum * This);
+ DECLSPEC_XFGVIRT(ICorProfilerFunctionEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorProfilerFunctionEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorProfilerFunctionEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorProfilerFunctionEnum * This);
+ DECLSPEC_XFGVIRT(ICorProfilerFunctionEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorProfilerFunctionEnum * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerFunctionEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorProfilerFunctionEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorProfilerFunctionEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorProfilerFunctionEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorProfilerFunctionEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerFunctionEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerFunctionEnum_AddRef(This) \
+#define ICorProfilerFunctionEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerFunctionEnum_Release(This) \
+#define ICorProfilerFunctionEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerFunctionEnum_Skip(This,celt) \
+#define ICorProfilerFunctionEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorProfilerFunctionEnum_Reset(This) \
+#define ICorProfilerFunctionEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorProfilerFunctionEnum_Clone(This,ppEnum) \
+#define ICorProfilerFunctionEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorProfilerFunctionEnum_GetCount(This,pcelt) \
+#define ICorProfilerFunctionEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorProfilerFunctionEnum_Next(This,celt,ids,pceltFetched) \
+#define ICorProfilerFunctionEnum_Next(This,celt,ids,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,ids,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerFunctionEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerFunctionEnum_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerModuleEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerModuleEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerModuleEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerModuleEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerModuleEnum * This);
+ DECLSPEC_XFGVIRT(ICorProfilerModuleEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorProfilerModuleEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorProfilerModuleEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorProfilerModuleEnum * This);
+ DECLSPEC_XFGVIRT(ICorProfilerModuleEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorProfilerModuleEnum * This,
/* [out] */ ICorProfilerModuleEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerModuleEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorProfilerModuleEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorProfilerModuleEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorProfilerModuleEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorProfilerModuleEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerModuleEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerModuleEnum_AddRef(This) \
+#define ICorProfilerModuleEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerModuleEnum_Release(This) \
+#define ICorProfilerModuleEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerModuleEnum_Skip(This,celt) \
+#define ICorProfilerModuleEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorProfilerModuleEnum_Reset(This) \
+#define ICorProfilerModuleEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorProfilerModuleEnum_Clone(This,ppEnum) \
+#define ICorProfilerModuleEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorProfilerModuleEnum_GetCount(This,pcelt) \
+#define ICorProfilerModuleEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorProfilerModuleEnum_Next(This,celt,ids,pceltFetched) \
+#define ICorProfilerModuleEnum_Next(This,celt,ids,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,ids,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerModuleEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerModuleEnum_INTERFACE_DEFINED__ */
#ifndef __IMethodMalloc_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct IMethodMallocVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
IMethodMalloc * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
IMethodMalloc * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
IMethodMalloc * This);
+ DECLSPEC_XFGVIRT(IMethodMalloc, Alloc)
PVOID ( STDMETHODCALLTYPE *Alloc )(
IMethodMalloc * This,
/* [in] */ ULONG cb);
#ifdef COBJMACROS
-#define IMethodMalloc_QueryInterface(This,riid,ppvObject) \
+#define IMethodMalloc_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define IMethodMalloc_AddRef(This) \
+#define IMethodMalloc_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define IMethodMalloc_Release(This) \
+#define IMethodMalloc_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define IMethodMalloc_Alloc(This,cb) \
+#define IMethodMalloc_Alloc(This,cb) \
( (This)->lpVtbl -> Alloc(This,cb) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __IMethodMalloc_INTERFACE_DEFINED__ */
+#endif /* __IMethodMalloc_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerFunctionControl_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerFunctionControlVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerFunctionControl * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerFunctionControl * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerFunctionControl * This);
+ DECLSPEC_XFGVIRT(ICorProfilerFunctionControl, SetCodegenFlags)
HRESULT ( STDMETHODCALLTYPE *SetCodegenFlags )(
ICorProfilerFunctionControl * This,
/* [in] */ DWORD flags);
+ DECLSPEC_XFGVIRT(ICorProfilerFunctionControl, SetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )(
ICorProfilerFunctionControl * This,
/* [in] */ ULONG cbNewILMethodHeader,
/* [size_is][in] */ LPCBYTE pbNewILMethodHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerFunctionControl, SetILInstrumentedCodeMap)
HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )(
ICorProfilerFunctionControl * This,
/* [in] */ ULONG cILMapEntries,
#ifdef COBJMACROS
-#define ICorProfilerFunctionControl_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerFunctionControl_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerFunctionControl_AddRef(This) \
+#define ICorProfilerFunctionControl_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerFunctionControl_Release(This) \
+#define ICorProfilerFunctionControl_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerFunctionControl_SetCodegenFlags(This,flags) \
+#define ICorProfilerFunctionControl_SetCodegenFlags(This,flags) \
( (This)->lpVtbl -> SetCodegenFlags(This,flags) )
-#define ICorProfilerFunctionControl_SetILFunctionBody(This,cbNewILMethodHeader,pbNewILMethodHeader) \
+#define ICorProfilerFunctionControl_SetILFunctionBody(This,cbNewILMethodHeader,pbNewILMethodHeader) \
( (This)->lpVtbl -> SetILFunctionBody(This,cbNewILMethodHeader,pbNewILMethodHeader) )
-#define ICorProfilerFunctionControl_SetILInstrumentedCodeMap(This,cILMapEntries,rgILMapEntries) \
+#define ICorProfilerFunctionControl_SetILInstrumentedCodeMap(This,cILMapEntries,rgILMapEntries) \
( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,cILMapEntries,rgILMapEntries) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerFunctionControl_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerFunctionControl_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerInfo4_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerInfo4Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerInfo4 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerInfo4 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerInfo4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromObject)
HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )(
ICorProfilerInfo4 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromToken)
HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )(
ICorProfilerInfo4 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdTypeDef typeDef,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCodeInfo)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionID functionId,
/* [out] */ LPCBYTE *pStart,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetEventMask)
HRESULT ( STDMETHODCALLTYPE *GetEventMask )(
ICorProfilerInfo4 * This,
/* [out] */ DWORD *pdwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromIP)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )(
ICorProfilerInfo4 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )(
ICorProfilerInfo4 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdToken token,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetHandleFromThread)
HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )(
ICorProfilerInfo4 * This,
/* [in] */ ThreadID threadId,
/* [out] */ HANDLE *phThread);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetObjectSize)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize )(
ICorProfilerInfo4 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, IsArrayClass)
HRESULT ( STDMETHODCALLTYPE *IsArrayClass )(
ICorProfilerInfo4 * This,
/* [in] */ ClassID classId,
/* [out] */ ClassID *pBaseClassId,
/* [out] */ ULONG *pcRank);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadInfo)
HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )(
ICorProfilerInfo4 * This,
/* [in] */ ThreadID threadId,
/* [out] */ DWORD *pdwWin32ThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCurrentThreadID)
HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )(
ICorProfilerInfo4 * This,
/* [out] */ ThreadID *pThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassIDInfo)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )(
ICorProfilerInfo4 * This,
/* [in] */ ClassID classId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdTypeDef *pTypeDefToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEventMask)
HRESULT ( STDMETHODCALLTYPE *SetEventMask )(
ICorProfilerInfo4 * This,
/* [in] */ DWORD dwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEnterLeaveFunctionHooks)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionEnter *pFuncEnter,
/* [in] */ FunctionLeave *pFuncLeave,
/* [in] */ FunctionTailcall *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionIDMapper)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionIDMapper *pFunc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetTokenAndMetaDataFromFunction)
HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionID functionId,
/* [out] */ IUnknown **ppImport,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleInfo)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )(
ICorProfilerInfo4 * This,
/* [in] */ ModuleID moduleId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ AssemblyID *pAssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleMetaData)
HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )(
ICorProfilerInfo4 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ REFIID riid,
/* [out] */ IUnknown **ppOut);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )(
ICorProfilerInfo4 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ LPCBYTE *ppMethodHeader,
/* [out] */ ULONG *pcbMethodSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBodyAllocator)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )(
ICorProfilerInfo4 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ IMethodMalloc **ppMalloc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )(
ICorProfilerInfo4 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodid,
/* [in] */ LPCBYTE pbNewILMethodHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAppDomainInfo)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )(
ICorProfilerInfo4 * This,
/* [in] */ AppDomainID appDomainId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ ProcessID *pProcessId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAssemblyInfo)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )(
ICorProfilerInfo4 * This,
/* [in] */ AssemblyID assemblyId,
/* [out] */ AppDomainID *pAppDomainId,
/* [out] */ ModuleID *pModuleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionReJIT)
HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, ForceGC)
HRESULT ( STDMETHODCALLTYPE *ForceGC )(
ICorProfilerInfo4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILInstrumentedCodeMap)
HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ULONG cILMapEntries,
/* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionInterface)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )(
ICorProfilerInfo4 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionIThisThread)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )(
ICorProfilerInfo4 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadContext)
HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
ICorProfilerInfo4 * This,
/* [in] */ ThreadID threadId,
/* [out] */ ContextID *pContextId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, BeginInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )(
ICorProfilerInfo4 * This,
/* [in] */ BOOL fThisThreadOnly,
/* [out] */ DWORD *pdwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, EndInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )(
ICorProfilerInfo4 * This,
/* [in] */ DWORD dwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILToNativeMapping)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, DoStackSnapshot)
HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )(
ICorProfilerInfo4 * This,
/* [in] */ ThreadID thread,
/* [size_is][in] */ BYTE context[ ],
/* [in] */ ULONG32 contextSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, SetEnterLeaveFunctionHooks2)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionEnter2 *pFuncEnter,
/* [in] */ FunctionLeave2 *pFuncLeave,
/* [in] */ FunctionTailcall2 *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionInfo2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionID funcId,
/* [out] */ ULONG32 *pcTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStringLayout)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout )(
ICorProfilerInfo4 * This,
/* [out] */ ULONG *pBufferLengthOffset,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetClassLayout )(
ICorProfilerInfo4 * This,
/* [in] */ ClassID classID,
/* [out] */ ULONG *pcFieldOffset,
/* [out] */ ULONG *pulClassSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassIDInfo2)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )(
ICorProfilerInfo4 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pcNumTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetCodeInfo2)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )(
ICorProfilerInfo4 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ ClassID *pClassID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )(
ICorProfilerInfo4 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ FunctionID *pFunctionID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, EnumModuleFrozenObjects)
HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )(
ICorProfilerInfo4 * This,
/* [in] */ ModuleID moduleID,
/* [out] */ ICorProfilerObjectEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetArrayObjectInfo)
HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )(
ICorProfilerInfo4 * This,
/* [in] */ ObjectID objectId,
/* [size_is][out] */ int pDimensionLowerBounds[ ],
/* [out] */ BYTE **ppData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetBoxClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )(
ICorProfilerInfo4 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadAppDomain)
HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )(
ICorProfilerInfo4 * This,
/* [in] */ ThreadID threadId,
/* [out] */ AppDomainID *pAppDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetRVAStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )(
ICorProfilerInfo4 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetAppDomainStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )(
ICorProfilerInfo4 * This,
/* [in] */ ClassID classId,
/* [in] */ AppDomainID appDomainId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )(
ICorProfilerInfo4 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetContextStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )(
ICorProfilerInfo4 * This,
/* [in] */ ClassID classId,
/* [in] */ ContextID contextId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStaticFieldInfo)
HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )(
ICorProfilerInfo4 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetGenerationBounds)
HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )(
ICorProfilerInfo4 * This,
/* [in] */ ULONG cObjectRanges,
/* [out] */ ULONG *pcObjectRanges,
/* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetObjectGeneration)
HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )(
ICorProfilerInfo4 * This,
/* [in] */ ObjectID objectId,
/* [out] */ COR_PRF_GC_GENERATION_RANGE *range);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetNotifiedExceptionClauseInfo)
HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )(
ICorProfilerInfo4 * This,
/* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumJITedFunctions)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )(
ICorProfilerInfo4 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, RequestProfilerDetach)
HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )(
ICorProfilerInfo4 * This,
/* [in] */ DWORD dwExpectedCompletionMilliseconds);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetFunctionIDMapper2)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionIDMapper2 *pFunc,
/* [in] */ void *clientData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetStringLayout2)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )(
ICorProfilerInfo4 * This,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionEnter3 *pFuncEnter3,
/* [in] */ FunctionLeave3 *pFuncLeave3,
/* [in] */ FunctionTailcall3 *pFuncTailcall3);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3WithInfo)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo,
/* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo,
/* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionEnter3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionID functionId,
/* [out][in] */ ULONG *pcbArgumentInfo,
/* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionLeave3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionID functionId,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo,
/* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionTailcall3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_ELT_INFO eltInfo,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumModules)
HRESULT ( STDMETHODCALLTYPE *EnumModules )(
ICorProfilerInfo4 * This,
/* [out] */ ICorProfilerModuleEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetRuntimeInformation)
HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )(
ICorProfilerInfo4 * This,
/* [out] */ USHORT *pClrInstanceId,
/* [annotation][out] */
_Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetThreadStaticAddress2)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )(
ICorProfilerInfo4 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetAppDomainsContainingModule)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )(
ICorProfilerInfo4 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ ULONG32 *pcAppDomainIds,
/* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetModuleInfo2)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )(
ICorProfilerInfo4 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ AssemblyID *pAssemblyId,
/* [out] */ DWORD *pdwModuleFlags);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumThreads)
HRESULT ( STDMETHODCALLTYPE *EnumThreads )(
ICorProfilerInfo4 * This,
/* [out] */ ICorProfilerThreadEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, InitializeCurrentThread)
HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )(
ICorProfilerInfo4 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestReJIT)
HRESULT ( STDMETHODCALLTYPE *RequestReJIT )(
ICorProfilerInfo4 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ ModuleID moduleIds[ ],
/* [size_is][in] */ mdMethodDef methodIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestRevert)
HRESULT ( STDMETHODCALLTYPE *RequestRevert )(
ICorProfilerInfo4 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ mdMethodDef methodIds[ ],
/* [size_is][out] */ HRESULT status[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetCodeInfo3)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetFunctionFromIP2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )(
ICorProfilerInfo4 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId,
/* [out] */ ReJITID *pReJitId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetReJITIDs)
HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG *pcReJitIds,
/* [length_is][size_is][out] */ ReJITID reJitIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetILToNativeMapping2)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )(
ICorProfilerInfo4 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumJITedFunctions2)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )(
ICorProfilerInfo4 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetObjectSize2)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )(
ICorProfilerInfo4 * This,
/* [in] */ ObjectID objectId,
#ifdef COBJMACROS
-#define ICorProfilerInfo4_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerInfo4_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerInfo4_AddRef(This) \
+#define ICorProfilerInfo4_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerInfo4_Release(This) \
+#define ICorProfilerInfo4_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerInfo4_GetClassFromObject(This,objectId,pClassId) \
+#define ICorProfilerInfo4_GetClassFromObject(This,objectId,pClassId) \
( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) )
-#define ICorProfilerInfo4_GetClassFromToken(This,moduleId,typeDef,pClassId) \
+#define ICorProfilerInfo4_GetClassFromToken(This,moduleId,typeDef,pClassId) \
( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) )
-#define ICorProfilerInfo4_GetCodeInfo(This,functionId,pStart,pcSize) \
+#define ICorProfilerInfo4_GetCodeInfo(This,functionId,pStart,pcSize) \
( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) )
-#define ICorProfilerInfo4_GetEventMask(This,pdwEvents) \
+#define ICorProfilerInfo4_GetEventMask(This,pdwEvents) \
( (This)->lpVtbl -> GetEventMask(This,pdwEvents) )
-#define ICorProfilerInfo4_GetFunctionFromIP(This,ip,pFunctionId) \
+#define ICorProfilerInfo4_GetFunctionFromIP(This,ip,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) )
-#define ICorProfilerInfo4_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
+#define ICorProfilerInfo4_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) )
-#define ICorProfilerInfo4_GetHandleFromThread(This,threadId,phThread) \
+#define ICorProfilerInfo4_GetHandleFromThread(This,threadId,phThread) \
( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) )
-#define ICorProfilerInfo4_GetObjectSize(This,objectId,pcSize) \
+#define ICorProfilerInfo4_GetObjectSize(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) )
-#define ICorProfilerInfo4_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
+#define ICorProfilerInfo4_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) )
-#define ICorProfilerInfo4_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
+#define ICorProfilerInfo4_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) )
-#define ICorProfilerInfo4_GetCurrentThreadID(This,pThreadId) \
+#define ICorProfilerInfo4_GetCurrentThreadID(This,pThreadId) \
( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) )
-#define ICorProfilerInfo4_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
+#define ICorProfilerInfo4_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) )
-#define ICorProfilerInfo4_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
+#define ICorProfilerInfo4_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) )
-#define ICorProfilerInfo4_SetEventMask(This,dwEvents) \
+#define ICorProfilerInfo4_SetEventMask(This,dwEvents) \
( (This)->lpVtbl -> SetEventMask(This,dwEvents) )
-#define ICorProfilerInfo4_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo4_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo4_SetFunctionIDMapper(This,pFunc) \
+#define ICorProfilerInfo4_SetFunctionIDMapper(This,pFunc) \
( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) )
-#define ICorProfilerInfo4_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
+#define ICorProfilerInfo4_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) )
-#define ICorProfilerInfo4_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
+#define ICorProfilerInfo4_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) )
-#define ICorProfilerInfo4_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
+#define ICorProfilerInfo4_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) )
-#define ICorProfilerInfo4_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
+#define ICorProfilerInfo4_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) )
-#define ICorProfilerInfo4_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
+#define ICorProfilerInfo4_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) )
-#define ICorProfilerInfo4_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
+#define ICorProfilerInfo4_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) )
-#define ICorProfilerInfo4_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
+#define ICorProfilerInfo4_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) )
-#define ICorProfilerInfo4_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
+#define ICorProfilerInfo4_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) )
-#define ICorProfilerInfo4_SetFunctionReJIT(This,functionId) \
+#define ICorProfilerInfo4_SetFunctionReJIT(This,functionId) \
( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) )
-#define ICorProfilerInfo4_ForceGC(This) \
+#define ICorProfilerInfo4_ForceGC(This) \
( (This)->lpVtbl -> ForceGC(This) )
-#define ICorProfilerInfo4_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
+#define ICorProfilerInfo4_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) )
-#define ICorProfilerInfo4_GetInprocInspectionInterface(This,ppicd) \
+#define ICorProfilerInfo4_GetInprocInspectionInterface(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) )
-#define ICorProfilerInfo4_GetInprocInspectionIThisThread(This,ppicd) \
+#define ICorProfilerInfo4_GetInprocInspectionIThisThread(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) )
-#define ICorProfilerInfo4_GetThreadContext(This,threadId,pContextId) \
+#define ICorProfilerInfo4_GetThreadContext(This,threadId,pContextId) \
( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) )
-#define ICorProfilerInfo4_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
+#define ICorProfilerInfo4_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) )
-#define ICorProfilerInfo4_EndInprocDebugging(This,dwProfilerContext) \
+#define ICorProfilerInfo4_EndInprocDebugging(This,dwProfilerContext) \
( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) )
-#define ICorProfilerInfo4_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
+#define ICorProfilerInfo4_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) )
-#define ICorProfilerInfo4_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
+#define ICorProfilerInfo4_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) )
-#define ICorProfilerInfo4_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo4_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo4_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
+#define ICorProfilerInfo4_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) )
-#define ICorProfilerInfo4_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo4_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo4_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
+#define ICorProfilerInfo4_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) )
-#define ICorProfilerInfo4_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
+#define ICorProfilerInfo4_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) )
-#define ICorProfilerInfo4_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo4_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo4_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
+#define ICorProfilerInfo4_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) )
-#define ICorProfilerInfo4_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
+#define ICorProfilerInfo4_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) )
-#define ICorProfilerInfo4_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
+#define ICorProfilerInfo4_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) )
-#define ICorProfilerInfo4_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
+#define ICorProfilerInfo4_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) )
-#define ICorProfilerInfo4_GetBoxClassLayout(This,classId,pBufferOffset) \
+#define ICorProfilerInfo4_GetBoxClassLayout(This,classId,pBufferOffset) \
( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) )
-#define ICorProfilerInfo4_GetThreadAppDomain(This,threadId,pAppDomainId) \
+#define ICorProfilerInfo4_GetThreadAppDomain(This,threadId,pAppDomainId) \
( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) )
-#define ICorProfilerInfo4_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
+#define ICorProfilerInfo4_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) )
-#define ICorProfilerInfo4_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
+#define ICorProfilerInfo4_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) )
-#define ICorProfilerInfo4_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
+#define ICorProfilerInfo4_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) )
-#define ICorProfilerInfo4_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
+#define ICorProfilerInfo4_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) )
-#define ICorProfilerInfo4_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
+#define ICorProfilerInfo4_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) )
-#define ICorProfilerInfo4_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
+#define ICorProfilerInfo4_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) )
-#define ICorProfilerInfo4_GetObjectGeneration(This,objectId,range) \
+#define ICorProfilerInfo4_GetObjectGeneration(This,objectId,range) \
( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) )
-#define ICorProfilerInfo4_GetNotifiedExceptionClauseInfo(This,pinfo) \
+#define ICorProfilerInfo4_GetNotifiedExceptionClauseInfo(This,pinfo) \
( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) )
-#define ICorProfilerInfo4_EnumJITedFunctions(This,ppEnum) \
+#define ICorProfilerInfo4_EnumJITedFunctions(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) )
-#define ICorProfilerInfo4_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
+#define ICorProfilerInfo4_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) )
-#define ICorProfilerInfo4_SetFunctionIDMapper2(This,pFunc,clientData) \
+#define ICorProfilerInfo4_SetFunctionIDMapper2(This,pFunc,clientData) \
( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) )
-#define ICorProfilerInfo4_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo4_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo4_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
+#define ICorProfilerInfo4_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) )
-#define ICorProfilerInfo4_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
+#define ICorProfilerInfo4_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) )
-#define ICorProfilerInfo4_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
+#define ICorProfilerInfo4_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) )
-#define ICorProfilerInfo4_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
+#define ICorProfilerInfo4_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) )
-#define ICorProfilerInfo4_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
+#define ICorProfilerInfo4_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) )
-#define ICorProfilerInfo4_EnumModules(This,ppEnum) \
+#define ICorProfilerInfo4_EnumModules(This,ppEnum) \
( (This)->lpVtbl -> EnumModules(This,ppEnum) )
-#define ICorProfilerInfo4_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
+#define ICorProfilerInfo4_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) )
-#define ICorProfilerInfo4_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
+#define ICorProfilerInfo4_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) )
-#define ICorProfilerInfo4_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
+#define ICorProfilerInfo4_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) )
-#define ICorProfilerInfo4_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
+#define ICorProfilerInfo4_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) )
-#define ICorProfilerInfo4_EnumThreads(This,ppEnum) \
+#define ICorProfilerInfo4_EnumThreads(This,ppEnum) \
( (This)->lpVtbl -> EnumThreads(This,ppEnum) )
-#define ICorProfilerInfo4_InitializeCurrentThread(This) \
+#define ICorProfilerInfo4_InitializeCurrentThread(This) \
( (This)->lpVtbl -> InitializeCurrentThread(This) )
-#define ICorProfilerInfo4_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
+#define ICorProfilerInfo4_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) )
-#define ICorProfilerInfo4_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
+#define ICorProfilerInfo4_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) )
-#define ICorProfilerInfo4_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo4_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo4_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
+#define ICorProfilerInfo4_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) )
-#define ICorProfilerInfo4_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
+#define ICorProfilerInfo4_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) )
-#define ICorProfilerInfo4_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
+#define ICorProfilerInfo4_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) )
-#define ICorProfilerInfo4_EnumJITedFunctions2(This,ppEnum) \
+#define ICorProfilerInfo4_EnumJITedFunctions2(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) )
-#define ICorProfilerInfo4_GetObjectSize2(This,objectId,pcSize) \
+#define ICorProfilerInfo4_GetObjectSize2(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerInfo4_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerInfo4_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerInfo5_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerInfo5Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerInfo5 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerInfo5 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerInfo5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromObject)
HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )(
ICorProfilerInfo5 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromToken)
HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )(
ICorProfilerInfo5 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdTypeDef typeDef,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCodeInfo)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionID functionId,
/* [out] */ LPCBYTE *pStart,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetEventMask)
HRESULT ( STDMETHODCALLTYPE *GetEventMask )(
ICorProfilerInfo5 * This,
/* [out] */ DWORD *pdwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromIP)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )(
ICorProfilerInfo5 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )(
ICorProfilerInfo5 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdToken token,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetHandleFromThread)
HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )(
ICorProfilerInfo5 * This,
/* [in] */ ThreadID threadId,
/* [out] */ HANDLE *phThread);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetObjectSize)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize )(
ICorProfilerInfo5 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, IsArrayClass)
HRESULT ( STDMETHODCALLTYPE *IsArrayClass )(
ICorProfilerInfo5 * This,
/* [in] */ ClassID classId,
/* [out] */ ClassID *pBaseClassId,
/* [out] */ ULONG *pcRank);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadInfo)
HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )(
ICorProfilerInfo5 * This,
/* [in] */ ThreadID threadId,
/* [out] */ DWORD *pdwWin32ThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCurrentThreadID)
HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )(
ICorProfilerInfo5 * This,
/* [out] */ ThreadID *pThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassIDInfo)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )(
ICorProfilerInfo5 * This,
/* [in] */ ClassID classId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdTypeDef *pTypeDefToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEventMask)
HRESULT ( STDMETHODCALLTYPE *SetEventMask )(
ICorProfilerInfo5 * This,
/* [in] */ DWORD dwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEnterLeaveFunctionHooks)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionEnter *pFuncEnter,
/* [in] */ FunctionLeave *pFuncLeave,
/* [in] */ FunctionTailcall *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionIDMapper)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionIDMapper *pFunc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetTokenAndMetaDataFromFunction)
HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionID functionId,
/* [out] */ IUnknown **ppImport,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleInfo)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )(
ICorProfilerInfo5 * This,
/* [in] */ ModuleID moduleId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ AssemblyID *pAssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleMetaData)
HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )(
ICorProfilerInfo5 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ REFIID riid,
/* [out] */ IUnknown **ppOut);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )(
ICorProfilerInfo5 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ LPCBYTE *ppMethodHeader,
/* [out] */ ULONG *pcbMethodSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBodyAllocator)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )(
ICorProfilerInfo5 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ IMethodMalloc **ppMalloc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )(
ICorProfilerInfo5 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodid,
/* [in] */ LPCBYTE pbNewILMethodHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAppDomainInfo)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )(
ICorProfilerInfo5 * This,
/* [in] */ AppDomainID appDomainId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ ProcessID *pProcessId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAssemblyInfo)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )(
ICorProfilerInfo5 * This,
/* [in] */ AssemblyID assemblyId,
/* [out] */ AppDomainID *pAppDomainId,
/* [out] */ ModuleID *pModuleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionReJIT)
HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, ForceGC)
HRESULT ( STDMETHODCALLTYPE *ForceGC )(
ICorProfilerInfo5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILInstrumentedCodeMap)
HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ULONG cILMapEntries,
/* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionInterface)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )(
ICorProfilerInfo5 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionIThisThread)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )(
ICorProfilerInfo5 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadContext)
HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
ICorProfilerInfo5 * This,
/* [in] */ ThreadID threadId,
/* [out] */ ContextID *pContextId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, BeginInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )(
ICorProfilerInfo5 * This,
/* [in] */ BOOL fThisThreadOnly,
/* [out] */ DWORD *pdwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, EndInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )(
ICorProfilerInfo5 * This,
/* [in] */ DWORD dwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILToNativeMapping)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, DoStackSnapshot)
HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )(
ICorProfilerInfo5 * This,
/* [in] */ ThreadID thread,
/* [size_is][in] */ BYTE context[ ],
/* [in] */ ULONG32 contextSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, SetEnterLeaveFunctionHooks2)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionEnter2 *pFuncEnter,
/* [in] */ FunctionLeave2 *pFuncLeave,
/* [in] */ FunctionTailcall2 *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionInfo2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionID funcId,
/* [out] */ ULONG32 *pcTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStringLayout)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout )(
ICorProfilerInfo5 * This,
/* [out] */ ULONG *pBufferLengthOffset,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetClassLayout )(
ICorProfilerInfo5 * This,
/* [in] */ ClassID classID,
/* [out] */ ULONG *pcFieldOffset,
/* [out] */ ULONG *pulClassSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassIDInfo2)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )(
ICorProfilerInfo5 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pcNumTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetCodeInfo2)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )(
ICorProfilerInfo5 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ ClassID *pClassID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )(
ICorProfilerInfo5 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ FunctionID *pFunctionID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, EnumModuleFrozenObjects)
HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )(
ICorProfilerInfo5 * This,
/* [in] */ ModuleID moduleID,
/* [out] */ ICorProfilerObjectEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetArrayObjectInfo)
HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )(
ICorProfilerInfo5 * This,
/* [in] */ ObjectID objectId,
/* [size_is][out] */ int pDimensionLowerBounds[ ],
/* [out] */ BYTE **ppData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetBoxClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )(
ICorProfilerInfo5 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadAppDomain)
HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )(
ICorProfilerInfo5 * This,
/* [in] */ ThreadID threadId,
/* [out] */ AppDomainID *pAppDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetRVAStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )(
ICorProfilerInfo5 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetAppDomainStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )(
ICorProfilerInfo5 * This,
/* [in] */ ClassID classId,
/* [in] */ AppDomainID appDomainId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )(
ICorProfilerInfo5 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetContextStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )(
ICorProfilerInfo5 * This,
/* [in] */ ClassID classId,
/* [in] */ ContextID contextId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStaticFieldInfo)
HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )(
ICorProfilerInfo5 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetGenerationBounds)
HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )(
ICorProfilerInfo5 * This,
/* [in] */ ULONG cObjectRanges,
/* [out] */ ULONG *pcObjectRanges,
/* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetObjectGeneration)
HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )(
ICorProfilerInfo5 * This,
/* [in] */ ObjectID objectId,
/* [out] */ COR_PRF_GC_GENERATION_RANGE *range);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetNotifiedExceptionClauseInfo)
HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )(
ICorProfilerInfo5 * This,
/* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumJITedFunctions)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )(
ICorProfilerInfo5 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, RequestProfilerDetach)
HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )(
ICorProfilerInfo5 * This,
/* [in] */ DWORD dwExpectedCompletionMilliseconds);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetFunctionIDMapper2)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionIDMapper2 *pFunc,
/* [in] */ void *clientData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetStringLayout2)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )(
ICorProfilerInfo5 * This,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionEnter3 *pFuncEnter3,
/* [in] */ FunctionLeave3 *pFuncLeave3,
/* [in] */ FunctionTailcall3 *pFuncTailcall3);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3WithInfo)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo,
/* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo,
/* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionEnter3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionID functionId,
/* [out][in] */ ULONG *pcbArgumentInfo,
/* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionLeave3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionID functionId,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo,
/* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionTailcall3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_ELT_INFO eltInfo,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumModules)
HRESULT ( STDMETHODCALLTYPE *EnumModules )(
ICorProfilerInfo5 * This,
/* [out] */ ICorProfilerModuleEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetRuntimeInformation)
HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )(
ICorProfilerInfo5 * This,
/* [out] */ USHORT *pClrInstanceId,
/* [annotation][out] */
_Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetThreadStaticAddress2)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )(
ICorProfilerInfo5 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetAppDomainsContainingModule)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )(
ICorProfilerInfo5 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ ULONG32 *pcAppDomainIds,
/* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetModuleInfo2)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )(
ICorProfilerInfo5 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ AssemblyID *pAssemblyId,
/* [out] */ DWORD *pdwModuleFlags);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumThreads)
HRESULT ( STDMETHODCALLTYPE *EnumThreads )(
ICorProfilerInfo5 * This,
/* [out] */ ICorProfilerThreadEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, InitializeCurrentThread)
HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )(
ICorProfilerInfo5 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestReJIT)
HRESULT ( STDMETHODCALLTYPE *RequestReJIT )(
ICorProfilerInfo5 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ ModuleID moduleIds[ ],
/* [size_is][in] */ mdMethodDef methodIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestRevert)
HRESULT ( STDMETHODCALLTYPE *RequestRevert )(
ICorProfilerInfo5 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ mdMethodDef methodIds[ ],
/* [size_is][out] */ HRESULT status[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetCodeInfo3)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetFunctionFromIP2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )(
ICorProfilerInfo5 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId,
/* [out] */ ReJITID *pReJitId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetReJITIDs)
HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG *pcReJitIds,
/* [length_is][size_is][out] */ ReJITID reJitIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetILToNativeMapping2)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )(
ICorProfilerInfo5 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumJITedFunctions2)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )(
ICorProfilerInfo5 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetObjectSize2)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )(
ICorProfilerInfo5 * This,
/* [in] */ ObjectID objectId,
/* [out] */ SIZE_T *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, GetEventMask2)
HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )(
ICorProfilerInfo5 * This,
/* [out] */ DWORD *pdwEventsLow,
/* [out] */ DWORD *pdwEventsHigh);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, SetEventMask2)
HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )(
ICorProfilerInfo5 * This,
/* [in] */ DWORD dwEventsLow,
#ifdef COBJMACROS
-#define ICorProfilerInfo5_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerInfo5_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerInfo5_AddRef(This) \
+#define ICorProfilerInfo5_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerInfo5_Release(This) \
+#define ICorProfilerInfo5_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerInfo5_GetClassFromObject(This,objectId,pClassId) \
+#define ICorProfilerInfo5_GetClassFromObject(This,objectId,pClassId) \
( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) )
-#define ICorProfilerInfo5_GetClassFromToken(This,moduleId,typeDef,pClassId) \
+#define ICorProfilerInfo5_GetClassFromToken(This,moduleId,typeDef,pClassId) \
( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) )
-#define ICorProfilerInfo5_GetCodeInfo(This,functionId,pStart,pcSize) \
+#define ICorProfilerInfo5_GetCodeInfo(This,functionId,pStart,pcSize) \
( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) )
-#define ICorProfilerInfo5_GetEventMask(This,pdwEvents) \
+#define ICorProfilerInfo5_GetEventMask(This,pdwEvents) \
( (This)->lpVtbl -> GetEventMask(This,pdwEvents) )
-#define ICorProfilerInfo5_GetFunctionFromIP(This,ip,pFunctionId) \
+#define ICorProfilerInfo5_GetFunctionFromIP(This,ip,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) )
-#define ICorProfilerInfo5_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
+#define ICorProfilerInfo5_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) )
-#define ICorProfilerInfo5_GetHandleFromThread(This,threadId,phThread) \
+#define ICorProfilerInfo5_GetHandleFromThread(This,threadId,phThread) \
( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) )
-#define ICorProfilerInfo5_GetObjectSize(This,objectId,pcSize) \
+#define ICorProfilerInfo5_GetObjectSize(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) )
-#define ICorProfilerInfo5_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
+#define ICorProfilerInfo5_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) )
-#define ICorProfilerInfo5_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
+#define ICorProfilerInfo5_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) )
-#define ICorProfilerInfo5_GetCurrentThreadID(This,pThreadId) \
+#define ICorProfilerInfo5_GetCurrentThreadID(This,pThreadId) \
( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) )
-#define ICorProfilerInfo5_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
+#define ICorProfilerInfo5_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) )
-#define ICorProfilerInfo5_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
+#define ICorProfilerInfo5_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) )
-#define ICorProfilerInfo5_SetEventMask(This,dwEvents) \
+#define ICorProfilerInfo5_SetEventMask(This,dwEvents) \
( (This)->lpVtbl -> SetEventMask(This,dwEvents) )
-#define ICorProfilerInfo5_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo5_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo5_SetFunctionIDMapper(This,pFunc) \
+#define ICorProfilerInfo5_SetFunctionIDMapper(This,pFunc) \
( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) )
-#define ICorProfilerInfo5_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
+#define ICorProfilerInfo5_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) )
-#define ICorProfilerInfo5_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
+#define ICorProfilerInfo5_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) )
-#define ICorProfilerInfo5_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
+#define ICorProfilerInfo5_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) )
-#define ICorProfilerInfo5_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
+#define ICorProfilerInfo5_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) )
-#define ICorProfilerInfo5_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
+#define ICorProfilerInfo5_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) )
-#define ICorProfilerInfo5_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
+#define ICorProfilerInfo5_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) )
-#define ICorProfilerInfo5_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
+#define ICorProfilerInfo5_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) )
-#define ICorProfilerInfo5_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
+#define ICorProfilerInfo5_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) )
-#define ICorProfilerInfo5_SetFunctionReJIT(This,functionId) \
+#define ICorProfilerInfo5_SetFunctionReJIT(This,functionId) \
( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) )
-#define ICorProfilerInfo5_ForceGC(This) \
+#define ICorProfilerInfo5_ForceGC(This) \
( (This)->lpVtbl -> ForceGC(This) )
-#define ICorProfilerInfo5_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
+#define ICorProfilerInfo5_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) )
-#define ICorProfilerInfo5_GetInprocInspectionInterface(This,ppicd) \
+#define ICorProfilerInfo5_GetInprocInspectionInterface(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) )
-#define ICorProfilerInfo5_GetInprocInspectionIThisThread(This,ppicd) \
+#define ICorProfilerInfo5_GetInprocInspectionIThisThread(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) )
-#define ICorProfilerInfo5_GetThreadContext(This,threadId,pContextId) \
+#define ICorProfilerInfo5_GetThreadContext(This,threadId,pContextId) \
( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) )
-#define ICorProfilerInfo5_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
+#define ICorProfilerInfo5_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) )
-#define ICorProfilerInfo5_EndInprocDebugging(This,dwProfilerContext) \
+#define ICorProfilerInfo5_EndInprocDebugging(This,dwProfilerContext) \
( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) )
-#define ICorProfilerInfo5_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
+#define ICorProfilerInfo5_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) )
-#define ICorProfilerInfo5_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
+#define ICorProfilerInfo5_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) )
-#define ICorProfilerInfo5_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo5_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo5_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
+#define ICorProfilerInfo5_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) )
-#define ICorProfilerInfo5_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo5_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo5_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
+#define ICorProfilerInfo5_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) )
-#define ICorProfilerInfo5_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
+#define ICorProfilerInfo5_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) )
-#define ICorProfilerInfo5_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo5_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo5_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
+#define ICorProfilerInfo5_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) )
-#define ICorProfilerInfo5_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
+#define ICorProfilerInfo5_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) )
-#define ICorProfilerInfo5_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
+#define ICorProfilerInfo5_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) )
-#define ICorProfilerInfo5_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
+#define ICorProfilerInfo5_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) )
-#define ICorProfilerInfo5_GetBoxClassLayout(This,classId,pBufferOffset) \
+#define ICorProfilerInfo5_GetBoxClassLayout(This,classId,pBufferOffset) \
( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) )
-#define ICorProfilerInfo5_GetThreadAppDomain(This,threadId,pAppDomainId) \
+#define ICorProfilerInfo5_GetThreadAppDomain(This,threadId,pAppDomainId) \
( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) )
-#define ICorProfilerInfo5_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
+#define ICorProfilerInfo5_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) )
-#define ICorProfilerInfo5_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
+#define ICorProfilerInfo5_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) )
-#define ICorProfilerInfo5_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
+#define ICorProfilerInfo5_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) )
-#define ICorProfilerInfo5_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
+#define ICorProfilerInfo5_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) )
-#define ICorProfilerInfo5_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
+#define ICorProfilerInfo5_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) )
-#define ICorProfilerInfo5_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
+#define ICorProfilerInfo5_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) )
-#define ICorProfilerInfo5_GetObjectGeneration(This,objectId,range) \
+#define ICorProfilerInfo5_GetObjectGeneration(This,objectId,range) \
( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) )
-#define ICorProfilerInfo5_GetNotifiedExceptionClauseInfo(This,pinfo) \
+#define ICorProfilerInfo5_GetNotifiedExceptionClauseInfo(This,pinfo) \
( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) )
-#define ICorProfilerInfo5_EnumJITedFunctions(This,ppEnum) \
+#define ICorProfilerInfo5_EnumJITedFunctions(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) )
-#define ICorProfilerInfo5_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
+#define ICorProfilerInfo5_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) )
-#define ICorProfilerInfo5_SetFunctionIDMapper2(This,pFunc,clientData) \
+#define ICorProfilerInfo5_SetFunctionIDMapper2(This,pFunc,clientData) \
( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) )
-#define ICorProfilerInfo5_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo5_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo5_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
+#define ICorProfilerInfo5_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) )
-#define ICorProfilerInfo5_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
+#define ICorProfilerInfo5_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) )
-#define ICorProfilerInfo5_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
+#define ICorProfilerInfo5_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) )
-#define ICorProfilerInfo5_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
+#define ICorProfilerInfo5_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) )
-#define ICorProfilerInfo5_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
+#define ICorProfilerInfo5_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) )
-#define ICorProfilerInfo5_EnumModules(This,ppEnum) \
+#define ICorProfilerInfo5_EnumModules(This,ppEnum) \
( (This)->lpVtbl -> EnumModules(This,ppEnum) )
-#define ICorProfilerInfo5_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
+#define ICorProfilerInfo5_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) )
-#define ICorProfilerInfo5_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
+#define ICorProfilerInfo5_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) )
-#define ICorProfilerInfo5_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
+#define ICorProfilerInfo5_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) )
-#define ICorProfilerInfo5_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
+#define ICorProfilerInfo5_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) )
-#define ICorProfilerInfo5_EnumThreads(This,ppEnum) \
+#define ICorProfilerInfo5_EnumThreads(This,ppEnum) \
( (This)->lpVtbl -> EnumThreads(This,ppEnum) )
-#define ICorProfilerInfo5_InitializeCurrentThread(This) \
+#define ICorProfilerInfo5_InitializeCurrentThread(This) \
( (This)->lpVtbl -> InitializeCurrentThread(This) )
-#define ICorProfilerInfo5_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
+#define ICorProfilerInfo5_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) )
-#define ICorProfilerInfo5_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
+#define ICorProfilerInfo5_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) )
-#define ICorProfilerInfo5_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo5_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo5_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
+#define ICorProfilerInfo5_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) )
-#define ICorProfilerInfo5_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
+#define ICorProfilerInfo5_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) )
-#define ICorProfilerInfo5_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
+#define ICorProfilerInfo5_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) )
-#define ICorProfilerInfo5_EnumJITedFunctions2(This,ppEnum) \
+#define ICorProfilerInfo5_EnumJITedFunctions2(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) )
-#define ICorProfilerInfo5_GetObjectSize2(This,objectId,pcSize) \
+#define ICorProfilerInfo5_GetObjectSize2(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) )
-#define ICorProfilerInfo5_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
+#define ICorProfilerInfo5_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) )
-#define ICorProfilerInfo5_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
+#define ICorProfilerInfo5_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerInfo5_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerInfo5_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerInfo6_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerInfo6Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerInfo6 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerInfo6 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerInfo6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromObject)
HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )(
ICorProfilerInfo6 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromToken)
HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )(
ICorProfilerInfo6 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdTypeDef typeDef,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCodeInfo)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionID functionId,
/* [out] */ LPCBYTE *pStart,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetEventMask)
HRESULT ( STDMETHODCALLTYPE *GetEventMask )(
ICorProfilerInfo6 * This,
/* [out] */ DWORD *pdwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromIP)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )(
ICorProfilerInfo6 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )(
ICorProfilerInfo6 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdToken token,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetHandleFromThread)
HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )(
ICorProfilerInfo6 * This,
/* [in] */ ThreadID threadId,
/* [out] */ HANDLE *phThread);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetObjectSize)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize )(
ICorProfilerInfo6 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, IsArrayClass)
HRESULT ( STDMETHODCALLTYPE *IsArrayClass )(
ICorProfilerInfo6 * This,
/* [in] */ ClassID classId,
/* [out] */ ClassID *pBaseClassId,
/* [out] */ ULONG *pcRank);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadInfo)
HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )(
ICorProfilerInfo6 * This,
/* [in] */ ThreadID threadId,
/* [out] */ DWORD *pdwWin32ThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCurrentThreadID)
HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )(
ICorProfilerInfo6 * This,
/* [out] */ ThreadID *pThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassIDInfo)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )(
ICorProfilerInfo6 * This,
/* [in] */ ClassID classId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdTypeDef *pTypeDefToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEventMask)
HRESULT ( STDMETHODCALLTYPE *SetEventMask )(
ICorProfilerInfo6 * This,
/* [in] */ DWORD dwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEnterLeaveFunctionHooks)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionEnter *pFuncEnter,
/* [in] */ FunctionLeave *pFuncLeave,
/* [in] */ FunctionTailcall *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionIDMapper)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionIDMapper *pFunc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetTokenAndMetaDataFromFunction)
HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionID functionId,
/* [out] */ IUnknown **ppImport,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleInfo)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )(
ICorProfilerInfo6 * This,
/* [in] */ ModuleID moduleId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ AssemblyID *pAssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleMetaData)
HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )(
ICorProfilerInfo6 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ REFIID riid,
/* [out] */ IUnknown **ppOut);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )(
ICorProfilerInfo6 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ LPCBYTE *ppMethodHeader,
/* [out] */ ULONG *pcbMethodSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBodyAllocator)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )(
ICorProfilerInfo6 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ IMethodMalloc **ppMalloc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )(
ICorProfilerInfo6 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodid,
/* [in] */ LPCBYTE pbNewILMethodHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAppDomainInfo)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )(
ICorProfilerInfo6 * This,
/* [in] */ AppDomainID appDomainId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ ProcessID *pProcessId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAssemblyInfo)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )(
ICorProfilerInfo6 * This,
/* [in] */ AssemblyID assemblyId,
/* [out] */ AppDomainID *pAppDomainId,
/* [out] */ ModuleID *pModuleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionReJIT)
HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, ForceGC)
HRESULT ( STDMETHODCALLTYPE *ForceGC )(
ICorProfilerInfo6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILInstrumentedCodeMap)
HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ULONG cILMapEntries,
/* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionInterface)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )(
ICorProfilerInfo6 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionIThisThread)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )(
ICorProfilerInfo6 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadContext)
HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
ICorProfilerInfo6 * This,
/* [in] */ ThreadID threadId,
/* [out] */ ContextID *pContextId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, BeginInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )(
ICorProfilerInfo6 * This,
/* [in] */ BOOL fThisThreadOnly,
/* [out] */ DWORD *pdwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, EndInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )(
ICorProfilerInfo6 * This,
/* [in] */ DWORD dwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILToNativeMapping)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, DoStackSnapshot)
HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )(
ICorProfilerInfo6 * This,
/* [in] */ ThreadID thread,
/* [size_is][in] */ BYTE context[ ],
/* [in] */ ULONG32 contextSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, SetEnterLeaveFunctionHooks2)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionEnter2 *pFuncEnter,
/* [in] */ FunctionLeave2 *pFuncLeave,
/* [in] */ FunctionTailcall2 *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionInfo2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionID funcId,
/* [out] */ ULONG32 *pcTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStringLayout)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout )(
ICorProfilerInfo6 * This,
/* [out] */ ULONG *pBufferLengthOffset,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetClassLayout )(
ICorProfilerInfo6 * This,
/* [in] */ ClassID classID,
/* [out] */ ULONG *pcFieldOffset,
/* [out] */ ULONG *pulClassSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassIDInfo2)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )(
ICorProfilerInfo6 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pcNumTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetCodeInfo2)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )(
ICorProfilerInfo6 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ ClassID *pClassID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )(
ICorProfilerInfo6 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ FunctionID *pFunctionID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, EnumModuleFrozenObjects)
HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )(
ICorProfilerInfo6 * This,
/* [in] */ ModuleID moduleID,
/* [out] */ ICorProfilerObjectEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetArrayObjectInfo)
HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )(
ICorProfilerInfo6 * This,
/* [in] */ ObjectID objectId,
/* [size_is][out] */ int pDimensionLowerBounds[ ],
/* [out] */ BYTE **ppData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetBoxClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )(
ICorProfilerInfo6 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadAppDomain)
HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )(
ICorProfilerInfo6 * This,
/* [in] */ ThreadID threadId,
/* [out] */ AppDomainID *pAppDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetRVAStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )(
ICorProfilerInfo6 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetAppDomainStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )(
ICorProfilerInfo6 * This,
/* [in] */ ClassID classId,
/* [in] */ AppDomainID appDomainId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )(
ICorProfilerInfo6 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetContextStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )(
ICorProfilerInfo6 * This,
/* [in] */ ClassID classId,
/* [in] */ ContextID contextId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStaticFieldInfo)
HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )(
ICorProfilerInfo6 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetGenerationBounds)
HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )(
ICorProfilerInfo6 * This,
/* [in] */ ULONG cObjectRanges,
/* [out] */ ULONG *pcObjectRanges,
/* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetObjectGeneration)
HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )(
ICorProfilerInfo6 * This,
/* [in] */ ObjectID objectId,
/* [out] */ COR_PRF_GC_GENERATION_RANGE *range);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetNotifiedExceptionClauseInfo)
HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )(
ICorProfilerInfo6 * This,
/* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumJITedFunctions)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )(
ICorProfilerInfo6 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, RequestProfilerDetach)
HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )(
ICorProfilerInfo6 * This,
/* [in] */ DWORD dwExpectedCompletionMilliseconds);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetFunctionIDMapper2)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionIDMapper2 *pFunc,
/* [in] */ void *clientData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetStringLayout2)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )(
ICorProfilerInfo6 * This,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionEnter3 *pFuncEnter3,
/* [in] */ FunctionLeave3 *pFuncLeave3,
/* [in] */ FunctionTailcall3 *pFuncTailcall3);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3WithInfo)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo,
/* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo,
/* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionEnter3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionID functionId,
/* [out][in] */ ULONG *pcbArgumentInfo,
/* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionLeave3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionID functionId,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo,
/* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionTailcall3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_ELT_INFO eltInfo,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumModules)
HRESULT ( STDMETHODCALLTYPE *EnumModules )(
ICorProfilerInfo6 * This,
/* [out] */ ICorProfilerModuleEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetRuntimeInformation)
HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )(
ICorProfilerInfo6 * This,
/* [out] */ USHORT *pClrInstanceId,
/* [annotation][out] */
_Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetThreadStaticAddress2)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )(
ICorProfilerInfo6 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetAppDomainsContainingModule)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )(
ICorProfilerInfo6 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ ULONG32 *pcAppDomainIds,
/* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetModuleInfo2)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )(
ICorProfilerInfo6 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ AssemblyID *pAssemblyId,
/* [out] */ DWORD *pdwModuleFlags);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumThreads)
HRESULT ( STDMETHODCALLTYPE *EnumThreads )(
ICorProfilerInfo6 * This,
/* [out] */ ICorProfilerThreadEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, InitializeCurrentThread)
HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )(
ICorProfilerInfo6 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestReJIT)
HRESULT ( STDMETHODCALLTYPE *RequestReJIT )(
ICorProfilerInfo6 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ ModuleID moduleIds[ ],
/* [size_is][in] */ mdMethodDef methodIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestRevert)
HRESULT ( STDMETHODCALLTYPE *RequestRevert )(
ICorProfilerInfo6 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ mdMethodDef methodIds[ ],
/* [size_is][out] */ HRESULT status[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetCodeInfo3)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetFunctionFromIP2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )(
ICorProfilerInfo6 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId,
/* [out] */ ReJITID *pReJitId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetReJITIDs)
HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG *pcReJitIds,
/* [length_is][size_is][out] */ ReJITID reJitIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetILToNativeMapping2)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )(
ICorProfilerInfo6 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumJITedFunctions2)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )(
ICorProfilerInfo6 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetObjectSize2)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )(
ICorProfilerInfo6 * This,
/* [in] */ ObjectID objectId,
/* [out] */ SIZE_T *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, GetEventMask2)
HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )(
ICorProfilerInfo6 * This,
/* [out] */ DWORD *pdwEventsLow,
/* [out] */ DWORD *pdwEventsHigh);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, SetEventMask2)
HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )(
ICorProfilerInfo6 * This,
/* [in] */ DWORD dwEventsLow,
/* [in] */ DWORD dwEventsHigh);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo6, EnumNgenModuleMethodsInliningThisMethod)
HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )(
ICorProfilerInfo6 * This,
/* [in] */ ModuleID inlinersModuleId,
#ifdef COBJMACROS
-#define ICorProfilerInfo6_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerInfo6_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerInfo6_AddRef(This) \
+#define ICorProfilerInfo6_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerInfo6_Release(This) \
+#define ICorProfilerInfo6_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerInfo6_GetClassFromObject(This,objectId,pClassId) \
+#define ICorProfilerInfo6_GetClassFromObject(This,objectId,pClassId) \
( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) )
-#define ICorProfilerInfo6_GetClassFromToken(This,moduleId,typeDef,pClassId) \
+#define ICorProfilerInfo6_GetClassFromToken(This,moduleId,typeDef,pClassId) \
( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) )
-#define ICorProfilerInfo6_GetCodeInfo(This,functionId,pStart,pcSize) \
+#define ICorProfilerInfo6_GetCodeInfo(This,functionId,pStart,pcSize) \
( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) )
-#define ICorProfilerInfo6_GetEventMask(This,pdwEvents) \
+#define ICorProfilerInfo6_GetEventMask(This,pdwEvents) \
( (This)->lpVtbl -> GetEventMask(This,pdwEvents) )
-#define ICorProfilerInfo6_GetFunctionFromIP(This,ip,pFunctionId) \
+#define ICorProfilerInfo6_GetFunctionFromIP(This,ip,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) )
-#define ICorProfilerInfo6_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
+#define ICorProfilerInfo6_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) )
-#define ICorProfilerInfo6_GetHandleFromThread(This,threadId,phThread) \
+#define ICorProfilerInfo6_GetHandleFromThread(This,threadId,phThread) \
( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) )
-#define ICorProfilerInfo6_GetObjectSize(This,objectId,pcSize) \
+#define ICorProfilerInfo6_GetObjectSize(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) )
-#define ICorProfilerInfo6_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
+#define ICorProfilerInfo6_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) )
-#define ICorProfilerInfo6_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
+#define ICorProfilerInfo6_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) )
-#define ICorProfilerInfo6_GetCurrentThreadID(This,pThreadId) \
+#define ICorProfilerInfo6_GetCurrentThreadID(This,pThreadId) \
( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) )
-#define ICorProfilerInfo6_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
+#define ICorProfilerInfo6_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) )
-#define ICorProfilerInfo6_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
+#define ICorProfilerInfo6_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) )
-#define ICorProfilerInfo6_SetEventMask(This,dwEvents) \
+#define ICorProfilerInfo6_SetEventMask(This,dwEvents) \
( (This)->lpVtbl -> SetEventMask(This,dwEvents) )
-#define ICorProfilerInfo6_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo6_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo6_SetFunctionIDMapper(This,pFunc) \
+#define ICorProfilerInfo6_SetFunctionIDMapper(This,pFunc) \
( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) )
-#define ICorProfilerInfo6_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
+#define ICorProfilerInfo6_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) )
-#define ICorProfilerInfo6_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
+#define ICorProfilerInfo6_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) )
-#define ICorProfilerInfo6_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
+#define ICorProfilerInfo6_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) )
-#define ICorProfilerInfo6_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
+#define ICorProfilerInfo6_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) )
-#define ICorProfilerInfo6_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
+#define ICorProfilerInfo6_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) )
-#define ICorProfilerInfo6_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
+#define ICorProfilerInfo6_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) )
-#define ICorProfilerInfo6_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
+#define ICorProfilerInfo6_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) )
-#define ICorProfilerInfo6_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
+#define ICorProfilerInfo6_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) )
-#define ICorProfilerInfo6_SetFunctionReJIT(This,functionId) \
+#define ICorProfilerInfo6_SetFunctionReJIT(This,functionId) \
( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) )
-#define ICorProfilerInfo6_ForceGC(This) \
+#define ICorProfilerInfo6_ForceGC(This) \
( (This)->lpVtbl -> ForceGC(This) )
-#define ICorProfilerInfo6_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
+#define ICorProfilerInfo6_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) )
-#define ICorProfilerInfo6_GetInprocInspectionInterface(This,ppicd) \
+#define ICorProfilerInfo6_GetInprocInspectionInterface(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) )
-#define ICorProfilerInfo6_GetInprocInspectionIThisThread(This,ppicd) \
+#define ICorProfilerInfo6_GetInprocInspectionIThisThread(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) )
-#define ICorProfilerInfo6_GetThreadContext(This,threadId,pContextId) \
+#define ICorProfilerInfo6_GetThreadContext(This,threadId,pContextId) \
( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) )
-#define ICorProfilerInfo6_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
+#define ICorProfilerInfo6_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) )
-#define ICorProfilerInfo6_EndInprocDebugging(This,dwProfilerContext) \
+#define ICorProfilerInfo6_EndInprocDebugging(This,dwProfilerContext) \
( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) )
-#define ICorProfilerInfo6_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
+#define ICorProfilerInfo6_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) )
-#define ICorProfilerInfo6_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
+#define ICorProfilerInfo6_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) )
-#define ICorProfilerInfo6_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo6_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo6_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
+#define ICorProfilerInfo6_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) )
-#define ICorProfilerInfo6_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo6_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo6_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
+#define ICorProfilerInfo6_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) )
-#define ICorProfilerInfo6_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
+#define ICorProfilerInfo6_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) )
-#define ICorProfilerInfo6_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo6_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo6_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
+#define ICorProfilerInfo6_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) )
-#define ICorProfilerInfo6_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
+#define ICorProfilerInfo6_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) )
-#define ICorProfilerInfo6_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
+#define ICorProfilerInfo6_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) )
-#define ICorProfilerInfo6_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
+#define ICorProfilerInfo6_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) )
-#define ICorProfilerInfo6_GetBoxClassLayout(This,classId,pBufferOffset) \
+#define ICorProfilerInfo6_GetBoxClassLayout(This,classId,pBufferOffset) \
( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) )
-#define ICorProfilerInfo6_GetThreadAppDomain(This,threadId,pAppDomainId) \
+#define ICorProfilerInfo6_GetThreadAppDomain(This,threadId,pAppDomainId) \
( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) )
-#define ICorProfilerInfo6_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
+#define ICorProfilerInfo6_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) )
-#define ICorProfilerInfo6_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
+#define ICorProfilerInfo6_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) )
-#define ICorProfilerInfo6_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
+#define ICorProfilerInfo6_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) )
-#define ICorProfilerInfo6_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
+#define ICorProfilerInfo6_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) )
-#define ICorProfilerInfo6_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
+#define ICorProfilerInfo6_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) )
-#define ICorProfilerInfo6_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
+#define ICorProfilerInfo6_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) )
-#define ICorProfilerInfo6_GetObjectGeneration(This,objectId,range) \
+#define ICorProfilerInfo6_GetObjectGeneration(This,objectId,range) \
( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) )
-#define ICorProfilerInfo6_GetNotifiedExceptionClauseInfo(This,pinfo) \
+#define ICorProfilerInfo6_GetNotifiedExceptionClauseInfo(This,pinfo) \
( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) )
-#define ICorProfilerInfo6_EnumJITedFunctions(This,ppEnum) \
+#define ICorProfilerInfo6_EnumJITedFunctions(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) )
-#define ICorProfilerInfo6_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
+#define ICorProfilerInfo6_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) )
-#define ICorProfilerInfo6_SetFunctionIDMapper2(This,pFunc,clientData) \
+#define ICorProfilerInfo6_SetFunctionIDMapper2(This,pFunc,clientData) \
( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) )
-#define ICorProfilerInfo6_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo6_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo6_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
+#define ICorProfilerInfo6_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) )
-#define ICorProfilerInfo6_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
+#define ICorProfilerInfo6_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) )
-#define ICorProfilerInfo6_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
+#define ICorProfilerInfo6_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) )
-#define ICorProfilerInfo6_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
+#define ICorProfilerInfo6_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) )
-#define ICorProfilerInfo6_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
+#define ICorProfilerInfo6_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) )
-#define ICorProfilerInfo6_EnumModules(This,ppEnum) \
+#define ICorProfilerInfo6_EnumModules(This,ppEnum) \
( (This)->lpVtbl -> EnumModules(This,ppEnum) )
-#define ICorProfilerInfo6_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
+#define ICorProfilerInfo6_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) )
-#define ICorProfilerInfo6_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
+#define ICorProfilerInfo6_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) )
-#define ICorProfilerInfo6_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
+#define ICorProfilerInfo6_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) )
-#define ICorProfilerInfo6_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
+#define ICorProfilerInfo6_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) )
-#define ICorProfilerInfo6_EnumThreads(This,ppEnum) \
+#define ICorProfilerInfo6_EnumThreads(This,ppEnum) \
( (This)->lpVtbl -> EnumThreads(This,ppEnum) )
-#define ICorProfilerInfo6_InitializeCurrentThread(This) \
+#define ICorProfilerInfo6_InitializeCurrentThread(This) \
( (This)->lpVtbl -> InitializeCurrentThread(This) )
-#define ICorProfilerInfo6_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
+#define ICorProfilerInfo6_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) )
-#define ICorProfilerInfo6_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
+#define ICorProfilerInfo6_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) )
-#define ICorProfilerInfo6_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo6_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo6_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
+#define ICorProfilerInfo6_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) )
-#define ICorProfilerInfo6_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
+#define ICorProfilerInfo6_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) )
-#define ICorProfilerInfo6_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
+#define ICorProfilerInfo6_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) )
-#define ICorProfilerInfo6_EnumJITedFunctions2(This,ppEnum) \
+#define ICorProfilerInfo6_EnumJITedFunctions2(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) )
-#define ICorProfilerInfo6_GetObjectSize2(This,objectId,pcSize) \
+#define ICorProfilerInfo6_GetObjectSize2(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) )
-#define ICorProfilerInfo6_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
+#define ICorProfilerInfo6_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) )
-#define ICorProfilerInfo6_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
+#define ICorProfilerInfo6_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) )
-#define ICorProfilerInfo6_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
+#define ICorProfilerInfo6_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerInfo6_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerInfo6_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerInfo7_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerInfo7Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerInfo7 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerInfo7 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerInfo7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromObject)
HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )(
ICorProfilerInfo7 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromToken)
HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )(
ICorProfilerInfo7 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdTypeDef typeDef,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCodeInfo)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionID functionId,
/* [out] */ LPCBYTE *pStart,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetEventMask)
HRESULT ( STDMETHODCALLTYPE *GetEventMask )(
ICorProfilerInfo7 * This,
/* [out] */ DWORD *pdwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromIP)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )(
ICorProfilerInfo7 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )(
ICorProfilerInfo7 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdToken token,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetHandleFromThread)
HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )(
ICorProfilerInfo7 * This,
/* [in] */ ThreadID threadId,
/* [out] */ HANDLE *phThread);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetObjectSize)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize )(
ICorProfilerInfo7 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, IsArrayClass)
HRESULT ( STDMETHODCALLTYPE *IsArrayClass )(
ICorProfilerInfo7 * This,
/* [in] */ ClassID classId,
/* [out] */ ClassID *pBaseClassId,
/* [out] */ ULONG *pcRank);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadInfo)
HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )(
ICorProfilerInfo7 * This,
/* [in] */ ThreadID threadId,
/* [out] */ DWORD *pdwWin32ThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCurrentThreadID)
HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )(
ICorProfilerInfo7 * This,
/* [out] */ ThreadID *pThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassIDInfo)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )(
ICorProfilerInfo7 * This,
/* [in] */ ClassID classId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdTypeDef *pTypeDefToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEventMask)
HRESULT ( STDMETHODCALLTYPE *SetEventMask )(
ICorProfilerInfo7 * This,
/* [in] */ DWORD dwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEnterLeaveFunctionHooks)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionEnter *pFuncEnter,
/* [in] */ FunctionLeave *pFuncLeave,
/* [in] */ FunctionTailcall *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionIDMapper)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionIDMapper *pFunc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetTokenAndMetaDataFromFunction)
HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionID functionId,
/* [out] */ IUnknown **ppImport,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleInfo)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )(
ICorProfilerInfo7 * This,
/* [in] */ ModuleID moduleId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ AssemblyID *pAssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleMetaData)
HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )(
ICorProfilerInfo7 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ REFIID riid,
/* [out] */ IUnknown **ppOut);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )(
ICorProfilerInfo7 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ LPCBYTE *ppMethodHeader,
/* [out] */ ULONG *pcbMethodSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBodyAllocator)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )(
ICorProfilerInfo7 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ IMethodMalloc **ppMalloc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )(
ICorProfilerInfo7 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodid,
/* [in] */ LPCBYTE pbNewILMethodHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAppDomainInfo)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )(
ICorProfilerInfo7 * This,
/* [in] */ AppDomainID appDomainId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ ProcessID *pProcessId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAssemblyInfo)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )(
ICorProfilerInfo7 * This,
/* [in] */ AssemblyID assemblyId,
/* [out] */ AppDomainID *pAppDomainId,
/* [out] */ ModuleID *pModuleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionReJIT)
HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, ForceGC)
HRESULT ( STDMETHODCALLTYPE *ForceGC )(
ICorProfilerInfo7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILInstrumentedCodeMap)
HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ULONG cILMapEntries,
/* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionInterface)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )(
ICorProfilerInfo7 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionIThisThread)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )(
ICorProfilerInfo7 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadContext)
HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
ICorProfilerInfo7 * This,
/* [in] */ ThreadID threadId,
/* [out] */ ContextID *pContextId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, BeginInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )(
ICorProfilerInfo7 * This,
/* [in] */ BOOL fThisThreadOnly,
/* [out] */ DWORD *pdwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, EndInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )(
ICorProfilerInfo7 * This,
/* [in] */ DWORD dwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILToNativeMapping)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, DoStackSnapshot)
HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )(
ICorProfilerInfo7 * This,
/* [in] */ ThreadID thread,
/* [size_is][in] */ BYTE context[ ],
/* [in] */ ULONG32 contextSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, SetEnterLeaveFunctionHooks2)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionEnter2 *pFuncEnter,
/* [in] */ FunctionLeave2 *pFuncLeave,
/* [in] */ FunctionTailcall2 *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionInfo2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionID funcId,
/* [out] */ ULONG32 *pcTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStringLayout)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout )(
ICorProfilerInfo7 * This,
/* [out] */ ULONG *pBufferLengthOffset,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetClassLayout )(
ICorProfilerInfo7 * This,
/* [in] */ ClassID classID,
/* [out] */ ULONG *pcFieldOffset,
/* [out] */ ULONG *pulClassSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassIDInfo2)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )(
ICorProfilerInfo7 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pcNumTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetCodeInfo2)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )(
ICorProfilerInfo7 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ ClassID *pClassID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )(
ICorProfilerInfo7 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ FunctionID *pFunctionID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, EnumModuleFrozenObjects)
HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )(
ICorProfilerInfo7 * This,
/* [in] */ ModuleID moduleID,
/* [out] */ ICorProfilerObjectEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetArrayObjectInfo)
HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )(
ICorProfilerInfo7 * This,
/* [in] */ ObjectID objectId,
/* [size_is][out] */ int pDimensionLowerBounds[ ],
/* [out] */ BYTE **ppData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetBoxClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )(
ICorProfilerInfo7 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadAppDomain)
HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )(
ICorProfilerInfo7 * This,
/* [in] */ ThreadID threadId,
/* [out] */ AppDomainID *pAppDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetRVAStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )(
ICorProfilerInfo7 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetAppDomainStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )(
ICorProfilerInfo7 * This,
/* [in] */ ClassID classId,
/* [in] */ AppDomainID appDomainId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )(
ICorProfilerInfo7 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetContextStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )(
ICorProfilerInfo7 * This,
/* [in] */ ClassID classId,
/* [in] */ ContextID contextId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStaticFieldInfo)
HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )(
ICorProfilerInfo7 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetGenerationBounds)
HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )(
ICorProfilerInfo7 * This,
/* [in] */ ULONG cObjectRanges,
/* [out] */ ULONG *pcObjectRanges,
/* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetObjectGeneration)
HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )(
ICorProfilerInfo7 * This,
/* [in] */ ObjectID objectId,
/* [out] */ COR_PRF_GC_GENERATION_RANGE *range);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetNotifiedExceptionClauseInfo)
HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )(
ICorProfilerInfo7 * This,
/* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumJITedFunctions)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )(
ICorProfilerInfo7 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, RequestProfilerDetach)
HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )(
ICorProfilerInfo7 * This,
/* [in] */ DWORD dwExpectedCompletionMilliseconds);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetFunctionIDMapper2)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionIDMapper2 *pFunc,
/* [in] */ void *clientData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetStringLayout2)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )(
ICorProfilerInfo7 * This,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionEnter3 *pFuncEnter3,
/* [in] */ FunctionLeave3 *pFuncLeave3,
/* [in] */ FunctionTailcall3 *pFuncTailcall3);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3WithInfo)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo,
/* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo,
/* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionEnter3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionID functionId,
/* [out][in] */ ULONG *pcbArgumentInfo,
/* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionLeave3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionID functionId,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo,
/* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionTailcall3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_ELT_INFO eltInfo,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumModules)
HRESULT ( STDMETHODCALLTYPE *EnumModules )(
ICorProfilerInfo7 * This,
/* [out] */ ICorProfilerModuleEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetRuntimeInformation)
HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )(
ICorProfilerInfo7 * This,
/* [out] */ USHORT *pClrInstanceId,
/* [annotation][out] */
_Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetThreadStaticAddress2)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )(
ICorProfilerInfo7 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetAppDomainsContainingModule)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )(
ICorProfilerInfo7 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ ULONG32 *pcAppDomainIds,
/* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetModuleInfo2)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )(
ICorProfilerInfo7 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ AssemblyID *pAssemblyId,
/* [out] */ DWORD *pdwModuleFlags);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumThreads)
HRESULT ( STDMETHODCALLTYPE *EnumThreads )(
ICorProfilerInfo7 * This,
/* [out] */ ICorProfilerThreadEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, InitializeCurrentThread)
HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )(
ICorProfilerInfo7 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestReJIT)
HRESULT ( STDMETHODCALLTYPE *RequestReJIT )(
ICorProfilerInfo7 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ ModuleID moduleIds[ ],
/* [size_is][in] */ mdMethodDef methodIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestRevert)
HRESULT ( STDMETHODCALLTYPE *RequestRevert )(
ICorProfilerInfo7 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ mdMethodDef methodIds[ ],
/* [size_is][out] */ HRESULT status[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetCodeInfo3)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetFunctionFromIP2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )(
ICorProfilerInfo7 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId,
/* [out] */ ReJITID *pReJitId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetReJITIDs)
HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG *pcReJitIds,
/* [length_is][size_is][out] */ ReJITID reJitIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetILToNativeMapping2)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )(
ICorProfilerInfo7 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumJITedFunctions2)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )(
ICorProfilerInfo7 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetObjectSize2)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )(
ICorProfilerInfo7 * This,
/* [in] */ ObjectID objectId,
/* [out] */ SIZE_T *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, GetEventMask2)
HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )(
ICorProfilerInfo7 * This,
/* [out] */ DWORD *pdwEventsLow,
/* [out] */ DWORD *pdwEventsHigh);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, SetEventMask2)
HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )(
ICorProfilerInfo7 * This,
/* [in] */ DWORD dwEventsLow,
/* [in] */ DWORD dwEventsHigh);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo6, EnumNgenModuleMethodsInliningThisMethod)
HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )(
ICorProfilerInfo7 * This,
/* [in] */ ModuleID inlinersModuleId,
/* [out] */ BOOL *incompleteData,
/* [out] */ ICorProfilerMethodEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ApplyMetaData)
HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )(
ICorProfilerInfo7 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, GetInMemorySymbolsLength)
HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )(
ICorProfilerInfo7 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ DWORD *pCountSymbolBytes);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ReadInMemorySymbols)
HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )(
ICorProfilerInfo7 * This,
/* [in] */ ModuleID moduleId,
#ifdef COBJMACROS
-#define ICorProfilerInfo7_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerInfo7_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerInfo7_AddRef(This) \
+#define ICorProfilerInfo7_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerInfo7_Release(This) \
+#define ICorProfilerInfo7_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerInfo7_GetClassFromObject(This,objectId,pClassId) \
+#define ICorProfilerInfo7_GetClassFromObject(This,objectId,pClassId) \
( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) )
-#define ICorProfilerInfo7_GetClassFromToken(This,moduleId,typeDef,pClassId) \
+#define ICorProfilerInfo7_GetClassFromToken(This,moduleId,typeDef,pClassId) \
( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) )
-#define ICorProfilerInfo7_GetCodeInfo(This,functionId,pStart,pcSize) \
+#define ICorProfilerInfo7_GetCodeInfo(This,functionId,pStart,pcSize) \
( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) )
-#define ICorProfilerInfo7_GetEventMask(This,pdwEvents) \
+#define ICorProfilerInfo7_GetEventMask(This,pdwEvents) \
( (This)->lpVtbl -> GetEventMask(This,pdwEvents) )
-#define ICorProfilerInfo7_GetFunctionFromIP(This,ip,pFunctionId) \
+#define ICorProfilerInfo7_GetFunctionFromIP(This,ip,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) )
-#define ICorProfilerInfo7_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
+#define ICorProfilerInfo7_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) )
-#define ICorProfilerInfo7_GetHandleFromThread(This,threadId,phThread) \
+#define ICorProfilerInfo7_GetHandleFromThread(This,threadId,phThread) \
( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) )
-#define ICorProfilerInfo7_GetObjectSize(This,objectId,pcSize) \
+#define ICorProfilerInfo7_GetObjectSize(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) )
-#define ICorProfilerInfo7_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
+#define ICorProfilerInfo7_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) )
-#define ICorProfilerInfo7_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
+#define ICorProfilerInfo7_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) )
-#define ICorProfilerInfo7_GetCurrentThreadID(This,pThreadId) \
+#define ICorProfilerInfo7_GetCurrentThreadID(This,pThreadId) \
( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) )
-#define ICorProfilerInfo7_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
+#define ICorProfilerInfo7_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) )
-#define ICorProfilerInfo7_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
+#define ICorProfilerInfo7_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) )
-#define ICorProfilerInfo7_SetEventMask(This,dwEvents) \
+#define ICorProfilerInfo7_SetEventMask(This,dwEvents) \
( (This)->lpVtbl -> SetEventMask(This,dwEvents) )
-#define ICorProfilerInfo7_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo7_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo7_SetFunctionIDMapper(This,pFunc) \
+#define ICorProfilerInfo7_SetFunctionIDMapper(This,pFunc) \
( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) )
-#define ICorProfilerInfo7_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
+#define ICorProfilerInfo7_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) )
-#define ICorProfilerInfo7_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
+#define ICorProfilerInfo7_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) )
-#define ICorProfilerInfo7_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
+#define ICorProfilerInfo7_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) )
-#define ICorProfilerInfo7_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
+#define ICorProfilerInfo7_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) )
-#define ICorProfilerInfo7_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
+#define ICorProfilerInfo7_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) )
-#define ICorProfilerInfo7_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
+#define ICorProfilerInfo7_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) )
-#define ICorProfilerInfo7_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
+#define ICorProfilerInfo7_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) )
-#define ICorProfilerInfo7_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
+#define ICorProfilerInfo7_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) )
-#define ICorProfilerInfo7_SetFunctionReJIT(This,functionId) \
+#define ICorProfilerInfo7_SetFunctionReJIT(This,functionId) \
( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) )
-#define ICorProfilerInfo7_ForceGC(This) \
+#define ICorProfilerInfo7_ForceGC(This) \
( (This)->lpVtbl -> ForceGC(This) )
-#define ICorProfilerInfo7_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
+#define ICorProfilerInfo7_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) )
-#define ICorProfilerInfo7_GetInprocInspectionInterface(This,ppicd) \
+#define ICorProfilerInfo7_GetInprocInspectionInterface(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) )
-#define ICorProfilerInfo7_GetInprocInspectionIThisThread(This,ppicd) \
+#define ICorProfilerInfo7_GetInprocInspectionIThisThread(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) )
-#define ICorProfilerInfo7_GetThreadContext(This,threadId,pContextId) \
+#define ICorProfilerInfo7_GetThreadContext(This,threadId,pContextId) \
( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) )
-#define ICorProfilerInfo7_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
+#define ICorProfilerInfo7_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) )
-#define ICorProfilerInfo7_EndInprocDebugging(This,dwProfilerContext) \
+#define ICorProfilerInfo7_EndInprocDebugging(This,dwProfilerContext) \
( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) )
-#define ICorProfilerInfo7_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
+#define ICorProfilerInfo7_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) )
-#define ICorProfilerInfo7_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
+#define ICorProfilerInfo7_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) )
-#define ICorProfilerInfo7_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo7_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo7_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
+#define ICorProfilerInfo7_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) )
-#define ICorProfilerInfo7_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo7_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo7_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
+#define ICorProfilerInfo7_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) )
-#define ICorProfilerInfo7_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
+#define ICorProfilerInfo7_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) )
-#define ICorProfilerInfo7_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo7_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo7_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
+#define ICorProfilerInfo7_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) )
-#define ICorProfilerInfo7_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
+#define ICorProfilerInfo7_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) )
-#define ICorProfilerInfo7_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
+#define ICorProfilerInfo7_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) )
-#define ICorProfilerInfo7_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
+#define ICorProfilerInfo7_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) )
-#define ICorProfilerInfo7_GetBoxClassLayout(This,classId,pBufferOffset) \
+#define ICorProfilerInfo7_GetBoxClassLayout(This,classId,pBufferOffset) \
( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) )
-#define ICorProfilerInfo7_GetThreadAppDomain(This,threadId,pAppDomainId) \
+#define ICorProfilerInfo7_GetThreadAppDomain(This,threadId,pAppDomainId) \
( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) )
-#define ICorProfilerInfo7_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
+#define ICorProfilerInfo7_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) )
-#define ICorProfilerInfo7_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
+#define ICorProfilerInfo7_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) )
-#define ICorProfilerInfo7_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
+#define ICorProfilerInfo7_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) )
-#define ICorProfilerInfo7_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
+#define ICorProfilerInfo7_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) )
-#define ICorProfilerInfo7_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
+#define ICorProfilerInfo7_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) )
-#define ICorProfilerInfo7_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
+#define ICorProfilerInfo7_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) )
-#define ICorProfilerInfo7_GetObjectGeneration(This,objectId,range) \
+#define ICorProfilerInfo7_GetObjectGeneration(This,objectId,range) \
( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) )
-#define ICorProfilerInfo7_GetNotifiedExceptionClauseInfo(This,pinfo) \
+#define ICorProfilerInfo7_GetNotifiedExceptionClauseInfo(This,pinfo) \
( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) )
-#define ICorProfilerInfo7_EnumJITedFunctions(This,ppEnum) \
+#define ICorProfilerInfo7_EnumJITedFunctions(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) )
-#define ICorProfilerInfo7_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
+#define ICorProfilerInfo7_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) )
-#define ICorProfilerInfo7_SetFunctionIDMapper2(This,pFunc,clientData) \
+#define ICorProfilerInfo7_SetFunctionIDMapper2(This,pFunc,clientData) \
( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) )
-#define ICorProfilerInfo7_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo7_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo7_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
+#define ICorProfilerInfo7_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) )
-#define ICorProfilerInfo7_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
+#define ICorProfilerInfo7_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) )
-#define ICorProfilerInfo7_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
+#define ICorProfilerInfo7_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) )
-#define ICorProfilerInfo7_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
+#define ICorProfilerInfo7_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) )
-#define ICorProfilerInfo7_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
+#define ICorProfilerInfo7_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) )
-#define ICorProfilerInfo7_EnumModules(This,ppEnum) \
+#define ICorProfilerInfo7_EnumModules(This,ppEnum) \
( (This)->lpVtbl -> EnumModules(This,ppEnum) )
-#define ICorProfilerInfo7_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
+#define ICorProfilerInfo7_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) )
-#define ICorProfilerInfo7_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
+#define ICorProfilerInfo7_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) )
-#define ICorProfilerInfo7_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
+#define ICorProfilerInfo7_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) )
-#define ICorProfilerInfo7_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
+#define ICorProfilerInfo7_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) )
-#define ICorProfilerInfo7_EnumThreads(This,ppEnum) \
+#define ICorProfilerInfo7_EnumThreads(This,ppEnum) \
( (This)->lpVtbl -> EnumThreads(This,ppEnum) )
-#define ICorProfilerInfo7_InitializeCurrentThread(This) \
+#define ICorProfilerInfo7_InitializeCurrentThread(This) \
( (This)->lpVtbl -> InitializeCurrentThread(This) )
-#define ICorProfilerInfo7_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
+#define ICorProfilerInfo7_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) )
-#define ICorProfilerInfo7_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
+#define ICorProfilerInfo7_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) )
-#define ICorProfilerInfo7_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo7_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo7_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
+#define ICorProfilerInfo7_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) )
-#define ICorProfilerInfo7_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
+#define ICorProfilerInfo7_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) )
-#define ICorProfilerInfo7_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
+#define ICorProfilerInfo7_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) )
-#define ICorProfilerInfo7_EnumJITedFunctions2(This,ppEnum) \
+#define ICorProfilerInfo7_EnumJITedFunctions2(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) )
-#define ICorProfilerInfo7_GetObjectSize2(This,objectId,pcSize) \
+#define ICorProfilerInfo7_GetObjectSize2(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) )
-#define ICorProfilerInfo7_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
+#define ICorProfilerInfo7_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) )
-#define ICorProfilerInfo7_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
+#define ICorProfilerInfo7_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) )
-#define ICorProfilerInfo7_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
+#define ICorProfilerInfo7_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) )
-#define ICorProfilerInfo7_ApplyMetaData(This,moduleId) \
+#define ICorProfilerInfo7_ApplyMetaData(This,moduleId) \
( (This)->lpVtbl -> ApplyMetaData(This,moduleId) )
-#define ICorProfilerInfo7_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \
+#define ICorProfilerInfo7_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \
( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) )
-#define ICorProfilerInfo7_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \
+#define ICorProfilerInfo7_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \
( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerInfo7_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerInfo7_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerInfo8_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerInfo8Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerInfo8 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerInfo8 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerInfo8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromObject)
HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )(
ICorProfilerInfo8 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromToken)
HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )(
ICorProfilerInfo8 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdTypeDef typeDef,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCodeInfo)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionID functionId,
/* [out] */ LPCBYTE *pStart,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetEventMask)
HRESULT ( STDMETHODCALLTYPE *GetEventMask )(
ICorProfilerInfo8 * This,
/* [out] */ DWORD *pdwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromIP)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )(
ICorProfilerInfo8 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )(
ICorProfilerInfo8 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdToken token,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetHandleFromThread)
HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )(
ICorProfilerInfo8 * This,
/* [in] */ ThreadID threadId,
/* [out] */ HANDLE *phThread);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetObjectSize)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize )(
ICorProfilerInfo8 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, IsArrayClass)
HRESULT ( STDMETHODCALLTYPE *IsArrayClass )(
ICorProfilerInfo8 * This,
/* [in] */ ClassID classId,
/* [out] */ ClassID *pBaseClassId,
/* [out] */ ULONG *pcRank);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadInfo)
HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )(
ICorProfilerInfo8 * This,
/* [in] */ ThreadID threadId,
/* [out] */ DWORD *pdwWin32ThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCurrentThreadID)
HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )(
ICorProfilerInfo8 * This,
/* [out] */ ThreadID *pThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassIDInfo)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )(
ICorProfilerInfo8 * This,
/* [in] */ ClassID classId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdTypeDef *pTypeDefToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEventMask)
HRESULT ( STDMETHODCALLTYPE *SetEventMask )(
ICorProfilerInfo8 * This,
/* [in] */ DWORD dwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEnterLeaveFunctionHooks)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionEnter *pFuncEnter,
/* [in] */ FunctionLeave *pFuncLeave,
/* [in] */ FunctionTailcall *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionIDMapper)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionIDMapper *pFunc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetTokenAndMetaDataFromFunction)
HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionID functionId,
/* [out] */ IUnknown **ppImport,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleInfo)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )(
ICorProfilerInfo8 * This,
/* [in] */ ModuleID moduleId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ AssemblyID *pAssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleMetaData)
HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )(
ICorProfilerInfo8 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ REFIID riid,
/* [out] */ IUnknown **ppOut);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )(
ICorProfilerInfo8 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ LPCBYTE *ppMethodHeader,
/* [out] */ ULONG *pcbMethodSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBodyAllocator)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )(
ICorProfilerInfo8 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ IMethodMalloc **ppMalloc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )(
ICorProfilerInfo8 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodid,
/* [in] */ LPCBYTE pbNewILMethodHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAppDomainInfo)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )(
ICorProfilerInfo8 * This,
/* [in] */ AppDomainID appDomainId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ ProcessID *pProcessId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAssemblyInfo)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )(
ICorProfilerInfo8 * This,
/* [in] */ AssemblyID assemblyId,
/* [out] */ AppDomainID *pAppDomainId,
/* [out] */ ModuleID *pModuleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionReJIT)
HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, ForceGC)
HRESULT ( STDMETHODCALLTYPE *ForceGC )(
ICorProfilerInfo8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILInstrumentedCodeMap)
HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ULONG cILMapEntries,
/* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionInterface)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )(
ICorProfilerInfo8 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionIThisThread)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )(
ICorProfilerInfo8 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadContext)
HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
ICorProfilerInfo8 * This,
/* [in] */ ThreadID threadId,
/* [out] */ ContextID *pContextId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, BeginInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )(
ICorProfilerInfo8 * This,
/* [in] */ BOOL fThisThreadOnly,
/* [out] */ DWORD *pdwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, EndInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )(
ICorProfilerInfo8 * This,
/* [in] */ DWORD dwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILToNativeMapping)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, DoStackSnapshot)
HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )(
ICorProfilerInfo8 * This,
/* [in] */ ThreadID thread,
/* [size_is][in] */ BYTE context[ ],
/* [in] */ ULONG32 contextSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, SetEnterLeaveFunctionHooks2)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionEnter2 *pFuncEnter,
/* [in] */ FunctionLeave2 *pFuncLeave,
/* [in] */ FunctionTailcall2 *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionInfo2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionID funcId,
/* [out] */ ULONG32 *pcTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStringLayout)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout )(
ICorProfilerInfo8 * This,
/* [out] */ ULONG *pBufferLengthOffset,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetClassLayout )(
ICorProfilerInfo8 * This,
/* [in] */ ClassID classID,
/* [out] */ ULONG *pcFieldOffset,
/* [out] */ ULONG *pulClassSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassIDInfo2)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )(
ICorProfilerInfo8 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pcNumTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetCodeInfo2)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )(
ICorProfilerInfo8 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ ClassID *pClassID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )(
ICorProfilerInfo8 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ FunctionID *pFunctionID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, EnumModuleFrozenObjects)
HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )(
ICorProfilerInfo8 * This,
/* [in] */ ModuleID moduleID,
/* [out] */ ICorProfilerObjectEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetArrayObjectInfo)
HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )(
ICorProfilerInfo8 * This,
/* [in] */ ObjectID objectId,
/* [size_is][out] */ int pDimensionLowerBounds[ ],
/* [out] */ BYTE **ppData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetBoxClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )(
ICorProfilerInfo8 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadAppDomain)
HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )(
ICorProfilerInfo8 * This,
/* [in] */ ThreadID threadId,
/* [out] */ AppDomainID *pAppDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetRVAStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )(
ICorProfilerInfo8 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetAppDomainStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )(
ICorProfilerInfo8 * This,
/* [in] */ ClassID classId,
/* [in] */ AppDomainID appDomainId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )(
ICorProfilerInfo8 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetContextStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )(
ICorProfilerInfo8 * This,
/* [in] */ ClassID classId,
/* [in] */ ContextID contextId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStaticFieldInfo)
HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )(
ICorProfilerInfo8 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetGenerationBounds)
HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )(
ICorProfilerInfo8 * This,
/* [in] */ ULONG cObjectRanges,
/* [out] */ ULONG *pcObjectRanges,
/* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetObjectGeneration)
HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )(
ICorProfilerInfo8 * This,
/* [in] */ ObjectID objectId,
/* [out] */ COR_PRF_GC_GENERATION_RANGE *range);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetNotifiedExceptionClauseInfo)
HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )(
ICorProfilerInfo8 * This,
/* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumJITedFunctions)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )(
ICorProfilerInfo8 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, RequestProfilerDetach)
HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )(
ICorProfilerInfo8 * This,
/* [in] */ DWORD dwExpectedCompletionMilliseconds);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetFunctionIDMapper2)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionIDMapper2 *pFunc,
/* [in] */ void *clientData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetStringLayout2)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )(
ICorProfilerInfo8 * This,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionEnter3 *pFuncEnter3,
/* [in] */ FunctionLeave3 *pFuncLeave3,
/* [in] */ FunctionTailcall3 *pFuncTailcall3);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3WithInfo)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo,
/* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo,
/* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionEnter3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionID functionId,
/* [out][in] */ ULONG *pcbArgumentInfo,
/* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionLeave3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionID functionId,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo,
/* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionTailcall3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_ELT_INFO eltInfo,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumModules)
HRESULT ( STDMETHODCALLTYPE *EnumModules )(
ICorProfilerInfo8 * This,
/* [out] */ ICorProfilerModuleEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetRuntimeInformation)
HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )(
ICorProfilerInfo8 * This,
/* [out] */ USHORT *pClrInstanceId,
/* [annotation][out] */
_Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetThreadStaticAddress2)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )(
ICorProfilerInfo8 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetAppDomainsContainingModule)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )(
ICorProfilerInfo8 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ ULONG32 *pcAppDomainIds,
/* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetModuleInfo2)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )(
ICorProfilerInfo8 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ AssemblyID *pAssemblyId,
/* [out] */ DWORD *pdwModuleFlags);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumThreads)
HRESULT ( STDMETHODCALLTYPE *EnumThreads )(
ICorProfilerInfo8 * This,
/* [out] */ ICorProfilerThreadEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, InitializeCurrentThread)
HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )(
ICorProfilerInfo8 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestReJIT)
HRESULT ( STDMETHODCALLTYPE *RequestReJIT )(
ICorProfilerInfo8 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ ModuleID moduleIds[ ],
/* [size_is][in] */ mdMethodDef methodIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestRevert)
HRESULT ( STDMETHODCALLTYPE *RequestRevert )(
ICorProfilerInfo8 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ mdMethodDef methodIds[ ],
/* [size_is][out] */ HRESULT status[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetCodeInfo3)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetFunctionFromIP2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )(
ICorProfilerInfo8 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId,
/* [out] */ ReJITID *pReJitId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetReJITIDs)
HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG *pcReJitIds,
/* [length_is][size_is][out] */ ReJITID reJitIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetILToNativeMapping2)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumJITedFunctions2)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )(
ICorProfilerInfo8 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetObjectSize2)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )(
ICorProfilerInfo8 * This,
/* [in] */ ObjectID objectId,
/* [out] */ SIZE_T *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, GetEventMask2)
HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )(
ICorProfilerInfo8 * This,
/* [out] */ DWORD *pdwEventsLow,
/* [out] */ DWORD *pdwEventsHigh);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, SetEventMask2)
HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )(
ICorProfilerInfo8 * This,
/* [in] */ DWORD dwEventsLow,
/* [in] */ DWORD dwEventsHigh);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo6, EnumNgenModuleMethodsInliningThisMethod)
HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )(
ICorProfilerInfo8 * This,
/* [in] */ ModuleID inlinersModuleId,
/* [out] */ BOOL *incompleteData,
/* [out] */ ICorProfilerMethodEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ApplyMetaData)
HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )(
ICorProfilerInfo8 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, GetInMemorySymbolsLength)
HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )(
ICorProfilerInfo8 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ DWORD *pCountSymbolBytes);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ReadInMemorySymbols)
HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )(
ICorProfilerInfo8 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ DWORD countSymbolBytes,
/* [out] */ DWORD *pCountSymbolBytesRead);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, IsFunctionDynamic)
HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionID functionId,
/* [out] */ BOOL *isDynamic);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, GetFunctionFromIP3)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )(
ICorProfilerInfo8 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *functionId,
/* [out] */ ReJITID *pReJitId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, GetDynamicFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )(
ICorProfilerInfo8 * This,
/* [in] */ FunctionID functionId,
#ifdef COBJMACROS
-#define ICorProfilerInfo8_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerInfo8_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerInfo8_AddRef(This) \
+#define ICorProfilerInfo8_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerInfo8_Release(This) \
+#define ICorProfilerInfo8_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerInfo8_GetClassFromObject(This,objectId,pClassId) \
+#define ICorProfilerInfo8_GetClassFromObject(This,objectId,pClassId) \
( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) )
-#define ICorProfilerInfo8_GetClassFromToken(This,moduleId,typeDef,pClassId) \
+#define ICorProfilerInfo8_GetClassFromToken(This,moduleId,typeDef,pClassId) \
( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) )
-#define ICorProfilerInfo8_GetCodeInfo(This,functionId,pStart,pcSize) \
+#define ICorProfilerInfo8_GetCodeInfo(This,functionId,pStart,pcSize) \
( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) )
-#define ICorProfilerInfo8_GetEventMask(This,pdwEvents) \
+#define ICorProfilerInfo8_GetEventMask(This,pdwEvents) \
( (This)->lpVtbl -> GetEventMask(This,pdwEvents) )
-#define ICorProfilerInfo8_GetFunctionFromIP(This,ip,pFunctionId) \
+#define ICorProfilerInfo8_GetFunctionFromIP(This,ip,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) )
-#define ICorProfilerInfo8_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
+#define ICorProfilerInfo8_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) )
-#define ICorProfilerInfo8_GetHandleFromThread(This,threadId,phThread) \
+#define ICorProfilerInfo8_GetHandleFromThread(This,threadId,phThread) \
( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) )
-#define ICorProfilerInfo8_GetObjectSize(This,objectId,pcSize) \
+#define ICorProfilerInfo8_GetObjectSize(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) )
-#define ICorProfilerInfo8_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
+#define ICorProfilerInfo8_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) )
-#define ICorProfilerInfo8_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
+#define ICorProfilerInfo8_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) )
-#define ICorProfilerInfo8_GetCurrentThreadID(This,pThreadId) \
+#define ICorProfilerInfo8_GetCurrentThreadID(This,pThreadId) \
( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) )
-#define ICorProfilerInfo8_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
+#define ICorProfilerInfo8_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) )
-#define ICorProfilerInfo8_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
+#define ICorProfilerInfo8_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) )
-#define ICorProfilerInfo8_SetEventMask(This,dwEvents) \
+#define ICorProfilerInfo8_SetEventMask(This,dwEvents) \
( (This)->lpVtbl -> SetEventMask(This,dwEvents) )
-#define ICorProfilerInfo8_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo8_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo8_SetFunctionIDMapper(This,pFunc) \
+#define ICorProfilerInfo8_SetFunctionIDMapper(This,pFunc) \
( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) )
-#define ICorProfilerInfo8_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
+#define ICorProfilerInfo8_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) )
-#define ICorProfilerInfo8_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
+#define ICorProfilerInfo8_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) )
-#define ICorProfilerInfo8_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
+#define ICorProfilerInfo8_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) )
-#define ICorProfilerInfo8_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
+#define ICorProfilerInfo8_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) )
-#define ICorProfilerInfo8_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
+#define ICorProfilerInfo8_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) )
-#define ICorProfilerInfo8_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
+#define ICorProfilerInfo8_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) )
-#define ICorProfilerInfo8_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
+#define ICorProfilerInfo8_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) )
-#define ICorProfilerInfo8_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
+#define ICorProfilerInfo8_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) )
-#define ICorProfilerInfo8_SetFunctionReJIT(This,functionId) \
+#define ICorProfilerInfo8_SetFunctionReJIT(This,functionId) \
( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) )
-#define ICorProfilerInfo8_ForceGC(This) \
+#define ICorProfilerInfo8_ForceGC(This) \
( (This)->lpVtbl -> ForceGC(This) )
-#define ICorProfilerInfo8_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
+#define ICorProfilerInfo8_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) )
-#define ICorProfilerInfo8_GetInprocInspectionInterface(This,ppicd) \
+#define ICorProfilerInfo8_GetInprocInspectionInterface(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) )
-#define ICorProfilerInfo8_GetInprocInspectionIThisThread(This,ppicd) \
+#define ICorProfilerInfo8_GetInprocInspectionIThisThread(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) )
-#define ICorProfilerInfo8_GetThreadContext(This,threadId,pContextId) \
+#define ICorProfilerInfo8_GetThreadContext(This,threadId,pContextId) \
( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) )
-#define ICorProfilerInfo8_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
+#define ICorProfilerInfo8_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) )
-#define ICorProfilerInfo8_EndInprocDebugging(This,dwProfilerContext) \
+#define ICorProfilerInfo8_EndInprocDebugging(This,dwProfilerContext) \
( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) )
-#define ICorProfilerInfo8_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
+#define ICorProfilerInfo8_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) )
-#define ICorProfilerInfo8_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
+#define ICorProfilerInfo8_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) )
-#define ICorProfilerInfo8_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo8_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo8_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
+#define ICorProfilerInfo8_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) )
-#define ICorProfilerInfo8_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo8_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo8_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
+#define ICorProfilerInfo8_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) )
-#define ICorProfilerInfo8_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
+#define ICorProfilerInfo8_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) )
-#define ICorProfilerInfo8_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo8_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo8_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
+#define ICorProfilerInfo8_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) )
-#define ICorProfilerInfo8_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
+#define ICorProfilerInfo8_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) )
-#define ICorProfilerInfo8_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
+#define ICorProfilerInfo8_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) )
-#define ICorProfilerInfo8_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
+#define ICorProfilerInfo8_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) )
-#define ICorProfilerInfo8_GetBoxClassLayout(This,classId,pBufferOffset) \
+#define ICorProfilerInfo8_GetBoxClassLayout(This,classId,pBufferOffset) \
( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) )
-#define ICorProfilerInfo8_GetThreadAppDomain(This,threadId,pAppDomainId) \
+#define ICorProfilerInfo8_GetThreadAppDomain(This,threadId,pAppDomainId) \
( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) )
-#define ICorProfilerInfo8_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
+#define ICorProfilerInfo8_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) )
-#define ICorProfilerInfo8_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
+#define ICorProfilerInfo8_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) )
-#define ICorProfilerInfo8_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
+#define ICorProfilerInfo8_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) )
-#define ICorProfilerInfo8_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
+#define ICorProfilerInfo8_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) )
-#define ICorProfilerInfo8_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
+#define ICorProfilerInfo8_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) )
-#define ICorProfilerInfo8_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
+#define ICorProfilerInfo8_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) )
-#define ICorProfilerInfo8_GetObjectGeneration(This,objectId,range) \
+#define ICorProfilerInfo8_GetObjectGeneration(This,objectId,range) \
( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) )
-#define ICorProfilerInfo8_GetNotifiedExceptionClauseInfo(This,pinfo) \
+#define ICorProfilerInfo8_GetNotifiedExceptionClauseInfo(This,pinfo) \
( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) )
-#define ICorProfilerInfo8_EnumJITedFunctions(This,ppEnum) \
+#define ICorProfilerInfo8_EnumJITedFunctions(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) )
-#define ICorProfilerInfo8_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
+#define ICorProfilerInfo8_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) )
-#define ICorProfilerInfo8_SetFunctionIDMapper2(This,pFunc,clientData) \
+#define ICorProfilerInfo8_SetFunctionIDMapper2(This,pFunc,clientData) \
( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) )
-#define ICorProfilerInfo8_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo8_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo8_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
+#define ICorProfilerInfo8_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) )
-#define ICorProfilerInfo8_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
+#define ICorProfilerInfo8_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) )
-#define ICorProfilerInfo8_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
+#define ICorProfilerInfo8_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) )
-#define ICorProfilerInfo8_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
+#define ICorProfilerInfo8_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) )
-#define ICorProfilerInfo8_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
+#define ICorProfilerInfo8_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) )
-#define ICorProfilerInfo8_EnumModules(This,ppEnum) \
+#define ICorProfilerInfo8_EnumModules(This,ppEnum) \
( (This)->lpVtbl -> EnumModules(This,ppEnum) )
-#define ICorProfilerInfo8_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
+#define ICorProfilerInfo8_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) )
-#define ICorProfilerInfo8_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
+#define ICorProfilerInfo8_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) )
-#define ICorProfilerInfo8_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
+#define ICorProfilerInfo8_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) )
-#define ICorProfilerInfo8_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
+#define ICorProfilerInfo8_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) )
-#define ICorProfilerInfo8_EnumThreads(This,ppEnum) \
+#define ICorProfilerInfo8_EnumThreads(This,ppEnum) \
( (This)->lpVtbl -> EnumThreads(This,ppEnum) )
-#define ICorProfilerInfo8_InitializeCurrentThread(This) \
+#define ICorProfilerInfo8_InitializeCurrentThread(This) \
( (This)->lpVtbl -> InitializeCurrentThread(This) )
-#define ICorProfilerInfo8_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
+#define ICorProfilerInfo8_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) )
-#define ICorProfilerInfo8_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
+#define ICorProfilerInfo8_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) )
-#define ICorProfilerInfo8_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo8_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo8_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
+#define ICorProfilerInfo8_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) )
-#define ICorProfilerInfo8_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
+#define ICorProfilerInfo8_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) )
-#define ICorProfilerInfo8_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
+#define ICorProfilerInfo8_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) )
-#define ICorProfilerInfo8_EnumJITedFunctions2(This,ppEnum) \
+#define ICorProfilerInfo8_EnumJITedFunctions2(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) )
-#define ICorProfilerInfo8_GetObjectSize2(This,objectId,pcSize) \
+#define ICorProfilerInfo8_GetObjectSize2(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) )
-#define ICorProfilerInfo8_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
+#define ICorProfilerInfo8_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) )
-#define ICorProfilerInfo8_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
+#define ICorProfilerInfo8_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) )
-#define ICorProfilerInfo8_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
+#define ICorProfilerInfo8_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) )
-#define ICorProfilerInfo8_ApplyMetaData(This,moduleId) \
+#define ICorProfilerInfo8_ApplyMetaData(This,moduleId) \
( (This)->lpVtbl -> ApplyMetaData(This,moduleId) )
-#define ICorProfilerInfo8_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \
+#define ICorProfilerInfo8_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \
( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) )
-#define ICorProfilerInfo8_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \
+#define ICorProfilerInfo8_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \
( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) )
-#define ICorProfilerInfo8_IsFunctionDynamic(This,functionId,isDynamic) \
+#define ICorProfilerInfo8_IsFunctionDynamic(This,functionId,isDynamic) \
( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) )
-#define ICorProfilerInfo8_GetFunctionFromIP3(This,ip,functionId,pReJitId) \
+#define ICorProfilerInfo8_GetFunctionFromIP3(This,ip,functionId,pReJitId) \
( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) )
-#define ICorProfilerInfo8_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \
+#define ICorProfilerInfo8_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \
( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerInfo8_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerInfo8_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerInfo9_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerInfo9Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerInfo9 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerInfo9 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerInfo9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromObject)
HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )(
ICorProfilerInfo9 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromToken)
HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )(
ICorProfilerInfo9 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdTypeDef typeDef,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCodeInfo)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionID functionId,
/* [out] */ LPCBYTE *pStart,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetEventMask)
HRESULT ( STDMETHODCALLTYPE *GetEventMask )(
ICorProfilerInfo9 * This,
/* [out] */ DWORD *pdwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromIP)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )(
ICorProfilerInfo9 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )(
ICorProfilerInfo9 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdToken token,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetHandleFromThread)
HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )(
ICorProfilerInfo9 * This,
/* [in] */ ThreadID threadId,
/* [out] */ HANDLE *phThread);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetObjectSize)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize )(
ICorProfilerInfo9 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, IsArrayClass)
HRESULT ( STDMETHODCALLTYPE *IsArrayClass )(
ICorProfilerInfo9 * This,
/* [in] */ ClassID classId,
/* [out] */ ClassID *pBaseClassId,
/* [out] */ ULONG *pcRank);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadInfo)
HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )(
ICorProfilerInfo9 * This,
/* [in] */ ThreadID threadId,
/* [out] */ DWORD *pdwWin32ThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCurrentThreadID)
HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )(
ICorProfilerInfo9 * This,
/* [out] */ ThreadID *pThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassIDInfo)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )(
ICorProfilerInfo9 * This,
/* [in] */ ClassID classId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdTypeDef *pTypeDefToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEventMask)
HRESULT ( STDMETHODCALLTYPE *SetEventMask )(
ICorProfilerInfo9 * This,
/* [in] */ DWORD dwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEnterLeaveFunctionHooks)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionEnter *pFuncEnter,
/* [in] */ FunctionLeave *pFuncLeave,
/* [in] */ FunctionTailcall *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionIDMapper)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionIDMapper *pFunc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetTokenAndMetaDataFromFunction)
HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionID functionId,
/* [out] */ IUnknown **ppImport,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleInfo)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )(
ICorProfilerInfo9 * This,
/* [in] */ ModuleID moduleId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ AssemblyID *pAssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleMetaData)
HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )(
ICorProfilerInfo9 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ REFIID riid,
/* [out] */ IUnknown **ppOut);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )(
ICorProfilerInfo9 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ LPCBYTE *ppMethodHeader,
/* [out] */ ULONG *pcbMethodSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBodyAllocator)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )(
ICorProfilerInfo9 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ IMethodMalloc **ppMalloc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )(
ICorProfilerInfo9 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodid,
/* [in] */ LPCBYTE pbNewILMethodHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAppDomainInfo)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )(
ICorProfilerInfo9 * This,
/* [in] */ AppDomainID appDomainId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ ProcessID *pProcessId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAssemblyInfo)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )(
ICorProfilerInfo9 * This,
/* [in] */ AssemblyID assemblyId,
/* [out] */ AppDomainID *pAppDomainId,
/* [out] */ ModuleID *pModuleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionReJIT)
HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, ForceGC)
HRESULT ( STDMETHODCALLTYPE *ForceGC )(
ICorProfilerInfo9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILInstrumentedCodeMap)
HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ULONG cILMapEntries,
/* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionInterface)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )(
ICorProfilerInfo9 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionIThisThread)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )(
ICorProfilerInfo9 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadContext)
HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
ICorProfilerInfo9 * This,
/* [in] */ ThreadID threadId,
/* [out] */ ContextID *pContextId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, BeginInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )(
ICorProfilerInfo9 * This,
/* [in] */ BOOL fThisThreadOnly,
/* [out] */ DWORD *pdwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, EndInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )(
ICorProfilerInfo9 * This,
/* [in] */ DWORD dwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILToNativeMapping)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, DoStackSnapshot)
HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )(
ICorProfilerInfo9 * This,
/* [in] */ ThreadID thread,
/* [size_is][in] */ BYTE context[ ],
/* [in] */ ULONG32 contextSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, SetEnterLeaveFunctionHooks2)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionEnter2 *pFuncEnter,
/* [in] */ FunctionLeave2 *pFuncLeave,
/* [in] */ FunctionTailcall2 *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionInfo2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionID funcId,
/* [out] */ ULONG32 *pcTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStringLayout)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout )(
ICorProfilerInfo9 * This,
/* [out] */ ULONG *pBufferLengthOffset,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetClassLayout )(
ICorProfilerInfo9 * This,
/* [in] */ ClassID classID,
/* [out] */ ULONG *pcFieldOffset,
/* [out] */ ULONG *pulClassSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassIDInfo2)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )(
ICorProfilerInfo9 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pcNumTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetCodeInfo2)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )(
ICorProfilerInfo9 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ ClassID *pClassID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )(
ICorProfilerInfo9 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ FunctionID *pFunctionID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, EnumModuleFrozenObjects)
HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )(
ICorProfilerInfo9 * This,
/* [in] */ ModuleID moduleID,
/* [out] */ ICorProfilerObjectEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetArrayObjectInfo)
HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )(
ICorProfilerInfo9 * This,
/* [in] */ ObjectID objectId,
/* [size_is][out] */ int pDimensionLowerBounds[ ],
/* [out] */ BYTE **ppData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetBoxClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )(
ICorProfilerInfo9 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadAppDomain)
HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )(
ICorProfilerInfo9 * This,
/* [in] */ ThreadID threadId,
/* [out] */ AppDomainID *pAppDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetRVAStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )(
ICorProfilerInfo9 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetAppDomainStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )(
ICorProfilerInfo9 * This,
/* [in] */ ClassID classId,
/* [in] */ AppDomainID appDomainId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )(
ICorProfilerInfo9 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetContextStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )(
ICorProfilerInfo9 * This,
/* [in] */ ClassID classId,
/* [in] */ ContextID contextId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStaticFieldInfo)
HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )(
ICorProfilerInfo9 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetGenerationBounds)
HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )(
ICorProfilerInfo9 * This,
/* [in] */ ULONG cObjectRanges,
/* [out] */ ULONG *pcObjectRanges,
/* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetObjectGeneration)
HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )(
ICorProfilerInfo9 * This,
/* [in] */ ObjectID objectId,
/* [out] */ COR_PRF_GC_GENERATION_RANGE *range);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetNotifiedExceptionClauseInfo)
HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )(
ICorProfilerInfo9 * This,
/* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumJITedFunctions)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )(
ICorProfilerInfo9 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, RequestProfilerDetach)
HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )(
ICorProfilerInfo9 * This,
/* [in] */ DWORD dwExpectedCompletionMilliseconds);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetFunctionIDMapper2)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionIDMapper2 *pFunc,
/* [in] */ void *clientData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetStringLayout2)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )(
ICorProfilerInfo9 * This,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionEnter3 *pFuncEnter3,
/* [in] */ FunctionLeave3 *pFuncLeave3,
/* [in] */ FunctionTailcall3 *pFuncTailcall3);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3WithInfo)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo,
/* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo,
/* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionEnter3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionID functionId,
/* [out][in] */ ULONG *pcbArgumentInfo,
/* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionLeave3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionID functionId,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo,
/* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionTailcall3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_ELT_INFO eltInfo,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumModules)
HRESULT ( STDMETHODCALLTYPE *EnumModules )(
ICorProfilerInfo9 * This,
/* [out] */ ICorProfilerModuleEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetRuntimeInformation)
HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )(
ICorProfilerInfo9 * This,
/* [out] */ USHORT *pClrInstanceId,
/* [annotation][out] */
_Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetThreadStaticAddress2)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )(
ICorProfilerInfo9 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetAppDomainsContainingModule)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )(
ICorProfilerInfo9 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ ULONG32 *pcAppDomainIds,
/* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetModuleInfo2)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )(
ICorProfilerInfo9 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ AssemblyID *pAssemblyId,
/* [out] */ DWORD *pdwModuleFlags);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumThreads)
HRESULT ( STDMETHODCALLTYPE *EnumThreads )(
ICorProfilerInfo9 * This,
/* [out] */ ICorProfilerThreadEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, InitializeCurrentThread)
HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )(
ICorProfilerInfo9 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestReJIT)
HRESULT ( STDMETHODCALLTYPE *RequestReJIT )(
ICorProfilerInfo9 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ ModuleID moduleIds[ ],
/* [size_is][in] */ mdMethodDef methodIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestRevert)
HRESULT ( STDMETHODCALLTYPE *RequestRevert )(
ICorProfilerInfo9 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ mdMethodDef methodIds[ ],
/* [size_is][out] */ HRESULT status[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetCodeInfo3)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetFunctionFromIP2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )(
ICorProfilerInfo9 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId,
/* [out] */ ReJITID *pReJitId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetReJITIDs)
HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG *pcReJitIds,
/* [length_is][size_is][out] */ ReJITID reJitIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetILToNativeMapping2)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumJITedFunctions2)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )(
ICorProfilerInfo9 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetObjectSize2)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )(
ICorProfilerInfo9 * This,
/* [in] */ ObjectID objectId,
/* [out] */ SIZE_T *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, GetEventMask2)
HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )(
ICorProfilerInfo9 * This,
/* [out] */ DWORD *pdwEventsLow,
/* [out] */ DWORD *pdwEventsHigh);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, SetEventMask2)
HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )(
ICorProfilerInfo9 * This,
/* [in] */ DWORD dwEventsLow,
/* [in] */ DWORD dwEventsHigh);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo6, EnumNgenModuleMethodsInliningThisMethod)
HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )(
ICorProfilerInfo9 * This,
/* [in] */ ModuleID inlinersModuleId,
/* [out] */ BOOL *incompleteData,
/* [out] */ ICorProfilerMethodEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ApplyMetaData)
HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )(
ICorProfilerInfo9 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, GetInMemorySymbolsLength)
HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )(
ICorProfilerInfo9 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ DWORD *pCountSymbolBytes);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ReadInMemorySymbols)
HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )(
ICorProfilerInfo9 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ DWORD countSymbolBytes,
/* [out] */ DWORD *pCountSymbolBytesRead);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, IsFunctionDynamic)
HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionID functionId,
/* [out] */ BOOL *isDynamic);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, GetFunctionFromIP3)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )(
ICorProfilerInfo9 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *functionId,
/* [out] */ ReJITID *pReJitId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, GetDynamicFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )(
ICorProfilerInfo9 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG *pcchName,
/* [out] */ WCHAR wszName[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetNativeCodeStartAddresses)
HRESULT ( STDMETHODCALLTYPE *GetNativeCodeStartAddresses )(
ICorProfilerInfo9 * This,
FunctionID functionID,
ULONG32 *pcCodeStartAddresses,
UINT_PTR codeStartAddresses[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetILToNativeMapping3)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping3 )(
ICorProfilerInfo9 * This,
UINT_PTR pNativeCodeStartAddress,
ULONG32 *pcMap,
COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetCodeInfo4)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo4 )(
ICorProfilerInfo9 * This,
UINT_PTR pNativeCodeStartAddress,
#ifdef COBJMACROS
-#define ICorProfilerInfo9_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerInfo9_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerInfo9_AddRef(This) \
+#define ICorProfilerInfo9_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerInfo9_Release(This) \
+#define ICorProfilerInfo9_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerInfo9_GetClassFromObject(This,objectId,pClassId) \
+#define ICorProfilerInfo9_GetClassFromObject(This,objectId,pClassId) \
( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) )
-#define ICorProfilerInfo9_GetClassFromToken(This,moduleId,typeDef,pClassId) \
+#define ICorProfilerInfo9_GetClassFromToken(This,moduleId,typeDef,pClassId) \
( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) )
-#define ICorProfilerInfo9_GetCodeInfo(This,functionId,pStart,pcSize) \
+#define ICorProfilerInfo9_GetCodeInfo(This,functionId,pStart,pcSize) \
( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) )
-#define ICorProfilerInfo9_GetEventMask(This,pdwEvents) \
+#define ICorProfilerInfo9_GetEventMask(This,pdwEvents) \
( (This)->lpVtbl -> GetEventMask(This,pdwEvents) )
-#define ICorProfilerInfo9_GetFunctionFromIP(This,ip,pFunctionId) \
+#define ICorProfilerInfo9_GetFunctionFromIP(This,ip,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) )
-#define ICorProfilerInfo9_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
+#define ICorProfilerInfo9_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) )
-#define ICorProfilerInfo9_GetHandleFromThread(This,threadId,phThread) \
+#define ICorProfilerInfo9_GetHandleFromThread(This,threadId,phThread) \
( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) )
-#define ICorProfilerInfo9_GetObjectSize(This,objectId,pcSize) \
+#define ICorProfilerInfo9_GetObjectSize(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) )
-#define ICorProfilerInfo9_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
+#define ICorProfilerInfo9_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) )
-#define ICorProfilerInfo9_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
+#define ICorProfilerInfo9_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) )
-#define ICorProfilerInfo9_GetCurrentThreadID(This,pThreadId) \
+#define ICorProfilerInfo9_GetCurrentThreadID(This,pThreadId) \
( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) )
-#define ICorProfilerInfo9_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
+#define ICorProfilerInfo9_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) )
-#define ICorProfilerInfo9_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
+#define ICorProfilerInfo9_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) )
-#define ICorProfilerInfo9_SetEventMask(This,dwEvents) \
+#define ICorProfilerInfo9_SetEventMask(This,dwEvents) \
( (This)->lpVtbl -> SetEventMask(This,dwEvents) )
-#define ICorProfilerInfo9_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo9_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo9_SetFunctionIDMapper(This,pFunc) \
+#define ICorProfilerInfo9_SetFunctionIDMapper(This,pFunc) \
( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) )
-#define ICorProfilerInfo9_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
+#define ICorProfilerInfo9_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) )
-#define ICorProfilerInfo9_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
+#define ICorProfilerInfo9_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) )
-#define ICorProfilerInfo9_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
+#define ICorProfilerInfo9_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) )
-#define ICorProfilerInfo9_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
+#define ICorProfilerInfo9_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) )
-#define ICorProfilerInfo9_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
+#define ICorProfilerInfo9_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) )
-#define ICorProfilerInfo9_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
+#define ICorProfilerInfo9_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) )
-#define ICorProfilerInfo9_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
+#define ICorProfilerInfo9_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) )
-#define ICorProfilerInfo9_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
+#define ICorProfilerInfo9_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) )
-#define ICorProfilerInfo9_SetFunctionReJIT(This,functionId) \
+#define ICorProfilerInfo9_SetFunctionReJIT(This,functionId) \
( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) )
-#define ICorProfilerInfo9_ForceGC(This) \
+#define ICorProfilerInfo9_ForceGC(This) \
( (This)->lpVtbl -> ForceGC(This) )
-#define ICorProfilerInfo9_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
+#define ICorProfilerInfo9_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) )
-#define ICorProfilerInfo9_GetInprocInspectionInterface(This,ppicd) \
+#define ICorProfilerInfo9_GetInprocInspectionInterface(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) )
-#define ICorProfilerInfo9_GetInprocInspectionIThisThread(This,ppicd) \
+#define ICorProfilerInfo9_GetInprocInspectionIThisThread(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) )
-#define ICorProfilerInfo9_GetThreadContext(This,threadId,pContextId) \
+#define ICorProfilerInfo9_GetThreadContext(This,threadId,pContextId) \
( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) )
-#define ICorProfilerInfo9_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
+#define ICorProfilerInfo9_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) )
-#define ICorProfilerInfo9_EndInprocDebugging(This,dwProfilerContext) \
+#define ICorProfilerInfo9_EndInprocDebugging(This,dwProfilerContext) \
( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) )
-#define ICorProfilerInfo9_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
+#define ICorProfilerInfo9_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) )
-#define ICorProfilerInfo9_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
+#define ICorProfilerInfo9_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) )
-#define ICorProfilerInfo9_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo9_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo9_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
+#define ICorProfilerInfo9_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) )
-#define ICorProfilerInfo9_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo9_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo9_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
+#define ICorProfilerInfo9_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) )
-#define ICorProfilerInfo9_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
+#define ICorProfilerInfo9_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) )
-#define ICorProfilerInfo9_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo9_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo9_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
+#define ICorProfilerInfo9_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) )
-#define ICorProfilerInfo9_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
+#define ICorProfilerInfo9_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) )
-#define ICorProfilerInfo9_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
+#define ICorProfilerInfo9_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) )
-#define ICorProfilerInfo9_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
+#define ICorProfilerInfo9_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) )
-#define ICorProfilerInfo9_GetBoxClassLayout(This,classId,pBufferOffset) \
+#define ICorProfilerInfo9_GetBoxClassLayout(This,classId,pBufferOffset) \
( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) )
-#define ICorProfilerInfo9_GetThreadAppDomain(This,threadId,pAppDomainId) \
+#define ICorProfilerInfo9_GetThreadAppDomain(This,threadId,pAppDomainId) \
( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) )
-#define ICorProfilerInfo9_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
+#define ICorProfilerInfo9_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) )
-#define ICorProfilerInfo9_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
+#define ICorProfilerInfo9_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) )
-#define ICorProfilerInfo9_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
+#define ICorProfilerInfo9_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) )
-#define ICorProfilerInfo9_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
+#define ICorProfilerInfo9_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) )
-#define ICorProfilerInfo9_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
+#define ICorProfilerInfo9_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) )
-#define ICorProfilerInfo9_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
+#define ICorProfilerInfo9_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) )
-#define ICorProfilerInfo9_GetObjectGeneration(This,objectId,range) \
+#define ICorProfilerInfo9_GetObjectGeneration(This,objectId,range) \
( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) )
-#define ICorProfilerInfo9_GetNotifiedExceptionClauseInfo(This,pinfo) \
+#define ICorProfilerInfo9_GetNotifiedExceptionClauseInfo(This,pinfo) \
( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) )
-#define ICorProfilerInfo9_EnumJITedFunctions(This,ppEnum) \
+#define ICorProfilerInfo9_EnumJITedFunctions(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) )
-#define ICorProfilerInfo9_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
+#define ICorProfilerInfo9_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) )
-#define ICorProfilerInfo9_SetFunctionIDMapper2(This,pFunc,clientData) \
+#define ICorProfilerInfo9_SetFunctionIDMapper2(This,pFunc,clientData) \
( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) )
-#define ICorProfilerInfo9_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo9_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo9_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
+#define ICorProfilerInfo9_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) )
-#define ICorProfilerInfo9_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
+#define ICorProfilerInfo9_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) )
-#define ICorProfilerInfo9_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
+#define ICorProfilerInfo9_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) )
-#define ICorProfilerInfo9_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
+#define ICorProfilerInfo9_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) )
-#define ICorProfilerInfo9_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
+#define ICorProfilerInfo9_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) )
-#define ICorProfilerInfo9_EnumModules(This,ppEnum) \
+#define ICorProfilerInfo9_EnumModules(This,ppEnum) \
( (This)->lpVtbl -> EnumModules(This,ppEnum) )
-#define ICorProfilerInfo9_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
+#define ICorProfilerInfo9_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) )
-#define ICorProfilerInfo9_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
+#define ICorProfilerInfo9_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) )
-#define ICorProfilerInfo9_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
+#define ICorProfilerInfo9_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) )
-#define ICorProfilerInfo9_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
+#define ICorProfilerInfo9_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) )
-#define ICorProfilerInfo9_EnumThreads(This,ppEnum) \
+#define ICorProfilerInfo9_EnumThreads(This,ppEnum) \
( (This)->lpVtbl -> EnumThreads(This,ppEnum) )
-#define ICorProfilerInfo9_InitializeCurrentThread(This) \
+#define ICorProfilerInfo9_InitializeCurrentThread(This) \
( (This)->lpVtbl -> InitializeCurrentThread(This) )
-#define ICorProfilerInfo9_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
+#define ICorProfilerInfo9_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) )
-#define ICorProfilerInfo9_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
+#define ICorProfilerInfo9_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) )
-#define ICorProfilerInfo9_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo9_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo9_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
+#define ICorProfilerInfo9_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) )
-#define ICorProfilerInfo9_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
+#define ICorProfilerInfo9_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) )
-#define ICorProfilerInfo9_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
+#define ICorProfilerInfo9_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) )
-#define ICorProfilerInfo9_EnumJITedFunctions2(This,ppEnum) \
+#define ICorProfilerInfo9_EnumJITedFunctions2(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) )
-#define ICorProfilerInfo9_GetObjectSize2(This,objectId,pcSize) \
+#define ICorProfilerInfo9_GetObjectSize2(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) )
-#define ICorProfilerInfo9_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
+#define ICorProfilerInfo9_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) )
-#define ICorProfilerInfo9_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
+#define ICorProfilerInfo9_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) )
-#define ICorProfilerInfo9_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
+#define ICorProfilerInfo9_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) )
-#define ICorProfilerInfo9_ApplyMetaData(This,moduleId) \
+#define ICorProfilerInfo9_ApplyMetaData(This,moduleId) \
( (This)->lpVtbl -> ApplyMetaData(This,moduleId) )
-#define ICorProfilerInfo9_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \
+#define ICorProfilerInfo9_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \
( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) )
-#define ICorProfilerInfo9_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \
+#define ICorProfilerInfo9_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \
( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) )
-#define ICorProfilerInfo9_IsFunctionDynamic(This,functionId,isDynamic) \
+#define ICorProfilerInfo9_IsFunctionDynamic(This,functionId,isDynamic) \
( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) )
-#define ICorProfilerInfo9_GetFunctionFromIP3(This,ip,functionId,pReJitId) \
+#define ICorProfilerInfo9_GetFunctionFromIP3(This,ip,functionId,pReJitId) \
( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) )
-#define ICorProfilerInfo9_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \
+#define ICorProfilerInfo9_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \
( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) )
-#define ICorProfilerInfo9_GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) \
+#define ICorProfilerInfo9_GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) \
( (This)->lpVtbl -> GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) )
-#define ICorProfilerInfo9_GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) \
+#define ICorProfilerInfo9_GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) )
-#define ICorProfilerInfo9_GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo9_GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerInfo9_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerInfo9_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerInfo10_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerInfo10Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerInfo10 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerInfo10 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerInfo10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromObject)
HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )(
ICorProfilerInfo10 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromToken)
HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )(
ICorProfilerInfo10 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdTypeDef typeDef,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCodeInfo)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionID functionId,
/* [out] */ LPCBYTE *pStart,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetEventMask)
HRESULT ( STDMETHODCALLTYPE *GetEventMask )(
ICorProfilerInfo10 * This,
/* [out] */ DWORD *pdwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromIP)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )(
ICorProfilerInfo10 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )(
ICorProfilerInfo10 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdToken token,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetHandleFromThread)
HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )(
ICorProfilerInfo10 * This,
/* [in] */ ThreadID threadId,
/* [out] */ HANDLE *phThread);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetObjectSize)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize )(
ICorProfilerInfo10 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, IsArrayClass)
HRESULT ( STDMETHODCALLTYPE *IsArrayClass )(
ICorProfilerInfo10 * This,
/* [in] */ ClassID classId,
/* [out] */ ClassID *pBaseClassId,
/* [out] */ ULONG *pcRank);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadInfo)
HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )(
ICorProfilerInfo10 * This,
/* [in] */ ThreadID threadId,
/* [out] */ DWORD *pdwWin32ThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCurrentThreadID)
HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )(
ICorProfilerInfo10 * This,
/* [out] */ ThreadID *pThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassIDInfo)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )(
ICorProfilerInfo10 * This,
/* [in] */ ClassID classId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdTypeDef *pTypeDefToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEventMask)
HRESULT ( STDMETHODCALLTYPE *SetEventMask )(
ICorProfilerInfo10 * This,
/* [in] */ DWORD dwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEnterLeaveFunctionHooks)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionEnter *pFuncEnter,
/* [in] */ FunctionLeave *pFuncLeave,
/* [in] */ FunctionTailcall *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionIDMapper)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionIDMapper *pFunc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetTokenAndMetaDataFromFunction)
HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionID functionId,
/* [out] */ IUnknown **ppImport,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleInfo)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )(
ICorProfilerInfo10 * This,
/* [in] */ ModuleID moduleId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ AssemblyID *pAssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleMetaData)
HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )(
ICorProfilerInfo10 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ REFIID riid,
/* [out] */ IUnknown **ppOut);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )(
ICorProfilerInfo10 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ LPCBYTE *ppMethodHeader,
/* [out] */ ULONG *pcbMethodSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBodyAllocator)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )(
ICorProfilerInfo10 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ IMethodMalloc **ppMalloc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )(
ICorProfilerInfo10 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodid,
/* [in] */ LPCBYTE pbNewILMethodHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAppDomainInfo)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )(
ICorProfilerInfo10 * This,
/* [in] */ AppDomainID appDomainId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ ProcessID *pProcessId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAssemblyInfo)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )(
ICorProfilerInfo10 * This,
/* [in] */ AssemblyID assemblyId,
/* [out] */ AppDomainID *pAppDomainId,
/* [out] */ ModuleID *pModuleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionReJIT)
HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, ForceGC)
HRESULT ( STDMETHODCALLTYPE *ForceGC )(
ICorProfilerInfo10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILInstrumentedCodeMap)
HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ULONG cILMapEntries,
/* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionInterface)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )(
ICorProfilerInfo10 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionIThisThread)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )(
ICorProfilerInfo10 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadContext)
HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
ICorProfilerInfo10 * This,
/* [in] */ ThreadID threadId,
/* [out] */ ContextID *pContextId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, BeginInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )(
ICorProfilerInfo10 * This,
/* [in] */ BOOL fThisThreadOnly,
/* [out] */ DWORD *pdwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, EndInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )(
ICorProfilerInfo10 * This,
/* [in] */ DWORD dwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILToNativeMapping)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, DoStackSnapshot)
HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )(
ICorProfilerInfo10 * This,
/* [in] */ ThreadID thread,
/* [size_is][in] */ BYTE context[ ],
/* [in] */ ULONG32 contextSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, SetEnterLeaveFunctionHooks2)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionEnter2 *pFuncEnter,
/* [in] */ FunctionLeave2 *pFuncLeave,
/* [in] */ FunctionTailcall2 *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionInfo2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionID funcId,
/* [out] */ ULONG32 *pcTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStringLayout)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout )(
ICorProfilerInfo10 * This,
/* [out] */ ULONG *pBufferLengthOffset,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetClassLayout )(
ICorProfilerInfo10 * This,
/* [in] */ ClassID classID,
/* [out] */ ULONG *pcFieldOffset,
/* [out] */ ULONG *pulClassSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassIDInfo2)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )(
ICorProfilerInfo10 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pcNumTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetCodeInfo2)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )(
ICorProfilerInfo10 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ ClassID *pClassID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )(
ICorProfilerInfo10 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ FunctionID *pFunctionID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, EnumModuleFrozenObjects)
HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )(
ICorProfilerInfo10 * This,
/* [in] */ ModuleID moduleID,
/* [out] */ ICorProfilerObjectEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetArrayObjectInfo)
HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )(
ICorProfilerInfo10 * This,
/* [in] */ ObjectID objectId,
/* [size_is][out] */ int pDimensionLowerBounds[ ],
/* [out] */ BYTE **ppData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetBoxClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )(
ICorProfilerInfo10 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadAppDomain)
HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )(
ICorProfilerInfo10 * This,
/* [in] */ ThreadID threadId,
/* [out] */ AppDomainID *pAppDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetRVAStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )(
ICorProfilerInfo10 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetAppDomainStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )(
ICorProfilerInfo10 * This,
/* [in] */ ClassID classId,
/* [in] */ AppDomainID appDomainId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )(
ICorProfilerInfo10 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetContextStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )(
ICorProfilerInfo10 * This,
/* [in] */ ClassID classId,
/* [in] */ ContextID contextId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStaticFieldInfo)
HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )(
ICorProfilerInfo10 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetGenerationBounds)
HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )(
ICorProfilerInfo10 * This,
/* [in] */ ULONG cObjectRanges,
/* [out] */ ULONG *pcObjectRanges,
/* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetObjectGeneration)
HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )(
ICorProfilerInfo10 * This,
/* [in] */ ObjectID objectId,
/* [out] */ COR_PRF_GC_GENERATION_RANGE *range);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetNotifiedExceptionClauseInfo)
HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )(
ICorProfilerInfo10 * This,
/* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumJITedFunctions)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )(
ICorProfilerInfo10 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, RequestProfilerDetach)
HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )(
ICorProfilerInfo10 * This,
/* [in] */ DWORD dwExpectedCompletionMilliseconds);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetFunctionIDMapper2)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionIDMapper2 *pFunc,
/* [in] */ void *clientData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetStringLayout2)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )(
ICorProfilerInfo10 * This,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionEnter3 *pFuncEnter3,
/* [in] */ FunctionLeave3 *pFuncLeave3,
/* [in] */ FunctionTailcall3 *pFuncTailcall3);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3WithInfo)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo,
/* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo,
/* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionEnter3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionID functionId,
/* [out][in] */ ULONG *pcbArgumentInfo,
/* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionLeave3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionID functionId,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo,
/* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionTailcall3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_ELT_INFO eltInfo,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumModules)
HRESULT ( STDMETHODCALLTYPE *EnumModules )(
ICorProfilerInfo10 * This,
/* [out] */ ICorProfilerModuleEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetRuntimeInformation)
HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )(
ICorProfilerInfo10 * This,
/* [out] */ USHORT *pClrInstanceId,
/* [annotation][out] */
_Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetThreadStaticAddress2)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )(
ICorProfilerInfo10 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetAppDomainsContainingModule)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )(
ICorProfilerInfo10 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ ULONG32 *pcAppDomainIds,
/* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetModuleInfo2)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )(
ICorProfilerInfo10 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ AssemblyID *pAssemblyId,
/* [out] */ DWORD *pdwModuleFlags);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumThreads)
HRESULT ( STDMETHODCALLTYPE *EnumThreads )(
ICorProfilerInfo10 * This,
/* [out] */ ICorProfilerThreadEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, InitializeCurrentThread)
HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )(
ICorProfilerInfo10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestReJIT)
HRESULT ( STDMETHODCALLTYPE *RequestReJIT )(
ICorProfilerInfo10 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ ModuleID moduleIds[ ],
/* [size_is][in] */ mdMethodDef methodIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestRevert)
HRESULT ( STDMETHODCALLTYPE *RequestRevert )(
ICorProfilerInfo10 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ mdMethodDef methodIds[ ],
/* [size_is][out] */ HRESULT status[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetCodeInfo3)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetFunctionFromIP2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )(
ICorProfilerInfo10 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId,
/* [out] */ ReJITID *pReJitId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetReJITIDs)
HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG *pcReJitIds,
/* [length_is][size_is][out] */ ReJITID reJitIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetILToNativeMapping2)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumJITedFunctions2)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )(
ICorProfilerInfo10 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetObjectSize2)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )(
ICorProfilerInfo10 * This,
/* [in] */ ObjectID objectId,
/* [out] */ SIZE_T *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, GetEventMask2)
HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )(
ICorProfilerInfo10 * This,
/* [out] */ DWORD *pdwEventsLow,
/* [out] */ DWORD *pdwEventsHigh);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, SetEventMask2)
HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )(
ICorProfilerInfo10 * This,
/* [in] */ DWORD dwEventsLow,
/* [in] */ DWORD dwEventsHigh);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo6, EnumNgenModuleMethodsInliningThisMethod)
HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )(
ICorProfilerInfo10 * This,
/* [in] */ ModuleID inlinersModuleId,
/* [out] */ BOOL *incompleteData,
/* [out] */ ICorProfilerMethodEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ApplyMetaData)
HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )(
ICorProfilerInfo10 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, GetInMemorySymbolsLength)
HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )(
ICorProfilerInfo10 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ DWORD *pCountSymbolBytes);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ReadInMemorySymbols)
HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )(
ICorProfilerInfo10 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ DWORD countSymbolBytes,
/* [out] */ DWORD *pCountSymbolBytesRead);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, IsFunctionDynamic)
HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionID functionId,
/* [out] */ BOOL *isDynamic);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, GetFunctionFromIP3)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )(
ICorProfilerInfo10 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *functionId,
/* [out] */ ReJITID *pReJitId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, GetDynamicFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )(
ICorProfilerInfo10 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG *pcchName,
/* [out] */ WCHAR wszName[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetNativeCodeStartAddresses)
HRESULT ( STDMETHODCALLTYPE *GetNativeCodeStartAddresses )(
ICorProfilerInfo10 * This,
FunctionID functionID,
ULONG32 *pcCodeStartAddresses,
UINT_PTR codeStartAddresses[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetILToNativeMapping3)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping3 )(
ICorProfilerInfo10 * This,
UINT_PTR pNativeCodeStartAddress,
ULONG32 *pcMap,
COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetCodeInfo4)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo4 )(
ICorProfilerInfo10 * This,
UINT_PTR pNativeCodeStartAddress,
ULONG32 *pcCodeInfos,
COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, EnumerateObjectReferences)
HRESULT ( STDMETHODCALLTYPE *EnumerateObjectReferences )(
ICorProfilerInfo10 * This,
ObjectID objectId,
ObjectReferenceCallback callback,
void *clientData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, IsFrozenObject)
HRESULT ( STDMETHODCALLTYPE *IsFrozenObject )(
ICorProfilerInfo10 * This,
ObjectID objectId,
BOOL *pbFrozen);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, GetLOHObjectSizeThreshold)
HRESULT ( STDMETHODCALLTYPE *GetLOHObjectSizeThreshold )(
ICorProfilerInfo10 * This,
DWORD *pThreshold);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, RequestReJITWithInliners)
HRESULT ( STDMETHODCALLTYPE *RequestReJITWithInliners )(
ICorProfilerInfo10 * This,
/* [in] */ DWORD dwRejitFlags,
/* [size_is][in] */ ModuleID moduleIds[ ],
/* [size_is][in] */ mdMethodDef methodIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, SuspendRuntime)
HRESULT ( STDMETHODCALLTYPE *SuspendRuntime )(
ICorProfilerInfo10 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, ResumeRuntime)
HRESULT ( STDMETHODCALLTYPE *ResumeRuntime )(
ICorProfilerInfo10 * This);
#ifdef COBJMACROS
-#define ICorProfilerInfo10_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerInfo10_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerInfo10_AddRef(This) \
+#define ICorProfilerInfo10_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerInfo10_Release(This) \
+#define ICorProfilerInfo10_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerInfo10_GetClassFromObject(This,objectId,pClassId) \
+#define ICorProfilerInfo10_GetClassFromObject(This,objectId,pClassId) \
( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) )
-#define ICorProfilerInfo10_GetClassFromToken(This,moduleId,typeDef,pClassId) \
+#define ICorProfilerInfo10_GetClassFromToken(This,moduleId,typeDef,pClassId) \
( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) )
-#define ICorProfilerInfo10_GetCodeInfo(This,functionId,pStart,pcSize) \
+#define ICorProfilerInfo10_GetCodeInfo(This,functionId,pStart,pcSize) \
( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) )
-#define ICorProfilerInfo10_GetEventMask(This,pdwEvents) \
+#define ICorProfilerInfo10_GetEventMask(This,pdwEvents) \
( (This)->lpVtbl -> GetEventMask(This,pdwEvents) )
-#define ICorProfilerInfo10_GetFunctionFromIP(This,ip,pFunctionId) \
+#define ICorProfilerInfo10_GetFunctionFromIP(This,ip,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) )
-#define ICorProfilerInfo10_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
+#define ICorProfilerInfo10_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) )
-#define ICorProfilerInfo10_GetHandleFromThread(This,threadId,phThread) \
+#define ICorProfilerInfo10_GetHandleFromThread(This,threadId,phThread) \
( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) )
-#define ICorProfilerInfo10_GetObjectSize(This,objectId,pcSize) \
+#define ICorProfilerInfo10_GetObjectSize(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) )
-#define ICorProfilerInfo10_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
+#define ICorProfilerInfo10_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) )
-#define ICorProfilerInfo10_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
+#define ICorProfilerInfo10_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) )
-#define ICorProfilerInfo10_GetCurrentThreadID(This,pThreadId) \
+#define ICorProfilerInfo10_GetCurrentThreadID(This,pThreadId) \
( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) )
-#define ICorProfilerInfo10_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
+#define ICorProfilerInfo10_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) )
-#define ICorProfilerInfo10_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
+#define ICorProfilerInfo10_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) )
-#define ICorProfilerInfo10_SetEventMask(This,dwEvents) \
+#define ICorProfilerInfo10_SetEventMask(This,dwEvents) \
( (This)->lpVtbl -> SetEventMask(This,dwEvents) )
-#define ICorProfilerInfo10_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo10_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo10_SetFunctionIDMapper(This,pFunc) \
+#define ICorProfilerInfo10_SetFunctionIDMapper(This,pFunc) \
( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) )
-#define ICorProfilerInfo10_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
+#define ICorProfilerInfo10_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) )
-#define ICorProfilerInfo10_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
+#define ICorProfilerInfo10_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) )
-#define ICorProfilerInfo10_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
+#define ICorProfilerInfo10_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) )
-#define ICorProfilerInfo10_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
+#define ICorProfilerInfo10_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) )
-#define ICorProfilerInfo10_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
+#define ICorProfilerInfo10_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) )
-#define ICorProfilerInfo10_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
+#define ICorProfilerInfo10_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) )
-#define ICorProfilerInfo10_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
+#define ICorProfilerInfo10_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) )
-#define ICorProfilerInfo10_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
+#define ICorProfilerInfo10_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) )
-#define ICorProfilerInfo10_SetFunctionReJIT(This,functionId) \
+#define ICorProfilerInfo10_SetFunctionReJIT(This,functionId) \
( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) )
-#define ICorProfilerInfo10_ForceGC(This) \
+#define ICorProfilerInfo10_ForceGC(This) \
( (This)->lpVtbl -> ForceGC(This) )
-#define ICorProfilerInfo10_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
+#define ICorProfilerInfo10_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) )
-#define ICorProfilerInfo10_GetInprocInspectionInterface(This,ppicd) \
+#define ICorProfilerInfo10_GetInprocInspectionInterface(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) )
-#define ICorProfilerInfo10_GetInprocInspectionIThisThread(This,ppicd) \
+#define ICorProfilerInfo10_GetInprocInspectionIThisThread(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) )
-#define ICorProfilerInfo10_GetThreadContext(This,threadId,pContextId) \
+#define ICorProfilerInfo10_GetThreadContext(This,threadId,pContextId) \
( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) )
-#define ICorProfilerInfo10_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
+#define ICorProfilerInfo10_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) )
-#define ICorProfilerInfo10_EndInprocDebugging(This,dwProfilerContext) \
+#define ICorProfilerInfo10_EndInprocDebugging(This,dwProfilerContext) \
( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) )
-#define ICorProfilerInfo10_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
+#define ICorProfilerInfo10_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) )
-#define ICorProfilerInfo10_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
+#define ICorProfilerInfo10_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) )
-#define ICorProfilerInfo10_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo10_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo10_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
+#define ICorProfilerInfo10_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) )
-#define ICorProfilerInfo10_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo10_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo10_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
+#define ICorProfilerInfo10_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) )
-#define ICorProfilerInfo10_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
+#define ICorProfilerInfo10_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) )
-#define ICorProfilerInfo10_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo10_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo10_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
+#define ICorProfilerInfo10_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) )
-#define ICorProfilerInfo10_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
+#define ICorProfilerInfo10_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) )
-#define ICorProfilerInfo10_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
+#define ICorProfilerInfo10_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) )
-#define ICorProfilerInfo10_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
+#define ICorProfilerInfo10_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) )
-#define ICorProfilerInfo10_GetBoxClassLayout(This,classId,pBufferOffset) \
+#define ICorProfilerInfo10_GetBoxClassLayout(This,classId,pBufferOffset) \
( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) )
-#define ICorProfilerInfo10_GetThreadAppDomain(This,threadId,pAppDomainId) \
+#define ICorProfilerInfo10_GetThreadAppDomain(This,threadId,pAppDomainId) \
( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) )
-#define ICorProfilerInfo10_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
+#define ICorProfilerInfo10_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) )
-#define ICorProfilerInfo10_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
+#define ICorProfilerInfo10_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) )
-#define ICorProfilerInfo10_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
+#define ICorProfilerInfo10_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) )
-#define ICorProfilerInfo10_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
+#define ICorProfilerInfo10_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) )
-#define ICorProfilerInfo10_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
+#define ICorProfilerInfo10_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) )
-#define ICorProfilerInfo10_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
+#define ICorProfilerInfo10_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) )
-#define ICorProfilerInfo10_GetObjectGeneration(This,objectId,range) \
+#define ICorProfilerInfo10_GetObjectGeneration(This,objectId,range) \
( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) )
-#define ICorProfilerInfo10_GetNotifiedExceptionClauseInfo(This,pinfo) \
+#define ICorProfilerInfo10_GetNotifiedExceptionClauseInfo(This,pinfo) \
( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) )
-#define ICorProfilerInfo10_EnumJITedFunctions(This,ppEnum) \
+#define ICorProfilerInfo10_EnumJITedFunctions(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) )
-#define ICorProfilerInfo10_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
+#define ICorProfilerInfo10_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) )
-#define ICorProfilerInfo10_SetFunctionIDMapper2(This,pFunc,clientData) \
+#define ICorProfilerInfo10_SetFunctionIDMapper2(This,pFunc,clientData) \
( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) )
-#define ICorProfilerInfo10_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo10_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo10_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
+#define ICorProfilerInfo10_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) )
-#define ICorProfilerInfo10_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
+#define ICorProfilerInfo10_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) )
-#define ICorProfilerInfo10_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
+#define ICorProfilerInfo10_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) )
-#define ICorProfilerInfo10_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
+#define ICorProfilerInfo10_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) )
-#define ICorProfilerInfo10_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
+#define ICorProfilerInfo10_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) )
-#define ICorProfilerInfo10_EnumModules(This,ppEnum) \
+#define ICorProfilerInfo10_EnumModules(This,ppEnum) \
( (This)->lpVtbl -> EnumModules(This,ppEnum) )
-#define ICorProfilerInfo10_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
+#define ICorProfilerInfo10_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) )
-#define ICorProfilerInfo10_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
+#define ICorProfilerInfo10_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) )
-#define ICorProfilerInfo10_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
+#define ICorProfilerInfo10_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) )
-#define ICorProfilerInfo10_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
+#define ICorProfilerInfo10_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) )
-#define ICorProfilerInfo10_EnumThreads(This,ppEnum) \
+#define ICorProfilerInfo10_EnumThreads(This,ppEnum) \
( (This)->lpVtbl -> EnumThreads(This,ppEnum) )
-#define ICorProfilerInfo10_InitializeCurrentThread(This) \
+#define ICorProfilerInfo10_InitializeCurrentThread(This) \
( (This)->lpVtbl -> InitializeCurrentThread(This) )
-#define ICorProfilerInfo10_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
+#define ICorProfilerInfo10_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) )
-#define ICorProfilerInfo10_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
+#define ICorProfilerInfo10_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) )
-#define ICorProfilerInfo10_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo10_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo10_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
+#define ICorProfilerInfo10_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) )
-#define ICorProfilerInfo10_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
+#define ICorProfilerInfo10_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) )
-#define ICorProfilerInfo10_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
+#define ICorProfilerInfo10_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) )
-#define ICorProfilerInfo10_EnumJITedFunctions2(This,ppEnum) \
+#define ICorProfilerInfo10_EnumJITedFunctions2(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) )
-#define ICorProfilerInfo10_GetObjectSize2(This,objectId,pcSize) \
+#define ICorProfilerInfo10_GetObjectSize2(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) )
-#define ICorProfilerInfo10_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
+#define ICorProfilerInfo10_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) )
-#define ICorProfilerInfo10_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
+#define ICorProfilerInfo10_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) )
-#define ICorProfilerInfo10_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
+#define ICorProfilerInfo10_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) )
-#define ICorProfilerInfo10_ApplyMetaData(This,moduleId) \
+#define ICorProfilerInfo10_ApplyMetaData(This,moduleId) \
( (This)->lpVtbl -> ApplyMetaData(This,moduleId) )
-#define ICorProfilerInfo10_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \
+#define ICorProfilerInfo10_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \
( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) )
-#define ICorProfilerInfo10_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \
+#define ICorProfilerInfo10_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \
( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) )
-#define ICorProfilerInfo10_IsFunctionDynamic(This,functionId,isDynamic) \
+#define ICorProfilerInfo10_IsFunctionDynamic(This,functionId,isDynamic) \
( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) )
-#define ICorProfilerInfo10_GetFunctionFromIP3(This,ip,functionId,pReJitId) \
+#define ICorProfilerInfo10_GetFunctionFromIP3(This,ip,functionId,pReJitId) \
( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) )
-#define ICorProfilerInfo10_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \
+#define ICorProfilerInfo10_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \
( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) )
-#define ICorProfilerInfo10_GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) \
+#define ICorProfilerInfo10_GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) \
( (This)->lpVtbl -> GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) )
-#define ICorProfilerInfo10_GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) \
+#define ICorProfilerInfo10_GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) )
-#define ICorProfilerInfo10_GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo10_GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo10_EnumerateObjectReferences(This,objectId,callback,clientData) \
+#define ICorProfilerInfo10_EnumerateObjectReferences(This,objectId,callback,clientData) \
( (This)->lpVtbl -> EnumerateObjectReferences(This,objectId,callback,clientData) )
-#define ICorProfilerInfo10_IsFrozenObject(This,objectId,pbFrozen) \
+#define ICorProfilerInfo10_IsFrozenObject(This,objectId,pbFrozen) \
( (This)->lpVtbl -> IsFrozenObject(This,objectId,pbFrozen) )
-#define ICorProfilerInfo10_GetLOHObjectSizeThreshold(This,pThreshold) \
+#define ICorProfilerInfo10_GetLOHObjectSizeThreshold(This,pThreshold) \
( (This)->lpVtbl -> GetLOHObjectSizeThreshold(This,pThreshold) )
-#define ICorProfilerInfo10_RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) \
+#define ICorProfilerInfo10_RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) \
( (This)->lpVtbl -> RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) )
-#define ICorProfilerInfo10_SuspendRuntime(This) \
+#define ICorProfilerInfo10_SuspendRuntime(This) \
( (This)->lpVtbl -> SuspendRuntime(This) )
-#define ICorProfilerInfo10_ResumeRuntime(This) \
+#define ICorProfilerInfo10_ResumeRuntime(This) \
( (This)->lpVtbl -> ResumeRuntime(This) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerInfo10_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerInfo10_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerInfo11_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerInfo11Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerInfo11 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerInfo11 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerInfo11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromObject)
HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )(
ICorProfilerInfo11 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromToken)
HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )(
ICorProfilerInfo11 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdTypeDef typeDef,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCodeInfo)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionID functionId,
/* [out] */ LPCBYTE *pStart,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetEventMask)
HRESULT ( STDMETHODCALLTYPE *GetEventMask )(
ICorProfilerInfo11 * This,
/* [out] */ DWORD *pdwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromIP)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )(
ICorProfilerInfo11 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )(
ICorProfilerInfo11 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdToken token,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetHandleFromThread)
HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )(
ICorProfilerInfo11 * This,
/* [in] */ ThreadID threadId,
/* [out] */ HANDLE *phThread);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetObjectSize)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize )(
ICorProfilerInfo11 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, IsArrayClass)
HRESULT ( STDMETHODCALLTYPE *IsArrayClass )(
ICorProfilerInfo11 * This,
/* [in] */ ClassID classId,
/* [out] */ ClassID *pBaseClassId,
/* [out] */ ULONG *pcRank);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadInfo)
HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )(
ICorProfilerInfo11 * This,
/* [in] */ ThreadID threadId,
/* [out] */ DWORD *pdwWin32ThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCurrentThreadID)
HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )(
ICorProfilerInfo11 * This,
/* [out] */ ThreadID *pThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassIDInfo)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )(
ICorProfilerInfo11 * This,
/* [in] */ ClassID classId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdTypeDef *pTypeDefToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEventMask)
HRESULT ( STDMETHODCALLTYPE *SetEventMask )(
ICorProfilerInfo11 * This,
/* [in] */ DWORD dwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEnterLeaveFunctionHooks)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionEnter *pFuncEnter,
/* [in] */ FunctionLeave *pFuncLeave,
/* [in] */ FunctionTailcall *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionIDMapper)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionIDMapper *pFunc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetTokenAndMetaDataFromFunction)
HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionID functionId,
/* [out] */ IUnknown **ppImport,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleInfo)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )(
ICorProfilerInfo11 * This,
/* [in] */ ModuleID moduleId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ AssemblyID *pAssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleMetaData)
HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )(
ICorProfilerInfo11 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ REFIID riid,
/* [out] */ IUnknown **ppOut);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )(
ICorProfilerInfo11 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ LPCBYTE *ppMethodHeader,
/* [out] */ ULONG *pcbMethodSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBodyAllocator)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )(
ICorProfilerInfo11 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ IMethodMalloc **ppMalloc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )(
ICorProfilerInfo11 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodid,
/* [in] */ LPCBYTE pbNewILMethodHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAppDomainInfo)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )(
ICorProfilerInfo11 * This,
/* [in] */ AppDomainID appDomainId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ ProcessID *pProcessId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAssemblyInfo)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )(
ICorProfilerInfo11 * This,
/* [in] */ AssemblyID assemblyId,
/* [out] */ AppDomainID *pAppDomainId,
/* [out] */ ModuleID *pModuleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionReJIT)
HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, ForceGC)
HRESULT ( STDMETHODCALLTYPE *ForceGC )(
ICorProfilerInfo11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILInstrumentedCodeMap)
HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ULONG cILMapEntries,
/* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionInterface)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )(
ICorProfilerInfo11 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionIThisThread)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )(
ICorProfilerInfo11 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadContext)
HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
ICorProfilerInfo11 * This,
/* [in] */ ThreadID threadId,
/* [out] */ ContextID *pContextId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, BeginInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )(
ICorProfilerInfo11 * This,
/* [in] */ BOOL fThisThreadOnly,
/* [out] */ DWORD *pdwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, EndInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )(
ICorProfilerInfo11 * This,
/* [in] */ DWORD dwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILToNativeMapping)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, DoStackSnapshot)
HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )(
ICorProfilerInfo11 * This,
/* [in] */ ThreadID thread,
/* [size_is][in] */ BYTE context[ ],
/* [in] */ ULONG32 contextSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, SetEnterLeaveFunctionHooks2)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionEnter2 *pFuncEnter,
/* [in] */ FunctionLeave2 *pFuncLeave,
/* [in] */ FunctionTailcall2 *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionInfo2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionID funcId,
/* [out] */ ULONG32 *pcTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStringLayout)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout )(
ICorProfilerInfo11 * This,
/* [out] */ ULONG *pBufferLengthOffset,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetClassLayout )(
ICorProfilerInfo11 * This,
/* [in] */ ClassID classID,
/* [out] */ ULONG *pcFieldOffset,
/* [out] */ ULONG *pulClassSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassIDInfo2)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )(
ICorProfilerInfo11 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pcNumTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetCodeInfo2)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )(
ICorProfilerInfo11 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ ClassID *pClassID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )(
ICorProfilerInfo11 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ FunctionID *pFunctionID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, EnumModuleFrozenObjects)
HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )(
ICorProfilerInfo11 * This,
/* [in] */ ModuleID moduleID,
/* [out] */ ICorProfilerObjectEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetArrayObjectInfo)
HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )(
ICorProfilerInfo11 * This,
/* [in] */ ObjectID objectId,
/* [size_is][out] */ int pDimensionLowerBounds[ ],
/* [out] */ BYTE **ppData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetBoxClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )(
ICorProfilerInfo11 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadAppDomain)
HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )(
ICorProfilerInfo11 * This,
/* [in] */ ThreadID threadId,
/* [out] */ AppDomainID *pAppDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetRVAStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )(
ICorProfilerInfo11 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetAppDomainStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )(
ICorProfilerInfo11 * This,
/* [in] */ ClassID classId,
/* [in] */ AppDomainID appDomainId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )(
ICorProfilerInfo11 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetContextStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )(
ICorProfilerInfo11 * This,
/* [in] */ ClassID classId,
/* [in] */ ContextID contextId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStaticFieldInfo)
HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )(
ICorProfilerInfo11 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetGenerationBounds)
HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )(
ICorProfilerInfo11 * This,
/* [in] */ ULONG cObjectRanges,
/* [out] */ ULONG *pcObjectRanges,
/* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetObjectGeneration)
HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )(
ICorProfilerInfo11 * This,
/* [in] */ ObjectID objectId,
/* [out] */ COR_PRF_GC_GENERATION_RANGE *range);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetNotifiedExceptionClauseInfo)
HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )(
ICorProfilerInfo11 * This,
/* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumJITedFunctions)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )(
ICorProfilerInfo11 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, RequestProfilerDetach)
HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )(
ICorProfilerInfo11 * This,
/* [in] */ DWORD dwExpectedCompletionMilliseconds);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetFunctionIDMapper2)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionIDMapper2 *pFunc,
/* [in] */ void *clientData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetStringLayout2)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )(
ICorProfilerInfo11 * This,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionEnter3 *pFuncEnter3,
/* [in] */ FunctionLeave3 *pFuncLeave3,
/* [in] */ FunctionTailcall3 *pFuncTailcall3);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3WithInfo)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo,
/* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo,
/* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionEnter3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionID functionId,
/* [out][in] */ ULONG *pcbArgumentInfo,
/* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionLeave3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionID functionId,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo,
/* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionTailcall3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_ELT_INFO eltInfo,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumModules)
HRESULT ( STDMETHODCALLTYPE *EnumModules )(
ICorProfilerInfo11 * This,
/* [out] */ ICorProfilerModuleEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetRuntimeInformation)
HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )(
ICorProfilerInfo11 * This,
/* [out] */ USHORT *pClrInstanceId,
/* [annotation][out] */
_Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetThreadStaticAddress2)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )(
ICorProfilerInfo11 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetAppDomainsContainingModule)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )(
ICorProfilerInfo11 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ ULONG32 *pcAppDomainIds,
/* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetModuleInfo2)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )(
ICorProfilerInfo11 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ AssemblyID *pAssemblyId,
/* [out] */ DWORD *pdwModuleFlags);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumThreads)
HRESULT ( STDMETHODCALLTYPE *EnumThreads )(
ICorProfilerInfo11 * This,
/* [out] */ ICorProfilerThreadEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, InitializeCurrentThread)
HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )(
ICorProfilerInfo11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestReJIT)
HRESULT ( STDMETHODCALLTYPE *RequestReJIT )(
ICorProfilerInfo11 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ ModuleID moduleIds[ ],
/* [size_is][in] */ mdMethodDef methodIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestRevert)
HRESULT ( STDMETHODCALLTYPE *RequestRevert )(
ICorProfilerInfo11 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ mdMethodDef methodIds[ ],
/* [size_is][out] */ HRESULT status[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetCodeInfo3)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetFunctionFromIP2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )(
ICorProfilerInfo11 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId,
/* [out] */ ReJITID *pReJitId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetReJITIDs)
HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG *pcReJitIds,
/* [length_is][size_is][out] */ ReJITID reJitIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetILToNativeMapping2)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumJITedFunctions2)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )(
ICorProfilerInfo11 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetObjectSize2)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )(
ICorProfilerInfo11 * This,
/* [in] */ ObjectID objectId,
/* [out] */ SIZE_T *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, GetEventMask2)
HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )(
ICorProfilerInfo11 * This,
/* [out] */ DWORD *pdwEventsLow,
/* [out] */ DWORD *pdwEventsHigh);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, SetEventMask2)
HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )(
ICorProfilerInfo11 * This,
/* [in] */ DWORD dwEventsLow,
/* [in] */ DWORD dwEventsHigh);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo6, EnumNgenModuleMethodsInliningThisMethod)
HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )(
ICorProfilerInfo11 * This,
/* [in] */ ModuleID inlinersModuleId,
/* [out] */ BOOL *incompleteData,
/* [out] */ ICorProfilerMethodEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ApplyMetaData)
HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )(
ICorProfilerInfo11 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, GetInMemorySymbolsLength)
HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )(
ICorProfilerInfo11 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ DWORD *pCountSymbolBytes);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ReadInMemorySymbols)
HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )(
ICorProfilerInfo11 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ DWORD countSymbolBytes,
/* [out] */ DWORD *pCountSymbolBytesRead);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, IsFunctionDynamic)
HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionID functionId,
/* [out] */ BOOL *isDynamic);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, GetFunctionFromIP3)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )(
ICorProfilerInfo11 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *functionId,
/* [out] */ ReJITID *pReJitId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, GetDynamicFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )(
ICorProfilerInfo11 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG *pcchName,
/* [out] */ WCHAR wszName[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetNativeCodeStartAddresses)
HRESULT ( STDMETHODCALLTYPE *GetNativeCodeStartAddresses )(
ICorProfilerInfo11 * This,
FunctionID functionID,
ULONG32 *pcCodeStartAddresses,
UINT_PTR codeStartAddresses[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetILToNativeMapping3)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping3 )(
ICorProfilerInfo11 * This,
UINT_PTR pNativeCodeStartAddress,
ULONG32 *pcMap,
COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetCodeInfo4)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo4 )(
ICorProfilerInfo11 * This,
UINT_PTR pNativeCodeStartAddress,
ULONG32 *pcCodeInfos,
COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, EnumerateObjectReferences)
HRESULT ( STDMETHODCALLTYPE *EnumerateObjectReferences )(
ICorProfilerInfo11 * This,
ObjectID objectId,
ObjectReferenceCallback callback,
void *clientData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, IsFrozenObject)
HRESULT ( STDMETHODCALLTYPE *IsFrozenObject )(
ICorProfilerInfo11 * This,
ObjectID objectId,
BOOL *pbFrozen);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, GetLOHObjectSizeThreshold)
HRESULT ( STDMETHODCALLTYPE *GetLOHObjectSizeThreshold )(
ICorProfilerInfo11 * This,
DWORD *pThreshold);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, RequestReJITWithInliners)
HRESULT ( STDMETHODCALLTYPE *RequestReJITWithInliners )(
ICorProfilerInfo11 * This,
/* [in] */ DWORD dwRejitFlags,
/* [size_is][in] */ ModuleID moduleIds[ ],
/* [size_is][in] */ mdMethodDef methodIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, SuspendRuntime)
HRESULT ( STDMETHODCALLTYPE *SuspendRuntime )(
ICorProfilerInfo11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, ResumeRuntime)
HRESULT ( STDMETHODCALLTYPE *ResumeRuntime )(
ICorProfilerInfo11 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo11, GetEnvironmentVariable)
HRESULT ( STDMETHODCALLTYPE *GetEnvironmentVariable )(
ICorProfilerInfo11 * This,
/* [string][in] */ const WCHAR *szName,
/* [annotation][out] */
_Out_writes_to_(cchValue, *pcchValue) WCHAR szValue[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo11, SetEnvironmentVariable)
HRESULT ( STDMETHODCALLTYPE *SetEnvironmentVariable )(
ICorProfilerInfo11 * This,
/* [string][in] */ const WCHAR *szName,
#ifdef COBJMACROS
-#define ICorProfilerInfo11_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerInfo11_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerInfo11_AddRef(This) \
+#define ICorProfilerInfo11_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerInfo11_Release(This) \
+#define ICorProfilerInfo11_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerInfo11_GetClassFromObject(This,objectId,pClassId) \
+#define ICorProfilerInfo11_GetClassFromObject(This,objectId,pClassId) \
( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) )
-#define ICorProfilerInfo11_GetClassFromToken(This,moduleId,typeDef,pClassId) \
+#define ICorProfilerInfo11_GetClassFromToken(This,moduleId,typeDef,pClassId) \
( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) )
-#define ICorProfilerInfo11_GetCodeInfo(This,functionId,pStart,pcSize) \
+#define ICorProfilerInfo11_GetCodeInfo(This,functionId,pStart,pcSize) \
( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) )
-#define ICorProfilerInfo11_GetEventMask(This,pdwEvents) \
+#define ICorProfilerInfo11_GetEventMask(This,pdwEvents) \
( (This)->lpVtbl -> GetEventMask(This,pdwEvents) )
-#define ICorProfilerInfo11_GetFunctionFromIP(This,ip,pFunctionId) \
+#define ICorProfilerInfo11_GetFunctionFromIP(This,ip,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) )
-#define ICorProfilerInfo11_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
+#define ICorProfilerInfo11_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) )
-#define ICorProfilerInfo11_GetHandleFromThread(This,threadId,phThread) \
+#define ICorProfilerInfo11_GetHandleFromThread(This,threadId,phThread) \
( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) )
-#define ICorProfilerInfo11_GetObjectSize(This,objectId,pcSize) \
+#define ICorProfilerInfo11_GetObjectSize(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) )
-#define ICorProfilerInfo11_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
+#define ICorProfilerInfo11_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) )
-#define ICorProfilerInfo11_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
+#define ICorProfilerInfo11_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) )
-#define ICorProfilerInfo11_GetCurrentThreadID(This,pThreadId) \
+#define ICorProfilerInfo11_GetCurrentThreadID(This,pThreadId) \
( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) )
-#define ICorProfilerInfo11_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
+#define ICorProfilerInfo11_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) )
-#define ICorProfilerInfo11_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
+#define ICorProfilerInfo11_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) )
-#define ICorProfilerInfo11_SetEventMask(This,dwEvents) \
+#define ICorProfilerInfo11_SetEventMask(This,dwEvents) \
( (This)->lpVtbl -> SetEventMask(This,dwEvents) )
-#define ICorProfilerInfo11_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo11_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo11_SetFunctionIDMapper(This,pFunc) \
+#define ICorProfilerInfo11_SetFunctionIDMapper(This,pFunc) \
( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) )
-#define ICorProfilerInfo11_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
+#define ICorProfilerInfo11_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) )
-#define ICorProfilerInfo11_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
+#define ICorProfilerInfo11_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) )
-#define ICorProfilerInfo11_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
+#define ICorProfilerInfo11_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) )
-#define ICorProfilerInfo11_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
+#define ICorProfilerInfo11_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) )
-#define ICorProfilerInfo11_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
+#define ICorProfilerInfo11_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) )
-#define ICorProfilerInfo11_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
+#define ICorProfilerInfo11_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) )
-#define ICorProfilerInfo11_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
+#define ICorProfilerInfo11_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) )
-#define ICorProfilerInfo11_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
+#define ICorProfilerInfo11_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) )
-#define ICorProfilerInfo11_SetFunctionReJIT(This,functionId) \
+#define ICorProfilerInfo11_SetFunctionReJIT(This,functionId) \
( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) )
-#define ICorProfilerInfo11_ForceGC(This) \
+#define ICorProfilerInfo11_ForceGC(This) \
( (This)->lpVtbl -> ForceGC(This) )
-#define ICorProfilerInfo11_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
+#define ICorProfilerInfo11_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) )
-#define ICorProfilerInfo11_GetInprocInspectionInterface(This,ppicd) \
+#define ICorProfilerInfo11_GetInprocInspectionInterface(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) )
-#define ICorProfilerInfo11_GetInprocInspectionIThisThread(This,ppicd) \
+#define ICorProfilerInfo11_GetInprocInspectionIThisThread(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) )
-#define ICorProfilerInfo11_GetThreadContext(This,threadId,pContextId) \
+#define ICorProfilerInfo11_GetThreadContext(This,threadId,pContextId) \
( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) )
-#define ICorProfilerInfo11_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
+#define ICorProfilerInfo11_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) )
-#define ICorProfilerInfo11_EndInprocDebugging(This,dwProfilerContext) \
+#define ICorProfilerInfo11_EndInprocDebugging(This,dwProfilerContext) \
( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) )
-#define ICorProfilerInfo11_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
+#define ICorProfilerInfo11_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) )
-#define ICorProfilerInfo11_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
+#define ICorProfilerInfo11_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) )
-#define ICorProfilerInfo11_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo11_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo11_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
+#define ICorProfilerInfo11_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) )
-#define ICorProfilerInfo11_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo11_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo11_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
+#define ICorProfilerInfo11_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) )
-#define ICorProfilerInfo11_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
+#define ICorProfilerInfo11_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) )
-#define ICorProfilerInfo11_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo11_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo11_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
+#define ICorProfilerInfo11_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) )
-#define ICorProfilerInfo11_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
+#define ICorProfilerInfo11_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) )
-#define ICorProfilerInfo11_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
+#define ICorProfilerInfo11_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) )
-#define ICorProfilerInfo11_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
+#define ICorProfilerInfo11_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) )
-#define ICorProfilerInfo11_GetBoxClassLayout(This,classId,pBufferOffset) \
+#define ICorProfilerInfo11_GetBoxClassLayout(This,classId,pBufferOffset) \
( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) )
-#define ICorProfilerInfo11_GetThreadAppDomain(This,threadId,pAppDomainId) \
+#define ICorProfilerInfo11_GetThreadAppDomain(This,threadId,pAppDomainId) \
( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) )
-#define ICorProfilerInfo11_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
+#define ICorProfilerInfo11_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) )
-#define ICorProfilerInfo11_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
+#define ICorProfilerInfo11_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) )
-#define ICorProfilerInfo11_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
+#define ICorProfilerInfo11_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) )
-#define ICorProfilerInfo11_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
+#define ICorProfilerInfo11_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) )
-#define ICorProfilerInfo11_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
+#define ICorProfilerInfo11_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) )
-#define ICorProfilerInfo11_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
+#define ICorProfilerInfo11_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) )
-#define ICorProfilerInfo11_GetObjectGeneration(This,objectId,range) \
+#define ICorProfilerInfo11_GetObjectGeneration(This,objectId,range) \
( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) )
-#define ICorProfilerInfo11_GetNotifiedExceptionClauseInfo(This,pinfo) \
+#define ICorProfilerInfo11_GetNotifiedExceptionClauseInfo(This,pinfo) \
( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) )
-#define ICorProfilerInfo11_EnumJITedFunctions(This,ppEnum) \
+#define ICorProfilerInfo11_EnumJITedFunctions(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) )
-#define ICorProfilerInfo11_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
+#define ICorProfilerInfo11_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) )
-#define ICorProfilerInfo11_SetFunctionIDMapper2(This,pFunc,clientData) \
+#define ICorProfilerInfo11_SetFunctionIDMapper2(This,pFunc,clientData) \
( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) )
-#define ICorProfilerInfo11_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo11_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo11_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
+#define ICorProfilerInfo11_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) )
-#define ICorProfilerInfo11_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
+#define ICorProfilerInfo11_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) )
-#define ICorProfilerInfo11_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
+#define ICorProfilerInfo11_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) )
-#define ICorProfilerInfo11_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
+#define ICorProfilerInfo11_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) )
-#define ICorProfilerInfo11_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
+#define ICorProfilerInfo11_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) )
-#define ICorProfilerInfo11_EnumModules(This,ppEnum) \
+#define ICorProfilerInfo11_EnumModules(This,ppEnum) \
( (This)->lpVtbl -> EnumModules(This,ppEnum) )
-#define ICorProfilerInfo11_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
+#define ICorProfilerInfo11_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) )
-#define ICorProfilerInfo11_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
+#define ICorProfilerInfo11_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) )
-#define ICorProfilerInfo11_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
+#define ICorProfilerInfo11_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) )
-#define ICorProfilerInfo11_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
+#define ICorProfilerInfo11_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) )
-#define ICorProfilerInfo11_EnumThreads(This,ppEnum) \
+#define ICorProfilerInfo11_EnumThreads(This,ppEnum) \
( (This)->lpVtbl -> EnumThreads(This,ppEnum) )
-#define ICorProfilerInfo11_InitializeCurrentThread(This) \
+#define ICorProfilerInfo11_InitializeCurrentThread(This) \
( (This)->lpVtbl -> InitializeCurrentThread(This) )
-#define ICorProfilerInfo11_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
+#define ICorProfilerInfo11_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) )
-#define ICorProfilerInfo11_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
+#define ICorProfilerInfo11_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) )
-#define ICorProfilerInfo11_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo11_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo11_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
+#define ICorProfilerInfo11_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) )
-#define ICorProfilerInfo11_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
+#define ICorProfilerInfo11_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) )
-#define ICorProfilerInfo11_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
+#define ICorProfilerInfo11_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) )
-#define ICorProfilerInfo11_EnumJITedFunctions2(This,ppEnum) \
+#define ICorProfilerInfo11_EnumJITedFunctions2(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) )
-#define ICorProfilerInfo11_GetObjectSize2(This,objectId,pcSize) \
+#define ICorProfilerInfo11_GetObjectSize2(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) )
-#define ICorProfilerInfo11_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
+#define ICorProfilerInfo11_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) )
-#define ICorProfilerInfo11_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
+#define ICorProfilerInfo11_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) )
-#define ICorProfilerInfo11_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
+#define ICorProfilerInfo11_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) )
-#define ICorProfilerInfo11_ApplyMetaData(This,moduleId) \
+#define ICorProfilerInfo11_ApplyMetaData(This,moduleId) \
( (This)->lpVtbl -> ApplyMetaData(This,moduleId) )
-#define ICorProfilerInfo11_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \
+#define ICorProfilerInfo11_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \
( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) )
-#define ICorProfilerInfo11_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \
+#define ICorProfilerInfo11_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \
( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) )
-#define ICorProfilerInfo11_IsFunctionDynamic(This,functionId,isDynamic) \
+#define ICorProfilerInfo11_IsFunctionDynamic(This,functionId,isDynamic) \
( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) )
-#define ICorProfilerInfo11_GetFunctionFromIP3(This,ip,functionId,pReJitId) \
+#define ICorProfilerInfo11_GetFunctionFromIP3(This,ip,functionId,pReJitId) \
( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) )
-#define ICorProfilerInfo11_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \
+#define ICorProfilerInfo11_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \
( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) )
-#define ICorProfilerInfo11_GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) \
+#define ICorProfilerInfo11_GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) \
( (This)->lpVtbl -> GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) )
-#define ICorProfilerInfo11_GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) \
+#define ICorProfilerInfo11_GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) )
-#define ICorProfilerInfo11_GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo11_GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo11_EnumerateObjectReferences(This,objectId,callback,clientData) \
+#define ICorProfilerInfo11_EnumerateObjectReferences(This,objectId,callback,clientData) \
( (This)->lpVtbl -> EnumerateObjectReferences(This,objectId,callback,clientData) )
-#define ICorProfilerInfo11_IsFrozenObject(This,objectId,pbFrozen) \
+#define ICorProfilerInfo11_IsFrozenObject(This,objectId,pbFrozen) \
( (This)->lpVtbl -> IsFrozenObject(This,objectId,pbFrozen) )
-#define ICorProfilerInfo11_GetLOHObjectSizeThreshold(This,pThreshold) \
+#define ICorProfilerInfo11_GetLOHObjectSizeThreshold(This,pThreshold) \
( (This)->lpVtbl -> GetLOHObjectSizeThreshold(This,pThreshold) )
-#define ICorProfilerInfo11_RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) \
+#define ICorProfilerInfo11_RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) \
( (This)->lpVtbl -> RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) )
-#define ICorProfilerInfo11_SuspendRuntime(This) \
+#define ICorProfilerInfo11_SuspendRuntime(This) \
( (This)->lpVtbl -> SuspendRuntime(This) )
-#define ICorProfilerInfo11_ResumeRuntime(This) \
+#define ICorProfilerInfo11_ResumeRuntime(This) \
( (This)->lpVtbl -> ResumeRuntime(This) )
-#define ICorProfilerInfo11_GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) \
+#define ICorProfilerInfo11_GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) \
( (This)->lpVtbl -> GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) )
-#define ICorProfilerInfo11_SetEnvironmentVariable(This,szName,szValue) \
+#define ICorProfilerInfo11_SetEnvironmentVariable(This,szName,szValue) \
( (This)->lpVtbl -> SetEnvironmentVariable(This,szName,szValue) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerInfo11_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerInfo11_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerInfo12_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerInfo12Vtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerInfo12 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerInfo12 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerInfo12 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromObject)
HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )(
ICorProfilerInfo12 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromToken)
HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )(
ICorProfilerInfo12 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdTypeDef typeDef,
/* [out] */ ClassID *pClassId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCodeInfo)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionID functionId,
/* [out] */ LPCBYTE *pStart,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetEventMask)
HRESULT ( STDMETHODCALLTYPE *GetEventMask )(
ICorProfilerInfo12 * This,
/* [out] */ DWORD *pdwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromIP)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )(
ICorProfilerInfo12 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromToken)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )(
ICorProfilerInfo12 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdToken token,
/* [out] */ FunctionID *pFunctionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetHandleFromThread)
HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )(
ICorProfilerInfo12 * This,
/* [in] */ ThreadID threadId,
/* [out] */ HANDLE *phThread);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetObjectSize)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize )(
ICorProfilerInfo12 * This,
/* [in] */ ObjectID objectId,
/* [out] */ ULONG *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, IsArrayClass)
HRESULT ( STDMETHODCALLTYPE *IsArrayClass )(
ICorProfilerInfo12 * This,
/* [in] */ ClassID classId,
/* [out] */ ClassID *pBaseClassId,
/* [out] */ ULONG *pcRank);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadInfo)
HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )(
ICorProfilerInfo12 * This,
/* [in] */ ThreadID threadId,
/* [out] */ DWORD *pdwWin32ThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCurrentThreadID)
HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )(
ICorProfilerInfo12 * This,
/* [out] */ ThreadID *pThreadId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassIDInfo)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )(
ICorProfilerInfo12 * This,
/* [in] */ ClassID classId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdTypeDef *pTypeDefToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ModuleID *pModuleId,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEventMask)
HRESULT ( STDMETHODCALLTYPE *SetEventMask )(
ICorProfilerInfo12 * This,
/* [in] */ DWORD dwEvents);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEnterLeaveFunctionHooks)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionEnter *pFuncEnter,
/* [in] */ FunctionLeave *pFuncLeave,
/* [in] */ FunctionTailcall *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionIDMapper)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionIDMapper *pFunc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetTokenAndMetaDataFromFunction)
HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionID functionId,
/* [out] */ IUnknown **ppImport,
/* [out] */ mdToken *pToken);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleInfo)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )(
ICorProfilerInfo12 * This,
/* [in] */ ModuleID moduleId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ AssemblyID *pAssemblyId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleMetaData)
HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )(
ICorProfilerInfo12 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ REFIID riid,
/* [out] */ IUnknown **ppOut);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )(
ICorProfilerInfo12 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ LPCBYTE *ppMethodHeader,
/* [out] */ ULONG *pcbMethodSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBodyAllocator)
HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )(
ICorProfilerInfo12 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ IMethodMalloc **ppMalloc);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILFunctionBody)
HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )(
ICorProfilerInfo12 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ mdMethodDef methodid,
/* [in] */ LPCBYTE pbNewILMethodHeader);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAppDomainInfo)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )(
ICorProfilerInfo12 * This,
/* [in] */ AppDomainID appDomainId,
_Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
/* [out] */ ProcessID *pProcessId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAssemblyInfo)
HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )(
ICorProfilerInfo12 * This,
/* [in] */ AssemblyID assemblyId,
/* [out] */ AppDomainID *pAppDomainId,
/* [out] */ ModuleID *pModuleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionReJIT)
HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionID functionId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, ForceGC)
HRESULT ( STDMETHODCALLTYPE *ForceGC )(
ICorProfilerInfo12 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILInstrumentedCodeMap)
HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionID functionId,
/* [in] */ ULONG cILMapEntries,
/* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionInterface)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )(
ICorProfilerInfo12 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionIThisThread)
HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )(
ICorProfilerInfo12 * This,
/* [out] */ IUnknown **ppicd);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadContext)
HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
ICorProfilerInfo12 * This,
/* [in] */ ThreadID threadId,
/* [out] */ ContextID *pContextId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, BeginInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )(
ICorProfilerInfo12 * This,
/* [in] */ BOOL fThisThreadOnly,
/* [out] */ DWORD *pdwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, EndInprocDebugging)
HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )(
ICorProfilerInfo12 * This,
/* [in] */ DWORD dwProfilerContext);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILToNativeMapping)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, DoStackSnapshot)
HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )(
ICorProfilerInfo12 * This,
/* [in] */ ThreadID thread,
/* [size_is][in] */ BYTE context[ ],
/* [in] */ ULONG32 contextSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, SetEnterLeaveFunctionHooks2)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionEnter2 *pFuncEnter,
/* [in] */ FunctionLeave2 *pFuncLeave,
/* [in] */ FunctionTailcall2 *pFuncTailcall);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionInfo2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionID funcId,
/* [out] */ ULONG32 *pcTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStringLayout)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout )(
ICorProfilerInfo12 * This,
/* [out] */ ULONG *pBufferLengthOffset,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetClassLayout )(
ICorProfilerInfo12 * This,
/* [in] */ ClassID classID,
/* [out] */ ULONG *pcFieldOffset,
/* [out] */ ULONG *pulClassSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassIDInfo2)
HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )(
ICorProfilerInfo12 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pcNumTypeArgs,
/* [out] */ ClassID typeArgs[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetCodeInfo2)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )(
ICorProfilerInfo12 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ ClassID *pClassID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionFromTokenAndTypeArgs)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )(
ICorProfilerInfo12 * This,
/* [in] */ ModuleID moduleID,
/* [size_is][in] */ ClassID typeArgs[ ],
/* [out] */ FunctionID *pFunctionID);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, EnumModuleFrozenObjects)
HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )(
ICorProfilerInfo12 * This,
/* [in] */ ModuleID moduleID,
/* [out] */ ICorProfilerObjectEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetArrayObjectInfo)
HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )(
ICorProfilerInfo12 * This,
/* [in] */ ObjectID objectId,
/* [size_is][out] */ int pDimensionLowerBounds[ ],
/* [out] */ BYTE **ppData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetBoxClassLayout)
HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )(
ICorProfilerInfo12 * This,
/* [in] */ ClassID classId,
/* [out] */ ULONG32 *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadAppDomain)
HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )(
ICorProfilerInfo12 * This,
/* [in] */ ThreadID threadId,
/* [out] */ AppDomainID *pAppDomainId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetRVAStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )(
ICorProfilerInfo12 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetAppDomainStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )(
ICorProfilerInfo12 * This,
/* [in] */ ClassID classId,
/* [in] */ AppDomainID appDomainId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )(
ICorProfilerInfo12 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetContextStaticAddress)
HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )(
ICorProfilerInfo12 * This,
/* [in] */ ClassID classId,
/* [in] */ ContextID contextId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStaticFieldInfo)
HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )(
ICorProfilerInfo12 * This,
/* [in] */ ClassID classId,
/* [in] */ mdFieldDef fieldToken,
/* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetGenerationBounds)
HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )(
ICorProfilerInfo12 * This,
/* [in] */ ULONG cObjectRanges,
/* [out] */ ULONG *pcObjectRanges,
/* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetObjectGeneration)
HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )(
ICorProfilerInfo12 * This,
/* [in] */ ObjectID objectId,
/* [out] */ COR_PRF_GC_GENERATION_RANGE *range);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetNotifiedExceptionClauseInfo)
HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )(
ICorProfilerInfo12 * This,
/* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumJITedFunctions)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )(
ICorProfilerInfo12 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, RequestProfilerDetach)
HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )(
ICorProfilerInfo12 * This,
/* [in] */ DWORD dwExpectedCompletionMilliseconds);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetFunctionIDMapper2)
HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionIDMapper2 *pFunc,
/* [in] */ void *clientData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetStringLayout2)
HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )(
ICorProfilerInfo12 * This,
/* [out] */ ULONG *pStringLengthOffset,
/* [out] */ ULONG *pBufferOffset);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionEnter3 *pFuncEnter3,
/* [in] */ FunctionLeave3 *pFuncLeave3,
/* [in] */ FunctionTailcall3 *pFuncTailcall3);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3WithInfo)
HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo,
/* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo,
/* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionEnter3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionID functionId,
/* [out][in] */ ULONG *pcbArgumentInfo,
/* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionLeave3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionID functionId,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo,
/* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionTailcall3Info)
HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionID functionId,
/* [in] */ COR_PRF_ELT_INFO eltInfo,
/* [out] */ COR_PRF_FRAME_INFO *pFrameInfo);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumModules)
HRESULT ( STDMETHODCALLTYPE *EnumModules )(
ICorProfilerInfo12 * This,
/* [out] */ ICorProfilerModuleEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetRuntimeInformation)
HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )(
ICorProfilerInfo12 * This,
/* [out] */ USHORT *pClrInstanceId,
/* [annotation][out] */
_Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetThreadStaticAddress2)
HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )(
ICorProfilerInfo12 * This,
/* [in] */ ClassID classId,
/* [in] */ ThreadID threadId,
/* [out] */ void **ppAddress);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetAppDomainsContainingModule)
HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )(
ICorProfilerInfo12 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ ULONG32 *pcAppDomainIds,
/* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetModuleInfo2)
HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )(
ICorProfilerInfo12 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ AssemblyID *pAssemblyId,
/* [out] */ DWORD *pdwModuleFlags);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumThreads)
HRESULT ( STDMETHODCALLTYPE *EnumThreads )(
ICorProfilerInfo12 * This,
/* [out] */ ICorProfilerThreadEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, InitializeCurrentThread)
HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )(
ICorProfilerInfo12 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestReJIT)
HRESULT ( STDMETHODCALLTYPE *RequestReJIT )(
ICorProfilerInfo12 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ ModuleID moduleIds[ ],
/* [size_is][in] */ mdMethodDef methodIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestRevert)
HRESULT ( STDMETHODCALLTYPE *RequestRevert )(
ICorProfilerInfo12 * This,
/* [in] */ ULONG cFunctions,
/* [size_is][in] */ mdMethodDef methodIds[ ],
/* [size_is][out] */ HRESULT status[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetCodeInfo3)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionID functionID,
/* [out] */ ULONG32 *pcCodeInfos,
/* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetFunctionFromIP2)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )(
ICorProfilerInfo12 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *pFunctionId,
/* [out] */ ReJITID *pReJitId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetReJITIDs)
HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG *pcReJitIds,
/* [length_is][size_is][out] */ ReJITID reJitIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetILToNativeMapping2)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG32 *pcMap,
/* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumJITedFunctions2)
HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )(
ICorProfilerInfo12 * This,
/* [out] */ ICorProfilerFunctionEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetObjectSize2)
HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )(
ICorProfilerInfo12 * This,
/* [in] */ ObjectID objectId,
/* [out] */ SIZE_T *pcSize);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, GetEventMask2)
HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )(
ICorProfilerInfo12 * This,
/* [out] */ DWORD *pdwEventsLow,
/* [out] */ DWORD *pdwEventsHigh);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, SetEventMask2)
HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )(
ICorProfilerInfo12 * This,
/* [in] */ DWORD dwEventsLow,
/* [in] */ DWORD dwEventsHigh);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo6, EnumNgenModuleMethodsInliningThisMethod)
HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )(
ICorProfilerInfo12 * This,
/* [in] */ ModuleID inlinersModuleId,
/* [out] */ BOOL *incompleteData,
/* [out] */ ICorProfilerMethodEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ApplyMetaData)
HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )(
ICorProfilerInfo12 * This,
/* [in] */ ModuleID moduleId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, GetInMemorySymbolsLength)
HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )(
ICorProfilerInfo12 * This,
/* [in] */ ModuleID moduleId,
/* [out] */ DWORD *pCountSymbolBytes);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ReadInMemorySymbols)
HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )(
ICorProfilerInfo12 * This,
/* [in] */ ModuleID moduleId,
/* [in] */ DWORD countSymbolBytes,
/* [out] */ DWORD *pCountSymbolBytesRead);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, IsFunctionDynamic)
HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionID functionId,
/* [out] */ BOOL *isDynamic);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, GetFunctionFromIP3)
HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )(
ICorProfilerInfo12 * This,
/* [in] */ LPCBYTE ip,
/* [out] */ FunctionID *functionId,
/* [out] */ ReJITID *pReJitId);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, GetDynamicFunctionInfo)
HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )(
ICorProfilerInfo12 * This,
/* [in] */ FunctionID functionId,
/* [out] */ ULONG *pcchName,
/* [out] */ WCHAR wszName[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetNativeCodeStartAddresses)
HRESULT ( STDMETHODCALLTYPE *GetNativeCodeStartAddresses )(
ICorProfilerInfo12 * This,
FunctionID functionID,
ULONG32 *pcCodeStartAddresses,
UINT_PTR codeStartAddresses[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetILToNativeMapping3)
HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping3 )(
ICorProfilerInfo12 * This,
UINT_PTR pNativeCodeStartAddress,
ULONG32 *pcMap,
COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetCodeInfo4)
HRESULT ( STDMETHODCALLTYPE *GetCodeInfo4 )(
ICorProfilerInfo12 * This,
UINT_PTR pNativeCodeStartAddress,
ULONG32 *pcCodeInfos,
COR_PRF_CODE_INFO codeInfos[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, EnumerateObjectReferences)
HRESULT ( STDMETHODCALLTYPE *EnumerateObjectReferences )(
ICorProfilerInfo12 * This,
ObjectID objectId,
ObjectReferenceCallback callback,
void *clientData);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, IsFrozenObject)
HRESULT ( STDMETHODCALLTYPE *IsFrozenObject )(
ICorProfilerInfo12 * This,
ObjectID objectId,
BOOL *pbFrozen);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, GetLOHObjectSizeThreshold)
HRESULT ( STDMETHODCALLTYPE *GetLOHObjectSizeThreshold )(
ICorProfilerInfo12 * This,
DWORD *pThreshold);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, RequestReJITWithInliners)
HRESULT ( STDMETHODCALLTYPE *RequestReJITWithInliners )(
ICorProfilerInfo12 * This,
/* [in] */ DWORD dwRejitFlags,
/* [size_is][in] */ ModuleID moduleIds[ ],
/* [size_is][in] */ mdMethodDef methodIds[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, SuspendRuntime)
HRESULT ( STDMETHODCALLTYPE *SuspendRuntime )(
ICorProfilerInfo12 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, ResumeRuntime)
HRESULT ( STDMETHODCALLTYPE *ResumeRuntime )(
ICorProfilerInfo12 * This);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo11, GetEnvironmentVariable)
HRESULT ( STDMETHODCALLTYPE *GetEnvironmentVariable )(
ICorProfilerInfo12 * This,
/* [string][in] */ const WCHAR *szName,
/* [annotation][out] */
_Out_writes_to_(cchValue, *pcchValue) WCHAR szValue[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo11, SetEnvironmentVariable)
HRESULT ( STDMETHODCALLTYPE *SetEnvironmentVariable )(
ICorProfilerInfo12 * This,
/* [string][in] */ const WCHAR *szName,
/* [string][in] */ const WCHAR *szValue);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeStartSession)
HRESULT ( STDMETHODCALLTYPE *EventPipeStartSession )(
ICorProfilerInfo12 * This,
/* [in] */ UINT32 cProviderConfigs,
/* [in] */ BOOL requestRundown,
/* [out] */ EVENTPIPE_SESSION *pSession);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeAddProviderToSession)
HRESULT ( STDMETHODCALLTYPE *EventPipeAddProviderToSession )(
ICorProfilerInfo12 * This,
/* [in] */ EVENTPIPE_SESSION session,
/* [in] */ COR_PRF_EVENTPIPE_PROVIDER_CONFIG providerConfig);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeStopSession)
HRESULT ( STDMETHODCALLTYPE *EventPipeStopSession )(
ICorProfilerInfo12 * This,
/* [in] */ EVENTPIPE_SESSION session);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeCreateProvider)
HRESULT ( STDMETHODCALLTYPE *EventPipeCreateProvider )(
ICorProfilerInfo12 * This,
/* [string][in] */ const WCHAR *providerName,
/* [out] */ EVENTPIPE_PROVIDER *pProvider);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeGetProviderInfo)
HRESULT ( STDMETHODCALLTYPE *EventPipeGetProviderInfo )(
ICorProfilerInfo12 * This,
/* [in] */ EVENTPIPE_PROVIDER provider,
/* [annotation][out] */
_Out_writes_to_(cchName, *pcchName) WCHAR providerName[ ]);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeDefineEvent)
HRESULT ( STDMETHODCALLTYPE *EventPipeDefineEvent )(
ICorProfilerInfo12 * This,
/* [in] */ EVENTPIPE_PROVIDER provider,
/* [size_is][in] */ COR_PRF_EVENTPIPE_PARAM_DESC pParamDescs[ ],
/* [out] */ EVENTPIPE_EVENT *pEvent);
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeWriteEvent)
HRESULT ( STDMETHODCALLTYPE *EventPipeWriteEvent )(
ICorProfilerInfo12 * This,
/* [in] */ EVENTPIPE_EVENT event,
#ifdef COBJMACROS
-#define ICorProfilerInfo12_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerInfo12_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerInfo12_AddRef(This) \
+#define ICorProfilerInfo12_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerInfo12_Release(This) \
+#define ICorProfilerInfo12_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerInfo12_GetClassFromObject(This,objectId,pClassId) \
+#define ICorProfilerInfo12_GetClassFromObject(This,objectId,pClassId) \
( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) )
-#define ICorProfilerInfo12_GetClassFromToken(This,moduleId,typeDef,pClassId) \
+#define ICorProfilerInfo12_GetClassFromToken(This,moduleId,typeDef,pClassId) \
( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) )
-#define ICorProfilerInfo12_GetCodeInfo(This,functionId,pStart,pcSize) \
+#define ICorProfilerInfo12_GetCodeInfo(This,functionId,pStart,pcSize) \
( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) )
-#define ICorProfilerInfo12_GetEventMask(This,pdwEvents) \
+#define ICorProfilerInfo12_GetEventMask(This,pdwEvents) \
( (This)->lpVtbl -> GetEventMask(This,pdwEvents) )
-#define ICorProfilerInfo12_GetFunctionFromIP(This,ip,pFunctionId) \
+#define ICorProfilerInfo12_GetFunctionFromIP(This,ip,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) )
-#define ICorProfilerInfo12_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
+#define ICorProfilerInfo12_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) )
-#define ICorProfilerInfo12_GetHandleFromThread(This,threadId,phThread) \
+#define ICorProfilerInfo12_GetHandleFromThread(This,threadId,phThread) \
( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) )
-#define ICorProfilerInfo12_GetObjectSize(This,objectId,pcSize) \
+#define ICorProfilerInfo12_GetObjectSize(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) )
-#define ICorProfilerInfo12_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
+#define ICorProfilerInfo12_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) )
-#define ICorProfilerInfo12_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
+#define ICorProfilerInfo12_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) )
-#define ICorProfilerInfo12_GetCurrentThreadID(This,pThreadId) \
+#define ICorProfilerInfo12_GetCurrentThreadID(This,pThreadId) \
( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) )
-#define ICorProfilerInfo12_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
+#define ICorProfilerInfo12_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) )
-#define ICorProfilerInfo12_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
+#define ICorProfilerInfo12_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) )
-#define ICorProfilerInfo12_SetEventMask(This,dwEvents) \
+#define ICorProfilerInfo12_SetEventMask(This,dwEvents) \
( (This)->lpVtbl -> SetEventMask(This,dwEvents) )
-#define ICorProfilerInfo12_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo12_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo12_SetFunctionIDMapper(This,pFunc) \
+#define ICorProfilerInfo12_SetFunctionIDMapper(This,pFunc) \
( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) )
-#define ICorProfilerInfo12_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
+#define ICorProfilerInfo12_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) )
-#define ICorProfilerInfo12_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
+#define ICorProfilerInfo12_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) )
-#define ICorProfilerInfo12_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
+#define ICorProfilerInfo12_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) )
-#define ICorProfilerInfo12_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
+#define ICorProfilerInfo12_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) )
-#define ICorProfilerInfo12_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
+#define ICorProfilerInfo12_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) )
-#define ICorProfilerInfo12_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
+#define ICorProfilerInfo12_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) )
-#define ICorProfilerInfo12_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
+#define ICorProfilerInfo12_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) )
-#define ICorProfilerInfo12_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
+#define ICorProfilerInfo12_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) )
-#define ICorProfilerInfo12_SetFunctionReJIT(This,functionId) \
+#define ICorProfilerInfo12_SetFunctionReJIT(This,functionId) \
( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) )
-#define ICorProfilerInfo12_ForceGC(This) \
+#define ICorProfilerInfo12_ForceGC(This) \
( (This)->lpVtbl -> ForceGC(This) )
-#define ICorProfilerInfo12_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
+#define ICorProfilerInfo12_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) )
-#define ICorProfilerInfo12_GetInprocInspectionInterface(This,ppicd) \
+#define ICorProfilerInfo12_GetInprocInspectionInterface(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) )
-#define ICorProfilerInfo12_GetInprocInspectionIThisThread(This,ppicd) \
+#define ICorProfilerInfo12_GetInprocInspectionIThisThread(This,ppicd) \
( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) )
-#define ICorProfilerInfo12_GetThreadContext(This,threadId,pContextId) \
+#define ICorProfilerInfo12_GetThreadContext(This,threadId,pContextId) \
( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) )
-#define ICorProfilerInfo12_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
+#define ICorProfilerInfo12_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) )
-#define ICorProfilerInfo12_EndInprocDebugging(This,dwProfilerContext) \
+#define ICorProfilerInfo12_EndInprocDebugging(This,dwProfilerContext) \
( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) )
-#define ICorProfilerInfo12_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
+#define ICorProfilerInfo12_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) )
-#define ICorProfilerInfo12_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
+#define ICorProfilerInfo12_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) )
-#define ICorProfilerInfo12_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+#define ICorProfilerInfo12_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
-#define ICorProfilerInfo12_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
+#define ICorProfilerInfo12_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) )
-#define ICorProfilerInfo12_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo12_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo12_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
+#define ICorProfilerInfo12_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) )
-#define ICorProfilerInfo12_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
+#define ICorProfilerInfo12_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) )
-#define ICorProfilerInfo12_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo12_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo12_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
+#define ICorProfilerInfo12_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) )
-#define ICorProfilerInfo12_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
+#define ICorProfilerInfo12_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) )
-#define ICorProfilerInfo12_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
+#define ICorProfilerInfo12_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) )
-#define ICorProfilerInfo12_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
+#define ICorProfilerInfo12_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) )
-#define ICorProfilerInfo12_GetBoxClassLayout(This,classId,pBufferOffset) \
+#define ICorProfilerInfo12_GetBoxClassLayout(This,classId,pBufferOffset) \
( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) )
-#define ICorProfilerInfo12_GetThreadAppDomain(This,threadId,pAppDomainId) \
+#define ICorProfilerInfo12_GetThreadAppDomain(This,threadId,pAppDomainId) \
( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) )
-#define ICorProfilerInfo12_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
+#define ICorProfilerInfo12_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) )
-#define ICorProfilerInfo12_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
+#define ICorProfilerInfo12_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) )
-#define ICorProfilerInfo12_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
+#define ICorProfilerInfo12_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) )
-#define ICorProfilerInfo12_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
+#define ICorProfilerInfo12_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) )
-#define ICorProfilerInfo12_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
+#define ICorProfilerInfo12_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) )
-#define ICorProfilerInfo12_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
+#define ICorProfilerInfo12_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) )
-#define ICorProfilerInfo12_GetObjectGeneration(This,objectId,range) \
+#define ICorProfilerInfo12_GetObjectGeneration(This,objectId,range) \
( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) )
-#define ICorProfilerInfo12_GetNotifiedExceptionClauseInfo(This,pinfo) \
+#define ICorProfilerInfo12_GetNotifiedExceptionClauseInfo(This,pinfo) \
( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) )
-#define ICorProfilerInfo12_EnumJITedFunctions(This,ppEnum) \
+#define ICorProfilerInfo12_EnumJITedFunctions(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) )
-#define ICorProfilerInfo12_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
+#define ICorProfilerInfo12_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) )
-#define ICorProfilerInfo12_SetFunctionIDMapper2(This,pFunc,clientData) \
+#define ICorProfilerInfo12_SetFunctionIDMapper2(This,pFunc,clientData) \
( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) )
-#define ICorProfilerInfo12_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
+#define ICorProfilerInfo12_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) )
-#define ICorProfilerInfo12_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
+#define ICorProfilerInfo12_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) )
-#define ICorProfilerInfo12_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
+#define ICorProfilerInfo12_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) )
-#define ICorProfilerInfo12_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
+#define ICorProfilerInfo12_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) )
-#define ICorProfilerInfo12_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
+#define ICorProfilerInfo12_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) )
-#define ICorProfilerInfo12_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
+#define ICorProfilerInfo12_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) )
-#define ICorProfilerInfo12_EnumModules(This,ppEnum) \
+#define ICorProfilerInfo12_EnumModules(This,ppEnum) \
( (This)->lpVtbl -> EnumModules(This,ppEnum) )
-#define ICorProfilerInfo12_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
+#define ICorProfilerInfo12_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) )
-#define ICorProfilerInfo12_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
+#define ICorProfilerInfo12_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) )
-#define ICorProfilerInfo12_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
+#define ICorProfilerInfo12_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) )
-#define ICorProfilerInfo12_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
+#define ICorProfilerInfo12_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) )
-#define ICorProfilerInfo12_EnumThreads(This,ppEnum) \
+#define ICorProfilerInfo12_EnumThreads(This,ppEnum) \
( (This)->lpVtbl -> EnumThreads(This,ppEnum) )
-#define ICorProfilerInfo12_InitializeCurrentThread(This) \
+#define ICorProfilerInfo12_InitializeCurrentThread(This) \
( (This)->lpVtbl -> InitializeCurrentThread(This) )
-#define ICorProfilerInfo12_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
+#define ICorProfilerInfo12_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) )
-#define ICorProfilerInfo12_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
+#define ICorProfilerInfo12_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) )
-#define ICorProfilerInfo12_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo12_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo12_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
+#define ICorProfilerInfo12_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) )
-#define ICorProfilerInfo12_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
+#define ICorProfilerInfo12_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) )
-#define ICorProfilerInfo12_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
+#define ICorProfilerInfo12_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) )
-#define ICorProfilerInfo12_EnumJITedFunctions2(This,ppEnum) \
+#define ICorProfilerInfo12_EnumJITedFunctions2(This,ppEnum) \
( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) )
-#define ICorProfilerInfo12_GetObjectSize2(This,objectId,pcSize) \
+#define ICorProfilerInfo12_GetObjectSize2(This,objectId,pcSize) \
( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) )
-#define ICorProfilerInfo12_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
+#define ICorProfilerInfo12_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) )
-#define ICorProfilerInfo12_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
+#define ICorProfilerInfo12_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) )
-#define ICorProfilerInfo12_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
+#define ICorProfilerInfo12_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) )
-#define ICorProfilerInfo12_ApplyMetaData(This,moduleId) \
+#define ICorProfilerInfo12_ApplyMetaData(This,moduleId) \
( (This)->lpVtbl -> ApplyMetaData(This,moduleId) )
-#define ICorProfilerInfo12_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \
+#define ICorProfilerInfo12_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \
( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) )
-#define ICorProfilerInfo12_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \
+#define ICorProfilerInfo12_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \
( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) )
-#define ICorProfilerInfo12_IsFunctionDynamic(This,functionId,isDynamic) \
+#define ICorProfilerInfo12_IsFunctionDynamic(This,functionId,isDynamic) \
( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) )
-#define ICorProfilerInfo12_GetFunctionFromIP3(This,ip,functionId,pReJitId) \
+#define ICorProfilerInfo12_GetFunctionFromIP3(This,ip,functionId,pReJitId) \
( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) )
-#define ICorProfilerInfo12_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \
+#define ICorProfilerInfo12_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \
( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) )
-#define ICorProfilerInfo12_GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) \
+#define ICorProfilerInfo12_GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) \
( (This)->lpVtbl -> GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) )
-#define ICorProfilerInfo12_GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) \
+#define ICorProfilerInfo12_GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) \
( (This)->lpVtbl -> GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) )
-#define ICorProfilerInfo12_GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) \
+#define ICorProfilerInfo12_GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) \
( (This)->lpVtbl -> GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) )
-#define ICorProfilerInfo12_EnumerateObjectReferences(This,objectId,callback,clientData) \
+#define ICorProfilerInfo12_EnumerateObjectReferences(This,objectId,callback,clientData) \
( (This)->lpVtbl -> EnumerateObjectReferences(This,objectId,callback,clientData) )
-#define ICorProfilerInfo12_IsFrozenObject(This,objectId,pbFrozen) \
+#define ICorProfilerInfo12_IsFrozenObject(This,objectId,pbFrozen) \
( (This)->lpVtbl -> IsFrozenObject(This,objectId,pbFrozen) )
-#define ICorProfilerInfo12_GetLOHObjectSizeThreshold(This,pThreshold) \
+#define ICorProfilerInfo12_GetLOHObjectSizeThreshold(This,pThreshold) \
( (This)->lpVtbl -> GetLOHObjectSizeThreshold(This,pThreshold) )
-#define ICorProfilerInfo12_RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) \
+#define ICorProfilerInfo12_RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) \
( (This)->lpVtbl -> RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) )
-#define ICorProfilerInfo12_SuspendRuntime(This) \
+#define ICorProfilerInfo12_SuspendRuntime(This) \
( (This)->lpVtbl -> SuspendRuntime(This) )
-#define ICorProfilerInfo12_ResumeRuntime(This) \
+#define ICorProfilerInfo12_ResumeRuntime(This) \
( (This)->lpVtbl -> ResumeRuntime(This) )
-#define ICorProfilerInfo12_GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) \
+#define ICorProfilerInfo12_GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) \
( (This)->lpVtbl -> GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) )
-#define ICorProfilerInfo12_SetEnvironmentVariable(This,szName,szValue) \
+#define ICorProfilerInfo12_SetEnvironmentVariable(This,szName,szValue) \
( (This)->lpVtbl -> SetEnvironmentVariable(This,szName,szValue) )
-#define ICorProfilerInfo12_EventPipeStartSession(This,cProviderConfigs,pProviderConfigs,requestRundown,pSession) \
+#define ICorProfilerInfo12_EventPipeStartSession(This,cProviderConfigs,pProviderConfigs,requestRundown,pSession) \
( (This)->lpVtbl -> EventPipeStartSession(This,cProviderConfigs,pProviderConfigs,requestRundown,pSession) )
-#define ICorProfilerInfo12_EventPipeAddProviderToSession(This,session,providerConfig) \
+#define ICorProfilerInfo12_EventPipeAddProviderToSession(This,session,providerConfig) \
( (This)->lpVtbl -> EventPipeAddProviderToSession(This,session,providerConfig) )
-#define ICorProfilerInfo12_EventPipeStopSession(This,session) \
+#define ICorProfilerInfo12_EventPipeStopSession(This,session) \
( (This)->lpVtbl -> EventPipeStopSession(This,session) )
-#define ICorProfilerInfo12_EventPipeCreateProvider(This,providerName,pProvider) \
+#define ICorProfilerInfo12_EventPipeCreateProvider(This,providerName,pProvider) \
( (This)->lpVtbl -> EventPipeCreateProvider(This,providerName,pProvider) )
-#define ICorProfilerInfo12_EventPipeGetProviderInfo(This,provider,cchName,pcchName,providerName) \
+#define ICorProfilerInfo12_EventPipeGetProviderInfo(This,provider,cchName,pcchName,providerName) \
( (This)->lpVtbl -> EventPipeGetProviderInfo(This,provider,cchName,pcchName,providerName) )
-#define ICorProfilerInfo12_EventPipeDefineEvent(This,provider,eventName,eventID,keywords,eventVersion,level,opcode,needStack,cParamDescs,pParamDescs,pEvent) \
+#define ICorProfilerInfo12_EventPipeDefineEvent(This,provider,eventName,eventID,keywords,eventVersion,level,opcode,needStack,cParamDescs,pParamDescs,pEvent) \
( (This)->lpVtbl -> EventPipeDefineEvent(This,provider,eventName,eventID,keywords,eventVersion,level,opcode,needStack,cParamDescs,pParamDescs,pEvent) )
-#define ICorProfilerInfo12_EventPipeWriteEvent(This,event,cData,data,pActivityId,pRelatedActivityId) \
+#define ICorProfilerInfo12_EventPipeWriteEvent(This,event,cData,data,pActivityId,pRelatedActivityId) \
( (This)->lpVtbl -> EventPipeWriteEvent(This,event,cData,data,pActivityId,pRelatedActivityId) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
+
+
+
+
+#endif /* __ICorProfilerInfo12_INTERFACE_DEFINED__ */
+
+
+#ifndef __ICorProfilerInfo13_INTERFACE_DEFINED__
+#define __ICorProfilerInfo13_INTERFACE_DEFINED__
+
+/* interface ICorProfilerInfo13 */
+/* [local][unique][uuid][object] */
+
+
+EXTERN_C const IID IID_ICorProfilerInfo13;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("6E6C7EE2-0701-4EC2-9D29-2E8733B66934")
+ ICorProfilerInfo13 : public ICorProfilerInfo12
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE CreateHandle(
+ /* [in] */ ObjectID object,
+ /* [in] */ COR_PRF_HANDLE_TYPE type,
+ /* [out] */ ObjectHandleID *pHandle) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE DestroyHandle(
+ /* [in] */ ObjectHandleID handle) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetObjectIDFromHandle(
+ /* [in] */ ObjectHandleID handle,
+ /* [out] */ ObjectID *pObject) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct ICorProfilerInfo13Vtbl
+ {
+ BEGIN_INTERFACE
+
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ ICorProfilerInfo13 * This);
+
+ DECLSPEC_XFGVIRT(IUnknown, Release)
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ ICorProfilerInfo13 * This);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromObject)
+ HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ObjectID objectId,
+ /* [out] */ ClassID *pClassId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromToken)
+ HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ mdTypeDef typeDef,
+ /* [out] */ ClassID *pClassId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCodeInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionID functionId,
+ /* [out] */ LPCBYTE *pStart,
+ /* [out] */ ULONG *pcSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetEventMask)
+ HRESULT ( STDMETHODCALLTYPE *GetEventMask )(
+ ICorProfilerInfo13 * This,
+ /* [out] */ DWORD *pdwEvents);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromIP)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ LPCBYTE ip,
+ /* [out] */ FunctionID *pFunctionId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromToken)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ mdToken token,
+ /* [out] */ FunctionID *pFunctionId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetHandleFromThread)
+ HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ HANDLE *phThread);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetObjectSize)
+ HRESULT ( STDMETHODCALLTYPE *GetObjectSize )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ObjectID objectId,
+ /* [out] */ ULONG *pcSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, IsArrayClass)
+ HRESULT ( STDMETHODCALLTYPE *IsArrayClass )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ClassID classId,
+ /* [out] */ CorElementType *pBaseElemType,
+ /* [out] */ ClassID *pBaseClassId,
+ /* [out] */ ULONG *pcRank);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ DWORD *pdwWin32ThreadId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCurrentThreadID)
+ HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )(
+ ICorProfilerInfo13 * This,
+ /* [out] */ ThreadID *pThreadId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassIDInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ClassID classId,
+ /* [out] */ ModuleID *pModuleId,
+ /* [out] */ mdTypeDef *pTypeDefToken);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionID functionId,
+ /* [out] */ ClassID *pClassId,
+ /* [out] */ ModuleID *pModuleId,
+ /* [out] */ mdToken *pToken);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEventMask)
+ HRESULT ( STDMETHODCALLTYPE *SetEventMask )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ DWORD dwEvents);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEnterLeaveFunctionHooks)
+ HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionEnter *pFuncEnter,
+ /* [in] */ FunctionLeave *pFuncLeave,
+ /* [in] */ FunctionTailcall *pFuncTailcall);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionIDMapper)
+ HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionIDMapper *pFunc);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetTokenAndMetaDataFromFunction)
+ HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ REFIID riid,
+ /* [out] */ IUnknown **ppImport,
+ /* [out] */ mdToken *pToken);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [out] */ LPCBYTE *ppBaseLoadAddress,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [annotation][out] */
+ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
+ /* [out] */ AssemblyID *pAssemblyId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleMetaData)
+ HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ DWORD dwOpenFlags,
+ /* [in] */ REFIID riid,
+ /* [out] */ IUnknown **ppOut);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBody)
+ HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ mdMethodDef methodId,
+ /* [out] */ LPCBYTE *ppMethodHeader,
+ /* [out] */ ULONG *pcbMethodSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBodyAllocator)
+ HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [out] */ IMethodMalloc **ppMalloc);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILFunctionBody)
+ HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ mdMethodDef methodid,
+ /* [in] */ LPCBYTE pbNewILMethodHeader);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAppDomainInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ AppDomainID appDomainId,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [annotation][out] */
+ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
+ /* [out] */ ProcessID *pProcessId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAssemblyInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ AssemblyID assemblyId,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [annotation][out] */
+ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
+ /* [out] */ AppDomainID *pAppDomainId,
+ /* [out] */ ModuleID *pModuleId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionReJIT)
+ HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionID functionId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, ForceGC)
+ HRESULT ( STDMETHODCALLTYPE *ForceGC )(
+ ICorProfilerInfo13 * This);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILInstrumentedCodeMap)
+ HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ BOOL fStartJit,
+ /* [in] */ ULONG cILMapEntries,
+ /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionInterface)
+ HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )(
+ ICorProfilerInfo13 * This,
+ /* [out] */ IUnknown **ppicd);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionIThisThread)
+ HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )(
+ ICorProfilerInfo13 * This,
+ /* [out] */ IUnknown **ppicd);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadContext)
+ HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ ContextID *pContextId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, BeginInprocDebugging)
+ HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ BOOL fThisThreadOnly,
+ /* [out] */ DWORD *pdwProfilerContext);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, EndInprocDebugging)
+ HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ DWORD dwProfilerContext);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILToNativeMapping)
+ HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ ULONG32 cMap,
+ /* [out] */ ULONG32 *pcMap,
+ /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, DoStackSnapshot)
+ HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ThreadID thread,
+ /* [in] */ StackSnapshotCallback *callback,
+ /* [in] */ ULONG32 infoFlags,
+ /* [in] */ void *clientData,
+ /* [size_is][in] */ BYTE context[ ],
+ /* [in] */ ULONG32 contextSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, SetEnterLeaveFunctionHooks2)
+ HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionEnter2 *pFuncEnter,
+ /* [in] */ FunctionLeave2 *pFuncLeave,
+ /* [in] */ FunctionTailcall2 *pFuncTailcall);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionInfo2)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionID funcId,
+ /* [in] */ COR_PRF_FRAME_INFO frameInfo,
+ /* [out] */ ClassID *pClassId,
+ /* [out] */ ModuleID *pModuleId,
+ /* [out] */ mdToken *pToken,
+ /* [in] */ ULONG32 cTypeArgs,
+ /* [out] */ ULONG32 *pcTypeArgs,
+ /* [out] */ ClassID typeArgs[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStringLayout)
+ HRESULT ( STDMETHODCALLTYPE *GetStringLayout )(
+ ICorProfilerInfo13 * This,
+ /* [out] */ ULONG *pBufferLengthOffset,
+ /* [out] */ ULONG *pStringLengthOffset,
+ /* [out] */ ULONG *pBufferOffset);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassLayout)
+ HRESULT ( STDMETHODCALLTYPE *GetClassLayout )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ClassID classID,
+ /* [out][in] */ COR_FIELD_OFFSET rFieldOffset[ ],
+ /* [in] */ ULONG cFieldOffset,
+ /* [out] */ ULONG *pcFieldOffset,
+ /* [out] */ ULONG *pulClassSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassIDInfo2)
+ HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ClassID classId,
+ /* [out] */ ModuleID *pModuleId,
+ /* [out] */ mdTypeDef *pTypeDefToken,
+ /* [out] */ ClassID *pParentClassId,
+ /* [in] */ ULONG32 cNumTypeArgs,
+ /* [out] */ ULONG32 *pcNumTypeArgs,
+ /* [out] */ ClassID typeArgs[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetCodeInfo2)
+ HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionID functionID,
+ /* [in] */ ULONG32 cCodeInfos,
+ /* [out] */ ULONG32 *pcCodeInfos,
+ /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassFromTokenAndTypeArgs)
+ HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ModuleID moduleID,
+ /* [in] */ mdTypeDef typeDef,
+ /* [in] */ ULONG32 cTypeArgs,
+ /* [size_is][in] */ ClassID typeArgs[ ],
+ /* [out] */ ClassID *pClassID);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionFromTokenAndTypeArgs)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ModuleID moduleID,
+ /* [in] */ mdMethodDef funcDef,
+ /* [in] */ ClassID classId,
+ /* [in] */ ULONG32 cTypeArgs,
+ /* [size_is][in] */ ClassID typeArgs[ ],
+ /* [out] */ FunctionID *pFunctionID);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, EnumModuleFrozenObjects)
+ HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ModuleID moduleID,
+ /* [out] */ ICorProfilerObjectEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetArrayObjectInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ObjectID objectId,
+ /* [in] */ ULONG32 cDimensions,
+ /* [size_is][out] */ ULONG32 pDimensionSizes[ ],
+ /* [size_is][out] */ int pDimensionLowerBounds[ ],
+ /* [out] */ BYTE **ppData);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetBoxClassLayout)
+ HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ClassID classId,
+ /* [out] */ ULONG32 *pBufferOffset);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadAppDomain)
+ HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ AppDomainID *pAppDomainId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetRVAStaticAddress)
+ HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [out] */ void **ppAddress);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetAppDomainStaticAddress)
+ HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [in] */ AppDomainID appDomainId,
+ /* [out] */ void **ppAddress);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadStaticAddress)
+ HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ void **ppAddress);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetContextStaticAddress)
+ HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [in] */ ContextID contextId,
+ /* [out] */ void **ppAddress);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStaticFieldInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetGenerationBounds)
+ HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ULONG cObjectRanges,
+ /* [out] */ ULONG *pcObjectRanges,
+ /* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetObjectGeneration)
+ HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ObjectID objectId,
+ /* [out] */ COR_PRF_GC_GENERATION_RANGE *range);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetNotifiedExceptionClauseInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )(
+ ICorProfilerInfo13 * This,
+ /* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumJITedFunctions)
+ HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )(
+ ICorProfilerInfo13 * This,
+ /* [out] */ ICorProfilerFunctionEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, RequestProfilerDetach)
+ HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ DWORD dwExpectedCompletionMilliseconds);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetFunctionIDMapper2)
+ HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionIDMapper2 *pFunc,
+ /* [in] */ void *clientData);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetStringLayout2)
+ HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )(
+ ICorProfilerInfo13 * This,
+ /* [out] */ ULONG *pStringLengthOffset,
+ /* [out] */ ULONG *pBufferOffset);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3)
+ HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionEnter3 *pFuncEnter3,
+ /* [in] */ FunctionLeave3 *pFuncLeave3,
+ /* [in] */ FunctionTailcall3 *pFuncTailcall3);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3WithInfo)
+ HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo,
+ /* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo,
+ /* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionEnter3Info)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ COR_PRF_ELT_INFO eltInfo,
+ /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo,
+ /* [out][in] */ ULONG *pcbArgumentInfo,
+ /* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionLeave3Info)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ COR_PRF_ELT_INFO eltInfo,
+ /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo,
+ /* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionTailcall3Info)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ COR_PRF_ELT_INFO eltInfo,
+ /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumModules)
+ HRESULT ( STDMETHODCALLTYPE *EnumModules )(
+ ICorProfilerInfo13 * This,
+ /* [out] */ ICorProfilerModuleEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetRuntimeInformation)
+ HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )(
+ ICorProfilerInfo13 * This,
+ /* [out] */ USHORT *pClrInstanceId,
+ /* [out] */ COR_PRF_RUNTIME_TYPE *pRuntimeType,
+ /* [out] */ USHORT *pMajorVersion,
+ /* [out] */ USHORT *pMinorVersion,
+ /* [out] */ USHORT *pBuildNumber,
+ /* [out] */ USHORT *pQFEVersion,
+ /* [in] */ ULONG cchVersionString,
+ /* [out] */ ULONG *pcchVersionString,
+ /* [annotation][out] */
+ _Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetThreadStaticAddress2)
+ HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [in] */ AppDomainID appDomainId,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ void **ppAddress);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetAppDomainsContainingModule)
+ HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ ULONG32 cAppDomainIds,
+ /* [out] */ ULONG32 *pcAppDomainIds,
+ /* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetModuleInfo2)
+ HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [out] */ LPCBYTE *ppBaseLoadAddress,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [annotation][out] */
+ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
+ /* [out] */ AssemblyID *pAssemblyId,
+ /* [out] */ DWORD *pdwModuleFlags);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumThreads)
+ HRESULT ( STDMETHODCALLTYPE *EnumThreads )(
+ ICorProfilerInfo13 * This,
+ /* [out] */ ICorProfilerThreadEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, InitializeCurrentThread)
+ HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )(
+ ICorProfilerInfo13 * This);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestReJIT)
+ HRESULT ( STDMETHODCALLTYPE *RequestReJIT )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ULONG cFunctions,
+ /* [size_is][in] */ ModuleID moduleIds[ ],
+ /* [size_is][in] */ mdMethodDef methodIds[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestRevert)
+ HRESULT ( STDMETHODCALLTYPE *RequestRevert )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ULONG cFunctions,
+ /* [size_is][in] */ ModuleID moduleIds[ ],
+ /* [size_is][in] */ mdMethodDef methodIds[ ],
+ /* [size_is][out] */ HRESULT status[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetCodeInfo3)
+ HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionID functionID,
+ /* [in] */ ReJITID reJitId,
+ /* [in] */ ULONG32 cCodeInfos,
+ /* [out] */ ULONG32 *pcCodeInfos,
+ /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetFunctionFromIP2)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ LPCBYTE ip,
+ /* [out] */ FunctionID *pFunctionId,
+ /* [out] */ ReJITID *pReJitId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetReJITIDs)
+ HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ ULONG cReJitIds,
+ /* [out] */ ULONG *pcReJitIds,
+ /* [length_is][size_is][out] */ ReJITID reJitIds[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetILToNativeMapping2)
+ HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ ReJITID reJitId,
+ /* [in] */ ULONG32 cMap,
+ /* [out] */ ULONG32 *pcMap,
+ /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumJITedFunctions2)
+ HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )(
+ ICorProfilerInfo13 * This,
+ /* [out] */ ICorProfilerFunctionEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetObjectSize2)
+ HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ObjectID objectId,
+ /* [out] */ SIZE_T *pcSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, GetEventMask2)
+ HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )(
+ ICorProfilerInfo13 * This,
+ /* [out] */ DWORD *pdwEventsLow,
+ /* [out] */ DWORD *pdwEventsHigh);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, SetEventMask2)
+ HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ DWORD dwEventsLow,
+ /* [in] */ DWORD dwEventsHigh);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo6, EnumNgenModuleMethodsInliningThisMethod)
+ HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ModuleID inlinersModuleId,
+ /* [in] */ ModuleID inlineeModuleId,
+ /* [in] */ mdMethodDef inlineeMethodId,
+ /* [out] */ BOOL *incompleteData,
+ /* [out] */ ICorProfilerMethodEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ApplyMetaData)
+ HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ModuleID moduleId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, GetInMemorySymbolsLength)
+ HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [out] */ DWORD *pCountSymbolBytes);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ReadInMemorySymbols)
+ HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ DWORD symbolsReadOffset,
+ /* [out] */ BYTE *pSymbolBytes,
+ /* [in] */ DWORD countSymbolBytes,
+ /* [out] */ DWORD *pCountSymbolBytesRead);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, IsFunctionDynamic)
+ HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionID functionId,
+ /* [out] */ BOOL *isDynamic);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, GetFunctionFromIP3)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ LPCBYTE ip,
+ /* [out] */ FunctionID *functionId,
+ /* [out] */ ReJITID *pReJitId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, GetDynamicFunctionInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ FunctionID functionId,
+ /* [out] */ ModuleID *moduleId,
+ /* [out] */ PCCOR_SIGNATURE *ppvSig,
+ /* [out] */ ULONG *pbSig,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [out] */ WCHAR wszName[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetNativeCodeStartAddresses)
+ HRESULT ( STDMETHODCALLTYPE *GetNativeCodeStartAddresses )(
+ ICorProfilerInfo13 * This,
+ FunctionID functionID,
+ ReJITID reJitId,
+ ULONG32 cCodeStartAddresses,
+ ULONG32 *pcCodeStartAddresses,
+ UINT_PTR codeStartAddresses[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetILToNativeMapping3)
+ HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping3 )(
+ ICorProfilerInfo13 * This,
+ UINT_PTR pNativeCodeStartAddress,
+ ULONG32 cMap,
+ ULONG32 *pcMap,
+ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetCodeInfo4)
+ HRESULT ( STDMETHODCALLTYPE *GetCodeInfo4 )(
+ ICorProfilerInfo13 * This,
+ UINT_PTR pNativeCodeStartAddress,
+ ULONG32 cCodeInfos,
+ ULONG32 *pcCodeInfos,
+ COR_PRF_CODE_INFO codeInfos[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, EnumerateObjectReferences)
+ HRESULT ( STDMETHODCALLTYPE *EnumerateObjectReferences )(
+ ICorProfilerInfo13 * This,
+ ObjectID objectId,
+ ObjectReferenceCallback callback,
+ void *clientData);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, IsFrozenObject)
+ HRESULT ( STDMETHODCALLTYPE *IsFrozenObject )(
+ ICorProfilerInfo13 * This,
+ ObjectID objectId,
+ BOOL *pbFrozen);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, GetLOHObjectSizeThreshold)
+ HRESULT ( STDMETHODCALLTYPE *GetLOHObjectSizeThreshold )(
+ ICorProfilerInfo13 * This,
+ DWORD *pThreshold);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, RequestReJITWithInliners)
+ HRESULT ( STDMETHODCALLTYPE *RequestReJITWithInliners )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ DWORD dwRejitFlags,
+ /* [in] */ ULONG cFunctions,
+ /* [size_is][in] */ ModuleID moduleIds[ ],
+ /* [size_is][in] */ mdMethodDef methodIds[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, SuspendRuntime)
+ HRESULT ( STDMETHODCALLTYPE *SuspendRuntime )(
+ ICorProfilerInfo13 * This);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, ResumeRuntime)
+ HRESULT ( STDMETHODCALLTYPE *ResumeRuntime )(
+ ICorProfilerInfo13 * This);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo11, GetEnvironmentVariable)
+ HRESULT ( STDMETHODCALLTYPE *GetEnvironmentVariable )(
+ ICorProfilerInfo13 * This,
+ /* [string][in] */ const WCHAR *szName,
+ /* [in] */ ULONG cchValue,
+ /* [out] */ ULONG *pcchValue,
+ /* [annotation][out] */
+ _Out_writes_to_(cchValue, *pcchValue) WCHAR szValue[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo11, SetEnvironmentVariable)
+ HRESULT ( STDMETHODCALLTYPE *SetEnvironmentVariable )(
+ ICorProfilerInfo13 * This,
+ /* [string][in] */ const WCHAR *szName,
+ /* [string][in] */ const WCHAR *szValue);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeStartSession)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeStartSession )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ UINT32 cProviderConfigs,
+ /* [size_is][in] */ COR_PRF_EVENTPIPE_PROVIDER_CONFIG pProviderConfigs[ ],
+ /* [in] */ BOOL requestRundown,
+ /* [out] */ EVENTPIPE_SESSION *pSession);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeAddProviderToSession)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeAddProviderToSession )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ EVENTPIPE_SESSION session,
+ /* [in] */ COR_PRF_EVENTPIPE_PROVIDER_CONFIG providerConfig);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeStopSession)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeStopSession )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ EVENTPIPE_SESSION session);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeCreateProvider)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeCreateProvider )(
+ ICorProfilerInfo13 * This,
+ /* [string][in] */ const WCHAR *providerName,
+ /* [out] */ EVENTPIPE_PROVIDER *pProvider);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeGetProviderInfo)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeGetProviderInfo )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ EVENTPIPE_PROVIDER provider,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [annotation][out] */
+ _Out_writes_to_(cchName, *pcchName) WCHAR providerName[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeDefineEvent)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeDefineEvent )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ EVENTPIPE_PROVIDER provider,
+ /* [string][in] */ const WCHAR *eventName,
+ /* [in] */ UINT32 eventID,
+ /* [in] */ UINT64 keywords,
+ /* [in] */ UINT32 eventVersion,
+ /* [in] */ UINT32 level,
+ /* [in] */ UINT8 opcode,
+ /* [in] */ BOOL needStack,
+ /* [in] */ UINT32 cParamDescs,
+ /* [size_is][in] */ COR_PRF_EVENTPIPE_PARAM_DESC pParamDescs[ ],
+ /* [out] */ EVENTPIPE_EVENT *pEvent);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeWriteEvent)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeWriteEvent )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ EVENTPIPE_EVENT event,
+ /* [in] */ UINT32 cData,
+ /* [size_is][in] */ COR_PRF_EVENT_DATA data[ ],
+ /* [in] */ LPCGUID pActivityId,
+ /* [in] */ LPCGUID pRelatedActivityId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo13, CreateHandle)
+ HRESULT ( STDMETHODCALLTYPE *CreateHandle )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ObjectID object,
+ /* [in] */ COR_PRF_HANDLE_TYPE type,
+ /* [out] */ ObjectHandleID *pHandle);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo13, DestroyHandle)
+ HRESULT ( STDMETHODCALLTYPE *DestroyHandle )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ObjectHandleID handle);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo13, GetObjectIDFromHandle)
+ HRESULT ( STDMETHODCALLTYPE *GetObjectIDFromHandle )(
+ ICorProfilerInfo13 * This,
+ /* [in] */ ObjectHandleID handle,
+ /* [out] */ ObjectID *pObject);
+
+ END_INTERFACE
+ } ICorProfilerInfo13Vtbl;
+
+ interface ICorProfilerInfo13
+ {
+ CONST_VTBL struct ICorProfilerInfo13Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define ICorProfilerInfo13_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define ICorProfilerInfo13_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define ICorProfilerInfo13_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define ICorProfilerInfo13_GetClassFromObject(This,objectId,pClassId) \
+ ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) )
+
+#define ICorProfilerInfo13_GetClassFromToken(This,moduleId,typeDef,pClassId) \
+ ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) )
+
+#define ICorProfilerInfo13_GetCodeInfo(This,functionId,pStart,pcSize) \
+ ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) )
+
+#define ICorProfilerInfo13_GetEventMask(This,pdwEvents) \
+ ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) )
+
+#define ICorProfilerInfo13_GetFunctionFromIP(This,ip,pFunctionId) \
+ ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) )
+
+#define ICorProfilerInfo13_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
+ ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) )
+
+#define ICorProfilerInfo13_GetHandleFromThread(This,threadId,phThread) \
+ ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) )
+
+#define ICorProfilerInfo13_GetObjectSize(This,objectId,pcSize) \
+ ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) )
+
+#define ICorProfilerInfo13_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
+ ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) )
+
+#define ICorProfilerInfo13_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
+ ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) )
+
+#define ICorProfilerInfo13_GetCurrentThreadID(This,pThreadId) \
+ ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) )
+
+#define ICorProfilerInfo13_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
+ ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) )
+
+#define ICorProfilerInfo13_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
+ ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) )
+
+#define ICorProfilerInfo13_SetEventMask(This,dwEvents) \
+ ( (This)->lpVtbl -> SetEventMask(This,dwEvents) )
+
+#define ICorProfilerInfo13_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+ ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
+
+#define ICorProfilerInfo13_SetFunctionIDMapper(This,pFunc) \
+ ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) )
+
+#define ICorProfilerInfo13_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
+ ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) )
+
+#define ICorProfilerInfo13_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
+ ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) )
+
+#define ICorProfilerInfo13_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
+ ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) )
+
+#define ICorProfilerInfo13_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
+ ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) )
+
+#define ICorProfilerInfo13_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
+ ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) )
+
+#define ICorProfilerInfo13_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
+ ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) )
+
+#define ICorProfilerInfo13_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
+ ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) )
+
+#define ICorProfilerInfo13_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
+ ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) )
+
+#define ICorProfilerInfo13_SetFunctionReJIT(This,functionId) \
+ ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) )
+
+#define ICorProfilerInfo13_ForceGC(This) \
+ ( (This)->lpVtbl -> ForceGC(This) )
+
+#define ICorProfilerInfo13_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
+ ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) )
+
+#define ICorProfilerInfo13_GetInprocInspectionInterface(This,ppicd) \
+ ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) )
+
+#define ICorProfilerInfo13_GetInprocInspectionIThisThread(This,ppicd) \
+ ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) )
+
+#define ICorProfilerInfo13_GetThreadContext(This,threadId,pContextId) \
+ ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) )
+
+#define ICorProfilerInfo13_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
+ ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) )
+
+#define ICorProfilerInfo13_EndInprocDebugging(This,dwProfilerContext) \
+ ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) )
+
+#define ICorProfilerInfo13_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
+ ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) )
+
+
+#define ICorProfilerInfo13_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
+ ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) )
+
+#define ICorProfilerInfo13_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+ ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
+
+#define ICorProfilerInfo13_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
+ ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) )
+
+#define ICorProfilerInfo13_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
+ ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) )
+
+#define ICorProfilerInfo13_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
+ ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) )
+
+#define ICorProfilerInfo13_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
+ ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) )
+
+#define ICorProfilerInfo13_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
+ ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) )
+
+#define ICorProfilerInfo13_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
+ ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) )
+
+#define ICorProfilerInfo13_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
+ ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) )
+
+#define ICorProfilerInfo13_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
+ ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) )
+
+#define ICorProfilerInfo13_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
+ ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) )
+
+#define ICorProfilerInfo13_GetBoxClassLayout(This,classId,pBufferOffset) \
+ ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) )
+
+#define ICorProfilerInfo13_GetThreadAppDomain(This,threadId,pAppDomainId) \
+ ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) )
+
+#define ICorProfilerInfo13_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
+ ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) )
+
+#define ICorProfilerInfo13_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
+ ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) )
+
+#define ICorProfilerInfo13_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
+ ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) )
+
+#define ICorProfilerInfo13_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
+ ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) )
+
+#define ICorProfilerInfo13_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
+ ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) )
+
+#define ICorProfilerInfo13_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
+ ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) )
+
+#define ICorProfilerInfo13_GetObjectGeneration(This,objectId,range) \
+ ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) )
+
+#define ICorProfilerInfo13_GetNotifiedExceptionClauseInfo(This,pinfo) \
+ ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) )
+
+
+#define ICorProfilerInfo13_EnumJITedFunctions(This,ppEnum) \
+ ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) )
+
+#define ICorProfilerInfo13_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
+ ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) )
+
+#define ICorProfilerInfo13_SetFunctionIDMapper2(This,pFunc,clientData) \
+ ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) )
+
+#define ICorProfilerInfo13_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
+ ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) )
+
+#define ICorProfilerInfo13_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
+ ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) )
+
+#define ICorProfilerInfo13_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
+ ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) )
+
+#define ICorProfilerInfo13_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
+ ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) )
+
+#define ICorProfilerInfo13_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
+ ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) )
+
+#define ICorProfilerInfo13_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
+ ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) )
+
+#define ICorProfilerInfo13_EnumModules(This,ppEnum) \
+ ( (This)->lpVtbl -> EnumModules(This,ppEnum) )
+
+#define ICorProfilerInfo13_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
+ ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) )
+
+#define ICorProfilerInfo13_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
+ ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) )
+
+#define ICorProfilerInfo13_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
+ ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) )
+
+#define ICorProfilerInfo13_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
+ ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) )
+
+
+#define ICorProfilerInfo13_EnumThreads(This,ppEnum) \
+ ( (This)->lpVtbl -> EnumThreads(This,ppEnum) )
+
+#define ICorProfilerInfo13_InitializeCurrentThread(This) \
+ ( (This)->lpVtbl -> InitializeCurrentThread(This) )
+
+#define ICorProfilerInfo13_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
+ ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) )
+
+#define ICorProfilerInfo13_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
+ ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) )
+
+#define ICorProfilerInfo13_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
+ ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) )
+
+#define ICorProfilerInfo13_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
+ ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) )
+
+#define ICorProfilerInfo13_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
+ ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) )
+
+#define ICorProfilerInfo13_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
+ ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) )
+
+#define ICorProfilerInfo13_EnumJITedFunctions2(This,ppEnum) \
+ ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) )
+
+#define ICorProfilerInfo13_GetObjectSize2(This,objectId,pcSize) \
+ ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) )
+
+
+#define ICorProfilerInfo13_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
+ ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) )
+
+#define ICorProfilerInfo13_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
+ ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) )
+
+
+#define ICorProfilerInfo13_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
+ ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) )
+
+
+#define ICorProfilerInfo13_ApplyMetaData(This,moduleId) \
+ ( (This)->lpVtbl -> ApplyMetaData(This,moduleId) )
+
+#define ICorProfilerInfo13_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \
+ ( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) )
+
+#define ICorProfilerInfo13_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \
+ ( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) )
+
+
+#define ICorProfilerInfo13_IsFunctionDynamic(This,functionId,isDynamic) \
+ ( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) )
+
+#define ICorProfilerInfo13_GetFunctionFromIP3(This,ip,functionId,pReJitId) \
+ ( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) )
+
+#define ICorProfilerInfo13_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \
+ ( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) )
+
+
+#define ICorProfilerInfo13_GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) \
+ ( (This)->lpVtbl -> GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) )
+
+#define ICorProfilerInfo13_GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) \
+ ( (This)->lpVtbl -> GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) )
+
+#define ICorProfilerInfo13_GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) \
+ ( (This)->lpVtbl -> GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) )
+
+
+#define ICorProfilerInfo13_EnumerateObjectReferences(This,objectId,callback,clientData) \
+ ( (This)->lpVtbl -> EnumerateObjectReferences(This,objectId,callback,clientData) )
+
+#define ICorProfilerInfo13_IsFrozenObject(This,objectId,pbFrozen) \
+ ( (This)->lpVtbl -> IsFrozenObject(This,objectId,pbFrozen) )
+
+#define ICorProfilerInfo13_GetLOHObjectSizeThreshold(This,pThreshold) \
+ ( (This)->lpVtbl -> GetLOHObjectSizeThreshold(This,pThreshold) )
+
+#define ICorProfilerInfo13_RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) \
+ ( (This)->lpVtbl -> RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) )
+
+#define ICorProfilerInfo13_SuspendRuntime(This) \
+ ( (This)->lpVtbl -> SuspendRuntime(This) )
+
+#define ICorProfilerInfo13_ResumeRuntime(This) \
+ ( (This)->lpVtbl -> ResumeRuntime(This) )
+
+
+#define ICorProfilerInfo13_GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) \
+ ( (This)->lpVtbl -> GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) )
+
+#define ICorProfilerInfo13_SetEnvironmentVariable(This,szName,szValue) \
+ ( (This)->lpVtbl -> SetEnvironmentVariable(This,szName,szValue) )
+
+
+#define ICorProfilerInfo13_EventPipeStartSession(This,cProviderConfigs,pProviderConfigs,requestRundown,pSession) \
+ ( (This)->lpVtbl -> EventPipeStartSession(This,cProviderConfigs,pProviderConfigs,requestRundown,pSession) )
+
+#define ICorProfilerInfo13_EventPipeAddProviderToSession(This,session,providerConfig) \
+ ( (This)->lpVtbl -> EventPipeAddProviderToSession(This,session,providerConfig) )
+
+#define ICorProfilerInfo13_EventPipeStopSession(This,session) \
+ ( (This)->lpVtbl -> EventPipeStopSession(This,session) )
+
+#define ICorProfilerInfo13_EventPipeCreateProvider(This,providerName,pProvider) \
+ ( (This)->lpVtbl -> EventPipeCreateProvider(This,providerName,pProvider) )
+
+#define ICorProfilerInfo13_EventPipeGetProviderInfo(This,provider,cchName,pcchName,providerName) \
+ ( (This)->lpVtbl -> EventPipeGetProviderInfo(This,provider,cchName,pcchName,providerName) )
+
+#define ICorProfilerInfo13_EventPipeDefineEvent(This,provider,eventName,eventID,keywords,eventVersion,level,opcode,needStack,cParamDescs,pParamDescs,pEvent) \
+ ( (This)->lpVtbl -> EventPipeDefineEvent(This,provider,eventName,eventID,keywords,eventVersion,level,opcode,needStack,cParamDescs,pParamDescs,pEvent) )
+
+#define ICorProfilerInfo13_EventPipeWriteEvent(This,event,cData,data,pActivityId,pRelatedActivityId) \
+ ( (This)->lpVtbl -> EventPipeWriteEvent(This,event,cData,data,pActivityId,pRelatedActivityId) )
+
+
+#define ICorProfilerInfo13_CreateHandle(This,object,type,pHandle) \
+ ( (This)->lpVtbl -> CreateHandle(This,object,type,pHandle) )
+
+#define ICorProfilerInfo13_DestroyHandle(This,handle) \
+ ( (This)->lpVtbl -> DestroyHandle(This,handle) )
+
+#define ICorProfilerInfo13_GetObjectIDFromHandle(This,handle,pObject) \
+ ( (This)->lpVtbl -> GetObjectIDFromHandle(This,handle,pObject) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __ICorProfilerInfo13_INTERFACE_DEFINED__ */
+
+
+#ifndef __ICorProfilerInfo14_INTERFACE_DEFINED__
+#define __ICorProfilerInfo14_INTERFACE_DEFINED__
+
+/* interface ICorProfilerInfo14 */
+/* [local][unique][uuid][object] */
+
+
+EXTERN_C const IID IID_ICorProfilerInfo14;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("F460E352-D76D-4FE9-835F-F6AF9D6E862D")
+ ICorProfilerInfo14 : public ICorProfilerInfo13
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE EnumerateNonGCObjects(
+ /* [out] */ ICorProfilerObjectEnum **ppEnum) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE GetNonGCHeapBounds(
+ /* [in] */ ULONG cObjectRanges,
+ /* [out] */ ULONG *pcObjectRanges,
+ /* [length_is][size_is][out] */ COR_PRF_NONGC_HEAP_RANGE ranges[ ]) = 0;
+
+ virtual HRESULT STDMETHODCALLTYPE EventPipeCreateProvider2(
+ /* [string][in] */ const WCHAR *providerName,
+ /* [in] */ EventPipeProviderCallback *pCallback,
+ /* [out] */ EVENTPIPE_PROVIDER *pProvider) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct ICorProfilerInfo14Vtbl
+ {
+ BEGIN_INTERFACE
+
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ ICorProfilerInfo14 * This);
+
+ DECLSPEC_XFGVIRT(IUnknown, Release)
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ ICorProfilerInfo14 * This);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromObject)
+ HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ObjectID objectId,
+ /* [out] */ ClassID *pClassId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromToken)
+ HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ mdTypeDef typeDef,
+ /* [out] */ ClassID *pClassId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCodeInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionID functionId,
+ /* [out] */ LPCBYTE *pStart,
+ /* [out] */ ULONG *pcSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetEventMask)
+ HRESULT ( STDMETHODCALLTYPE *GetEventMask )(
+ ICorProfilerInfo14 * This,
+ /* [out] */ DWORD *pdwEvents);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromIP)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ LPCBYTE ip,
+ /* [out] */ FunctionID *pFunctionId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromToken)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ mdToken token,
+ /* [out] */ FunctionID *pFunctionId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetHandleFromThread)
+ HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ HANDLE *phThread);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetObjectSize)
+ HRESULT ( STDMETHODCALLTYPE *GetObjectSize )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ObjectID objectId,
+ /* [out] */ ULONG *pcSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, IsArrayClass)
+ HRESULT ( STDMETHODCALLTYPE *IsArrayClass )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ClassID classId,
+ /* [out] */ CorElementType *pBaseElemType,
+ /* [out] */ ClassID *pBaseClassId,
+ /* [out] */ ULONG *pcRank);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ DWORD *pdwWin32ThreadId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCurrentThreadID)
+ HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )(
+ ICorProfilerInfo14 * This,
+ /* [out] */ ThreadID *pThreadId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassIDInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ClassID classId,
+ /* [out] */ ModuleID *pModuleId,
+ /* [out] */ mdTypeDef *pTypeDefToken);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionID functionId,
+ /* [out] */ ClassID *pClassId,
+ /* [out] */ ModuleID *pModuleId,
+ /* [out] */ mdToken *pToken);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEventMask)
+ HRESULT ( STDMETHODCALLTYPE *SetEventMask )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ DWORD dwEvents);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEnterLeaveFunctionHooks)
+ HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionEnter *pFuncEnter,
+ /* [in] */ FunctionLeave *pFuncLeave,
+ /* [in] */ FunctionTailcall *pFuncTailcall);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionIDMapper)
+ HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionIDMapper *pFunc);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetTokenAndMetaDataFromFunction)
+ HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ REFIID riid,
+ /* [out] */ IUnknown **ppImport,
+ /* [out] */ mdToken *pToken);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [out] */ LPCBYTE *ppBaseLoadAddress,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [annotation][out] */
+ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
+ /* [out] */ AssemblyID *pAssemblyId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleMetaData)
+ HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ DWORD dwOpenFlags,
+ /* [in] */ REFIID riid,
+ /* [out] */ IUnknown **ppOut);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBody)
+ HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ mdMethodDef methodId,
+ /* [out] */ LPCBYTE *ppMethodHeader,
+ /* [out] */ ULONG *pcbMethodSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBodyAllocator)
+ HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [out] */ IMethodMalloc **ppMalloc);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILFunctionBody)
+ HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ mdMethodDef methodid,
+ /* [in] */ LPCBYTE pbNewILMethodHeader);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAppDomainInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ AppDomainID appDomainId,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [annotation][out] */
+ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
+ /* [out] */ ProcessID *pProcessId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAssemblyInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ AssemblyID assemblyId,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [annotation][out] */
+ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
+ /* [out] */ AppDomainID *pAppDomainId,
+ /* [out] */ ModuleID *pModuleId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionReJIT)
+ HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionID functionId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, ForceGC)
+ HRESULT ( STDMETHODCALLTYPE *ForceGC )(
+ ICorProfilerInfo14 * This);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILInstrumentedCodeMap)
+ HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ BOOL fStartJit,
+ /* [in] */ ULONG cILMapEntries,
+ /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionInterface)
+ HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )(
+ ICorProfilerInfo14 * This,
+ /* [out] */ IUnknown **ppicd);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionIThisThread)
+ HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )(
+ ICorProfilerInfo14 * This,
+ /* [out] */ IUnknown **ppicd);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadContext)
+ HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ ContextID *pContextId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, BeginInprocDebugging)
+ HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ BOOL fThisThreadOnly,
+ /* [out] */ DWORD *pdwProfilerContext);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, EndInprocDebugging)
+ HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ DWORD dwProfilerContext);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILToNativeMapping)
+ HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ ULONG32 cMap,
+ /* [out] */ ULONG32 *pcMap,
+ /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, DoStackSnapshot)
+ HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ThreadID thread,
+ /* [in] */ StackSnapshotCallback *callback,
+ /* [in] */ ULONG32 infoFlags,
+ /* [in] */ void *clientData,
+ /* [size_is][in] */ BYTE context[ ],
+ /* [in] */ ULONG32 contextSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, SetEnterLeaveFunctionHooks2)
+ HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionEnter2 *pFuncEnter,
+ /* [in] */ FunctionLeave2 *pFuncLeave,
+ /* [in] */ FunctionTailcall2 *pFuncTailcall);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionInfo2)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionID funcId,
+ /* [in] */ COR_PRF_FRAME_INFO frameInfo,
+ /* [out] */ ClassID *pClassId,
+ /* [out] */ ModuleID *pModuleId,
+ /* [out] */ mdToken *pToken,
+ /* [in] */ ULONG32 cTypeArgs,
+ /* [out] */ ULONG32 *pcTypeArgs,
+ /* [out] */ ClassID typeArgs[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStringLayout)
+ HRESULT ( STDMETHODCALLTYPE *GetStringLayout )(
+ ICorProfilerInfo14 * This,
+ /* [out] */ ULONG *pBufferLengthOffset,
+ /* [out] */ ULONG *pStringLengthOffset,
+ /* [out] */ ULONG *pBufferOffset);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassLayout)
+ HRESULT ( STDMETHODCALLTYPE *GetClassLayout )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ClassID classID,
+ /* [out][in] */ COR_FIELD_OFFSET rFieldOffset[ ],
+ /* [in] */ ULONG cFieldOffset,
+ /* [out] */ ULONG *pcFieldOffset,
+ /* [out] */ ULONG *pulClassSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassIDInfo2)
+ HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ClassID classId,
+ /* [out] */ ModuleID *pModuleId,
+ /* [out] */ mdTypeDef *pTypeDefToken,
+ /* [out] */ ClassID *pParentClassId,
+ /* [in] */ ULONG32 cNumTypeArgs,
+ /* [out] */ ULONG32 *pcNumTypeArgs,
+ /* [out] */ ClassID typeArgs[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetCodeInfo2)
+ HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionID functionID,
+ /* [in] */ ULONG32 cCodeInfos,
+ /* [out] */ ULONG32 *pcCodeInfos,
+ /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassFromTokenAndTypeArgs)
+ HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ModuleID moduleID,
+ /* [in] */ mdTypeDef typeDef,
+ /* [in] */ ULONG32 cTypeArgs,
+ /* [size_is][in] */ ClassID typeArgs[ ],
+ /* [out] */ ClassID *pClassID);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionFromTokenAndTypeArgs)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ModuleID moduleID,
+ /* [in] */ mdMethodDef funcDef,
+ /* [in] */ ClassID classId,
+ /* [in] */ ULONG32 cTypeArgs,
+ /* [size_is][in] */ ClassID typeArgs[ ],
+ /* [out] */ FunctionID *pFunctionID);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, EnumModuleFrozenObjects)
+ HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ModuleID moduleID,
+ /* [out] */ ICorProfilerObjectEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetArrayObjectInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ObjectID objectId,
+ /* [in] */ ULONG32 cDimensions,
+ /* [size_is][out] */ ULONG32 pDimensionSizes[ ],
+ /* [size_is][out] */ int pDimensionLowerBounds[ ],
+ /* [out] */ BYTE **ppData);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetBoxClassLayout)
+ HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ClassID classId,
+ /* [out] */ ULONG32 *pBufferOffset);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadAppDomain)
+ HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ AppDomainID *pAppDomainId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetRVAStaticAddress)
+ HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [out] */ void **ppAddress);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetAppDomainStaticAddress)
+ HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [in] */ AppDomainID appDomainId,
+ /* [out] */ void **ppAddress);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadStaticAddress)
+ HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ void **ppAddress);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetContextStaticAddress)
+ HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [in] */ ContextID contextId,
+ /* [out] */ void **ppAddress);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStaticFieldInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetGenerationBounds)
+ HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ULONG cObjectRanges,
+ /* [out] */ ULONG *pcObjectRanges,
+ /* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetObjectGeneration)
+ HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ObjectID objectId,
+ /* [out] */ COR_PRF_GC_GENERATION_RANGE *range);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetNotifiedExceptionClauseInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )(
+ ICorProfilerInfo14 * This,
+ /* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumJITedFunctions)
+ HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )(
+ ICorProfilerInfo14 * This,
+ /* [out] */ ICorProfilerFunctionEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, RequestProfilerDetach)
+ HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ DWORD dwExpectedCompletionMilliseconds);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetFunctionIDMapper2)
+ HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionIDMapper2 *pFunc,
+ /* [in] */ void *clientData);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetStringLayout2)
+ HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )(
+ ICorProfilerInfo14 * This,
+ /* [out] */ ULONG *pStringLengthOffset,
+ /* [out] */ ULONG *pBufferOffset);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3)
+ HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionEnter3 *pFuncEnter3,
+ /* [in] */ FunctionLeave3 *pFuncLeave3,
+ /* [in] */ FunctionTailcall3 *pFuncTailcall3);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3WithInfo)
+ HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo,
+ /* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo,
+ /* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionEnter3Info)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ COR_PRF_ELT_INFO eltInfo,
+ /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo,
+ /* [out][in] */ ULONG *pcbArgumentInfo,
+ /* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionLeave3Info)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ COR_PRF_ELT_INFO eltInfo,
+ /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo,
+ /* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionTailcall3Info)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ COR_PRF_ELT_INFO eltInfo,
+ /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumModules)
+ HRESULT ( STDMETHODCALLTYPE *EnumModules )(
+ ICorProfilerInfo14 * This,
+ /* [out] */ ICorProfilerModuleEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetRuntimeInformation)
+ HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )(
+ ICorProfilerInfo14 * This,
+ /* [out] */ USHORT *pClrInstanceId,
+ /* [out] */ COR_PRF_RUNTIME_TYPE *pRuntimeType,
+ /* [out] */ USHORT *pMajorVersion,
+ /* [out] */ USHORT *pMinorVersion,
+ /* [out] */ USHORT *pBuildNumber,
+ /* [out] */ USHORT *pQFEVersion,
+ /* [in] */ ULONG cchVersionString,
+ /* [out] */ ULONG *pcchVersionString,
+ /* [annotation][out] */
+ _Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetThreadStaticAddress2)
+ HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [in] */ AppDomainID appDomainId,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ void **ppAddress);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetAppDomainsContainingModule)
+ HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ ULONG32 cAppDomainIds,
+ /* [out] */ ULONG32 *pcAppDomainIds,
+ /* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetModuleInfo2)
+ HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [out] */ LPCBYTE *ppBaseLoadAddress,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [annotation][out] */
+ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
+ /* [out] */ AssemblyID *pAssemblyId,
+ /* [out] */ DWORD *pdwModuleFlags);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumThreads)
+ HRESULT ( STDMETHODCALLTYPE *EnumThreads )(
+ ICorProfilerInfo14 * This,
+ /* [out] */ ICorProfilerThreadEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, InitializeCurrentThread)
+ HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )(
+ ICorProfilerInfo14 * This);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestReJIT)
+ HRESULT ( STDMETHODCALLTYPE *RequestReJIT )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ULONG cFunctions,
+ /* [size_is][in] */ ModuleID moduleIds[ ],
+ /* [size_is][in] */ mdMethodDef methodIds[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestRevert)
+ HRESULT ( STDMETHODCALLTYPE *RequestRevert )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ULONG cFunctions,
+ /* [size_is][in] */ ModuleID moduleIds[ ],
+ /* [size_is][in] */ mdMethodDef methodIds[ ],
+ /* [size_is][out] */ HRESULT status[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetCodeInfo3)
+ HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionID functionID,
+ /* [in] */ ReJITID reJitId,
+ /* [in] */ ULONG32 cCodeInfos,
+ /* [out] */ ULONG32 *pcCodeInfos,
+ /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetFunctionFromIP2)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ LPCBYTE ip,
+ /* [out] */ FunctionID *pFunctionId,
+ /* [out] */ ReJITID *pReJitId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetReJITIDs)
+ HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ ULONG cReJitIds,
+ /* [out] */ ULONG *pcReJitIds,
+ /* [length_is][size_is][out] */ ReJITID reJitIds[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetILToNativeMapping2)
+ HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ ReJITID reJitId,
+ /* [in] */ ULONG32 cMap,
+ /* [out] */ ULONG32 *pcMap,
+ /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumJITedFunctions2)
+ HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )(
+ ICorProfilerInfo14 * This,
+ /* [out] */ ICorProfilerFunctionEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetObjectSize2)
+ HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ObjectID objectId,
+ /* [out] */ SIZE_T *pcSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, GetEventMask2)
+ HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )(
+ ICorProfilerInfo14 * This,
+ /* [out] */ DWORD *pdwEventsLow,
+ /* [out] */ DWORD *pdwEventsHigh);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, SetEventMask2)
+ HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ DWORD dwEventsLow,
+ /* [in] */ DWORD dwEventsHigh);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo6, EnumNgenModuleMethodsInliningThisMethod)
+ HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ModuleID inlinersModuleId,
+ /* [in] */ ModuleID inlineeModuleId,
+ /* [in] */ mdMethodDef inlineeMethodId,
+ /* [out] */ BOOL *incompleteData,
+ /* [out] */ ICorProfilerMethodEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ApplyMetaData)
+ HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ModuleID moduleId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, GetInMemorySymbolsLength)
+ HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [out] */ DWORD *pCountSymbolBytes);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ReadInMemorySymbols)
+ HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ DWORD symbolsReadOffset,
+ /* [out] */ BYTE *pSymbolBytes,
+ /* [in] */ DWORD countSymbolBytes,
+ /* [out] */ DWORD *pCountSymbolBytesRead);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, IsFunctionDynamic)
+ HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionID functionId,
+ /* [out] */ BOOL *isDynamic);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, GetFunctionFromIP3)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ LPCBYTE ip,
+ /* [out] */ FunctionID *functionId,
+ /* [out] */ ReJITID *pReJitId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, GetDynamicFunctionInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ FunctionID functionId,
+ /* [out] */ ModuleID *moduleId,
+ /* [out] */ PCCOR_SIGNATURE *ppvSig,
+ /* [out] */ ULONG *pbSig,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [out] */ WCHAR wszName[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetNativeCodeStartAddresses)
+ HRESULT ( STDMETHODCALLTYPE *GetNativeCodeStartAddresses )(
+ ICorProfilerInfo14 * This,
+ FunctionID functionID,
+ ReJITID reJitId,
+ ULONG32 cCodeStartAddresses,
+ ULONG32 *pcCodeStartAddresses,
+ UINT_PTR codeStartAddresses[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetILToNativeMapping3)
+ HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping3 )(
+ ICorProfilerInfo14 * This,
+ UINT_PTR pNativeCodeStartAddress,
+ ULONG32 cMap,
+ ULONG32 *pcMap,
+ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetCodeInfo4)
+ HRESULT ( STDMETHODCALLTYPE *GetCodeInfo4 )(
+ ICorProfilerInfo14 * This,
+ UINT_PTR pNativeCodeStartAddress,
+ ULONG32 cCodeInfos,
+ ULONG32 *pcCodeInfos,
+ COR_PRF_CODE_INFO codeInfos[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, EnumerateObjectReferences)
+ HRESULT ( STDMETHODCALLTYPE *EnumerateObjectReferences )(
+ ICorProfilerInfo14 * This,
+ ObjectID objectId,
+ ObjectReferenceCallback callback,
+ void *clientData);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, IsFrozenObject)
+ HRESULT ( STDMETHODCALLTYPE *IsFrozenObject )(
+ ICorProfilerInfo14 * This,
+ ObjectID objectId,
+ BOOL *pbFrozen);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, GetLOHObjectSizeThreshold)
+ HRESULT ( STDMETHODCALLTYPE *GetLOHObjectSizeThreshold )(
+ ICorProfilerInfo14 * This,
+ DWORD *pThreshold);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, RequestReJITWithInliners)
+ HRESULT ( STDMETHODCALLTYPE *RequestReJITWithInliners )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ DWORD dwRejitFlags,
+ /* [in] */ ULONG cFunctions,
+ /* [size_is][in] */ ModuleID moduleIds[ ],
+ /* [size_is][in] */ mdMethodDef methodIds[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, SuspendRuntime)
+ HRESULT ( STDMETHODCALLTYPE *SuspendRuntime )(
+ ICorProfilerInfo14 * This);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, ResumeRuntime)
+ HRESULT ( STDMETHODCALLTYPE *ResumeRuntime )(
+ ICorProfilerInfo14 * This);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo11, GetEnvironmentVariable)
+ HRESULT ( STDMETHODCALLTYPE *GetEnvironmentVariable )(
+ ICorProfilerInfo14 * This,
+ /* [string][in] */ const WCHAR *szName,
+ /* [in] */ ULONG cchValue,
+ /* [out] */ ULONG *pcchValue,
+ /* [annotation][out] */
+ _Out_writes_to_(cchValue, *pcchValue) WCHAR szValue[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo11, SetEnvironmentVariable)
+ HRESULT ( STDMETHODCALLTYPE *SetEnvironmentVariable )(
+ ICorProfilerInfo14 * This,
+ /* [string][in] */ const WCHAR *szName,
+ /* [string][in] */ const WCHAR *szValue);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeStartSession)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeStartSession )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ UINT32 cProviderConfigs,
+ /* [size_is][in] */ COR_PRF_EVENTPIPE_PROVIDER_CONFIG pProviderConfigs[ ],
+ /* [in] */ BOOL requestRundown,
+ /* [out] */ EVENTPIPE_SESSION *pSession);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeAddProviderToSession)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeAddProviderToSession )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ EVENTPIPE_SESSION session,
+ /* [in] */ COR_PRF_EVENTPIPE_PROVIDER_CONFIG providerConfig);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeStopSession)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeStopSession )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ EVENTPIPE_SESSION session);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeCreateProvider)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeCreateProvider )(
+ ICorProfilerInfo14 * This,
+ /* [string][in] */ const WCHAR *providerName,
+ /* [out] */ EVENTPIPE_PROVIDER *pProvider);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeGetProviderInfo)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeGetProviderInfo )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ EVENTPIPE_PROVIDER provider,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [annotation][out] */
+ _Out_writes_to_(cchName, *pcchName) WCHAR providerName[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeDefineEvent)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeDefineEvent )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ EVENTPIPE_PROVIDER provider,
+ /* [string][in] */ const WCHAR *eventName,
+ /* [in] */ UINT32 eventID,
+ /* [in] */ UINT64 keywords,
+ /* [in] */ UINT32 eventVersion,
+ /* [in] */ UINT32 level,
+ /* [in] */ UINT8 opcode,
+ /* [in] */ BOOL needStack,
+ /* [in] */ UINT32 cParamDescs,
+ /* [size_is][in] */ COR_PRF_EVENTPIPE_PARAM_DESC pParamDescs[ ],
+ /* [out] */ EVENTPIPE_EVENT *pEvent);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeWriteEvent)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeWriteEvent )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ EVENTPIPE_EVENT event,
+ /* [in] */ UINT32 cData,
+ /* [size_is][in] */ COR_PRF_EVENT_DATA data[ ],
+ /* [in] */ LPCGUID pActivityId,
+ /* [in] */ LPCGUID pRelatedActivityId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo13, CreateHandle)
+ HRESULT ( STDMETHODCALLTYPE *CreateHandle )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ObjectID object,
+ /* [in] */ COR_PRF_HANDLE_TYPE type,
+ /* [out] */ ObjectHandleID *pHandle);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo13, DestroyHandle)
+ HRESULT ( STDMETHODCALLTYPE *DestroyHandle )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ObjectHandleID handle);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo13, GetObjectIDFromHandle)
+ HRESULT ( STDMETHODCALLTYPE *GetObjectIDFromHandle )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ObjectHandleID handle,
+ /* [out] */ ObjectID *pObject);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo14, EnumerateNonGCObjects)
+ HRESULT ( STDMETHODCALLTYPE *EnumerateNonGCObjects )(
+ ICorProfilerInfo14 * This,
+ /* [out] */ ICorProfilerObjectEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo14, GetNonGCHeapBounds)
+ HRESULT ( STDMETHODCALLTYPE *GetNonGCHeapBounds )(
+ ICorProfilerInfo14 * This,
+ /* [in] */ ULONG cObjectRanges,
+ /* [out] */ ULONG *pcObjectRanges,
+ /* [length_is][size_is][out] */ COR_PRF_NONGC_HEAP_RANGE ranges[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo14, EventPipeCreateProvider2)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeCreateProvider2 )(
+ ICorProfilerInfo14 * This,
+ /* [string][in] */ const WCHAR *providerName,
+ /* [in] */ EventPipeProviderCallback *pCallback,
+ /* [out] */ EVENTPIPE_PROVIDER *pProvider);
+
+ END_INTERFACE
+ } ICorProfilerInfo14Vtbl;
+
+ interface ICorProfilerInfo14
+ {
+ CONST_VTBL struct ICorProfilerInfo14Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define ICorProfilerInfo14_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define ICorProfilerInfo14_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define ICorProfilerInfo14_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define ICorProfilerInfo14_GetClassFromObject(This,objectId,pClassId) \
+ ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) )
+
+#define ICorProfilerInfo14_GetClassFromToken(This,moduleId,typeDef,pClassId) \
+ ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) )
+
+#define ICorProfilerInfo14_GetCodeInfo(This,functionId,pStart,pcSize) \
+ ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) )
+
+#define ICorProfilerInfo14_GetEventMask(This,pdwEvents) \
+ ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) )
+
+#define ICorProfilerInfo14_GetFunctionFromIP(This,ip,pFunctionId) \
+ ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) )
+
+#define ICorProfilerInfo14_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
+ ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) )
+
+#define ICorProfilerInfo14_GetHandleFromThread(This,threadId,phThread) \
+ ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) )
+
+#define ICorProfilerInfo14_GetObjectSize(This,objectId,pcSize) \
+ ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) )
+
+#define ICorProfilerInfo14_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
+ ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) )
+
+#define ICorProfilerInfo14_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
+ ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) )
+
+#define ICorProfilerInfo14_GetCurrentThreadID(This,pThreadId) \
+ ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) )
+
+#define ICorProfilerInfo14_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
+ ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) )
+
+#define ICorProfilerInfo14_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
+ ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) )
+
+#define ICorProfilerInfo14_SetEventMask(This,dwEvents) \
+ ( (This)->lpVtbl -> SetEventMask(This,dwEvents) )
+
+#define ICorProfilerInfo14_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+ ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
+
+#define ICorProfilerInfo14_SetFunctionIDMapper(This,pFunc) \
+ ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) )
+
+#define ICorProfilerInfo14_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
+ ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) )
+
+#define ICorProfilerInfo14_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
+ ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) )
+
+#define ICorProfilerInfo14_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
+ ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) )
+
+#define ICorProfilerInfo14_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
+ ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) )
+
+#define ICorProfilerInfo14_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
+ ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) )
+
+#define ICorProfilerInfo14_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
+ ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) )
+
+#define ICorProfilerInfo14_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
+ ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) )
+
+#define ICorProfilerInfo14_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
+ ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) )
+
+#define ICorProfilerInfo14_SetFunctionReJIT(This,functionId) \
+ ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) )
+
+#define ICorProfilerInfo14_ForceGC(This) \
+ ( (This)->lpVtbl -> ForceGC(This) )
+
+#define ICorProfilerInfo14_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
+ ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) )
+
+#define ICorProfilerInfo14_GetInprocInspectionInterface(This,ppicd) \
+ ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) )
+
+#define ICorProfilerInfo14_GetInprocInspectionIThisThread(This,ppicd) \
+ ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) )
+
+#define ICorProfilerInfo14_GetThreadContext(This,threadId,pContextId) \
+ ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) )
+
+#define ICorProfilerInfo14_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
+ ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) )
+
+#define ICorProfilerInfo14_EndInprocDebugging(This,dwProfilerContext) \
+ ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) )
+
+#define ICorProfilerInfo14_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
+ ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) )
+
+
+#define ICorProfilerInfo14_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
+ ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) )
+
+#define ICorProfilerInfo14_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+ ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
+
+#define ICorProfilerInfo14_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
+ ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) )
+
+#define ICorProfilerInfo14_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
+ ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) )
+
+#define ICorProfilerInfo14_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
+ ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) )
+
+#define ICorProfilerInfo14_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
+ ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) )
+
+#define ICorProfilerInfo14_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
+ ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) )
+
+#define ICorProfilerInfo14_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
+ ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) )
+
+#define ICorProfilerInfo14_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
+ ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) )
+
+#define ICorProfilerInfo14_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
+ ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) )
+
+#define ICorProfilerInfo14_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
+ ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) )
+
+#define ICorProfilerInfo14_GetBoxClassLayout(This,classId,pBufferOffset) \
+ ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) )
+
+#define ICorProfilerInfo14_GetThreadAppDomain(This,threadId,pAppDomainId) \
+ ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) )
+
+#define ICorProfilerInfo14_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
+ ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) )
+
+#define ICorProfilerInfo14_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
+ ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) )
+
+#define ICorProfilerInfo14_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
+ ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) )
+
+#define ICorProfilerInfo14_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
+ ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) )
+
+#define ICorProfilerInfo14_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
+ ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) )
+
+#define ICorProfilerInfo14_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
+ ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) )
+
+#define ICorProfilerInfo14_GetObjectGeneration(This,objectId,range) \
+ ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) )
+
+#define ICorProfilerInfo14_GetNotifiedExceptionClauseInfo(This,pinfo) \
+ ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) )
+
+
+#define ICorProfilerInfo14_EnumJITedFunctions(This,ppEnum) \
+ ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) )
+
+#define ICorProfilerInfo14_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
+ ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) )
+
+#define ICorProfilerInfo14_SetFunctionIDMapper2(This,pFunc,clientData) \
+ ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) )
+
+#define ICorProfilerInfo14_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
+ ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) )
+
+#define ICorProfilerInfo14_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
+ ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) )
+
+#define ICorProfilerInfo14_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
+ ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) )
+
+#define ICorProfilerInfo14_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
+ ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) )
+
+#define ICorProfilerInfo14_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
+ ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) )
+
+#define ICorProfilerInfo14_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
+ ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) )
+
+#define ICorProfilerInfo14_EnumModules(This,ppEnum) \
+ ( (This)->lpVtbl -> EnumModules(This,ppEnum) )
+
+#define ICorProfilerInfo14_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
+ ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) )
+
+#define ICorProfilerInfo14_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
+ ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) )
+
+#define ICorProfilerInfo14_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
+ ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) )
+
+#define ICorProfilerInfo14_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
+ ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) )
+
+
+#define ICorProfilerInfo14_EnumThreads(This,ppEnum) \
+ ( (This)->lpVtbl -> EnumThreads(This,ppEnum) )
+
+#define ICorProfilerInfo14_InitializeCurrentThread(This) \
+ ( (This)->lpVtbl -> InitializeCurrentThread(This) )
+
+#define ICorProfilerInfo14_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
+ ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) )
+
+#define ICorProfilerInfo14_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
+ ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) )
+
+#define ICorProfilerInfo14_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
+ ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) )
+
+#define ICorProfilerInfo14_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
+ ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) )
+
+#define ICorProfilerInfo14_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
+ ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) )
+
+#define ICorProfilerInfo14_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
+ ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) )
+
+#define ICorProfilerInfo14_EnumJITedFunctions2(This,ppEnum) \
+ ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) )
+
+#define ICorProfilerInfo14_GetObjectSize2(This,objectId,pcSize) \
+ ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) )
+
+
+#define ICorProfilerInfo14_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
+ ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) )
+
+#define ICorProfilerInfo14_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
+ ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) )
+
+
+#define ICorProfilerInfo14_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
+ ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) )
+
+
+#define ICorProfilerInfo14_ApplyMetaData(This,moduleId) \
+ ( (This)->lpVtbl -> ApplyMetaData(This,moduleId) )
+
+#define ICorProfilerInfo14_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \
+ ( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) )
+
+#define ICorProfilerInfo14_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \
+ ( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) )
+
+
+#define ICorProfilerInfo14_IsFunctionDynamic(This,functionId,isDynamic) \
+ ( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) )
+
+#define ICorProfilerInfo14_GetFunctionFromIP3(This,ip,functionId,pReJitId) \
+ ( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) )
+
+#define ICorProfilerInfo14_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \
+ ( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) )
+
+
+#define ICorProfilerInfo14_GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) \
+ ( (This)->lpVtbl -> GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) )
+
+#define ICorProfilerInfo14_GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) \
+ ( (This)->lpVtbl -> GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) )
+
+#define ICorProfilerInfo14_GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) \
+ ( (This)->lpVtbl -> GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) )
+
+
+#define ICorProfilerInfo14_EnumerateObjectReferences(This,objectId,callback,clientData) \
+ ( (This)->lpVtbl -> EnumerateObjectReferences(This,objectId,callback,clientData) )
+
+#define ICorProfilerInfo14_IsFrozenObject(This,objectId,pbFrozen) \
+ ( (This)->lpVtbl -> IsFrozenObject(This,objectId,pbFrozen) )
+
+#define ICorProfilerInfo14_GetLOHObjectSizeThreshold(This,pThreshold) \
+ ( (This)->lpVtbl -> GetLOHObjectSizeThreshold(This,pThreshold) )
+
+#define ICorProfilerInfo14_RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) \
+ ( (This)->lpVtbl -> RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) )
+
+#define ICorProfilerInfo14_SuspendRuntime(This) \
+ ( (This)->lpVtbl -> SuspendRuntime(This) )
+
+#define ICorProfilerInfo14_ResumeRuntime(This) \
+ ( (This)->lpVtbl -> ResumeRuntime(This) )
+
+
+#define ICorProfilerInfo14_GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) \
+ ( (This)->lpVtbl -> GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) )
+
+#define ICorProfilerInfo14_SetEnvironmentVariable(This,szName,szValue) \
+ ( (This)->lpVtbl -> SetEnvironmentVariable(This,szName,szValue) )
+
+
+#define ICorProfilerInfo14_EventPipeStartSession(This,cProviderConfigs,pProviderConfigs,requestRundown,pSession) \
+ ( (This)->lpVtbl -> EventPipeStartSession(This,cProviderConfigs,pProviderConfigs,requestRundown,pSession) )
+
+#define ICorProfilerInfo14_EventPipeAddProviderToSession(This,session,providerConfig) \
+ ( (This)->lpVtbl -> EventPipeAddProviderToSession(This,session,providerConfig) )
+
+#define ICorProfilerInfo14_EventPipeStopSession(This,session) \
+ ( (This)->lpVtbl -> EventPipeStopSession(This,session) )
+
+#define ICorProfilerInfo14_EventPipeCreateProvider(This,providerName,pProvider) \
+ ( (This)->lpVtbl -> EventPipeCreateProvider(This,providerName,pProvider) )
+
+#define ICorProfilerInfo14_EventPipeGetProviderInfo(This,provider,cchName,pcchName,providerName) \
+ ( (This)->lpVtbl -> EventPipeGetProviderInfo(This,provider,cchName,pcchName,providerName) )
+
+#define ICorProfilerInfo14_EventPipeDefineEvent(This,provider,eventName,eventID,keywords,eventVersion,level,opcode,needStack,cParamDescs,pParamDescs,pEvent) \
+ ( (This)->lpVtbl -> EventPipeDefineEvent(This,provider,eventName,eventID,keywords,eventVersion,level,opcode,needStack,cParamDescs,pParamDescs,pEvent) )
+
+#define ICorProfilerInfo14_EventPipeWriteEvent(This,event,cData,data,pActivityId,pRelatedActivityId) \
+ ( (This)->lpVtbl -> EventPipeWriteEvent(This,event,cData,data,pActivityId,pRelatedActivityId) )
+
+
+#define ICorProfilerInfo14_CreateHandle(This,object,type,pHandle) \
+ ( (This)->lpVtbl -> CreateHandle(This,object,type,pHandle) )
+
+#define ICorProfilerInfo14_DestroyHandle(This,handle) \
+ ( (This)->lpVtbl -> DestroyHandle(This,handle) )
+
+#define ICorProfilerInfo14_GetObjectIDFromHandle(This,handle,pObject) \
+ ( (This)->lpVtbl -> GetObjectIDFromHandle(This,handle,pObject) )
+
+
+#define ICorProfilerInfo14_EnumerateNonGCObjects(This,ppEnum) \
+ ( (This)->lpVtbl -> EnumerateNonGCObjects(This,ppEnum) )
+
+#define ICorProfilerInfo14_GetNonGCHeapBounds(This,cObjectRanges,pcObjectRanges,ranges) \
+ ( (This)->lpVtbl -> GetNonGCHeapBounds(This,cObjectRanges,pcObjectRanges,ranges) )
+
+#define ICorProfilerInfo14_EventPipeCreateProvider2(This,providerName,pCallback,pProvider) \
+ ( (This)->lpVtbl -> EventPipeCreateProvider2(This,providerName,pCallback,pProvider) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
+
+
+
+
+#endif /* __ICorProfilerInfo14_INTERFACE_DEFINED__ */
+
+
+#ifndef __ICorProfilerInfo15_INTERFACE_DEFINED__
+#define __ICorProfilerInfo15_INTERFACE_DEFINED__
+
+/* interface ICorProfilerInfo15 */
+/* [local][unique][uuid][object] */
+
+
+EXTERN_C const IID IID_ICorProfilerInfo15;
+
+#if defined(__cplusplus) && !defined(CINTERFACE)
+
+ MIDL_INTERFACE("B446462D-BD22-41DD-872D-DC714C49EB56")
+ ICorProfilerInfo15 : public ICorProfilerInfo14
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE EnumerateGCHeapObjects(
+ /* [in] */ ObjectCallback callback,
+ /* [in] */ void *callbackState) = 0;
+
+ };
+
+
+#else /* C style interface */
+
+ typedef struct ICorProfilerInfo15Vtbl
+ {
+ BEGIN_INTERFACE
+
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
+ HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ REFIID riid,
+ /* [annotation][iid_is][out] */
+ _COM_Outptr_ void **ppvObject);
+
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
+ ULONG ( STDMETHODCALLTYPE *AddRef )(
+ ICorProfilerInfo15 * This);
+
+ DECLSPEC_XFGVIRT(IUnknown, Release)
+ ULONG ( STDMETHODCALLTYPE *Release )(
+ ICorProfilerInfo15 * This);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromObject)
+ HRESULT ( STDMETHODCALLTYPE *GetClassFromObject )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ObjectID objectId,
+ /* [out] */ ClassID *pClassId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassFromToken)
+ HRESULT ( STDMETHODCALLTYPE *GetClassFromToken )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ mdTypeDef typeDef,
+ /* [out] */ ClassID *pClassId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCodeInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetCodeInfo )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionID functionId,
+ /* [out] */ LPCBYTE *pStart,
+ /* [out] */ ULONG *pcSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetEventMask)
+ HRESULT ( STDMETHODCALLTYPE *GetEventMask )(
+ ICorProfilerInfo15 * This,
+ /* [out] */ DWORD *pdwEvents);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromIP)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ LPCBYTE ip,
+ /* [out] */ FunctionID *pFunctionId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionFromToken)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionFromToken )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ mdToken token,
+ /* [out] */ FunctionID *pFunctionId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetHandleFromThread)
+ HRESULT ( STDMETHODCALLTYPE *GetHandleFromThread )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ HANDLE *phThread);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetObjectSize)
+ HRESULT ( STDMETHODCALLTYPE *GetObjectSize )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ObjectID objectId,
+ /* [out] */ ULONG *pcSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, IsArrayClass)
+ HRESULT ( STDMETHODCALLTYPE *IsArrayClass )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ClassID classId,
+ /* [out] */ CorElementType *pBaseElemType,
+ /* [out] */ ClassID *pBaseClassId,
+ /* [out] */ ULONG *pcRank);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetThreadInfo )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ DWORD *pdwWin32ThreadId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetCurrentThreadID)
+ HRESULT ( STDMETHODCALLTYPE *GetCurrentThreadID )(
+ ICorProfilerInfo15 * This,
+ /* [out] */ ThreadID *pThreadId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetClassIDInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ClassID classId,
+ /* [out] */ ModuleID *pModuleId,
+ /* [out] */ mdTypeDef *pTypeDefToken);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetFunctionInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionID functionId,
+ /* [out] */ ClassID *pClassId,
+ /* [out] */ ModuleID *pModuleId,
+ /* [out] */ mdToken *pToken);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEventMask)
+ HRESULT ( STDMETHODCALLTYPE *SetEventMask )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ DWORD dwEvents);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetEnterLeaveFunctionHooks)
+ HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionEnter *pFuncEnter,
+ /* [in] */ FunctionLeave *pFuncLeave,
+ /* [in] */ FunctionTailcall *pFuncTailcall);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionIDMapper)
+ HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionIDMapper *pFunc);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetTokenAndMetaDataFromFunction)
+ HRESULT ( STDMETHODCALLTYPE *GetTokenAndMetaDataFromFunction )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ REFIID riid,
+ /* [out] */ IUnknown **ppImport,
+ /* [out] */ mdToken *pToken);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetModuleInfo )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [out] */ LPCBYTE *ppBaseLoadAddress,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [annotation][out] */
+ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
+ /* [out] */ AssemblyID *pAssemblyId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetModuleMetaData)
+ HRESULT ( STDMETHODCALLTYPE *GetModuleMetaData )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ DWORD dwOpenFlags,
+ /* [in] */ REFIID riid,
+ /* [out] */ IUnknown **ppOut);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBody)
+ HRESULT ( STDMETHODCALLTYPE *GetILFunctionBody )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ mdMethodDef methodId,
+ /* [out] */ LPCBYTE *ppMethodHeader,
+ /* [out] */ ULONG *pcbMethodSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILFunctionBodyAllocator)
+ HRESULT ( STDMETHODCALLTYPE *GetILFunctionBodyAllocator )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [out] */ IMethodMalloc **ppMalloc);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILFunctionBody)
+ HRESULT ( STDMETHODCALLTYPE *SetILFunctionBody )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ mdMethodDef methodid,
+ /* [in] */ LPCBYTE pbNewILMethodHeader);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAppDomainInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetAppDomainInfo )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ AppDomainID appDomainId,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [annotation][out] */
+ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
+ /* [out] */ ProcessID *pProcessId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetAssemblyInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetAssemblyInfo )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ AssemblyID assemblyId,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [annotation][out] */
+ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
+ /* [out] */ AppDomainID *pAppDomainId,
+ /* [out] */ ModuleID *pModuleId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetFunctionReJIT)
+ HRESULT ( STDMETHODCALLTYPE *SetFunctionReJIT )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionID functionId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, ForceGC)
+ HRESULT ( STDMETHODCALLTYPE *ForceGC )(
+ ICorProfilerInfo15 * This);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, SetILInstrumentedCodeMap)
+ HRESULT ( STDMETHODCALLTYPE *SetILInstrumentedCodeMap )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ BOOL fStartJit,
+ /* [in] */ ULONG cILMapEntries,
+ /* [size_is][in] */ COR_IL_MAP rgILMapEntries[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionInterface)
+ HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionInterface )(
+ ICorProfilerInfo15 * This,
+ /* [out] */ IUnknown **ppicd);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetInprocInspectionIThisThread)
+ HRESULT ( STDMETHODCALLTYPE *GetInprocInspectionIThisThread )(
+ ICorProfilerInfo15 * This,
+ /* [out] */ IUnknown **ppicd);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetThreadContext)
+ HRESULT ( STDMETHODCALLTYPE *GetThreadContext )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ ContextID *pContextId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, BeginInprocDebugging)
+ HRESULT ( STDMETHODCALLTYPE *BeginInprocDebugging )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ BOOL fThisThreadOnly,
+ /* [out] */ DWORD *pdwProfilerContext);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, EndInprocDebugging)
+ HRESULT ( STDMETHODCALLTYPE *EndInprocDebugging )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ DWORD dwProfilerContext);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo, GetILToNativeMapping)
+ HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ ULONG32 cMap,
+ /* [out] */ ULONG32 *pcMap,
+ /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, DoStackSnapshot)
+ HRESULT ( STDMETHODCALLTYPE *DoStackSnapshot )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ThreadID thread,
+ /* [in] */ StackSnapshotCallback *callback,
+ /* [in] */ ULONG32 infoFlags,
+ /* [in] */ void *clientData,
+ /* [size_is][in] */ BYTE context[ ],
+ /* [in] */ ULONG32 contextSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, SetEnterLeaveFunctionHooks2)
+ HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks2 )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionEnter2 *pFuncEnter,
+ /* [in] */ FunctionLeave2 *pFuncLeave,
+ /* [in] */ FunctionTailcall2 *pFuncTailcall);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionInfo2)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionInfo2 )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionID funcId,
+ /* [in] */ COR_PRF_FRAME_INFO frameInfo,
+ /* [out] */ ClassID *pClassId,
+ /* [out] */ ModuleID *pModuleId,
+ /* [out] */ mdToken *pToken,
+ /* [in] */ ULONG32 cTypeArgs,
+ /* [out] */ ULONG32 *pcTypeArgs,
+ /* [out] */ ClassID typeArgs[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStringLayout)
+ HRESULT ( STDMETHODCALLTYPE *GetStringLayout )(
+ ICorProfilerInfo15 * This,
+ /* [out] */ ULONG *pBufferLengthOffset,
+ /* [out] */ ULONG *pStringLengthOffset,
+ /* [out] */ ULONG *pBufferOffset);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassLayout)
+ HRESULT ( STDMETHODCALLTYPE *GetClassLayout )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ClassID classID,
+ /* [out][in] */ COR_FIELD_OFFSET rFieldOffset[ ],
+ /* [in] */ ULONG cFieldOffset,
+ /* [out] */ ULONG *pcFieldOffset,
+ /* [out] */ ULONG *pulClassSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassIDInfo2)
+ HRESULT ( STDMETHODCALLTYPE *GetClassIDInfo2 )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ClassID classId,
+ /* [out] */ ModuleID *pModuleId,
+ /* [out] */ mdTypeDef *pTypeDefToken,
+ /* [out] */ ClassID *pParentClassId,
+ /* [in] */ ULONG32 cNumTypeArgs,
+ /* [out] */ ULONG32 *pcNumTypeArgs,
+ /* [out] */ ClassID typeArgs[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetCodeInfo2)
+ HRESULT ( STDMETHODCALLTYPE *GetCodeInfo2 )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionID functionID,
+ /* [in] */ ULONG32 cCodeInfos,
+ /* [out] */ ULONG32 *pcCodeInfos,
+ /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetClassFromTokenAndTypeArgs)
+ HRESULT ( STDMETHODCALLTYPE *GetClassFromTokenAndTypeArgs )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ModuleID moduleID,
+ /* [in] */ mdTypeDef typeDef,
+ /* [in] */ ULONG32 cTypeArgs,
+ /* [size_is][in] */ ClassID typeArgs[ ],
+ /* [out] */ ClassID *pClassID);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetFunctionFromTokenAndTypeArgs)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionFromTokenAndTypeArgs )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ModuleID moduleID,
+ /* [in] */ mdMethodDef funcDef,
+ /* [in] */ ClassID classId,
+ /* [in] */ ULONG32 cTypeArgs,
+ /* [size_is][in] */ ClassID typeArgs[ ],
+ /* [out] */ FunctionID *pFunctionID);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, EnumModuleFrozenObjects)
+ HRESULT ( STDMETHODCALLTYPE *EnumModuleFrozenObjects )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ModuleID moduleID,
+ /* [out] */ ICorProfilerObjectEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetArrayObjectInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetArrayObjectInfo )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ObjectID objectId,
+ /* [in] */ ULONG32 cDimensions,
+ /* [size_is][out] */ ULONG32 pDimensionSizes[ ],
+ /* [size_is][out] */ int pDimensionLowerBounds[ ],
+ /* [out] */ BYTE **ppData);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetBoxClassLayout)
+ HRESULT ( STDMETHODCALLTYPE *GetBoxClassLayout )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ClassID classId,
+ /* [out] */ ULONG32 *pBufferOffset);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadAppDomain)
+ HRESULT ( STDMETHODCALLTYPE *GetThreadAppDomain )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ AppDomainID *pAppDomainId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetRVAStaticAddress)
+ HRESULT ( STDMETHODCALLTYPE *GetRVAStaticAddress )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [out] */ void **ppAddress);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetAppDomainStaticAddress)
+ HRESULT ( STDMETHODCALLTYPE *GetAppDomainStaticAddress )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [in] */ AppDomainID appDomainId,
+ /* [out] */ void **ppAddress);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetThreadStaticAddress)
+ HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ void **ppAddress);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetContextStaticAddress)
+ HRESULT ( STDMETHODCALLTYPE *GetContextStaticAddress )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [in] */ ContextID contextId,
+ /* [out] */ void **ppAddress);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetStaticFieldInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetStaticFieldInfo )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [out] */ COR_PRF_STATIC_TYPE *pFieldInfo);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetGenerationBounds)
+ HRESULT ( STDMETHODCALLTYPE *GetGenerationBounds )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ULONG cObjectRanges,
+ /* [out] */ ULONG *pcObjectRanges,
+ /* [length_is][size_is][out] */ COR_PRF_GC_GENERATION_RANGE ranges[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetObjectGeneration)
+ HRESULT ( STDMETHODCALLTYPE *GetObjectGeneration )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ObjectID objectId,
+ /* [out] */ COR_PRF_GC_GENERATION_RANGE *range);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo2, GetNotifiedExceptionClauseInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetNotifiedExceptionClauseInfo )(
+ ICorProfilerInfo15 * This,
+ /* [out] */ COR_PRF_EX_CLAUSE_INFO *pinfo);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumJITedFunctions)
+ HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions )(
+ ICorProfilerInfo15 * This,
+ /* [out] */ ICorProfilerFunctionEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, RequestProfilerDetach)
+ HRESULT ( STDMETHODCALLTYPE *RequestProfilerDetach )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ DWORD dwExpectedCompletionMilliseconds);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetFunctionIDMapper2)
+ HRESULT ( STDMETHODCALLTYPE *SetFunctionIDMapper2 )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionIDMapper2 *pFunc,
+ /* [in] */ void *clientData);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetStringLayout2)
+ HRESULT ( STDMETHODCALLTYPE *GetStringLayout2 )(
+ ICorProfilerInfo15 * This,
+ /* [out] */ ULONG *pStringLengthOffset,
+ /* [out] */ ULONG *pBufferOffset);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3)
+ HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3 )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionEnter3 *pFuncEnter3,
+ /* [in] */ FunctionLeave3 *pFuncLeave3,
+ /* [in] */ FunctionTailcall3 *pFuncTailcall3);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, SetEnterLeaveFunctionHooks3WithInfo)
+ HRESULT ( STDMETHODCALLTYPE *SetEnterLeaveFunctionHooks3WithInfo )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionEnter3WithInfo *pFuncEnter3WithInfo,
+ /* [in] */ FunctionLeave3WithInfo *pFuncLeave3WithInfo,
+ /* [in] */ FunctionTailcall3WithInfo *pFuncTailcall3WithInfo);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionEnter3Info)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionEnter3Info )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ COR_PRF_ELT_INFO eltInfo,
+ /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo,
+ /* [out][in] */ ULONG *pcbArgumentInfo,
+ /* [size_is][out] */ COR_PRF_FUNCTION_ARGUMENT_INFO *pArgumentInfo);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionLeave3Info)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionLeave3Info )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ COR_PRF_ELT_INFO eltInfo,
+ /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo,
+ /* [out] */ COR_PRF_FUNCTION_ARGUMENT_RANGE *pRetvalRange);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetFunctionTailcall3Info)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionTailcall3Info )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ COR_PRF_ELT_INFO eltInfo,
+ /* [out] */ COR_PRF_FRAME_INFO *pFrameInfo);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, EnumModules)
+ HRESULT ( STDMETHODCALLTYPE *EnumModules )(
+ ICorProfilerInfo15 * This,
+ /* [out] */ ICorProfilerModuleEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetRuntimeInformation)
+ HRESULT ( STDMETHODCALLTYPE *GetRuntimeInformation )(
+ ICorProfilerInfo15 * This,
+ /* [out] */ USHORT *pClrInstanceId,
+ /* [out] */ COR_PRF_RUNTIME_TYPE *pRuntimeType,
+ /* [out] */ USHORT *pMajorVersion,
+ /* [out] */ USHORT *pMinorVersion,
+ /* [out] */ USHORT *pBuildNumber,
+ /* [out] */ USHORT *pQFEVersion,
+ /* [in] */ ULONG cchVersionString,
+ /* [out] */ ULONG *pcchVersionString,
+ /* [annotation][out] */
+ _Out_writes_to_(cchVersionString, *pcchVersionString) WCHAR szVersionString[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetThreadStaticAddress2)
+ HRESULT ( STDMETHODCALLTYPE *GetThreadStaticAddress2 )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ClassID classId,
+ /* [in] */ mdFieldDef fieldToken,
+ /* [in] */ AppDomainID appDomainId,
+ /* [in] */ ThreadID threadId,
+ /* [out] */ void **ppAddress);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetAppDomainsContainingModule)
+ HRESULT ( STDMETHODCALLTYPE *GetAppDomainsContainingModule )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ ULONG32 cAppDomainIds,
+ /* [out] */ ULONG32 *pcAppDomainIds,
+ /* [length_is][size_is][out] */ AppDomainID appDomainIds[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo3, GetModuleInfo2)
+ HRESULT ( STDMETHODCALLTYPE *GetModuleInfo2 )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [out] */ LPCBYTE *ppBaseLoadAddress,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [annotation][out] */
+ _Out_writes_to_(cchName, *pcchName) WCHAR szName[ ],
+ /* [out] */ AssemblyID *pAssemblyId,
+ /* [out] */ DWORD *pdwModuleFlags);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumThreads)
+ HRESULT ( STDMETHODCALLTYPE *EnumThreads )(
+ ICorProfilerInfo15 * This,
+ /* [out] */ ICorProfilerThreadEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, InitializeCurrentThread)
+ HRESULT ( STDMETHODCALLTYPE *InitializeCurrentThread )(
+ ICorProfilerInfo15 * This);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestReJIT)
+ HRESULT ( STDMETHODCALLTYPE *RequestReJIT )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ULONG cFunctions,
+ /* [size_is][in] */ ModuleID moduleIds[ ],
+ /* [size_is][in] */ mdMethodDef methodIds[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, RequestRevert)
+ HRESULT ( STDMETHODCALLTYPE *RequestRevert )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ULONG cFunctions,
+ /* [size_is][in] */ ModuleID moduleIds[ ],
+ /* [size_is][in] */ mdMethodDef methodIds[ ],
+ /* [size_is][out] */ HRESULT status[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetCodeInfo3)
+ HRESULT ( STDMETHODCALLTYPE *GetCodeInfo3 )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionID functionID,
+ /* [in] */ ReJITID reJitId,
+ /* [in] */ ULONG32 cCodeInfos,
+ /* [out] */ ULONG32 *pcCodeInfos,
+ /* [length_is][size_is][out] */ COR_PRF_CODE_INFO codeInfos[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetFunctionFromIP2)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP2 )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ LPCBYTE ip,
+ /* [out] */ FunctionID *pFunctionId,
+ /* [out] */ ReJITID *pReJitId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetReJITIDs)
+ HRESULT ( STDMETHODCALLTYPE *GetReJITIDs )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ ULONG cReJitIds,
+ /* [out] */ ULONG *pcReJitIds,
+ /* [length_is][size_is][out] */ ReJITID reJitIds[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetILToNativeMapping2)
+ HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping2 )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionID functionId,
+ /* [in] */ ReJITID reJitId,
+ /* [in] */ ULONG32 cMap,
+ /* [out] */ ULONG32 *pcMap,
+ /* [length_is][size_is][out] */ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, EnumJITedFunctions2)
+ HRESULT ( STDMETHODCALLTYPE *EnumJITedFunctions2 )(
+ ICorProfilerInfo15 * This,
+ /* [out] */ ICorProfilerFunctionEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo4, GetObjectSize2)
+ HRESULT ( STDMETHODCALLTYPE *GetObjectSize2 )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ObjectID objectId,
+ /* [out] */ SIZE_T *pcSize);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, GetEventMask2)
+ HRESULT ( STDMETHODCALLTYPE *GetEventMask2 )(
+ ICorProfilerInfo15 * This,
+ /* [out] */ DWORD *pdwEventsLow,
+ /* [out] */ DWORD *pdwEventsHigh);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo5, SetEventMask2)
+ HRESULT ( STDMETHODCALLTYPE *SetEventMask2 )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ DWORD dwEventsLow,
+ /* [in] */ DWORD dwEventsHigh);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo6, EnumNgenModuleMethodsInliningThisMethod)
+ HRESULT ( STDMETHODCALLTYPE *EnumNgenModuleMethodsInliningThisMethod )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ModuleID inlinersModuleId,
+ /* [in] */ ModuleID inlineeModuleId,
+ /* [in] */ mdMethodDef inlineeMethodId,
+ /* [out] */ BOOL *incompleteData,
+ /* [out] */ ICorProfilerMethodEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ApplyMetaData)
+ HRESULT ( STDMETHODCALLTYPE *ApplyMetaData )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ModuleID moduleId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, GetInMemorySymbolsLength)
+ HRESULT ( STDMETHODCALLTYPE *GetInMemorySymbolsLength )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [out] */ DWORD *pCountSymbolBytes);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo7, ReadInMemorySymbols)
+ HRESULT ( STDMETHODCALLTYPE *ReadInMemorySymbols )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ModuleID moduleId,
+ /* [in] */ DWORD symbolsReadOffset,
+ /* [out] */ BYTE *pSymbolBytes,
+ /* [in] */ DWORD countSymbolBytes,
+ /* [out] */ DWORD *pCountSymbolBytesRead);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, IsFunctionDynamic)
+ HRESULT ( STDMETHODCALLTYPE *IsFunctionDynamic )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionID functionId,
+ /* [out] */ BOOL *isDynamic);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, GetFunctionFromIP3)
+ HRESULT ( STDMETHODCALLTYPE *GetFunctionFromIP3 )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ LPCBYTE ip,
+ /* [out] */ FunctionID *functionId,
+ /* [out] */ ReJITID *pReJitId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo8, GetDynamicFunctionInfo)
+ HRESULT ( STDMETHODCALLTYPE *GetDynamicFunctionInfo )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ FunctionID functionId,
+ /* [out] */ ModuleID *moduleId,
+ /* [out] */ PCCOR_SIGNATURE *ppvSig,
+ /* [out] */ ULONG *pbSig,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [out] */ WCHAR wszName[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetNativeCodeStartAddresses)
+ HRESULT ( STDMETHODCALLTYPE *GetNativeCodeStartAddresses )(
+ ICorProfilerInfo15 * This,
+ FunctionID functionID,
+ ReJITID reJitId,
+ ULONG32 cCodeStartAddresses,
+ ULONG32 *pcCodeStartAddresses,
+ UINT_PTR codeStartAddresses[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetILToNativeMapping3)
+ HRESULT ( STDMETHODCALLTYPE *GetILToNativeMapping3 )(
+ ICorProfilerInfo15 * This,
+ UINT_PTR pNativeCodeStartAddress,
+ ULONG32 cMap,
+ ULONG32 *pcMap,
+ COR_DEBUG_IL_TO_NATIVE_MAP map[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo9, GetCodeInfo4)
+ HRESULT ( STDMETHODCALLTYPE *GetCodeInfo4 )(
+ ICorProfilerInfo15 * This,
+ UINT_PTR pNativeCodeStartAddress,
+ ULONG32 cCodeInfos,
+ ULONG32 *pcCodeInfos,
+ COR_PRF_CODE_INFO codeInfos[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, EnumerateObjectReferences)
+ HRESULT ( STDMETHODCALLTYPE *EnumerateObjectReferences )(
+ ICorProfilerInfo15 * This,
+ ObjectID objectId,
+ ObjectReferenceCallback callback,
+ void *clientData);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, IsFrozenObject)
+ HRESULT ( STDMETHODCALLTYPE *IsFrozenObject )(
+ ICorProfilerInfo15 * This,
+ ObjectID objectId,
+ BOOL *pbFrozen);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, GetLOHObjectSizeThreshold)
+ HRESULT ( STDMETHODCALLTYPE *GetLOHObjectSizeThreshold )(
+ ICorProfilerInfo15 * This,
+ DWORD *pThreshold);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, RequestReJITWithInliners)
+ HRESULT ( STDMETHODCALLTYPE *RequestReJITWithInliners )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ DWORD dwRejitFlags,
+ /* [in] */ ULONG cFunctions,
+ /* [size_is][in] */ ModuleID moduleIds[ ],
+ /* [size_is][in] */ mdMethodDef methodIds[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, SuspendRuntime)
+ HRESULT ( STDMETHODCALLTYPE *SuspendRuntime )(
+ ICorProfilerInfo15 * This);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo10, ResumeRuntime)
+ HRESULT ( STDMETHODCALLTYPE *ResumeRuntime )(
+ ICorProfilerInfo15 * This);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo11, GetEnvironmentVariable)
+ HRESULT ( STDMETHODCALLTYPE *GetEnvironmentVariable )(
+ ICorProfilerInfo15 * This,
+ /* [string][in] */ const WCHAR *szName,
+ /* [in] */ ULONG cchValue,
+ /* [out] */ ULONG *pcchValue,
+ /* [annotation][out] */
+ _Out_writes_to_(cchValue, *pcchValue) WCHAR szValue[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo11, SetEnvironmentVariable)
+ HRESULT ( STDMETHODCALLTYPE *SetEnvironmentVariable )(
+ ICorProfilerInfo15 * This,
+ /* [string][in] */ const WCHAR *szName,
+ /* [string][in] */ const WCHAR *szValue);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeStartSession)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeStartSession )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ UINT32 cProviderConfigs,
+ /* [size_is][in] */ COR_PRF_EVENTPIPE_PROVIDER_CONFIG pProviderConfigs[ ],
+ /* [in] */ BOOL requestRundown,
+ /* [out] */ EVENTPIPE_SESSION *pSession);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeAddProviderToSession)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeAddProviderToSession )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ EVENTPIPE_SESSION session,
+ /* [in] */ COR_PRF_EVENTPIPE_PROVIDER_CONFIG providerConfig);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeStopSession)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeStopSession )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ EVENTPIPE_SESSION session);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeCreateProvider)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeCreateProvider )(
+ ICorProfilerInfo15 * This,
+ /* [string][in] */ const WCHAR *providerName,
+ /* [out] */ EVENTPIPE_PROVIDER *pProvider);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeGetProviderInfo)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeGetProviderInfo )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ EVENTPIPE_PROVIDER provider,
+ /* [in] */ ULONG cchName,
+ /* [out] */ ULONG *pcchName,
+ /* [annotation][out] */
+ _Out_writes_to_(cchName, *pcchName) WCHAR providerName[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeDefineEvent)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeDefineEvent )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ EVENTPIPE_PROVIDER provider,
+ /* [string][in] */ const WCHAR *eventName,
+ /* [in] */ UINT32 eventID,
+ /* [in] */ UINT64 keywords,
+ /* [in] */ UINT32 eventVersion,
+ /* [in] */ UINT32 level,
+ /* [in] */ UINT8 opcode,
+ /* [in] */ BOOL needStack,
+ /* [in] */ UINT32 cParamDescs,
+ /* [size_is][in] */ COR_PRF_EVENTPIPE_PARAM_DESC pParamDescs[ ],
+ /* [out] */ EVENTPIPE_EVENT *pEvent);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo12, EventPipeWriteEvent)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeWriteEvent )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ EVENTPIPE_EVENT event,
+ /* [in] */ UINT32 cData,
+ /* [size_is][in] */ COR_PRF_EVENT_DATA data[ ],
+ /* [in] */ LPCGUID pActivityId,
+ /* [in] */ LPCGUID pRelatedActivityId);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo13, CreateHandle)
+ HRESULT ( STDMETHODCALLTYPE *CreateHandle )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ObjectID object,
+ /* [in] */ COR_PRF_HANDLE_TYPE type,
+ /* [out] */ ObjectHandleID *pHandle);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo13, DestroyHandle)
+ HRESULT ( STDMETHODCALLTYPE *DestroyHandle )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ObjectHandleID handle);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo13, GetObjectIDFromHandle)
+ HRESULT ( STDMETHODCALLTYPE *GetObjectIDFromHandle )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ObjectHandleID handle,
+ /* [out] */ ObjectID *pObject);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo14, EnumerateNonGCObjects)
+ HRESULT ( STDMETHODCALLTYPE *EnumerateNonGCObjects )(
+ ICorProfilerInfo15 * This,
+ /* [out] */ ICorProfilerObjectEnum **ppEnum);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo14, GetNonGCHeapBounds)
+ HRESULT ( STDMETHODCALLTYPE *GetNonGCHeapBounds )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ULONG cObjectRanges,
+ /* [out] */ ULONG *pcObjectRanges,
+ /* [length_is][size_is][out] */ COR_PRF_NONGC_HEAP_RANGE ranges[ ]);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo14, EventPipeCreateProvider2)
+ HRESULT ( STDMETHODCALLTYPE *EventPipeCreateProvider2 )(
+ ICorProfilerInfo15 * This,
+ /* [string][in] */ const WCHAR *providerName,
+ /* [in] */ EventPipeProviderCallback *pCallback,
+ /* [out] */ EVENTPIPE_PROVIDER *pProvider);
+
+ DECLSPEC_XFGVIRT(ICorProfilerInfo15, EnumerateGCHeapObjects)
+ HRESULT ( STDMETHODCALLTYPE *EnumerateGCHeapObjects )(
+ ICorProfilerInfo15 * This,
+ /* [in] */ ObjectCallback callback,
+ /* [in] */ void *callbackState);
+
+ END_INTERFACE
+ } ICorProfilerInfo15Vtbl;
+
+ interface ICorProfilerInfo15
+ {
+ CONST_VTBL struct ICorProfilerInfo15Vtbl *lpVtbl;
+ };
+
+
+
+#ifdef COBJMACROS
+
+
+#define ICorProfilerInfo15_QueryInterface(This,riid,ppvObject) \
+ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
+
+#define ICorProfilerInfo15_AddRef(This) \
+ ( (This)->lpVtbl -> AddRef(This) )
+
+#define ICorProfilerInfo15_Release(This) \
+ ( (This)->lpVtbl -> Release(This) )
+
+
+#define ICorProfilerInfo15_GetClassFromObject(This,objectId,pClassId) \
+ ( (This)->lpVtbl -> GetClassFromObject(This,objectId,pClassId) )
+
+#define ICorProfilerInfo15_GetClassFromToken(This,moduleId,typeDef,pClassId) \
+ ( (This)->lpVtbl -> GetClassFromToken(This,moduleId,typeDef,pClassId) )
+
+#define ICorProfilerInfo15_GetCodeInfo(This,functionId,pStart,pcSize) \
+ ( (This)->lpVtbl -> GetCodeInfo(This,functionId,pStart,pcSize) )
+
+#define ICorProfilerInfo15_GetEventMask(This,pdwEvents) \
+ ( (This)->lpVtbl -> GetEventMask(This,pdwEvents) )
+
+#define ICorProfilerInfo15_GetFunctionFromIP(This,ip,pFunctionId) \
+ ( (This)->lpVtbl -> GetFunctionFromIP(This,ip,pFunctionId) )
+
+#define ICorProfilerInfo15_GetFunctionFromToken(This,moduleId,token,pFunctionId) \
+ ( (This)->lpVtbl -> GetFunctionFromToken(This,moduleId,token,pFunctionId) )
+
+#define ICorProfilerInfo15_GetHandleFromThread(This,threadId,phThread) \
+ ( (This)->lpVtbl -> GetHandleFromThread(This,threadId,phThread) )
+
+#define ICorProfilerInfo15_GetObjectSize(This,objectId,pcSize) \
+ ( (This)->lpVtbl -> GetObjectSize(This,objectId,pcSize) )
+
+#define ICorProfilerInfo15_IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) \
+ ( (This)->lpVtbl -> IsArrayClass(This,classId,pBaseElemType,pBaseClassId,pcRank) )
+
+#define ICorProfilerInfo15_GetThreadInfo(This,threadId,pdwWin32ThreadId) \
+ ( (This)->lpVtbl -> GetThreadInfo(This,threadId,pdwWin32ThreadId) )
+
+#define ICorProfilerInfo15_GetCurrentThreadID(This,pThreadId) \
+ ( (This)->lpVtbl -> GetCurrentThreadID(This,pThreadId) )
+
+#define ICorProfilerInfo15_GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) \
+ ( (This)->lpVtbl -> GetClassIDInfo(This,classId,pModuleId,pTypeDefToken) )
+
+#define ICorProfilerInfo15_GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) \
+ ( (This)->lpVtbl -> GetFunctionInfo(This,functionId,pClassId,pModuleId,pToken) )
+
+#define ICorProfilerInfo15_SetEventMask(This,dwEvents) \
+ ( (This)->lpVtbl -> SetEventMask(This,dwEvents) )
+
+#define ICorProfilerInfo15_SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+ ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
+
+#define ICorProfilerInfo15_SetFunctionIDMapper(This,pFunc) \
+ ( (This)->lpVtbl -> SetFunctionIDMapper(This,pFunc) )
+
+#define ICorProfilerInfo15_GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) \
+ ( (This)->lpVtbl -> GetTokenAndMetaDataFromFunction(This,functionId,riid,ppImport,pToken) )
+
+#define ICorProfilerInfo15_GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) \
+ ( (This)->lpVtbl -> GetModuleInfo(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId) )
+
+#define ICorProfilerInfo15_GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) \
+ ( (This)->lpVtbl -> GetModuleMetaData(This,moduleId,dwOpenFlags,riid,ppOut) )
+
+#define ICorProfilerInfo15_GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) \
+ ( (This)->lpVtbl -> GetILFunctionBody(This,moduleId,methodId,ppMethodHeader,pcbMethodSize) )
+
+#define ICorProfilerInfo15_GetILFunctionBodyAllocator(This,moduleId,ppMalloc) \
+ ( (This)->lpVtbl -> GetILFunctionBodyAllocator(This,moduleId,ppMalloc) )
+
+#define ICorProfilerInfo15_SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) \
+ ( (This)->lpVtbl -> SetILFunctionBody(This,moduleId,methodid,pbNewILMethodHeader) )
+
+#define ICorProfilerInfo15_GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) \
+ ( (This)->lpVtbl -> GetAppDomainInfo(This,appDomainId,cchName,pcchName,szName,pProcessId) )
+
+#define ICorProfilerInfo15_GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) \
+ ( (This)->lpVtbl -> GetAssemblyInfo(This,assemblyId,cchName,pcchName,szName,pAppDomainId,pModuleId) )
+
+#define ICorProfilerInfo15_SetFunctionReJIT(This,functionId) \
+ ( (This)->lpVtbl -> SetFunctionReJIT(This,functionId) )
+
+#define ICorProfilerInfo15_ForceGC(This) \
+ ( (This)->lpVtbl -> ForceGC(This) )
+
+#define ICorProfilerInfo15_SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) \
+ ( (This)->lpVtbl -> SetILInstrumentedCodeMap(This,functionId,fStartJit,cILMapEntries,rgILMapEntries) )
+
+#define ICorProfilerInfo15_GetInprocInspectionInterface(This,ppicd) \
+ ( (This)->lpVtbl -> GetInprocInspectionInterface(This,ppicd) )
+
+#define ICorProfilerInfo15_GetInprocInspectionIThisThread(This,ppicd) \
+ ( (This)->lpVtbl -> GetInprocInspectionIThisThread(This,ppicd) )
+
+#define ICorProfilerInfo15_GetThreadContext(This,threadId,pContextId) \
+ ( (This)->lpVtbl -> GetThreadContext(This,threadId,pContextId) )
+
+#define ICorProfilerInfo15_BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) \
+ ( (This)->lpVtbl -> BeginInprocDebugging(This,fThisThreadOnly,pdwProfilerContext) )
+
+#define ICorProfilerInfo15_EndInprocDebugging(This,dwProfilerContext) \
+ ( (This)->lpVtbl -> EndInprocDebugging(This,dwProfilerContext) )
+
+#define ICorProfilerInfo15_GetILToNativeMapping(This,functionId,cMap,pcMap,map) \
+ ( (This)->lpVtbl -> GetILToNativeMapping(This,functionId,cMap,pcMap,map) )
+
+
+#define ICorProfilerInfo15_DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) \
+ ( (This)->lpVtbl -> DoStackSnapshot(This,thread,callback,infoFlags,clientData,context,contextSize) )
+
+#define ICorProfilerInfo15_SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) \
+ ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks2(This,pFuncEnter,pFuncLeave,pFuncTailcall) )
+
+#define ICorProfilerInfo15_GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) \
+ ( (This)->lpVtbl -> GetFunctionInfo2(This,funcId,frameInfo,pClassId,pModuleId,pToken,cTypeArgs,pcTypeArgs,typeArgs) )
+
+#define ICorProfilerInfo15_GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) \
+ ( (This)->lpVtbl -> GetStringLayout(This,pBufferLengthOffset,pStringLengthOffset,pBufferOffset) )
+
+#define ICorProfilerInfo15_GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) \
+ ( (This)->lpVtbl -> GetClassLayout(This,classID,rFieldOffset,cFieldOffset,pcFieldOffset,pulClassSize) )
+
+#define ICorProfilerInfo15_GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) \
+ ( (This)->lpVtbl -> GetClassIDInfo2(This,classId,pModuleId,pTypeDefToken,pParentClassId,cNumTypeArgs,pcNumTypeArgs,typeArgs) )
+
+#define ICorProfilerInfo15_GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) \
+ ( (This)->lpVtbl -> GetCodeInfo2(This,functionID,cCodeInfos,pcCodeInfos,codeInfos) )
+
+#define ICorProfilerInfo15_GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) \
+ ( (This)->lpVtbl -> GetClassFromTokenAndTypeArgs(This,moduleID,typeDef,cTypeArgs,typeArgs,pClassID) )
+
+#define ICorProfilerInfo15_GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) \
+ ( (This)->lpVtbl -> GetFunctionFromTokenAndTypeArgs(This,moduleID,funcDef,classId,cTypeArgs,typeArgs,pFunctionID) )
+
+#define ICorProfilerInfo15_EnumModuleFrozenObjects(This,moduleID,ppEnum) \
+ ( (This)->lpVtbl -> EnumModuleFrozenObjects(This,moduleID,ppEnum) )
+
+#define ICorProfilerInfo15_GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) \
+ ( (This)->lpVtbl -> GetArrayObjectInfo(This,objectId,cDimensions,pDimensionSizes,pDimensionLowerBounds,ppData) )
+
+#define ICorProfilerInfo15_GetBoxClassLayout(This,classId,pBufferOffset) \
+ ( (This)->lpVtbl -> GetBoxClassLayout(This,classId,pBufferOffset) )
+
+#define ICorProfilerInfo15_GetThreadAppDomain(This,threadId,pAppDomainId) \
+ ( (This)->lpVtbl -> GetThreadAppDomain(This,threadId,pAppDomainId) )
+
+#define ICorProfilerInfo15_GetRVAStaticAddress(This,classId,fieldToken,ppAddress) \
+ ( (This)->lpVtbl -> GetRVAStaticAddress(This,classId,fieldToken,ppAddress) )
+
+#define ICorProfilerInfo15_GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) \
+ ( (This)->lpVtbl -> GetAppDomainStaticAddress(This,classId,fieldToken,appDomainId,ppAddress) )
+
+#define ICorProfilerInfo15_GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) \
+ ( (This)->lpVtbl -> GetThreadStaticAddress(This,classId,fieldToken,threadId,ppAddress) )
+
+#define ICorProfilerInfo15_GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) \
+ ( (This)->lpVtbl -> GetContextStaticAddress(This,classId,fieldToken,contextId,ppAddress) )
+
+#define ICorProfilerInfo15_GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) \
+ ( (This)->lpVtbl -> GetStaticFieldInfo(This,classId,fieldToken,pFieldInfo) )
+
+#define ICorProfilerInfo15_GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) \
+ ( (This)->lpVtbl -> GetGenerationBounds(This,cObjectRanges,pcObjectRanges,ranges) )
+
+#define ICorProfilerInfo15_GetObjectGeneration(This,objectId,range) \
+ ( (This)->lpVtbl -> GetObjectGeneration(This,objectId,range) )
+
+#define ICorProfilerInfo15_GetNotifiedExceptionClauseInfo(This,pinfo) \
+ ( (This)->lpVtbl -> GetNotifiedExceptionClauseInfo(This,pinfo) )
+
+
+#define ICorProfilerInfo15_EnumJITedFunctions(This,ppEnum) \
+ ( (This)->lpVtbl -> EnumJITedFunctions(This,ppEnum) )
+
+#define ICorProfilerInfo15_RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) \
+ ( (This)->lpVtbl -> RequestProfilerDetach(This,dwExpectedCompletionMilliseconds) )
+
+#define ICorProfilerInfo15_SetFunctionIDMapper2(This,pFunc,clientData) \
+ ( (This)->lpVtbl -> SetFunctionIDMapper2(This,pFunc,clientData) )
+
+#define ICorProfilerInfo15_GetStringLayout2(This,pStringLengthOffset,pBufferOffset) \
+ ( (This)->lpVtbl -> GetStringLayout2(This,pStringLengthOffset,pBufferOffset) )
+
+#define ICorProfilerInfo15_SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) \
+ ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3(This,pFuncEnter3,pFuncLeave3,pFuncTailcall3) )
+
+#define ICorProfilerInfo15_SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) \
+ ( (This)->lpVtbl -> SetEnterLeaveFunctionHooks3WithInfo(This,pFuncEnter3WithInfo,pFuncLeave3WithInfo,pFuncTailcall3WithInfo) )
+
+#define ICorProfilerInfo15_GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) \
+ ( (This)->lpVtbl -> GetFunctionEnter3Info(This,functionId,eltInfo,pFrameInfo,pcbArgumentInfo,pArgumentInfo) )
+
+#define ICorProfilerInfo15_GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) \
+ ( (This)->lpVtbl -> GetFunctionLeave3Info(This,functionId,eltInfo,pFrameInfo,pRetvalRange) )
+
+#define ICorProfilerInfo15_GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) \
+ ( (This)->lpVtbl -> GetFunctionTailcall3Info(This,functionId,eltInfo,pFrameInfo) )
+
+#define ICorProfilerInfo15_EnumModules(This,ppEnum) \
+ ( (This)->lpVtbl -> EnumModules(This,ppEnum) )
+
+#define ICorProfilerInfo15_GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) \
+ ( (This)->lpVtbl -> GetRuntimeInformation(This,pClrInstanceId,pRuntimeType,pMajorVersion,pMinorVersion,pBuildNumber,pQFEVersion,cchVersionString,pcchVersionString,szVersionString) )
+
+#define ICorProfilerInfo15_GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) \
+ ( (This)->lpVtbl -> GetThreadStaticAddress2(This,classId,fieldToken,appDomainId,threadId,ppAddress) )
+
+#define ICorProfilerInfo15_GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) \
+ ( (This)->lpVtbl -> GetAppDomainsContainingModule(This,moduleId,cAppDomainIds,pcAppDomainIds,appDomainIds) )
+
+#define ICorProfilerInfo15_GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) \
+ ( (This)->lpVtbl -> GetModuleInfo2(This,moduleId,ppBaseLoadAddress,cchName,pcchName,szName,pAssemblyId,pdwModuleFlags) )
+
+
+#define ICorProfilerInfo15_EnumThreads(This,ppEnum) \
+ ( (This)->lpVtbl -> EnumThreads(This,ppEnum) )
+
+#define ICorProfilerInfo15_InitializeCurrentThread(This) \
+ ( (This)->lpVtbl -> InitializeCurrentThread(This) )
+
+#define ICorProfilerInfo15_RequestReJIT(This,cFunctions,moduleIds,methodIds) \
+ ( (This)->lpVtbl -> RequestReJIT(This,cFunctions,moduleIds,methodIds) )
+
+#define ICorProfilerInfo15_RequestRevert(This,cFunctions,moduleIds,methodIds,status) \
+ ( (This)->lpVtbl -> RequestRevert(This,cFunctions,moduleIds,methodIds,status) )
+
+#define ICorProfilerInfo15_GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) \
+ ( (This)->lpVtbl -> GetCodeInfo3(This,functionID,reJitId,cCodeInfos,pcCodeInfos,codeInfos) )
+
+#define ICorProfilerInfo15_GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) \
+ ( (This)->lpVtbl -> GetFunctionFromIP2(This,ip,pFunctionId,pReJitId) )
+
+#define ICorProfilerInfo15_GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) \
+ ( (This)->lpVtbl -> GetReJITIDs(This,functionId,cReJitIds,pcReJitIds,reJitIds) )
+
+#define ICorProfilerInfo15_GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) \
+ ( (This)->lpVtbl -> GetILToNativeMapping2(This,functionId,reJitId,cMap,pcMap,map) )
+
+#define ICorProfilerInfo15_EnumJITedFunctions2(This,ppEnum) \
+ ( (This)->lpVtbl -> EnumJITedFunctions2(This,ppEnum) )
+
+#define ICorProfilerInfo15_GetObjectSize2(This,objectId,pcSize) \
+ ( (This)->lpVtbl -> GetObjectSize2(This,objectId,pcSize) )
+
+
+#define ICorProfilerInfo15_GetEventMask2(This,pdwEventsLow,pdwEventsHigh) \
+ ( (This)->lpVtbl -> GetEventMask2(This,pdwEventsLow,pdwEventsHigh) )
+
+#define ICorProfilerInfo15_SetEventMask2(This,dwEventsLow,dwEventsHigh) \
+ ( (This)->lpVtbl -> SetEventMask2(This,dwEventsLow,dwEventsHigh) )
+
+
+#define ICorProfilerInfo15_EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) \
+ ( (This)->lpVtbl -> EnumNgenModuleMethodsInliningThisMethod(This,inlinersModuleId,inlineeModuleId,inlineeMethodId,incompleteData,ppEnum) )
+
+
+#define ICorProfilerInfo15_ApplyMetaData(This,moduleId) \
+ ( (This)->lpVtbl -> ApplyMetaData(This,moduleId) )
+
+#define ICorProfilerInfo15_GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) \
+ ( (This)->lpVtbl -> GetInMemorySymbolsLength(This,moduleId,pCountSymbolBytes) )
+
+#define ICorProfilerInfo15_ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) \
+ ( (This)->lpVtbl -> ReadInMemorySymbols(This,moduleId,symbolsReadOffset,pSymbolBytes,countSymbolBytes,pCountSymbolBytesRead) )
+
+
+#define ICorProfilerInfo15_IsFunctionDynamic(This,functionId,isDynamic) \
+ ( (This)->lpVtbl -> IsFunctionDynamic(This,functionId,isDynamic) )
+
+#define ICorProfilerInfo15_GetFunctionFromIP3(This,ip,functionId,pReJitId) \
+ ( (This)->lpVtbl -> GetFunctionFromIP3(This,ip,functionId,pReJitId) )
+
+#define ICorProfilerInfo15_GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) \
+ ( (This)->lpVtbl -> GetDynamicFunctionInfo(This,functionId,moduleId,ppvSig,pbSig,cchName,pcchName,wszName) )
+
+
+#define ICorProfilerInfo15_GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) \
+ ( (This)->lpVtbl -> GetNativeCodeStartAddresses(This,functionID,reJitId,cCodeStartAddresses,pcCodeStartAddresses,codeStartAddresses) )
+
+#define ICorProfilerInfo15_GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) \
+ ( (This)->lpVtbl -> GetILToNativeMapping3(This,pNativeCodeStartAddress,cMap,pcMap,map) )
+
+#define ICorProfilerInfo15_GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) \
+ ( (This)->lpVtbl -> GetCodeInfo4(This,pNativeCodeStartAddress,cCodeInfos,pcCodeInfos,codeInfos) )
+
+
+#define ICorProfilerInfo15_EnumerateObjectReferences(This,objectId,callback,clientData) \
+ ( (This)->lpVtbl -> EnumerateObjectReferences(This,objectId,callback,clientData) )
+
+#define ICorProfilerInfo15_IsFrozenObject(This,objectId,pbFrozen) \
+ ( (This)->lpVtbl -> IsFrozenObject(This,objectId,pbFrozen) )
+
+#define ICorProfilerInfo15_GetLOHObjectSizeThreshold(This,pThreshold) \
+ ( (This)->lpVtbl -> GetLOHObjectSizeThreshold(This,pThreshold) )
+
+#define ICorProfilerInfo15_RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) \
+ ( (This)->lpVtbl -> RequestReJITWithInliners(This,dwRejitFlags,cFunctions,moduleIds,methodIds) )
+
+#define ICorProfilerInfo15_SuspendRuntime(This) \
+ ( (This)->lpVtbl -> SuspendRuntime(This) )
+
+#define ICorProfilerInfo15_ResumeRuntime(This) \
+ ( (This)->lpVtbl -> ResumeRuntime(This) )
+
+
+#define ICorProfilerInfo15_GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) \
+ ( (This)->lpVtbl -> GetEnvironmentVariable(This,szName,cchValue,pcchValue,szValue) )
+
+#define ICorProfilerInfo15_SetEnvironmentVariable(This,szName,szValue) \
+ ( (This)->lpVtbl -> SetEnvironmentVariable(This,szName,szValue) )
+
+
+#define ICorProfilerInfo15_EventPipeStartSession(This,cProviderConfigs,pProviderConfigs,requestRundown,pSession) \
+ ( (This)->lpVtbl -> EventPipeStartSession(This,cProviderConfigs,pProviderConfigs,requestRundown,pSession) )
+
+#define ICorProfilerInfo15_EventPipeAddProviderToSession(This,session,providerConfig) \
+ ( (This)->lpVtbl -> EventPipeAddProviderToSession(This,session,providerConfig) )
+
+#define ICorProfilerInfo15_EventPipeStopSession(This,session) \
+ ( (This)->lpVtbl -> EventPipeStopSession(This,session) )
+
+#define ICorProfilerInfo15_EventPipeCreateProvider(This,providerName,pProvider) \
+ ( (This)->lpVtbl -> EventPipeCreateProvider(This,providerName,pProvider) )
+
+#define ICorProfilerInfo15_EventPipeGetProviderInfo(This,provider,cchName,pcchName,providerName) \
+ ( (This)->lpVtbl -> EventPipeGetProviderInfo(This,provider,cchName,pcchName,providerName) )
+
+#define ICorProfilerInfo15_EventPipeDefineEvent(This,provider,eventName,eventID,keywords,eventVersion,level,opcode,needStack,cParamDescs,pParamDescs,pEvent) \
+ ( (This)->lpVtbl -> EventPipeDefineEvent(This,provider,eventName,eventID,keywords,eventVersion,level,opcode,needStack,cParamDescs,pParamDescs,pEvent) )
+
+#define ICorProfilerInfo15_EventPipeWriteEvent(This,event,cData,data,pActivityId,pRelatedActivityId) \
+ ( (This)->lpVtbl -> EventPipeWriteEvent(This,event,cData,data,pActivityId,pRelatedActivityId) )
+
+
+#define ICorProfilerInfo15_CreateHandle(This,object,type,pHandle) \
+ ( (This)->lpVtbl -> CreateHandle(This,object,type,pHandle) )
+
+#define ICorProfilerInfo15_DestroyHandle(This,handle) \
+ ( (This)->lpVtbl -> DestroyHandle(This,handle) )
+
+#define ICorProfilerInfo15_GetObjectIDFromHandle(This,handle,pObject) \
+ ( (This)->lpVtbl -> GetObjectIDFromHandle(This,handle,pObject) )
+
+
+#define ICorProfilerInfo15_EnumerateNonGCObjects(This,ppEnum) \
+ ( (This)->lpVtbl -> EnumerateNonGCObjects(This,ppEnum) )
+
+#define ICorProfilerInfo15_GetNonGCHeapBounds(This,cObjectRanges,pcObjectRanges,ranges) \
+ ( (This)->lpVtbl -> GetNonGCHeapBounds(This,cObjectRanges,pcObjectRanges,ranges) )
+
+#define ICorProfilerInfo15_EventPipeCreateProvider2(This,providerName,pCallback,pProvider) \
+ ( (This)->lpVtbl -> EventPipeCreateProvider2(This,providerName,pCallback,pProvider) )
+
+
+#define ICorProfilerInfo15_EnumerateGCHeapObjects(This,callback,callbackState) \
+ ( (This)->lpVtbl -> EnumerateGCHeapObjects(This,callback,callbackState) )
+
+#endif /* COBJMACROS */
+
+
+#endif /* C style interface */
-#endif /* __ICorProfilerInfo12_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerInfo15_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerMethodEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerMethodEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerMethodEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerMethodEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerMethodEnum * This);
+ DECLSPEC_XFGVIRT(ICorProfilerMethodEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorProfilerMethodEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorProfilerMethodEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorProfilerMethodEnum * This);
+ DECLSPEC_XFGVIRT(ICorProfilerMethodEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorProfilerMethodEnum * This,
/* [out] */ ICorProfilerMethodEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerMethodEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorProfilerMethodEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorProfilerMethodEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorProfilerMethodEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorProfilerMethodEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerMethodEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerMethodEnum_AddRef(This) \
+#define ICorProfilerMethodEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerMethodEnum_Release(This) \
+#define ICorProfilerMethodEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerMethodEnum_Skip(This,celt) \
+#define ICorProfilerMethodEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorProfilerMethodEnum_Reset(This) \
+#define ICorProfilerMethodEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorProfilerMethodEnum_Clone(This,ppEnum) \
+#define ICorProfilerMethodEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorProfilerMethodEnum_GetCount(This,pcelt) \
+#define ICorProfilerMethodEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorProfilerMethodEnum_Next(This,celt,elements,pceltFetched) \
+#define ICorProfilerMethodEnum_Next(This,celt,elements,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,elements,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerMethodEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerMethodEnum_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerThreadEnum_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerThreadEnumVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerThreadEnum * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerThreadEnum * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerThreadEnum * This);
+ DECLSPEC_XFGVIRT(ICorProfilerThreadEnum, Skip)
HRESULT ( STDMETHODCALLTYPE *Skip )(
ICorProfilerThreadEnum * This,
/* [in] */ ULONG celt);
+ DECLSPEC_XFGVIRT(ICorProfilerThreadEnum, Reset)
HRESULT ( STDMETHODCALLTYPE *Reset )(
ICorProfilerThreadEnum * This);
+ DECLSPEC_XFGVIRT(ICorProfilerThreadEnum, Clone)
HRESULT ( STDMETHODCALLTYPE *Clone )(
ICorProfilerThreadEnum * This,
/* [out] */ ICorProfilerThreadEnum **ppEnum);
+ DECLSPEC_XFGVIRT(ICorProfilerThreadEnum, GetCount)
HRESULT ( STDMETHODCALLTYPE *GetCount )(
ICorProfilerThreadEnum * This,
/* [out] */ ULONG *pcelt);
+ DECLSPEC_XFGVIRT(ICorProfilerThreadEnum, Next)
HRESULT ( STDMETHODCALLTYPE *Next )(
ICorProfilerThreadEnum * This,
/* [in] */ ULONG celt,
#ifdef COBJMACROS
-#define ICorProfilerThreadEnum_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerThreadEnum_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerThreadEnum_AddRef(This) \
+#define ICorProfilerThreadEnum_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerThreadEnum_Release(This) \
+#define ICorProfilerThreadEnum_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerThreadEnum_Skip(This,celt) \
+#define ICorProfilerThreadEnum_Skip(This,celt) \
( (This)->lpVtbl -> Skip(This,celt) )
-#define ICorProfilerThreadEnum_Reset(This) \
+#define ICorProfilerThreadEnum_Reset(This) \
( (This)->lpVtbl -> Reset(This) )
-#define ICorProfilerThreadEnum_Clone(This,ppEnum) \
+#define ICorProfilerThreadEnum_Clone(This,ppEnum) \
( (This)->lpVtbl -> Clone(This,ppEnum) )
-#define ICorProfilerThreadEnum_GetCount(This,pcelt) \
+#define ICorProfilerThreadEnum_GetCount(This,pcelt) \
( (This)->lpVtbl -> GetCount(This,pcelt) )
-#define ICorProfilerThreadEnum_Next(This,celt,ids,pceltFetched) \
+#define ICorProfilerThreadEnum_Next(This,celt,ids,pceltFetched) \
( (This)->lpVtbl -> Next(This,celt,ids,pceltFetched) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerThreadEnum_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerThreadEnum_INTERFACE_DEFINED__ */
#ifndef __ICorProfilerAssemblyReferenceProvider_INTERFACE_DEFINED__
};
-#else /* C style interface */
+#else /* C style interface */
typedef struct ICorProfilerAssemblyReferenceProviderVtbl
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICorProfilerAssemblyReferenceProvider * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICorProfilerAssemblyReferenceProvider * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICorProfilerAssemblyReferenceProvider * This);
+ DECLSPEC_XFGVIRT(ICorProfilerAssemblyReferenceProvider, AddAssemblyReference)
HRESULT ( STDMETHODCALLTYPE *AddAssemblyReference )(
ICorProfilerAssemblyReferenceProvider * This,
const COR_PRF_ASSEMBLY_REFERENCE_INFO *pAssemblyRefInfo);
#ifdef COBJMACROS
-#define ICorProfilerAssemblyReferenceProvider_QueryInterface(This,riid,ppvObject) \
+#define ICorProfilerAssemblyReferenceProvider_QueryInterface(This,riid,ppvObject) \
( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) )
-#define ICorProfilerAssemblyReferenceProvider_AddRef(This) \
+#define ICorProfilerAssemblyReferenceProvider_AddRef(This) \
( (This)->lpVtbl -> AddRef(This) )
-#define ICorProfilerAssemblyReferenceProvider_Release(This) \
+#define ICorProfilerAssemblyReferenceProvider_Release(This) \
( (This)->lpVtbl -> Release(This) )
-#define ICorProfilerAssemblyReferenceProvider_AddAssemblyReference(This,pAssemblyRefInfo) \
+#define ICorProfilerAssemblyReferenceProvider_AddAssemblyReference(This,pAssemblyRefInfo) \
( (This)->lpVtbl -> AddAssemblyReference(This,pAssemblyRefInfo) )
#endif /* COBJMACROS */
-#endif /* C style interface */
+#endif /* C style interface */
-#endif /* __ICorProfilerAssemblyReferenceProvider_INTERFACE_DEFINED__ */
+#endif /* __ICorProfilerAssemblyReferenceProvider_INTERFACE_DEFINED__ */
/* Additional Prototypes for ALL interfaces */
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-//
-// Insert just the #defines in winver.h, so that the
-// C# compiler can include this file after macro preprocessing.
-//
-
-#ifdef __cplusplus
-#ifndef FXVER_H_
-#define FXVER_H_
-#define INCLUDE_FXVER_H
-#endif
-#else
-#define RC_INVOKED 1
-#define INCLUDE_FXVER_H
-#endif
-
-#ifdef INCLUDE_FXVER_H
-#undef INCLUDE_FXVER_H
-
-#ifndef RC_INVOKED
-#define FXVER_H_RC_INVOKED_ENABLED
-#define RC_INVOKED 1
-#endif
-
+// Our custom .rc parser on Unix follows the #ifdef and #include rules
+// Use #ifndef here to avoid dummy verrsrc.h
+#ifndef HOST_UNIX
#include <verrsrc.h>
-
-#ifdef FXVER_H_RC_INVOKED_ENABLED
-#undef RC_INVOKED
-#undef FXVER_H_RC_INVOKED_ENABLED
#endif
-//
-// Include the definitions for rmj, rmm, rup, rpt
-//
-
-#include <product_version.h>
-
-/*
- * Product version, name and copyright
- */
-
-#include "fxverstrings.h"
+#define QUOTE_MACRO_HELPER(x) #x
+#define QUOTE_MACRO(x) QUOTE_MACRO_HELPER(x)
-/*
- * File version, names, description.
- */
+#define VER_PRODUCTNAME_STR L"Microsoft\256 .NET"
-// FX_VER_INTERNALNAME_STR is passed in by the build environment.
-#ifndef FX_VER_INTERNALNAME_STR
-#define FX_VER_INTERNALNAME_STR UNKNOWN_FILE
-#endif
#define VER_INTERNALNAME_STR QUOTE_MACRO(FX_VER_INTERNALNAME_STR)
#define VER_ORIGINALFILENAME_STR QUOTE_MACRO(FX_VER_INTERNALNAME_STR)
-// FX_VER_FILEDESCRIPTION_STR is defined in RC files that include fxver.h
-
-#ifndef FX_VER_FILEDESCRIPTION_STR
-#define FX_VER_FILEDESCRIPTION_STR QUOTE_MACRO(FX_VER_INTERNALNAME_STR)
-#endif
-
#define VER_FILEDESCRIPTION_STR FX_VER_FILEDESCRIPTION_STR
-#ifndef FX_VER_FILEVERSION_STR
-#define FX_VER_FILEVERSION_STR FX_FILEVERSION_STR
-#endif
-
-#define VER_FILEVERSION_STR FX_VER_FILEVERSION_STR
-#define VER_FILEVERSION_STR_L VER_PRODUCTVERSION_STR_L
-
-#ifndef FX_VER_FILEVERSION
-#define FX_VER_FILEVERSION VER_DOTFILEVERSION
-#endif
-
-#define VER_FILEVERSION FX_VER_FILEVERSION
-
-//URT_VFT passed in by the build environment.
-#ifndef FX_VFT
-#define FX_VFT VFT_UNKNOWN
-#endif
-
-#define VER_FILETYPE FX_VFT
-#define VER_FILESUBTYPE VFT2_UNKNOWN
-
-/* default is nodebug */
-#if _DEBUG
-#define VER_DEBUG VS_FF_DEBUG
-#else
-#define VER_DEBUG 0
-#endif
-
-#define VER_PRERELEASE 0
-
-#define EXPORT_TAG
-
-#if OFFICIAL_BUILD
-#define VER_PRIVATE 0
-#else
-#define VER_PRIVATE VS_FF_PRIVATEBUILD
-#endif
-
-#define VER_SPECIALBUILD 0
+#define VER_COMMENTS_STR "Flavor=" QUOTE_MACRO(URTBLDENV_FRIENDLY)
#define VER_FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
-#define VER_FILEFLAGS (VER_PRERELEASE|VER_DEBUG|VER_PRIVATE|VER_SPECIALBUILD)
+#define VER_FILEFLAGS VER_DEBUG
#define VER_FILEOS VOS__WINDOWS32
-#define VER_COMPANYNAME_STR "Microsoft Corporation"
+#define VER_FILETYPE VFT_UNKNOWN
+#define VER_FILESUBTYPE VFT2_UNKNOWN
-#ifdef VER_LANGNEUTRAL
-#define VER_VERSION_UNICODE_LANG "000004B0" /* LANG_NEUTRAL/SUBLANG_NEUTRAL, Unicode CP */
-#define VER_VERSION_ANSI_LANG "000004E4" /* LANG_NEUTRAL/SUBLANG_NEUTRAL, Ansi CP */
-#define VER_VERSION_TRANSLATION 0x0000, 0x04B0
-#else
#define VER_VERSION_UNICODE_LANG "040904B0" /* LANG_ENGLISH/SUBLANG_ENGLISH_US, Unicode CP */
#define VER_VERSION_ANSI_LANG "040904E4" /* LANG_ENGLISH/SUBLANG_ENGLISH_US, Ansi CP */
#define VER_VERSION_TRANSLATION 0x0409, 0x04B0
-#endif
-
-#if defined(CSC_INVOKED)
-#define VER_COMMENTS_STR "Flavor=" + QUOTE_MACRO(URTBLDENV_FRIENDLY)
-#else
-#define VER_COMMENTS_STR "Flavor=" QUOTE_MACRO(URTBLDENV_FRIENDLY)
-#endif
-
-#define VER_PRIVATEBUILD_STR QUOTE_MACRO(FX_VER_PRIVATEBUILD_STR)
-
-#if defined(__BUILDMACHINE__)
-#if defined(__BUILDDATE__)
-#define B2(x,y) " (" #x "." #y ")"
-#define B1(x,y) B2(x, y)
-#define BUILD_MACHINE_TAG B1(__BUILDMACHINE__, __BUILDDATE__)
-#else
-#define B2(x) " built by: " #x
-#define B1(x) B2(x)
-#define BUILD_MACHINE_TAG B1(__BUILDMACHINE__)
-#endif
-#if defined(__BUILDMACHINE_LEN__)
-#if __BUILDMACHINE_LEN__ >= 25
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG
-#elif __BUILDMACHINE_LEN__ == 24
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 23
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 22
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 21
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 20
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 19
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 18
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 17
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 16
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 15
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 14
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 13
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 12
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 11
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 10
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 9
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 8
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 7
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 6
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 5
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 4
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 3
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 2
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#elif __BUILDMACHINE_LEN__ == 1
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG " "
-#else
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG
-#endif
-#else
-#define BUILD_MACHINE_TAG_PADDED BUILD_MACHINE_TAG
-#endif
-#else
-#define BUILD_MACHINE_TAG
-#define BUILD_MACHINE_TAG_PADDED
-#endif
-
-#endif
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*---------------------------------------------------------------*/
-/* */
-/* The following section actually creates the version structure. */
-/* They are ignored if we are not being invoked by RC. */
-/* */
-/* ntverp.H must be included before including this file */
-/* */
-/* If VER_LEGALCOPYRIGHT_STR is not defined, it will be */
-/* constructed using VER_LEGALCOPYRIGHT_YEARS, so at least one */
-/* these macros must be defined before including this file. */
-/* */
-/* VER_FILETYPE, VER_FILESUBTYPE, VER_FILEDESCRIPTION_STR, and */
-/* VER_INTERNALNAME_STR must be defined before including this */
-/* file. */
-/* */
-/* If VER_FILEVERSION is not defined, VER_PRODUCTVERSION will be */
-/* used instead. If VER_FILEVERSION_STR is not defined, */
-/* VER_PRODUCTVERSION_STR will be used instead. */
-/* */
-/* If VER_ORIGINALFILENAME_STR is not defined, it is set to */
-/* the value in VER_INTERNALNAME_STR. */
-/* */
-/* If INTL is defined, then this is assumed to be an */
-/* an international build; two string blocks will be created, */
-/* (since all version resources must have English), and the */
-/* second one can be localized */
-/* */
-/*---------------------------------------------------------------*/
-
#ifdef _WIN32
#include <_version.h>
#endif //_WIN32
BLOCK VER_VERSION_UNICODE_LANG
BEGIN
VALUE "CompanyName", VER_COMPANYNAME_STR
- VALUE "FileDescription", VER_FILEDESCRIPTION_STR EXPORT_TAG
- VALUE "FileVersion", VER_FILEVERSION_STR BUILD_MACHINE_TAG_PADDED
- VALUE "InternalName", VER_INTERNALNAME_STR
- VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR
- VALUE "OriginalFilename",VER_ORIGINALFILENAME_STR
- VALUE "ProductName", VER_PRODUCTNAME_STR
- VALUE "ProductVersion", VER_PRODUCTVERSION_STR
-#ifdef VER_OLESELFREGISTER
- VALUE "OleSelfRegister", "\0"
-#endif
- VALUE "Comments", VER_COMMENTS_STR
-#if VER_PRIVATE
- VALUE "PrivateBuild", VER_PRIVATEBUILD_STR
-#endif
-#ifdef VER_EXTRA_VALUES
- VER_EXTRA_VALUES
-#endif
-
- END
-
-
-#ifdef VER_ANSICP /* Some apps are hard coded to look for ANSI CP. */
- BLOCK VER_VERSION_ANSI_LANG
- BEGIN
- VALUE "CompanyName", VER_COMPANYNAME_STR
- VALUE "FileDescription", VER_FILEDESCRIPTION_STR EXPORT_TAG
+ VALUE "FileDescription", VER_FILEDESCRIPTION_STR
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", VER_INTERNALNAME_STR
VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR
VALUE "OriginalFilename",VER_ORIGINALFILENAME_STR
VALUE "ProductName", VER_PRODUCTNAME_STR
- VALUE "ProductVersion", VER_PRODUCTVERSION_STR
-#ifdef VER_OLESELFREGISTER
- VALUE "OleSelfRegister", "\0"
-#endif
+ VALUE "ProductVersion", VER_FILEVERSION_STR
VALUE "Comments", VER_COMMENTS_STR
-#if VER_PRIVATE
- VALUE "PrivateBuild", VER_PRIVATEBUILD_STR
-#endif
-#ifdef VER_EXTRA_VALUES
- VER_EXTRA_VALUES
-#endif
END
-#endif
END
BLOCK "VarFileInfo"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#ifndef VER_PRODUCTNAME_STR
- #define VER_PRODUCTNAME_STR L"Microsoft\256 .NET Core"
-#endif
-
-#ifndef VER_LEGALCOPYRIGHT_STR
- #define VER_LEGALCOPYRIGHT_STR "\251 Microsoft Corporation. All rights reserved."
- #define VER_LEGALCOPYRIGHT_STR_L L"\251 Microsoft Corporation. All rights reserved."
-#endif
-
-#ifndef VER_LEGALCOPYRIGHT_LOGO_STR
- #define VER_LEGALCOPYRIGHT_LOGO_STR "Copyright (c) Microsoft Corporation. All rights reserved."
- #define VER_LEGALCOPYRIGHT_LOGO_STR_L L"Copyright (c) Microsoft Corporation. All rights reserved."
-#endif
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
- /* File created by MIDL compiler version 8.01.0622 */
+ /* File created by MIDL compiler version 8.01.0628 */
/* Compiler settings for metahost.idl:
- Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.01.0622
+ Oicf, W1, Zp8, env=Win64 (32b run), target_arch=AMD64 8.01.0628
protocol : dce , ms_ext, c_ext, robust
error checks: allocation ref bounds_check enum stub_data
VC __declspec() decoration level:
#pragma once
#endif
+#ifndef DECLSPEC_XFGVIRT
+#if defined(_CONTROL_FLOW_GUARD_XFG)
+#define DECLSPEC_XFGVIRT(base, func) __declspec(xfg_virtual(base, func))
+#else
+#define DECLSPEC_XFGVIRT(base, func)
+#endif
+#endif
+
/* Forward Declarations */
#ifndef __ICLRMetaHost_FWD_DEFINED__
typedef /* [public][public][public] */
enum __MIDL___MIDL_itf_metahost_0000_0000_0001
{
- Unknown = 0,
+ UnknownIndex = 0,
Identity = 1,
Runtime = 2
} LIBRARY_PROVIDER_INDEX_TYPE;
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICLRMetaHost * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICLRMetaHost * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICLRMetaHost * This);
+ DECLSPEC_XFGVIRT(ICLRMetaHost, GetRuntime)
HRESULT ( STDMETHODCALLTYPE *GetRuntime )(
ICLRMetaHost * This,
/* [in] */ LPCWSTR pwzVersion,
/* [in] */ REFIID riid,
/* [retval][iid_is][out] */ LPVOID *ppRuntime);
+ DECLSPEC_XFGVIRT(ICLRMetaHost, GetVersionFromFile)
HRESULT ( STDMETHODCALLTYPE *GetVersionFromFile )(
ICLRMetaHost * This,
/* [in] */ LPCWSTR pwzFilePath,
_Out_writes_all_(*pcchBuffer) LPWSTR pwzBuffer,
/* [out][in] */ DWORD *pcchBuffer);
+ DECLSPEC_XFGVIRT(ICLRMetaHost, EnumerateInstalledRuntimes)
HRESULT ( STDMETHODCALLTYPE *EnumerateInstalledRuntimes )(
ICLRMetaHost * This,
/* [retval][out] */ IEnumUnknown **ppEnumerator);
+ DECLSPEC_XFGVIRT(ICLRMetaHost, EnumerateLoadedRuntimes)
HRESULT ( STDMETHODCALLTYPE *EnumerateLoadedRuntimes )(
ICLRMetaHost * This,
/* [in] */ HANDLE hndProcess,
/* [retval][out] */ IEnumUnknown **ppEnumerator);
+ DECLSPEC_XFGVIRT(ICLRMetaHost, RequestRuntimeLoadedNotification)
HRESULT ( STDMETHODCALLTYPE *RequestRuntimeLoadedNotification )(
ICLRMetaHost * This,
/* [in] */ RuntimeLoadedCallbackFnPtr pCallbackFunction);
+ DECLSPEC_XFGVIRT(ICLRMetaHost, QueryLegacyV2RuntimeBinding)
HRESULT ( STDMETHODCALLTYPE *QueryLegacyV2RuntimeBinding )(
ICLRMetaHost * This,
/* [in] */ REFIID riid,
/* [retval][iid_is][out] */ LPVOID *ppUnk);
+ DECLSPEC_XFGVIRT(ICLRMetaHost, ExitProcess)
HRESULT ( STDMETHODCALLTYPE *ExitProcess )(
ICLRMetaHost * This,
/* [in] */ INT32 iExitCode);
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICLRDebuggingLibraryProvider * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICLRDebuggingLibraryProvider * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICLRDebuggingLibraryProvider * This);
+ DECLSPEC_XFGVIRT(ICLRDebuggingLibraryProvider, ProvideLibrary)
HRESULT ( STDMETHODCALLTYPE *ProvideLibrary )(
ICLRDebuggingLibraryProvider * This,
/* [in] */ const WCHAR *pwszFileName,
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICLRDebuggingLibraryProvider2 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICLRDebuggingLibraryProvider2 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICLRDebuggingLibraryProvider2 * This);
+ DECLSPEC_XFGVIRT(ICLRDebuggingLibraryProvider2, ProvideLibrary2)
HRESULT ( STDMETHODCALLTYPE *ProvideLibrary2 )(
ICLRDebuggingLibraryProvider2 * This,
/* [in] */ const WCHAR *pwszFileName,
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICLRDebuggingLibraryProvider3 * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICLRDebuggingLibraryProvider3 * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICLRDebuggingLibraryProvider3 * This);
+ DECLSPEC_XFGVIRT(ICLRDebuggingLibraryProvider3, ProvideWindowsLibrary)
HRESULT ( STDMETHODCALLTYPE *ProvideWindowsLibrary )(
ICLRDebuggingLibraryProvider3 * This,
/* [in] */ const WCHAR *pwszFileName,
/* [in] */ DWORD dwSizeOfImage,
/* [out] */ LPWSTR *ppResolvedModulePath);
+ DECLSPEC_XFGVIRT(ICLRDebuggingLibraryProvider3, ProvideUnixLibrary)
HRESULT ( STDMETHODCALLTYPE *ProvideUnixLibrary )(
ICLRDebuggingLibraryProvider3 * This,
/* [in] */ const WCHAR *pwszFileName,
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICLRDebugging * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICLRDebugging * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICLRDebugging * This);
+ DECLSPEC_XFGVIRT(ICLRDebugging, OpenVirtualProcess)
HRESULT ( STDMETHODCALLTYPE *OpenVirtualProcess )(
ICLRDebugging * This,
/* [in] */ ULONG64 moduleBaseAddress,
/* [out][in] */ CLR_DEBUGGING_VERSION *pVersion,
/* [out] */ CLR_DEBUGGING_PROCESS_FLAGS *pdwFlags);
+ DECLSPEC_XFGVIRT(ICLRDebugging, CanUnloadNow)
HRESULT ( STDMETHODCALLTYPE *CanUnloadNow )(
ICLRDebugging * This,
HMODULE hModule);
{
BEGIN_INTERFACE
+ DECLSPEC_XFGVIRT(IUnknown, QueryInterface)
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
ICLRRuntimeInfo * This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void **ppvObject);
+ DECLSPEC_XFGVIRT(IUnknown, AddRef)
ULONG ( STDMETHODCALLTYPE *AddRef )(
ICLRRuntimeInfo * This);
+ DECLSPEC_XFGVIRT(IUnknown, Release)
ULONG ( STDMETHODCALLTYPE *Release )(
ICLRRuntimeInfo * This);
+ DECLSPEC_XFGVIRT(ICLRRuntimeInfo, GetVersionString)
HRESULT ( STDMETHODCALLTYPE *GetVersionString )(
ICLRRuntimeInfo * This,
/* [annotation][size_is][out] */
_Out_writes_all_opt_(*pcchBuffer) LPWSTR pwzBuffer,
/* [out][in] */ DWORD *pcchBuffer);
+ DECLSPEC_XFGVIRT(ICLRRuntimeInfo, GetRuntimeDirectory)
HRESULT ( STDMETHODCALLTYPE *GetRuntimeDirectory )(
ICLRRuntimeInfo * This,
/* [annotation][size_is][out] */
_Out_writes_all_(*pcchBuffer) LPWSTR pwzBuffer,
/* [out][in] */ DWORD *pcchBuffer);
+ DECLSPEC_XFGVIRT(ICLRRuntimeInfo, IsLoaded)
HRESULT ( STDMETHODCALLTYPE *IsLoaded )(
ICLRRuntimeInfo * This,
/* [in] */ HANDLE hndProcess,
/* [retval][out] */ BOOL *pbLoaded);
+ DECLSPEC_XFGVIRT(ICLRRuntimeInfo, LoadErrorString)
HRESULT ( STDMETHODCALLTYPE *LoadErrorString )(
ICLRRuntimeInfo * This,
/* [in] */ UINT iResourceID,
/* [out][in] */ DWORD *pcchBuffer,
/* [lcid][in] */ LONG iLocaleID);
+ DECLSPEC_XFGVIRT(ICLRRuntimeInfo, LoadLibrary)
HRESULT ( STDMETHODCALLTYPE *LoadLibrary )(
ICLRRuntimeInfo * This,
/* [in] */ LPCWSTR pwzDllName,
/* [retval][out] */ HMODULE *phndModule);
+ DECLSPEC_XFGVIRT(ICLRRuntimeInfo, GetProcAddress)
HRESULT ( STDMETHODCALLTYPE *GetProcAddress )(
ICLRRuntimeInfo * This,
/* [in] */ LPCSTR pszProcName,
/* [retval][out] */ LPVOID *ppProc);
+ DECLSPEC_XFGVIRT(ICLRRuntimeInfo, GetInterface)
HRESULT ( STDMETHODCALLTYPE *GetInterface )(
ICLRRuntimeInfo * This,
/* [in] */ REFCLSID rclsid,
/* [in] */ REFIID riid,
/* [retval][iid_is][out] */ LPVOID *ppUnk);
+ DECLSPEC_XFGVIRT(ICLRRuntimeInfo, IsLoadable)
HRESULT ( STDMETHODCALLTYPE *IsLoadable )(
ICLRRuntimeInfo * This,
/* [retval][out] */ BOOL *pbLoadable);
+ DECLSPEC_XFGVIRT(ICLRRuntimeInfo, SetDefaultStartupFlags)
HRESULT ( STDMETHODCALLTYPE *SetDefaultStartupFlags )(
ICLRRuntimeInfo * This,
/* [in] */ DWORD dwStartupFlags,
/* [in] */ LPCWSTR pwzHostConfigFile);
+ DECLSPEC_XFGVIRT(ICLRRuntimeInfo, GetDefaultStartupFlags)
HRESULT ( STDMETHODCALLTYPE *GetDefaultStartupFlags )(
ICLRRuntimeInfo * This,
/* [out] */ DWORD *pdwStartupFlags,
_Out_writes_all_opt_(*pcchHostConfigFile) LPWSTR pwzHostConfigFile,
/* [out][in] */ DWORD *pcchHostConfigFile);
+ DECLSPEC_XFGVIRT(ICLRRuntimeInfo, BindAsLegacyV2Runtime)
HRESULT ( STDMETHODCALLTYPE *BindAsLegacyV2Runtime )(
ICLRRuntimeInfo * This);
+ DECLSPEC_XFGVIRT(ICLRRuntimeInfo, IsStarted)
HRESULT ( STDMETHODCALLTYPE *IsStarted )(
ICLRRuntimeInfo * This,
/* [out] */ BOOL *pbStarted,
+++ /dev/null
-
-#if 0
- Version strings for product keys... no comments can be allowed in this
- file due to some usage of this in the build process.
- // Licensed to the .NET Foundation under one or more agreements.
- // The .NET Foundation licenses this file to you under the MIT license.
- // See the LICENSE file in the project root for more information.
-#endif
-
-#ifdef CLR_MAJOR_VERSION
-#undef CLR_MAJOR_VERSION
-#endif
-
-#ifdef CLR_MINOR_VERSION
-#undef CLR_MINOR_VERSION
-#endif
-
-#ifdef CLR_BUILD_VERSION
-#undef CLR_BUILD_VERSION
-#endif
-
-#ifdef CLR_BUILD_VERSION_QFE
-#undef CLR_BUILD_VERSION_QFE
-#endif
-
-#ifdef VER_FILEVERSIONMINOR
-#undef VER_FILEVERSIONMINOR
-#endif
-
-#ifdef VER_FILEVERSIONBUILD
-#undef VER_FILEVERSIONBUILD
-#endif
-
-#ifdef VER_FILEVERSIONREVISION
-#undef VER_FILEVERSIONREVISION
-#endif
-
-#define CLR_MAJOR_VERSION rmj
-#define CLR_MINOR_VERSION rmm
-#define CLR_BUILD_VERSION rup
-#define CLR_BUILD_VERSION_QFE rpt
-
-#define VER_FILEVERSIONMINOR fvn
-#define VER_FILEVERSIONBUILD fvb
-#define VER_FILEVERSIONREVISION fvr
-
-#define VER_ASSEMBLYMAJORVERSION asm_rmj
-#define VER_ASSEMBLYMINORVERSION asm_rmm
-#define VER_ASSEMBLYBUILD asm_rup
-#define VER_ASSEMBLYBUILD_QFE asm_rpt
-
-#define QUOTE_MACRO_HELPER(x) #x
-#define QUOTE_MACRO(x) QUOTE_MACRO_HELPER(x)
-
-#ifndef QUOTE_MACRO_L
-#define QUOTE_MACRO_L_HELPER(x) L###x
-#define QUOTE_MACRO_L(x) QUOTE_MACRO_L_HELPER(x)
-#endif
-
-#define CONCAT_MACRO_HELPER(x, y) x ## y
-#define CONCAT_MACRO(x, y) CONCAT_MACRO_HELPER(x, y)
-
-#define VER_PRODUCTVERSION CLR_MAJOR_VERSION,CLR_MINOR_VERSION,CLR_BUILD_VERSION,CLR_BUILD_VERSION_QFE
-#define VER_DOTFILEVERSION CLR_MAJOR_VERSION,VER_FILEVERSIONMINOR,VER_FILEVERSIONBUILD,VER_FILEVERSIONREVISION
-#define VER_MANAGED_DOTFILEVERSION CLR_MAJOR_VERSION.VER_FILEVERSIONMINOR.VER_FILEVERSIONBUILD.VER_FILEVERSIONREVISION
-
-#define VER_DOTPRODUCTVERSION CLR_MAJOR_VERSION.CLR_MINOR_VERSION.CLR_BUILD_VERSION.CLR_BUILD_VERSION_QFE
-#define VER_DOTPRODUCTMAJORMINOR CLR_MAJOR_VERSION.CLR_MINOR_VERSION
-#define VER_DOTPRODUCTVERSIONNOQFE CLR_MAJOR_VERSION.CLR_MINOR_VERSION.CLR_BUILD_VERSION
-#define VER_DOTPRODUCTVERSIONZEROQFE CLR_MAJOR_VERSION.CLR_MINOR_VERSION.CLR_BUILD_VERSION.0
-#define VER_DOTASSEMBLYVERSION VER_ASSEMBLYMAJORVERSION.VER_ASSEMBLYMINORVERSION.VER_ASSEMBLYBUILD.VER_ASSEMBLYBUILD_QFE
-#define VER_DOTASSEMBLYVERSION3PART VER_ASSEMBLYMAJORVERSION.VER_ASSEMBLYMINORVERSION.VER_ASSEMBLYBUILD
-
-#define VER_UNDERSCORE_PRODUCTVERSION_STR3 CONCAT_MACRO(_, CLR_BUILD_VERSION)
-#define VER_UNDERSCORE_PRODUCTVERSION_STR2 CONCAT_MACRO(CLR_MINOR_VERSION, VER_UNDERSCORE_PRODUCTVERSION_STR3)
-#define VER_UNDERSCORE_PRODUCTVERSION_STR1 CONCAT_MACRO(_, VER_UNDERSCORE_PRODUCTVERSION_STR2)
-#define VER_UNDERSCORE_PRODUCTVERSION CONCAT_MACRO(CLR_MAJOR_VERSION, VER_UNDERSCORE_PRODUCTVERSION_STR1)
-
-#define VER_UNDERSCORE_PRODUCTVERSION_STR QUOTE_MACRO(VER_UNDERSCORE_PRODUCTVERSION)
-#define VER_UNDERSCORE_PRODUCTVERSION_STR_L QUOTE_MACRO_L(VER_UNDERSCORE_PRODUCTVERSION)
-
-#define FX_FILEVERSION_STR QUOTE_MACRO(VER_MANAGED_DOTFILEVERSION)
-#define VER_PRODUCTVERSION_STR QUOTE_MACRO(VER_DOTPRODUCTVERSION)
-#define VER_PRODUCTVERSION_STR_L QUOTE_MACRO_L(VER_DOTPRODUCTVERSION)
-
-#define VER_PRODUCTMAJORMINOR_STR QUOTE_MACRO(VER_DOTPRODUCTMAJORMINOR)
-#define VER_PRODUCTMAJORMINOR_STR_L QUOTE_MACRO_L(VER_DOTPRODUCTMAJORMINOR)
-
-#define VER_PRODUCTVERSION_NO_QFE_STR QUOTE_MACRO(VER_DOTPRODUCTVERSIONNOQFE)
-#define VER_PRODUCTVERSION_NO_QFE_STR_L QUOTE_MACRO_L(VER_DOTPRODUCTVERSIONNOQFE)
-
-#define VER_PRODUCTVERSION_ZERO_QFE_STR QUOTE_MACRO(VER_DOTPRODUCTVERSIONZEROQFE)
-#define VER_PRODUCTVERSION_ZERO_QFE_STR_L QUOTE_MACRO_L(VER_DOTPRODUCTVERSIONZEROQFE)
-
-#define VER_PRODUCTVERSION_NO_QFE_STR QUOTE_MACRO(VER_DOTPRODUCTVERSIONNOQFE)
-#define VER_PRODUCTVERSION_NO_QFE_STR_L QUOTE_MACRO_L(VER_DOTPRODUCTVERSIONNOQFE)
-
-#define VER_ASSEMBLYVERSION_STR QUOTE_MACRO(VER_DOTASSEMBLYVERSION)
-#define VER_ASSEMBLYVERSION_STR_L QUOTE_MACRO_L(VER_DOTASSEMBLYVERSION)
-
-#define VER_ASSEMBLYVERSION3PART_STR QUOTE_MACRO(VER_DOTASSEMBLYVERSION3PART)
-#define VER_ASSEMBLYVERSION3PART_STR_L QUOTE_MACRO_L(VER_DOTASSEMBLYVERSION3PART)
-
-#define VER_ECMA_PUBLICKEY b77a5c561934e089
-#define ECMA_PUBLICKEY_STR QUOTE_MACRO(VER_ECMA_PUBLICKEY)
-#define ECMA_PUBLICKEY_STR_L QUOTE_MACRO_L(VER_ECMA_PUBLICKEY)
-if(CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_FREEBSD)
+if(CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_FREEBSD OR CLR_CMAKE_TARGET_HAIKU)
# On OSX and *BSD, we use the libunwind that's part of the OS
+ # On Haiku, we used a special port of libunwind
set(CLR_CMAKE_USE_SYSTEM_LIBUNWIND 1)
-endif(CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_FREEBSD)
+endif(CLR_CMAKE_TARGET_OSX OR CLR_CMAKE_TARGET_FREEBSD OR CLR_CMAKE_TARGET_HAIKU)
if(NOT DEFINED ENV{ROOTFS_DIR})
include_directories(SYSTEM /usr/local/include)
set(PAL_ARCH_SOURCES_DIR arm64)
elseif(CLR_CMAKE_HOST_ARCH_LOONGARCH64)
set(PAL_ARCH_SOURCES_DIR loongarch64)
+elseif(CLR_CMAKE_HOST_ARCH_RISCV64)
+ set(PAL_ARCH_SOURCES_DIR riscv64)
elseif(CLR_CMAKE_HOST_ARCH_I386)
set(PAL_ARCH_SOURCES_DIR i386)
elseif(CLR_CMAKE_HOST_ARCH_S390X)
set(PAL_ARCH_SOURCES_DIR s390x)
-elseif(CLR_CMAKE_HOST_ARCH_RISCV64)
- set(PAL_ARCH_SOURCES_DIR riscv64)
+elseif(CLR_CMAKE_HOST_ARCH_POWERPC64)
+ set(PAL_ARCH_SOURCES_DIR ppc64le)
endif()
if(CLR_CMAKE_TARGET_OSX)
add_definitions(-DTARGET_OSX)
- if(CLR_CMAKE_TARGET_ARCH_AMD64)
+ if(CLR_CMAKE_HOST_ARCH_AMD64)
add_definitions(-DXSTATE_SUPPORTED)
endif()
set(PLATFORM_SOURCES
add_definitions(-DCORECLR)
add_definitions(-DPIC)
-if(CLR_CMAKE_HOST_ARCH_AMD64 AND CLR_CMAKE_TARGET_LINUX AND NOT CLR_CMAKE_HOST_LINUX_MUSL)
- # Currently the _xstate is not available on linux-musl
+if(CLR_CMAKE_HOST_ARCH_AMD64 AND CLR_CMAKE_TARGET_LINUX AND NOT CLR_CMAKE_TARGET_LINUX_MUSL)
+ # Currently the _xstate is not available on Alpine Linux
+ add_definitions(-DXSTATE_SUPPORTED)
+endif(CLR_CMAKE_HOST_ARCH_AMD64 AND CLR_CMAKE_TARGET_LINUX AND NOT CLR_CMAKE_TARGET_LINUX_MUSL)
+
+if(CLR_CMAKE_HOST_ARCH_ARM64 AND CLR_CMAKE_TARGET_LINUX AND NOT CLR_CMAKE_TARGET_LINUX_MUSL)
+ # Currently the _xstate is not available on Alpine Linux
add_definitions(-DXSTATE_SUPPORTED)
-endif(CLR_CMAKE_HOST_ARCH_AMD64 AND CLR_CMAKE_TARGET_LINUX AND NOT CLR_CMAKE_HOST_LINUX_MUSL)
+endif(CLR_CMAKE_HOST_ARCH_ARM64 AND CLR_CMAKE_TARGET_LINUX AND NOT CLR_CMAKE_TARGET_LINUX_MUSL)
-if(CLR_CMAKE_HOST_LINUX_MUSL)
- # Setting RLIMIT_NOFILE breaks debugging of coreclr on linux-musl for some reason
+if(CLR_CMAKE_TARGET_LINUX_MUSL)
+ # Setting RLIMIT_NOFILE breaks debugging of coreclr on Alpine Linux for some reason
add_definitions(-DDONT_SET_RLIMIT_NOFILE)
- # On linux-musl, we need to ensure that the reported stack range for the primary thread is
+ # On Alpine Linux, we need to ensure that the reported stack range for the primary thread is
# larger than the initial committed stack size.
add_definitions(-DENSURE_PRIMARY_STACK_SIZE)
-endif(CLR_CMAKE_HOST_LINUX_MUSL)
+endif(CLR_CMAKE_TARGET_LINUX_MUSL)
+
+if(CLR_CMAKE_TARGET_HAIKU)
+ add_definitions(-D_GNU_SOURCE)
+endif(CLR_CMAKE_TARGET_HAIKU)
# turn off capability to remove unused functions (which was enabled in debug build with sanitizers)
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -Wl,--no-gc-sections")
set(ARCH_SOURCES
arch/${PAL_ARCH_SOURCES_DIR}/debugbreak.S
- arch/${PAL_ARCH_SOURCES_DIR}/processor.cpp
)
if(CLR_CMAKE_HOST_ARCH_ARM)
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()
set(SOURCES
- cruntime/file.cpp
- cruntime/filecrt.cpp
- cruntime/malloc.cpp
- cruntime/math.cpp
- cruntime/misc.cpp
- cruntime/printf.cpp
- cruntime/printfcpp.cpp
- cruntime/silent_printf.cpp
- cruntime/string.cpp
- cruntime/stringtls.cpp
cruntime/wchar.cpp
debug/debug.cpp
file/directory.cpp
init/sxs.cpp
loader/module.cpp
locale/unicode.cpp
- locale/unicodedata.cpp
- locale/utf8.cpp
+ ${CLR_SRC_NATIVE_DIR}/minipal/utf8.c
+ ${CLR_SRC_NATIVE_DIR}/minipal/unicodedata.c
map/common.cpp
map/map.cpp
map/virtual.cpp
safecrt/sscanf_s.cpp
safecrt/strcat_s.cpp
safecrt/strcpy_s.cpp
- safecrt/strlen_s.cpp
safecrt/strncat_s.cpp
safecrt/strncpy_s.cpp
- safecrt/strtok_s.cpp
safecrt/swprintf.cpp
safecrt/vsprintf.cpp
safecrt/vswprint.cpp
safecrt/wcslen_s.cpp
safecrt/wcsncat_s.cpp
safecrt/wcsncpy_s.cpp
- safecrt/wcstok_s.cpp
safecrt/wmakepath_s.cpp
- safecrt/wsplitpath_s.cpp
safecrt/xtoa_s.cpp
safecrt/xtow_s.cpp
shmemory/shmemory.cpp
find_library(SECURITY Security)
find_library(SYSTEM System)
target_link_libraries(coreclrpal
+ PUBLIC
${COREFOUNDATION}
${CORESERVICES}
${SECURITY}
if(CLR_CMAKE_TARGET_FREEBSD)
target_link_libraries(coreclrpal
+ PUBLIC
pthread
rt
)
endif(CLR_CMAKE_TARGET_FREEBSD)
+if(CLR_CMAKE_TARGET_HAIKU)
+ target_link_libraries(coreclrpal
+ PUBLIC
+ bsd
+ )
+endif(CLR_CMAKE_TARGET_HAIKU)
+
if(CLR_CMAKE_TARGET_LINUX)
# On Android, we don't need to link with gcc_s, pthread and rt
if(NOT CLR_CMAKE_TARGET_ANDROID)
target_link_libraries(coreclrpal
+ PUBLIC
gcc_s
pthread
rt
)
else(NOT CLR_CMAKE_TARGET_ANDROID)
target_link_libraries(coreclrpal
+ PUBLIC
${ANDROID_GLOB}
${LZMA})
endif(NOT CLR_CMAKE_TARGET_ANDROID)
target_link_libraries(coreclrpal
+ PUBLIC
dl
)
add_definitions(-D_KMEMUSER)
find_library(KVM kvm)
target_link_libraries(coreclrpal
+ PUBLIC
pthread
rt
${KVM}
endif(CLR_CMAKE_TARGET_NETBSD)
if(CLR_CMAKE_TARGET_SUNOS)
target_link_libraries(coreclrpal
+ PUBLIC
pthread
rt
)
#ifdef HOST_64BIT
+#define XSTATE_GSSE (2)
+#define XSTATE_AVX (XSTATE_GSSE)
+#define XSTATE_AVX512_KMASK (5)
+#define XSTATE_AVX512_ZMM_H (6)
+#define XSTATE_AVX512_ZMM (7)
+
+#define XSTATE_MASK_GSSE (1 << (XSTATE_GSSE))
+#define XSTATE_MASK_AVX (XSTATE_MASK_GSSE)
+#define XSTATE_MASK_AVX512 ((1 << (XSTATE_AVX512_KMASK)) | \
+ (1 << (XSTATE_AVX512_ZMM_H)) | \
+ (1 << (XSTATE_AVX512_ZMM)))
+
// The arch bit is normally set in the flag constants below. Since this is already arch-specific code and the arch bit is not
// relevant, the arch bit is excluded from the flag constants below for simpler tests.
#define CONTEXT_AMD64 0x100000
#define CONTEXT_XSTATE 64
-#define CONTEXT_ContextFlags 6*8
+#define CONTEXT_ContextFlags (6*8)
#define CONTEXT_SegCs CONTEXT_ContextFlags+8
#define CONTEXT_SegDs CONTEXT_SegCs+2
#define CONTEXT_SegEs CONTEXT_SegDs+2
#define CONTEXT_R15 CONTEXT_R14+8
#define CONTEXT_Rip CONTEXT_R15+8
#define CONTEXT_FltSave CONTEXT_Rip+8
-#define FLOATING_SAVE_AREA_SIZE 4*8+24*16+96
-#define CONTEXT_Xmm0 CONTEXT_FltSave+10*16
+#define FLOATING_SAVE_AREA_SIZE (4*8)+(24*16)+96
+#define CONTEXT_Xmm0 CONTEXT_FltSave+(10*16)
#define CONTEXT_Xmm1 CONTEXT_Xmm0+16
#define CONTEXT_Xmm2 CONTEXT_Xmm1+16
#define CONTEXT_Xmm3 CONTEXT_Xmm2+16
#define CONTEXT_Xmm14 CONTEXT_Xmm13+16
#define CONTEXT_Xmm15 CONTEXT_Xmm14+16
#define CONTEXT_VectorRegister CONTEXT_FltSave+FLOATING_SAVE_AREA_SIZE
-#define CONTEXT_VectorControl CONTEXT_VectorRegister+16*26
+#define CONTEXT_VectorControl CONTEXT_VectorRegister+(16*26)
#define CONTEXT_DebugControl CONTEXT_VectorControl+8
#define CONTEXT_LastBranchToRip CONTEXT_DebugControl+8
#define CONTEXT_LastBranchFromRip CONTEXT_LastBranchToRip+8
#define CONTEXT_LastExceptionToRip CONTEXT_LastBranchFromRip+8
#define CONTEXT_LastExceptionFromRip CONTEXT_LastExceptionToRip+8
-#define CONTEXT_Size CONTEXT_LastExceptionFromRip+8
+#define CONTEXT_XStateFeaturesMask CONTEXT_LastExceptionFromRip+8
+#define CONTEXT_XStateReserved0 CONTEXT_XStateFeaturesMask+8
+#define CONTEXT_Ymm0H CONTEXT_XStateReserved0+8
+#define CONTEXT_KMask0 CONTEXT_Ymm0H+(16*16)
+#define CONTEXT_Zmm0H CONTEXT_KMask0+(8*8)
+#define CONTEXT_Zmm16 CONTEXT_Zmm0H+(32*16)
+#define CONTEXT_Size CONTEXT_Zmm16+(64*16)
#else // HOST_64BIT
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- processor.cpp
-
-Abstract:
-
- Implementation of processor related functions for the Intel x86/x64
- platforms. These functions are processor dependent.
-
-
-
---*/
-
-#include "pal/palinternal.h"
-
-/*++
-Function:
-XmmYmmStateSupport
-
-Check if OS has enabled both XMM and YMM state support
-
-Return value:
-1 if XMM and YMM are enabled, 0 otherwise
---*/
-extern "C" unsigned int XmmYmmStateSupport()
-{
- unsigned int eax;
- __asm(" mov $1, %%eax\n" \
- " cpuid\n" \
- " xor %%eax, %%eax\n" \
- " and $0x18000000, %%ecx\n" /* check for xsave feature set and that it is enabled by the OS */ \
- " cmp $0x18000000, %%ecx\n" \
- " jne end\n" \
- " xor %%ecx, %%ecx\n" \
- " xgetbv\n" \
- "end:\n" \
- : "=a"(eax) /* output in eax */ \
- : /* no inputs */ \
- : "ebx", "ecx", "edx" /* registers that are clobbered */
- );
- // Check OS has enabled both XMM and YMM state support
- return ((eax & 0x06) == 0x06) ? 1 : 0;
-}
#include "unixasmmacros.inc"
.syntax unified
+#ifndef __armv6__
.thumb
+#endif
LEAF_ENTRY DBG_DebugBreak, _TEXT
EMIT_BREAKPOINT
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- processor.cpp
-
-Abstract:
-
- Implementation of processor related functions for the ARM
- platform. These functions are processor dependent.
-
-
-
---*/
-
-#include "pal/palinternal.h"
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT)
+#define CONTEXT_ARM64_XSTATE_BIT (5)
+#define CONTEXT_ARM64_XSTATE (1 << CONTEXT_XSTATE_BIT)
+
+#define CONTEXT_XSTATE_BIT CONTEXT_ARM64_XSTATE_BIT
+#define CONTEXT_XSTATE CONTEXT_ARM64_XSTATE
+
+#define XSTATE_ARM64_SVE_BIT (2)
+#define XSTATE_MASK_ARM64_SVE (UI64(1) << (XSTATE_ARM64_SVE_BIT))
#define CONTEXT_ContextFlags 0
#define CONTEXT_Cpsr CONTEXT_ContextFlags+4
#define CONTEXT_Lr CONTEXT_Fp+8
#define CONTEXT_Sp CONTEXT_Lr+8
#define CONTEXT_Pc CONTEXT_Sp+8
+
#define CONTEXT_NEON_OFFSET CONTEXT_Pc+8
#define CONTEXT_V0 0
#define CONTEXT_V1 CONTEXT_V0+16
#define CONTEXT_V31 CONTEXT_V30+16
#define CONTEXT_FLOAT_CONTROL_OFFSET CONTEXT_V31+16
#define CONTEXT_Fpcr 0
-#define CONTEXT_Fpsr CONTEXT_Fpcr+8
-#define CONTEXT_Size ((CONTEXT_NEON_OFFSET + CONTEXT_Fpsr + 8 + 0xf) & ~0xf)
+#define CONTEXT_Fpsr CONTEXT_Fpcr+4
+#define CONTEXT_NEON_SIZE CONTEXT_FLOAT_CONTROL_OFFSET+CONTEXT_Fpsr+4
+
+#define CONTEXT_DEBUG_OFFSET CONTEXT_NEON_OFFSET+CONTEXT_NEON_SIZE
+#define CONTEXT_DEBUG_SIZE 120 // (8*4)+(8*8)+(2*4)+(2*8)
+
+#define CONTEXT_XSTATEFEATURESMASK_OFFSET CONTEXT_DEBUG_OFFSET+CONTEXT_DEBUG_SIZE
+
+// TODO-SVE: Support Vector register sizes >128bit
+
+#define CONTEXT_SVE_OFFSET CONTEXT_XSTATEFEATURESMASK_OFFSET+8
+#define CONTEXT_VL_OFFSET 0
+
+// SVE register offsets are multiples of the vector length
+#define CONTEXT_SVE_REGS_OFFSET CONTEXT_VL_OFFSET+4
+#define CONTEXT_FFR_VL 0
+#define CONTEXT_P0_VL CONTEXT_FFR_VL+1
+#define CONTEXT_P1_VL CONTEXT_P0_VL+1
+#define CONTEXT_P2_VL CONTEXT_P1_VL+1
+#define CONTEXT_P3_VL CONTEXT_P2_VL+1
+#define CONTEXT_P4_VL CONTEXT_P3_VL+1
+#define CONTEXT_P5_VL CONTEXT_P4_VL+1
+#define CONTEXT_P6_VL CONTEXT_P5_VL+1
+#define CONTEXT_P7_VL CONTEXT_P6_VL+1
+#define CONTEXT_P8_VL CONTEXT_P7_VL+1
+#define CONTEXT_P9_VL CONTEXT_P8_VL+1
+#define CONTEXT_P10_VL CONTEXT_P9_VL+1
+#define CONTEXT_P11_VL CONTEXT_P10_VL+1
+#define CONTEXT_P12_VL CONTEXT_P11_VL+1
+#define CONTEXT_P13_VL CONTEXT_P12_VL+1
+#define CONTEXT_P14_VL CONTEXT_P13_VL+1
+#define CONTEXT_P15_VL CONTEXT_P14_VL+1
+
+#define CONTEXT_SVE_REGS_SIZE ((CONTEXT_P15_VL+1) * 4)
+#define CONTEXT_SVE_SIZE CONTEXT_SVE_REGS_SIZE + 8
+
+#define CONTEXT_Size CONTEXT_SVE_OFFSET + CONTEXT_SVE_SIZE
#endif
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- processor.cpp
-
-Abstract:
-
- Implementation of processor related functions for the ARM64
- platform. These functions are processor dependent.
-
-
-
---*/
-
-#include "pal/palinternal.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- processor.cpp
-
-Abstract:
-
- Implementation of processor related functions for the Intel x86/x64
- platforms. These functions are processor dependent.
-
-
-
---*/
-
-#include "pal/palinternal.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- processor.cpp
-
-Abstract:
-
- Implementation of processor related functions for the ARM64
- platform. These functions are processor dependent.
-
-
-
---*/
-
-#include "pal/palinternal.h"
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef __PAL_POWERPC_ASMCONSTANTS_H__
+#define __PAL_POWERPC_ASMCONSTANTS_H__
+
+#define CONTEXT_PPC64 0x100000
+
+#define CONTEXT_CONTROL 1
+#define CONTEXT_INTEGER 2
+#define CONTEXT_FLOATING_POINT 4
+
+#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT)
+
+#define CONTEXT_ContextFlags 0
+#define CONTEXT_R0 CONTEXT_ContextFlags+8
+#define CONTEXT_R1 CONTEXT_R0+8
+#define CONTEXT_R2 CONTEXT_R1+8
+#define CONTEXT_R3 CONTEXT_R2+8
+#define CONTEXT_R4 CONTEXT_R3+8
+#define CONTEXT_R5 CONTEXT_R4+8
+#define CONTEXT_R6 CONTEXT_R5+8
+#define CONTEXT_R7 CONTEXT_R6+8
+#define CONTEXT_R8 CONTEXT_R7+8
+#define CONTEXT_R9 CONTEXT_R8+8
+#define CONTEXT_R10 CONTEXT_R9+8
+#define CONTEXT_R11 CONTEXT_R10+8
+#define CONTEXT_R12 CONTEXT_R11+8
+#define CONTEXT_R13 CONTEXT_R12+8
+#define CONTEXT_R14 CONTEXT_R13+8
+#define CONTEXT_R15 CONTEXT_R14+8
+#define CONTEXT_R16 CONTEXT_R15+8
+#define CONTEXT_R17 CONTEXT_R16+8
+#define CONTEXT_R18 CONTEXT_R17+8
+#define CONTEXT_R19 CONTEXT_R18+8
+#define CONTEXT_R20 CONTEXT_R19+8
+#define CONTEXT_R21 CONTEXT_R20+8
+#define CONTEXT_R22 CONTEXT_R21+8
+#define CONTEXT_R23 CONTEXT_R22+8
+#define CONTEXT_R24 CONTEXT_R23+8
+#define CONTEXT_R25 CONTEXT_R24+8
+#define CONTEXT_R26 CONTEXT_R25+8
+#define CONTEXT_R27 CONTEXT_R26+8
+#define CONTEXT_R28 CONTEXT_R27+8
+#define CONTEXT_R29 CONTEXT_R28+8
+#define CONTEXT_R30 CONTEXT_R29+8
+#define CONTEXT_R31 CONTEXT_R30+8
+#define CONTEXT_F0 CONTEXT_R31+8
+#define CONTEXT_F1 CONTEXT_F0+8
+#define CONTEXT_F2 CONTEXT_F1+8
+#define CONTEXT_F3 CONTEXT_F2+8
+#define CONTEXT_F4 CONTEXT_F3+8
+#define CONTEXT_F5 CONTEXT_F4+8
+#define CONTEXT_F6 CONTEXT_F5+8
+#define CONTEXT_F7 CONTEXT_F6+8
+#define CONTEXT_F8 CONTEXT_F7+8
+#define CONTEXT_F9 CONTEXT_F8+8
+#define CONTEXT_F10 CONTEXT_F9+8
+#define CONTEXT_F11 CONTEXT_F10+8
+#define CONTEXT_F12 CONTEXT_F11+8
+#define CONTEXT_F13 CONTEXT_F12+8
+#define CONTEXT_F14 CONTEXT_F13+8
+#define CONTEXT_F15 CONTEXT_F14+8
+#define CONTEXT_F16 CONTEXT_F15+8
+#define CONTEXT_F17 CONTEXT_F16+8
+#define CONTEXT_F18 CONTEXT_F17+8
+#define CONTEXT_F19 CONTEXT_F18+8
+#define CONTEXT_F20 CONTEXT_F19+8
+#define CONTEXT_F21 CONTEXT_F20+8
+#define CONTEXT_F22 CONTEXT_F21+8
+#define CONTEXT_F23 CONTEXT_F22+8
+#define CONTEXT_F24 CONTEXT_F23+8
+#define CONTEXT_F25 CONTEXT_F24+8
+#define CONTEXT_F26 CONTEXT_F25+8
+#define CONTEXT_F27 CONTEXT_F26+8
+#define CONTEXT_F28 CONTEXT_F27+8
+#define CONTEXT_F29 CONTEXT_F28+8
+#define CONTEXT_F30 CONTEXT_F29+8
+#define CONTEXT_F31 CONTEXT_F30+8
+#define CONTEXT_FPSCR CONTEXT_F31+8
+#define CONTEXT_NIP CONTEXT_FPSCR+8
+#define CONTEXT_MSR CONTEXT_NIP+8
+#define CONTEXT_CTR CONTEXT_MSR+8
+#define CONTEXT_LINK CONTEXT_CTR+8
+#define CONTEXT_XER CONTEXT_LINK+8
+#define CONTEXT_CCR CONTEXT_XER+8
+#define CONTEXT_Size CONTEXT_CCR+8
+
+#endif
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#include "unixasmmacros.inc"
+
+LEAF_ENTRY DBG_DebugBreak, _TEXT
+ bl abort
+ nop
+LEAF_END_MARKED DBG_DebugBreak, _TEXT
+
beqz t1, LOCAL_LABEL(No_Restore_CONTEXT_CONTROL)
ld ra, (CONTEXT_Ra)(t4)
+ ld t1, (CONTEXT_T4)(t4)
+ ld fp, (CONTEXT_Sp)(t4)
+ sd t1, -8(fp)
ld fp, (CONTEXT_Fp)(t4)
- ld sp, (CONTEXT_Sp)(t4)
ld t1, (CONTEXT_Pc)(t4) // Since we cannot control $pc directly, we're going to corrupt t1
- ld t4, (CONTEXT_T4)(t4)
+ ld t4, (CONTEXT_Sp)(t4)
+ addi sp, t4, -8
+ ld t4, (sp)
+ addi sp, sp, 8
jr t1
LOCAL_LABEL(No_Restore_CONTEXT_CONTROL):
ld t1, 8(sp)
ld t3, 16(sp)
+ sd x0, (CONTEXT_X0)(a0)
sd tp, (CONTEXT_Tp)(a0)
sd gp, (CONTEXT_Gp)(a0)
sd a0, (CONTEXT_A0)(a0)
// The .NET Foundation licenses this file to you under the MIT license.
#include "unixasmmacros.inc"
-
LEAF_ENTRY DBG_DebugBreak, _TEXT
EMIT_BREAKPOINT
LEAF_END_MARKED DBG_DebugBreak, _TEXT
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- processor.cpp
-
-Abstract:
-
- Implementation of processor related functions for the ARM64
- platform. These functions are processor dependent.
-
-
-
---*/
-
-#include "pal/palinternal.h"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-// Implementation of _CONTEXT_CaptureContext for the IBM s390x platform.
-// This function is processor dependent. It is used by exception handling,
-// and is always apply to the current thread.
-//
-
-#include "unixasmmacros.inc"
-#include "asmconstants.h"
-
-// Incoming:
-// R2: Context*
-//
-LEAF_ENTRY CONTEXT_CaptureContext, _TEXT
-
- tm CONTEXT_ContextFlags+3(%r2), CONTEXT_INTEGER
- je LOCAL_LABEL(Done_CONTEXT_INTEGER)
- stmg %r0, %r14, CONTEXT_R0(%r2)
-LOCAL_LABEL(Done_CONTEXT_INTEGER):
-
- tm CONTEXT_ContextFlags+3(%r2), CONTEXT_CONTROL
- je LOCAL_LABEL(Done_CONTEXT_CONTROL)
- // Set PSW address to return address from %r14
- stg %r14, CONTEXT_PSWAddr(%r2)
- // Extract PSW mask (CC is already changed; we ignore this here)
- epsw %r0, %r1
- stm %r0, %r1, CONTEXT_PSWMask(%r2)
- // Stack pointer is still unchanged
- stg %r15, CONTEXT_R15(%r2)
-LOCAL_LABEL(Done_CONTEXT_CONTROL):
-
- tm CONTEXT_ContextFlags+3(%r2), CONTEXT_FLOATING_POINT
- je LOCAL_LABEL(Done_CONTEXT_FLOATING_POINT)
- std %f0, CONTEXT_F0(%r2)
- std %f1, CONTEXT_F1(%r2)
- std %f2, CONTEXT_F2(%r2)
- std %f3, CONTEXT_F3(%r2)
- std %f4, CONTEXT_F4(%r2)
- std %f5, CONTEXT_F5(%r2)
- std %f6, CONTEXT_F6(%r2)
- std %f7, CONTEXT_F7(%r2)
- std %f8, CONTEXT_F8(%r2)
- std %f9, CONTEXT_F9(%r2)
- std %f10, CONTEXT_F10(%r2)
- std %f11, CONTEXT_F11(%r2)
- std %f12, CONTEXT_F12(%r2)
- std %f13, CONTEXT_F13(%r2)
- std %f14, CONTEXT_F14(%r2)
- std %f15, CONTEXT_F15(%r2)
-LOCAL_LABEL(Done_CONTEXT_FLOATING_POINT):
-
- br %r14
-LEAF_END CONTEXT_CaptureContext, _TEXT
-
-LEAF_ENTRY RtlCaptureContext, _TEXT
- mvhhi CONTEXT_ContextFlags+2(%r2), ((CONTEXT_S390X | CONTEXT_FULL) & 0xffff)
- mvhhi CONTEXT_ContextFlags(%r2), ((CONTEXT_S390X | CONTEXT_FULL) >> 16)
- jg C_FUNC(CONTEXT_CaptureContext)
-LEAF_END RtlCaptureContext, _TEXT
-
-LEAF_ENTRY RtlRestoreContext, _TEXT
-
- lgr %r1, %r14
-
- tm CONTEXT_ContextFlags+3(%r2), CONTEXT_FLOATING_POINT
- je LOCAL_LABEL(Done_Restore_CONTEXT_FLOATING_POINT)
- ld %f0, CONTEXT_F0(%r2)
- ld %f1, CONTEXT_F1(%r2)
- ld %f2, CONTEXT_F2(%r2)
- ld %f3, CONTEXT_F3(%r2)
- ld %f4, CONTEXT_F4(%r2)
- ld %f5, CONTEXT_F5(%r2)
- ld %f6, CONTEXT_F6(%r2)
- ld %f7, CONTEXT_F7(%r2)
- ld %f8, CONTEXT_F8(%r2)
- ld %f9, CONTEXT_F9(%r2)
- ld %f10, CONTEXT_F10(%r2)
- ld %f11, CONTEXT_F11(%r2)
- ld %f12, CONTEXT_F12(%r2)
- ld %f13, CONTEXT_F13(%r2)
- ld %f14, CONTEXT_F14(%r2)
- ld %f15, CONTEXT_F15(%r2)
-LOCAL_LABEL(Done_Restore_CONTEXT_FLOATING_POINT):
-
- tm CONTEXT_ContextFlags+3(%r2), CONTEXT_CONTROL
- je LOCAL_LABEL(Done_Restore_CONTEXT_CONTROL)
- // We do *not* attempt to restore the PSW mask here!
- lg %r1, CONTEXT_PSWAddr(%r2)
- lg %r15, CONTEXT_R15(%r2)
-LOCAL_LABEL(Done_Restore_CONTEXT_CONTROL):
-
- tm CONTEXT_ContextFlags+3(%r2), CONTEXT_INTEGER
- je LOCAL_LABEL(Done_Restore_CONTEXT_INTEGER)
- // We do *not* restore %r0 and %r1 here!
- lmg %r2, %r14, CONTEXT_R2(%r2)
-LOCAL_LABEL(Done_Restore_CONTEXT_INTEGER):
-
- br %r1
-LEAF_END RtlRestoreContext, _TEXT
-
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- processor.cpp
-
-Abstract:
-
- Implementation of processor related functions for the IBM s390x
- platforms. These functions are processor dependent.
-
-
-
---*/
-
-#include "pal/palinternal.h"
-
#cmakedefine01 HAVE_VM_FLAGS_SUPERPAGE_SIZE_ANY
#cmakedefine01 HAVE_MAP_HUGETLB
-#cmakedefine01 HAVE_IEEEFP_H
#cmakedefine01 HAVE_SYS_VMPARAM_H
#cmakedefine01 HAVE_MACH_VM_TYPES_H
#cmakedefine01 HAVE_MACH_VM_PARAM_H
#cmakedefine01 HAVE_RUNETYPE_H
#cmakedefine01 HAVE_GNU_LIBNAMES_H
#cmakedefine01 HAVE_PRCTL_H
-#cmakedefine01 HAVE_NUMA_H
#cmakedefine01 HAVE_PTHREAD_NP_H
#cmakedefine01 HAVE_AUXV_HWCAP_H
#cmakedefine01 HAVE_SYS_PTRACE_H
+#cmakedefine01 HAVE_UCONTEXT_H
#cmakedefine01 HAVE_GETAUXVAL
#cmakedefine01 HAVE_KQUEUE
-#cmakedefine01 HAVE_PTHREAD_SUSPEND
-#cmakedefine01 HAVE_PTHREAD_SUSPEND_NP
-#cmakedefine01 HAVE_PTHREAD_CONTINUE
-#cmakedefine01 HAVE_PTHREAD_RESUME_NP
-#cmakedefine01 HAVE_PTHREAD_CONTINUE_NP
#cmakedefine01 HAVE_PTHREAD_ATTR_GET_NP
#cmakedefine01 HAVE_PTHREAD_GETATTR_NP
#cmakedefine01 HAVE_PTHREAD_GETCPUCLOCKID
-#cmakedefine01 HAVE_PTHREAD_SIGQUEUE
#cmakedefine01 HAVE_PTHREAD_GETAFFINITY_NP
#cmakedefine01 HAVE_CPUSET_T
-#cmakedefine01 HAVE_SIGRETURN
-#cmakedefine01 HAVE__THREAD_SYS_SIGRETURN
-#cmakedefine01 HAVE_COPYSIGN
#cmakedefine01 HAVE_FSYNC
#cmakedefine01 HAVE_FUTIMES
-#cmakedefine01 HAVE_UTIMES
#cmakedefine01 HAVE_SYSCTL
#cmakedefine01 HAVE_SYSCTLBYNAME
#cmakedefine01 HAVE_SYSCONF
-#cmakedefine01 HAVE_SYSINFO
#cmakedefine01 HAVE_GMTIME_R
-#cmakedefine01 HAVE_TIMEGM
#cmakedefine01 HAVE_POLL
#cmakedefine01 HAVE_STATVFS
#cmakedefine01 HAVE_NON_LEGACY_STATFS
#cmakedefine01 HAVE_SEMAPHORE_H
#cmakedefine01 HAS_SYSV_SEMAPHORES
#cmakedefine01 HAS_PTHREAD_MUTEXES
-#cmakedefine01 HAVE_TTRACE
+#cmakedefine HAVE_TTRACE
#cmakedefine01 HAVE_PIPE2
#cmakedefine01 HAVE_SCHED_GETAFFINITY
#cmakedefine01 HAVE_SCHED_SETAFFINITY
#cmakedefine HAVE_UNW_GET_SAVE_LOC
#cmakedefine HAVE_UNW_GET_ACCESSORS
-#cmakedefine01 HAVE_XSWDEV
-#cmakedefine01 HAVE_XSW_USAGE
+#cmakedefine HAVE_UNW_AARCH64_X19
#cmakedefine01 HAVE_PUBLIC_XSTATE_STRUCT
#cmakedefine01 HAVE__FPX_SW_BYTES_WITH_XSTATE_BV
#cmakedefine01 HAVE_PR_SET_PTRACER
-#cmakedefine01 HAVE_SWAPCTL
#cmakedefine01 HAVE_STAT_TIMESPEC
#cmakedefine01 HAVE_STAT_TIM
#cmakedefine01 HAVE_STAT_NSEC
-#cmakedefine01 HAVE_TM_GMTOFF
#cmakedefine01 HAVE_BSD_REGS_T
#cmakedefine01 HAVE_PT_REGS
#cmakedefine01 HAVE___GREGSET_T
#cmakedefine01 HAVE_FPSTATE_GLIBC_RESERVED1
#cmakedefine01 HAVE_UCONTEXT_T
-#cmakedefine01 HAVE_PTHREAD_RWLOCK_T
-#cmakedefine01 HAVE_PRWATCH_T
#cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@
-#cmakedefine01 HAVE_DIRENT_D_TYPE
#cmakedefine01 HAVE_FPREGS_WITH_CW
#cmakedefine01 HAVE_YIELD_SYSCALL
#cmakedefine01 HAVE_INFTIM
-#cmakedefine01 HAVE_CHAR_BIT
#cmakedefine01 USER_H_DEFINES_DEBUG
#cmakedefine01 HAVE__SC_PHYS_PAGES
#cmakedefine01 HAVE__SC_AVPHYS_PAGES
#cmakedefine01 REALPATH_SUPPORTS_NONEXISTENT_FILES
-#cmakedefine01 SSCANF_CANNOT_HANDLE_MISSING_EXPONENT
-#cmakedefine01 SSCANF_SUPPORT_ll
-#cmakedefine01 HAVE_LARGE_SNPRINTF_SUPPORT
#cmakedefine01 HAVE_BROKEN_FIFO_SELECT
#cmakedefine01 HAVE_BROKEN_FIFO_KEVENT
-#cmakedefine01 HAS_FTRUNCATE_LENGTH_ISSUE
#cmakedefine01 UNWIND_CONTEXT_IS_UCONTEXT_T
#cmakedefine01 HAVE_SCHED_GET_PRIORITY
-#cmakedefine01 HAVE_SCHED_GETCPU
#cmakedefine01 HAVE_WORKING_GETTIMEOFDAY
#cmakedefine01 HAVE_WORKING_CLOCK_GETTIME
#cmakedefine01 HAVE_CLOCK_MONOTONIC
#cmakedefine01 HAVE_CLOCK_MONOTONIC_COARSE
#cmakedefine01 HAVE_CLOCK_GETTIME_NSEC_NP
-#cmakedefine01 HAVE_CLOCK_THREAD_CPUTIME
#cmakedefine01 HAVE_PTHREAD_CONDATTR_SETCLOCK
#cmakedefine01 MMAP_ANON_IGNORES_PROTECTION
#cmakedefine01 ONE_SHARED_MAPPING_PER_FILEREGION_PER_PROCESS
#cmakedefine01 PTHREAD_CREATE_MODIFIES_ERRNO
#cmakedefine01 SEM_INIT_MODIFIES_ERRNO
#cmakedefine01 HAVE_PROCFS_CTL
-#cmakedefine01 HAVE_PROCFS_MAPS
#cmakedefine01 HAVE_PROCFS_STAT
-#cmakedefine01 HAVE_PROCFS_STATUS
-#cmakedefine01 HAVE_COMPATIBLE_ACOS
-#cmakedefine01 HAVE_COMPATIBLE_ASIN
-#cmakedefine01 HAVE_COMPATIBLE_POW
-#cmakedefine01 HAVE_VALID_NEGATIVE_INF_POW
-#cmakedefine01 HAVE_VALID_POSITIVE_INF_POW
-#cmakedefine01 HAVE_COMPATIBLE_ATAN2
-#cmakedefine01 HAVE_COMPATIBLE_EXP
-#cmakedefine01 HAVE_COMPATIBLE_ILOGB0
-#cmakedefine01 HAVE_COMPATIBLE_ILOGBNAN
-#cmakedefine01 HAVE_COMPATIBLE_LOG
-#cmakedefine01 HAVE_COMPATIBLE_LOG10
-#cmakedefine01 UNGETC_NOT_RETURN_EOF
+#cmakedefine01 HAVE_PROCFS_MAPS
#cmakedefine01 HAS_POSIX_SEMAPHORES
-#cmakedefine01 FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL
#define PAL_THREAD_PRIORITY_MIN 0
#define PAL_THREAD_PRIORITY_MAX 0
#cmakedefine01 HAVE__NSGETENVIRON
#cmakedefine01 DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX
#cmakedefine PAL_PTRACE(cmd, pid, addr, data) @PAL_PTRACE@
-#cmakedefine PAL_PT_ATTACH @PAL_PT_ATTACH@
-#cmakedefine PAL_PT_DETACH @PAL_PT_DETACH@
-#cmakedefine PAL_PT_READ_D @PAL_PT_READ_D@
-#cmakedefine PAL_PT_WRITE_D @PAL_PT_WRITE_D@
#cmakedefine01 SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING
#cmakedefine01 ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS
-#cmakedefine01 HAS_FTRUNCATE_LENGTH_ISSUE
#cmakedefine01 HAVE_FULLY_FEATURED_PTHREAD_MUTEXES
#cmakedefine01 HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES
#cmakedefine BSD_REGS_STYLE(reg, RR, rr) @BSD_REGS_STYLE@
#cmakedefine01 HAVE_SCHED_OTHER_ASSIGNABLE
+#cmakedefine01 SET_SCHEDPARAM_NEEDS_PRIVS
#define CHECK_TRACE_SPECIFIERS 0
#define HAVE_GETHRTIME 0
#define OPEN64_IS_USED_INSTEAD_OF_OPEN 0
#define PAL_IGNORE_NORMAL_THREAD_PRIORITY 0
#define SELF_SUSPEND_FAILS_WITH_NATIVE_SUSPENSION 0
-#define SET_SCHEDPARAM_NEEDS_PRIVS 0
#define SIGWAIT_FAILS_WHEN_PASSED_FULL_SIGSET 0
#define WRITE_0_BYTES_HANGS_TTY 0
#define HAVE_FTRUNCATE_LARGE_LENGTH_SUPPORT 1
list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_FILE_OFFSET_BITS=64)
-check_include_files(ieeefp.h HAVE_IEEEFP_H)
check_include_files(sys/vmparam.h HAVE_SYS_VMPARAM_H)
check_include_files(mach/vm_types.h HAVE_MACH_VM_TYPES_H)
check_include_files(mach/vm_param.h HAVE_MACH_VM_PARAM_H)
check_include_files(runetype.h HAVE_RUNETYPE_H)
check_include_files(semaphore.h HAVE_SEMAPHORE_H)
check_include_files(sys/prctl.h HAVE_PRCTL_H)
-check_include_files(numa.h HAVE_NUMA_H)
check_include_files("sys/auxv.h;asm/hwcap.h" HAVE_AUXV_HWCAP_H)
check_include_files("sys/ptrace.h" HAVE_SYS_PTRACE_H)
+check_include_files(ucontext.h HAVE_UCONTEXT_H)
check_symbol_exists(getauxval sys/auxv.h HAVE_GETAUXVAL)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS})
check_function_exists(sysctlbyname HAVE_SYSCTLBYNAME)
check_include_files(gnu/lib-names.h HAVE_GNU_LIBNAMES_H)
-check_function_exists(kqueue HAVE_KQUEUE)
+if(CLR_CMAKE_TARGET_HAIKU)
+ # kqueue is broken on Haiku and does not provide the required information in the data field.
+ set(HAVE_KQUEUE 0)
+else()
+ check_function_exists(kqueue HAVE_KQUEUE)
+endif()
check_library_exists(c sched_getaffinity "" HAVE_SCHED_GETAFFINITY)
check_library_exists(c sched_setaffinity "" HAVE_SCHED_SETAFFINITY)
set(PTHREAD_LIBRARY c)
endif()
-check_library_exists(${PTHREAD_LIBRARY} pthread_suspend "" HAVE_PTHREAD_SUSPEND)
-check_library_exists(${PTHREAD_LIBRARY} pthread_suspend_np "" HAVE_PTHREAD_SUSPEND_NP)
-check_library_exists(${PTHREAD_LIBRARY} pthread_continue "" HAVE_PTHREAD_CONTINUE)
-check_library_exists(${PTHREAD_LIBRARY} pthread_continue_np "" HAVE_PTHREAD_CONTINUE_NP)
-check_library_exists(${PTHREAD_LIBRARY} pthread_resume_np "" HAVE_PTHREAD_RESUME_NP)
check_library_exists(${PTHREAD_LIBRARY} pthread_attr_get_np "" HAVE_PTHREAD_ATTR_GET_NP)
check_library_exists(${PTHREAD_LIBRARY} pthread_getattr_np "" HAVE_PTHREAD_GETATTR_NP)
check_library_exists(${PTHREAD_LIBRARY} pthread_getcpuclockid "" HAVE_PTHREAD_GETCPUCLOCKID)
-check_library_exists(${PTHREAD_LIBRARY} pthread_sigqueue "" HAVE_PTHREAD_SIGQUEUE)
check_library_exists(${PTHREAD_LIBRARY} pthread_getaffinity_np "" HAVE_PTHREAD_GETAFFINITY_NP)
-check_function_exists(sigreturn HAVE_SIGRETURN)
-check_function_exists(_thread_sys_sigreturn HAVE__THREAD_SYS_SIGRETURN)
-set(CMAKE_REQUIRED_LIBRARIES m)
-check_function_exists(copysign HAVE_COPYSIGN)
-set(CMAKE_REQUIRED_LIBRARIES)
check_function_exists(fsync HAVE_FSYNC)
check_function_exists(futimes HAVE_FUTIMES)
-check_function_exists(utimes HAVE_UTIMES)
if(CLR_CMAKE_TARGET_LINUX)
# sysctl is deprecated on Linux
set(HAVE_SYSCTL 0)
else()
check_function_exists(sysctl HAVE_SYSCTL)
endif()
-check_function_exists(sysinfo HAVE_SYSINFO)
check_function_exists(sysconf HAVE_SYSCONF)
check_function_exists(gmtime_r HAVE_GMTIME_R)
-check_function_exists(timegm HAVE_TIMEGM)
check_function_exists(poll HAVE_POLL)
check_function_exists(statvfs HAVE_STATVFS)
check_function_exists(thread_self HAVE_THREAD_SELF)
check_function_exists(pthread_mutex_init HAS_PTHREAD_MUTEXES)
check_function_exists(ttrace HAVE_TTRACE)
check_function_exists(pipe2 HAVE_PIPE2)
+check_function_exists(strerrorname_np HAVE_STRERRORNAME_NP)
check_cxx_source_compiles("
#include <pthread_np.h>
check_struct_has_member ("struct stat" st_atimespec "sys/types.h;sys/stat.h" HAVE_STAT_TIMESPEC)
check_struct_has_member ("struct stat" st_atim "sys/types.h;sys/stat.h" HAVE_STAT_TIM)
check_struct_has_member ("struct stat" st_atimensec "sys/types.h;sys/stat.h" HAVE_STAT_NSEC)
-check_struct_has_member ("struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF)
check_struct_has_member ("ucontext_t" uc_mcontext.gregs[0] ucontext.h HAVE_GREGSET_T)
check_struct_has_member ("ucontext_t" uc_mcontext.__gregs[0] ucontext.h HAVE___GREGSET_T)
check_struct_has_member ("ucontext_t" uc_mcontext.fpregs->__glibc_reserved1[0] ucontext.h HAVE_FPSTATE_GLIBC_RESERVED1)
-check_struct_has_member ("struct sysinfo" mem_unit "sys/sysinfo.h" HAVE_SYSINFO_WITH_MEM_UNIT)
-check_struct_has_member ("struct dirent" d_type dirent.h HAVE_DIRENT_D_TYPE)
check_struct_has_member ("struct _fpchip_state" cw sys/ucontext.h HAVE_FPREGS_WITH_CW)
set(CMAKE_EXTRA_INCLUDE_FILES machine/reg.h)
set(CMAKE_EXTRA_INCLUDE_FILES asm/ptrace.h)
check_type_size("struct pt_regs" PT_REGS)
set(CMAKE_EXTRA_INCLUDE_FILES)
-set(CMAKE_EXTRA_INCLUDE_FILES signal.h)
-set(CMAKE_EXTRA_INCLUDE_FILES)
-set(CMAKE_EXTRA_INCLUDE_FILES ucontext.h)
+if(HAVE_UCONTEXT_H)
+ set(CMAKE_EXTRA_INCLUDE_FILES ucontext.h)
+else()
+ set(CMAKE_EXTRA_INCLUDE_FILES signal.h)
+endif()
check_type_size(ucontext_t UCONTEXT_T)
set(CMAKE_EXTRA_INCLUDE_FILES)
set(CMAKE_EXTRA_INCLUDE_FILES pthread.h)
check_cxx_symbol_exists(SYS_yield sys/syscall.h HAVE_YIELD_SYSCALL)
check_cxx_symbol_exists(INFTIM poll.h HAVE_INFTIM)
-check_cxx_symbol_exists(CHAR_BIT limits.h HAVE_CHAR_BIT)
check_cxx_symbol_exists(_DEBUG sys/user.h USER_H_DEFINES_DEBUG)
check_cxx_symbol_exists(_SC_PHYS_PAGES unistd.h HAVE__SC_PHYS_PAGES)
check_cxx_symbol_exists(_SC_AVPHYS_PAGES unistd.h HAVE__SC_AVPHYS_PAGES)
-check_cxx_symbol_exists(swapctl sys/swap.h HAVE_SWAPCTL)
check_cxx_source_runs("
#include <sys/param.h>
check_cxx_source_runs("
#include <stdio.h>
#include <stdlib.h>
-int main(void)
-{
- long long n = 0;
- sscanf(\"5000000000\", \"%qu\", &n);
- exit (n != 5000000000);
- }" SSCANF_SUPPORT_ll)
-check_cxx_source_runs("
-#include <stdio.h>
-#include <stdlib.h>
-
-int main()
-{
- int ret;
- float f = 0;
- char * strin = \"12.34e\";
-
- ret = sscanf (strin, \"%e\", &f);
- if (ret <= 0)
- exit (0);
- exit(1);
-}" SSCANF_CANNOT_HANDLE_MISSING_EXPONENT)
-check_cxx_source_runs("
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(void) {
- char buf[256] = { 0 };
- snprintf(buf, 0x7fffffff, \"%#x\", 0x12345678);
- if (buf[0] == 0x0) {
- exit(1);
- }
- exit(0);
-}" HAVE_LARGE_SNPRINTF_SUPPORT)
-check_cxx_source_runs("
-#include <stdio.h>
-#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include <sys/stat.h>
exit(-1 == max_priority || -1 == min_priority);
}" HAVE_SCHED_GET_PRIORITY)
-set(CMAKE_REQUIRED_LIBRARIES pthread)
-check_cxx_source_runs("
-#include <stdlib.h>
-#include <sched.h>
-
-int main(void)
-{
- if (sched_getcpu() >= 0)
- {
- exit(0);
- }
- exit(1);
-}" HAVE_SCHED_GETCPU)
-set(CMAKE_REQUIRED_LIBRARIES)
check_cxx_source_runs("
#include <stdlib.h>
#include <time.h>
exit((ret == 0) ? 1 : 0);
}" HAVE_CLOCK_GETTIME_NSEC_NP)
-set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_RT_LIBS})
-check_cxx_source_runs("
-#include <stdlib.h>
-#include <time.h>
-#include <sys/time.h>
-
-int main()
-{
- int ret;
- struct timespec ts;
- ret = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts);
-
- exit(ret);
-}" HAVE_CLOCK_THREAD_CPUTIME)
-set(CMAKE_REQUIRED_LIBRARIES)
-
check_cxx_source_runs("
#include <sys/types.h>
#include <sys/mman.h>
exit(0);
}" HAVE_PROCFS_STAT)
set(CMAKE_REQUIRED_LIBRARIES)
-check_cxx_source_runs("
-#include <fcntl.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-
-int main(void) {
- int fd;
-#ifdef PATH_MAX
- char path[PATH_MAX];
-#elif defined(MAXPATHLEN)
- char path[MAXPATHLEN];
-#else
- char path[1024];
-#endif
-
- sprintf(path, \"/proc/%u/status\", getpid());
- fd = open(path, O_RDONLY);
- if (fd == -1) {
- exit(1);
- }
- exit(0);
-}" HAVE_PROCFS_STATUS)
-set(CMAKE_REQUIRED_LIBRARIES m)
-check_cxx_source_runs("
-#include <math.h>
-#include <stdlib.h>
-
-int main(void) {
- volatile double x = 10;
- if (!isnan(acos(x))) {
- exit(1);
- }
- exit(0);
-}" HAVE_COMPATIBLE_ACOS)
-set(CMAKE_REQUIRED_LIBRARIES)
-set(CMAKE_REQUIRED_LIBRARIES m)
-check_cxx_source_runs("
-#include <math.h>
-#include <stdlib.h>
-
-int main(void) {
- volatile double arg = 10;
- if (!isnan(asin(arg))) {
- exit(1);
- }
- exit(0);
-}" HAVE_COMPATIBLE_ASIN)
-set(CMAKE_REQUIRED_LIBRARIES)
-set(CMAKE_REQUIRED_LIBRARIES m)
-check_cxx_source_runs("
-#include <math.h>
-#include <stdlib.h>
-
-int main(void) {
- volatile double base = 1.0;
- volatile double infinity = 1.0 / 0.0;
- if (pow(base, infinity) != 1.0 || pow(base, -infinity) != 1.0) {
- exit(1);
- }
- if (pow(-base, infinity) != 1.0 || pow(-base, -infinity) != 1.0) {
- exit(1);
- }
-
- base = 0.0;
- if (pow(base, infinity) != 0.0) {
- exit(1);
- }
- if (pow(base, -infinity) != infinity) {
- exit(1);
- }
-
- base = 1.1;
- if (pow(-base, infinity) != infinity || pow(base, infinity) != infinity) {
- exit(1);
- }
- if (pow(-base, -infinity) != 0.0 || pow(base, -infinity) != 0.0) {
- exit(1);
- }
-
- base = 0.0;
- volatile int iexp = 1;
- if (pow(-base, -iexp) != -infinity) {
- exit(1);
- }
- if (pow(base, -iexp) != infinity) {
- exit(1);
- }
- exit(0);
-}" HAVE_COMPATIBLE_POW)
-set(CMAKE_REQUIRED_LIBRARIES)
-set(CMAKE_REQUIRED_LIBRARIES m)
-check_cxx_source_runs("
-#include <math.h>
-#include <stdlib.h>
-
-int main(int argc, char **argv) {
- double result;
- volatile double base = 3.2e-10;
- volatile double exp = 1 - 5e14;
-
- result = pow(-base, exp);
- if (result != -1.0 / 0.0) {
- exit(1);
- }
- exit(0);
-}" HAVE_VALID_NEGATIVE_INF_POW)
-set(CMAKE_REQUIRED_LIBRARIES)
-set(CMAKE_REQUIRED_LIBRARIES m)
-check_cxx_source_runs("
-#include <math.h>
-#include <stdlib.h>
-
-int main(int argc, char **argv) {
- double result;
- volatile double base = 3.5;
- volatile double exp = 3e100;
-
- result = pow(-base, exp);
- if (result != 1.0 / 0.0) {
- exit(1);
- }
- exit(0);
-}" HAVE_VALID_POSITIVE_INF_POW)
-set(CMAKE_REQUIRED_LIBRARIES)
-set(CMAKE_REQUIRED_LIBRARIES m)
-check_cxx_source_runs("
-#include <math.h>
-#include <stdlib.h>
-
-int main(void) {
- double pi = 3.14159265358979323846;
- double result;
- volatile double y = 0.0;
- volatile double x = 0.0;
-
- result = atan2(y, -x);
- if (fabs(pi - result) > 0.0000001) {
- exit(1);
- }
-
- result = atan2(-y, -x);
- if (fabs(-pi - result) > 0.0000001) {
- exit(1);
- }
-
- result = atan2 (-y, x);
- if (result != 0.0 || copysign (1.0, result) > 0) {
- exit(1);
- }
-
- result = atan2 (y, x);
- if (result != 0.0 || copysign (1.0, result) < 0) {
- exit(1);
- }
-
- exit (0);
-}" HAVE_COMPATIBLE_ATAN2)
-set(CMAKE_REQUIRED_LIBRARIES)
-set(CMAKE_REQUIRED_LIBRARIES m)
-check_cxx_source_runs("
-#include <math.h>
-#include <stdlib.h>
-
-int main(void) {
- double d = exp(1.0), e = M_E;
-
- /* Used memcmp rather than == to test that the doubles are equal to
- prevent gcc's optimizer from using its 80 bit internal long
- doubles. If you use ==, then on BSD you get a false negative since
- exp(1.0) == M_E to 64 bits, but not 80.
- */
-
- if (memcmp (&d, &e, sizeof (double)) == 0) {
- exit(0);
- }
- exit(1);
-}" HAVE_COMPATIBLE_EXP)
-set(CMAKE_REQUIRED_LIBRARIES)
-set(CMAKE_REQUIRED_LIBRARIES m)
-check_cxx_source_runs("
-#include <math.h>
-#include <stdlib.h>
-
-int main(void) {
- if (FP_ILOGB0 != -2147483648) {
- exit(1);
- }
-
- exit(0);
-}" HAVE_COMPATIBLE_ILOGB0)
-set(CMAKE_REQUIRED_LIBRARIES)
-set(CMAKE_REQUIRED_LIBRARIES m)
-check_cxx_source_runs("
-#include <math.h>
-#include <stdlib.h>
-
-int main(void) {
- if (FP_ILOGBNAN != 2147483647) {
- exit(1);
- }
-
- exit(0);
-}" HAVE_COMPATIBLE_ILOGBNAN)
-set(CMAKE_REQUIRED_LIBRARIES)
-set(CMAKE_REQUIRED_LIBRARIES m)
-check_cxx_source_runs("
-#include <math.h>
-#include <stdlib.h>
-
-int main(void) {
- volatile int arg = 10000;
- if (!isnan(log(-arg))) {
- exit(1);
- }
- exit(0);
-}" HAVE_COMPATIBLE_LOG)
-set(CMAKE_REQUIRED_LIBRARIES)
-set(CMAKE_REQUIRED_LIBRARIES m)
-check_cxx_source_runs("
-#include <math.h>
-#include <stdlib.h>
-
-int main(void) {
- volatile int arg = 10000;
- if (!isnan(log10(-arg))) {
- exit(1);
- }
- exit(0);
-}" HAVE_COMPATIBLE_LOG10)
-set(CMAKE_REQUIRED_LIBRARIES)
-check_cxx_source_runs("
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-int main(void)
-{
- char* szFileName;
- FILE* pFile = NULL;
- int ret = 1;
-
- szFileName = tempnam(\".\", \"tmp\");
-
- /* open the file write-only */
- pFile = fopen(szFileName, \"a\");
- if (pFile == NULL)
- {
- exit(0);
- }
- if (ungetc('A', pFile) != EOF)
- {
- ret = 0;
- }
- unlink(szFileName);
- exit(ret);
-}" UNGETC_NOT_RETURN_EOF)
set(CMAKE_REQUIRED_LIBRARIES ${PTHREAD_LIBRARY})
check_cxx_source_runs("
}" HAS_POSIX_SEMAPHORES)
set(CMAKE_REQUIRED_LIBRARIES)
-check_cxx_source_runs("
-#include <stdio.h>
-#include <stdlib.h>
-
-int main()
-{
- FILE *fp = NULL;
- char *fileName = \"/dev/zero\";
- char buf[10];
-
- /*
- * Open the file in append mode and try to read some text.
- * And, make sure ferror() is set.
- */
- fp = fopen (fileName, \"a\");
- if ( (NULL == fp) ||
- (fread (buf, sizeof(buf), 1, fp) > 0) ||
- (!ferror(fp))
- )
- {
- return 0;
- }
-
- /*
- * Now that ferror() is set, try to close the file.
- * If we get an error, we can conclude that this
- * fgets() depended on the previous ferror().
- */
- if ( fclose(fp) != 0 )
- {
- return 0;
- }
-
- return 1;
-}" FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL)
-
set(SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING 1)
set(ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS 1)
if(NOT CLR_CMAKE_USE_SYSTEM_LIBUNWIND)
- list(INSERT CMAKE_REQUIRED_INCLUDES 0 ${CMAKE_CURRENT_SOURCE_DIR}/libunwind/include ${CMAKE_CURRENT_BINARY_DIR}/libunwind/include)
+ list(INSERT CMAKE_REQUIRED_INCLUDES 0 ${CLR_SRC_NATIVE_DIR}/external/libunwind/include ${CLR_ARTIFACTS_OBJ_DIR}/external/libunwind/include)
endif()
check_c_source_compiles("
check_symbol_exists(unw_get_save_loc libunwind.h HAVE_UNW_GET_SAVE_LOC)
check_symbol_exists(unw_get_accessors libunwind.h HAVE_UNW_GET_ACCESSORS)
-if(NOT CLR_CMAKE_USE_SYSTEM_LIBUNWIND)
- list(REMOVE_AT CMAKE_REQUIRED_INCLUDES 0 1)
-endif()
-
check_cxx_source_compiles("
-#include <sys/param.h>
-#include <sys/sysctl.h>
-#include <vm/vm_param.h>
+#include <libunwind.h>
int main(int argc, char **argv)
{
- struct xswdev xsw;
-
+ int flag = (int)UNW_AARCH64_X19;
return 0;
-}" HAVE_XSWDEV)
-
-check_cxx_source_compiles("
-#include <sys/param.h>
-#include <sys/sysctl.h>
-
-int main(int argc, char **argv)
-{
- struct xsw_usage xsu;
+}" HAVE_UNW_AARCH64_X19)
- return 0;
-}" HAVE_XSW_USAGE)
+if(NOT CLR_CMAKE_USE_SYSTEM_LIBUNWIND)
+ list(REMOVE_AT CMAKE_REQUIRED_INCLUDES 0 1)
+endif()
check_cxx_source_compiles("
#include <signal.h>
set(HAVE__NSGETENVIRON 1)
set(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 1)
set(PAL_PTRACE "ptrace((cmd), (pid), (caddr_t)(addr), (data))")
- set(PAL_PT_ATTACH PT_ATTACH)
- set(PAL_PT_DETACH PT_DETACH)
- set(PAL_PT_READ_D PT_READ_D)
- set(PAL_PT_WRITE_D PT_WRITE_D)
- set(HAS_FTRUNCATE_LENGTH_ISSUE 1)
set(HAVE_SCHED_OTHER_ASSIGNABLE 1)
elseif(CLR_CMAKE_TARGET_FREEBSD)
set(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 0)
set(PAL_PTRACE "ptrace((cmd), (pid), (caddr_t)(addr), (data))")
- set(PAL_PT_ATTACH PT_ATTACH)
- set(PAL_PT_DETACH PT_DETACH)
- set(PAL_PT_READ_D PT_READ_D)
- set(PAL_PT_WRITE_D PT_WRITE_D)
- set(HAS_FTRUNCATE_LENGTH_ISSUE 0)
- set(BSD_REGS_STYLE "((reg).r_##rr)")
+ if (CLR_CMAKE_HOST_ARCH_AMD64)
+ set(BSD_REGS_STYLE "((reg).r_##rr)")
+ elseif(CLR_CMAKE_HOST_ARCH_ARM64)
+ set(BSD_REGS_STYLE "((reg).rr)")
+ else()
+ message(FATAL_ERROR "Unknown FreeBSD architecture")
+ endif()
set(HAVE_SCHED_OTHER_ASSIGNABLE 1)
elseif(CLR_CMAKE_TARGET_NETBSD)
set(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 0)
set(PAL_PTRACE "ptrace((cmd), (pid), (void*)(addr), (data))")
- set(PAL_PT_ATTACH PT_ATTACH)
- set(PAL_PT_DETACH PT_DETACH)
- set(PAL_PT_READ_D PT_READ_D)
- set(PAL_PT_WRITE_D PT_WRITE_D)
- set(HAS_FTRUNCATE_LENGTH_ISSUE 0)
set(BSD_REGS_STYLE "((reg).regs[_REG_##RR])")
set(HAVE_SCHED_OTHER_ASSIGNABLE 0)
elseif(CLR_CMAKE_TARGET_SUNOS)
set(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 0)
set(PAL_PTRACE "ptrace((cmd), (pid), (caddr_t)(addr), (data))")
- set(PAL_PT_ATTACH PT_ATTACH)
- set(PAL_PT_DETACH PT_DETACH)
- set(PAL_PT_READ_D PT_READ_D)
- set(PAL_PT_WRITE_D PT_WRITE_D)
- set(HAS_FTRUNCATE_LENGTH_ISSUE 0)
+ set(SET_SCHEDPARAM_NEEDS_PRIVS 1)
+elseif(CLR_CMAKE_TARGET_HAIKU)
+ # Haiku does not have ptrace.
+ set(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 0)
+ set(HAVE_SCHED_OTHER_ASSIGNABLE 1)
else() # Anything else is Linux
if(NOT HAVE_LTTNG_TRACEPOINT_H AND FEATURE_EVENT_TRACE)
unset(HAVE_LTTNG_TRACEPOINT_H CACHE)
endif()
set(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 0)
set(PAL_PTRACE "ptrace((cmd), (pid), (void*)(addr), (data))")
- set(PAL_PT_ATTACH PTRACE_ATTACH)
- set(PAL_PT_DETACH PTRACE_DETACH)
- set(PAL_PT_READ_D PTRACE_PEEKDATA)
- set(PAL_PT_WRITE_D PTRACE_POKEDATA)
- set(HAS_FTRUNCATE_LENGTH_ISSUE 0)
set(HAVE_SCHED_OTHER_ASSIGNABLE 1)
endif(CLR_CMAKE_TARGET_OSX)
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- file.c
-
-Abstract:
-
- Implementation of the file functions in the C runtime library that
- are Windows specific.
-
-
-
---*/
-
-#include "pal/palinternal.h"
-#include "pal/dbgmsg.h"
-#include "pal/file.h"
-#include "pal/cruntime.h"
-
-#include "pal/thread.hpp"
-#include "pal/threadsusp.hpp"
-
-#include <unistd.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <pthread.h>
-
-#if FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL
- #define CLEARERR(f) clearerr((f)->bsdFilePtr)
-#else
- #define CLEARERR(f)
-#endif
-
-SET_DEFAULT_DEBUG_CHANNEL(CRT);
-
-/* Global variables storing the std streams.*/
-PAL_FILE PAL_Stdout;
-PAL_FILE PAL_Stdin;
-PAL_FILE PAL_Stderr;
-
-/*++
-
-Function:
-
- CRTInitStdStreams.
-
- Initilizes the standard streams.
- Returns TRUE on success, FALSE otherwise.
---*/
-BOOL CRTInitStdStreams()
-{
- /* stdout */
- PAL_Stdout.bsdFilePtr = stdout;
- PAL_Stdout.PALferrorCode = PAL_FILE_NOERROR;
- PAL_Stdout.bTextMode = TRUE;
-
- /* stdin */
- PAL_Stdin.bsdFilePtr = stdin;
- PAL_Stdin.PALferrorCode = PAL_FILE_NOERROR;
- PAL_Stdin.bTextMode = TRUE;
-
- /* stderr */
- PAL_Stderr.bsdFilePtr = stderr;
- PAL_Stderr.PALferrorCode = PAL_FILE_NOERROR;
- PAL_Stderr.bTextMode = TRUE;
- return TRUE;
-}
-
-/*++
-Function :
-
- MapFileOpenModes
-
- Maps Windows file open modes to Unix fopen modes and validates.
-
---*/
-static LPSTR MapFileOpenModes(LPSTR str , BOOL * bTextMode)
-{
- LPSTR retval = NULL;
- LPSTR temp = NULL;
-
- if (NULL == bTextMode)
- {
- ASSERT("MapFileOpenModes called with a NULL parameter for bTextMode.\n");
- return NULL;
- }
-
- *bTextMode = TRUE;
-
- if (NULL == str)
- {
- ASSERT("MapFileOpenModes called with a NULL parameter for str.\n");
- return NULL;
- }
-
- /* The PAL behaves differently for some Windows file open modes:
-
- c, n, S, R, and T: these are all hints to the system that aren't supported
- by the PAL. Since the user cannot depend on this behavior, it's safe to
- simply ignore these modes.
-
- D: specifies a file as temporary. This file is expected to be deleted when
- the last file descriptor is closed. The PAL does not support this behavior
- and asserts when this mode is used.
-
- t: represents opening in text mode. Calls to fdopen on Unix don't accept
- 't' so it is silently stripped out. However, the PAL supports the mode by
- having the PAL wrappers do the translation of CR-LF to LF and vice versa.
-
- t vs. b: To get binary mode, you must explicitly use 'b'. If neither mode
- is specified on Windows, the default mode is defined by the global
- variable _fmode. The PAL simply defaults to text mode. After examining
- CLR usage patterns, the PAL behavior seems acceptable. */
-
- /* Check if the mode specifies deleting the temporary file
- automatically when the last file descriptor is closed.
- The PAL does not support this behavior. */
- if (NULL != strchr(str,'D'))
- {
- ASSERT("The PAL doesn't support the 'D' flag for _fdopen and fopen.\n");
- return NULL;
- }
-
- /* Check if the mode specifies opening in binary.
- If so, set the bTextMode to false. */
- if(NULL != strchr(str,'b'))
- {
- *bTextMode = FALSE;
- }
-
- retval = (LPSTR)PAL_malloc( ( strlen( str ) + 1 ) * sizeof( CHAR ) );
- if (NULL == retval)
- {
- ERROR("Unable to allocate memory.\n");
- return NULL;
- }
-
- temp = retval;
- while ( *str )
- {
- if ( *str == 'r' || *str == 'w' || *str == 'a' )
- {
- *temp = *str;
- temp++;
- if ( ( ++str != NULL ) && *str == '+' )
- {
- *temp = *str;
- temp++;
- str++;
- }
- }
- else
- {
- str++;
- }
- }
- *temp = '\0';
- return retval;
-}
-
-#if UNGETC_NOT_RETURN_EOF
-/*++
-Function :
-
- WriteOnlyMode
-
- Returns TRUE to if a file is opened in write-only mode,
- Otherwise FALSE.
-
---*/
-static BOOL WriteOnlyMode(FILE* pFile)
-{
- INT fd, flags;
-
- if (pFile != NULL)
- {
- fd = fileno(pFile);
- if ((flags = fcntl(fd, F_GETFL)) >= 0)
- {
- if ((flags & O_ACCMODE) == O_WRONLY)
- {
- return TRUE;
- }
- }
- }
- return FALSE;
-}
-#endif //UNGETC_NOT_RETURN_EOF
-
-/*++
-Function:
- _fdopen
-
-see MSDN
-
---*/
-PAL_FILE *
-__cdecl
-_fdopen(
- int handle,
- const char *mode)
-{
- PAL_FILE *f = NULL;
- LPSTR supported = NULL;
- BOOL bTextMode = TRUE;
-
- PERF_ENTRY(_fdopen);
- ENTRY("_fdopen (handle=%d mode=%p (%s))\n", handle, mode, mode);
-
- _ASSERTE(mode != NULL);
-
- f = (PAL_FILE*)PAL_malloc( sizeof( PAL_FILE ) );
- if ( f )
- {
- supported = MapFileOpenModes( (char*)mode , &bTextMode);
- if ( !supported )
- {
- PAL_free(f);
- f = NULL;
- goto EXIT;
- }
-
- f->bsdFilePtr = (FILE *)fdopen( handle, supported );
- f->PALferrorCode = PAL_FILE_NOERROR;
- /* Make sure fdopen did not fail. */
- if ( !f->bsdFilePtr )
- {
- PAL_free( f );
- f = NULL;
- }
-
- PAL_free( supported );
- supported = NULL;
- }
- else
- {
- ERROR( "Unable to allocate memory for the PAL_FILE wrapper!\n" );
- }
-
-EXIT:
- LOGEXIT( "_fdopen returns FILE* %p\n", f );
- PERF_EXIT(_fdopen);
- return f;
-}
-
-
-/*++
-
-Function :
- fopen
-
-see MSDN doc.
-
---*/
-PAL_FILE *
-__cdecl
-PAL_fopen(const char * fileName, const char * mode)
-{
- PAL_FILE *f = NULL;
- LPSTR supported = NULL;
- LPSTR UnixFileName = NULL;
- struct stat stat_data;
- BOOL bTextMode = TRUE;
-
- PERF_ENTRY(fopen);
- ENTRY("fopen ( fileName=%p (%s) mode=%p (%s))\n", fileName, fileName, mode , mode );
-
- _ASSERTE(fileName != NULL);
- _ASSERTE(mode != NULL);
-
- if ( *mode == 'r' || *mode == 'w' || *mode == 'a' )
- {
- supported = MapFileOpenModes( (char*)mode,&bTextMode);
-
- if ( !supported )
- {
- goto done;
- }
-
- UnixFileName = PAL__strdup(fileName);
- if (UnixFileName == NULL )
- {
- ERROR("PAL__strdup() failed\n");
- SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- goto done;
- }
-
- FILEDosToUnixPathA( UnixFileName );
-
- /*I am not checking for the case where stat fails
- *as fopen will handle the error more gracefully in case
- *UnixFileName is invalid*/
- if ((stat(UnixFileName, &stat_data) == 0 ) &&
- ((stat_data.st_mode & S_IFMT) == S_IFDIR))
- {
- goto done;
- }
-
- f = (PAL_FILE*)PAL_malloc( sizeof( PAL_FILE ) );
- if ( f )
- {
- f->bsdFilePtr = (FILE*)fopen( UnixFileName, supported );
- f->PALferrorCode = PAL_FILE_NOERROR;
- f->bTextMode = bTextMode;
- if ( !f->bsdFilePtr )
- {
- /* Failed */
- PAL_free( f );
- f = NULL;
- }
-#if UNGETC_NOT_RETURN_EOF
- else
- {
- f->bWriteOnlyMode = WriteOnlyMode(f->bsdFilePtr);
- }
-#endif //UNGETC_NOT_RETURN_EOF
- }
- else
- {
- ERROR( "Unable to allocate memory to the PAL_FILE wrapper\n" );
- }
- }
- else
- {
- ERROR( "The mode flags must start with either an a, w, or r.\n" );
- }
-
-done:
- PAL_free( supported );
- supported = NULL;
- PAL_free( UnixFileName );
-
- LOGEXIT( "fopen returns FILE* %p\n", f );
- PERF_EXIT(fopen);
- return f;
-}
-
-/*++
-Function:
- _wfopen
-
-see MSDN doc.
-
---*/
-PAL_FILE *
-__cdecl
-_wfopen(
- const wchar_16 *fileName,
- const wchar_16 *mode)
-{
- CHAR mbFileName[ _MAX_PATH ];
- CHAR mbMode[ 10 ];
- PAL_FILE * filePtr = NULL;
-
- PERF_ENTRY(_wfopen);
- ENTRY("_wfopen(fileName:%p (%S), mode:%p (%S))\n", fileName, fileName, mode, mode);
-
- _ASSERTE(fileName != NULL);
- _ASSERTE(mode != NULL);
-
- /* Convert the parameters to ASCII and defer to PAL_fopen */
- if ( WideCharToMultiByte( CP_ACP, 0, fileName, -1, mbFileName,
- sizeof mbFileName, NULL, NULL ) != 0 )
- {
- if ( WideCharToMultiByte( CP_ACP, 0, mode, -1, mbMode,
- sizeof mbMode, NULL, NULL ) != 0 )
- {
- filePtr = PAL_fopen(mbFileName, mbMode);
- }
- else
- {
- ERROR( "An error occurred while converting mode to ANSI.\n" );
- }
- }
- else
- {
- ERROR( "An error occurred while converting"
- " fileName to ANSI string.\n" );
- }
- LOGEXIT("_wfopen returning FILE* %p\n", filePtr);
- PERF_EXIT(_wfopen);
- return filePtr;
-}
-
-/*++
-Function
- PAL_get_stdout.
-
- Returns the stdout stream.
---*/
-PAL_FILE * __cdecl PAL_get_stdout(int caller)
-{
- PERF_ENTRY(get_stdout);
- ENTRY("PAL_get_stdout\n");
- LOGEXIT("PAL_get_stdout returns PAL_FILE * %p\n", &PAL_Stdout );
- PERF_EXIT(get_stdout);
- return &PAL_Stdout;
-}
-
-/*++
-Function
- PAL_get_stdin.
-
- Returns the stdin stream.
---*/
-PAL_FILE * __cdecl PAL_get_stdin(int caller)
-{
- PERF_ENTRY(get_stdin);
- ENTRY("PAL_get_stdin\n");
- LOGEXIT("PAL_get_stdin returns PAL_FILE * %p\n", &PAL_Stdin );
- PERF_EXIT(get_stdin);
- return &PAL_Stdin;
-}
-
-/*++
-Function
- PAL_get_stderr.
-
- Returns the stderr stream.
---*/
-PAL_FILE * __cdecl PAL_get_stderr(int caller)
-{
- PERF_ENTRY(get_stderr);
- ENTRY("PAL_get_stderr\n");
- LOGEXIT("PAL_get_stderr returns PAL_FILE * %p\n", &PAL_Stderr );
- PERF_EXIT(get_stderr);
- return &PAL_Stderr;
-}
-
-/*++
-
-Function:
-
- PAL_pread
-
-See msdn for more details.
---*/
-size_t __cdecl PAL__pread(int fd, void *buf, size_t nbytes, ULONG64 offset)
-{
- return pread(fd, buf, nbytes, offset);
-}
-
-/*++
-
-Function:
-
- _close
-
-See msdn for more details.
---*/
-int __cdecl PAL__close(int handle)
-{
- INT nRetVal = 0;
-
- PERF_ENTRY(_close);
- ENTRY( "_close( handle=%d )\n", handle );
-
- nRetVal = close( handle );
-
- LOGEXIT( "_close returning %d.\n", nRetVal );
- PERF_EXIT(_close);
- return nRetVal;
-}
-
-int __cdecl PAL__flushall()
-{
- return fflush(NULL);
-}
-
-int __cdecl PAL_getc(PAL_FILE *stream);
-
-/*++
-Function :
-
- fread
-
- See MSDN for more details.
---*/
-
-size_t
-__cdecl
-PAL_fread(void * buffer, size_t size, size_t count, PAL_FILE * f)
-{
- size_t nReadBytes = 0;
-
- PERF_ENTRY(fread);
- ENTRY( "fread( buffer=%p, size=%d, count=%d, f=%p )\n",
- buffer, size, count, f );
-
- _ASSERTE(f != NULL);
-
- CLEARERR(f);
-
- if(f->bTextMode != TRUE)
- {
- nReadBytes = fread( buffer, size, count, f->bsdFilePtr );
- }
- else
- {
- size_t i=0;
- if(size > 0)
- {
- size_t j=0;
- LPSTR temp = (LPSTR)buffer;
- int nChar = 0;
- int nCount =0;
-
- for(i=0; i< count; i++)
- {
- for(j=0; j< size; j++)
- {
- if((nChar = PAL_getc(f)) == EOF)
- {
- nReadBytes = i;
- goto done;
- }
- else
- {
- temp[nCount++]=nChar;
- }
- }
- }
- }
- nReadBytes = i;
- }
-
-done:
- LOGEXIT( "fread returning size_t %d\n", nReadBytes );
- PERF_EXIT(fread);
- return nReadBytes;
-}
-
-
-/*++
-Function :
-
- ferror
-
- See MSDN for more details.
---*/
-int
-_cdecl
-PAL_ferror(PAL_FILE * f)
-{
- INT nErrorCode = PAL_FILE_NOERROR;
-
- PERF_ENTRY(ferror);
- ENTRY( "ferror( f=%p )\n", f );
-
- _ASSERTE(f != NULL);
-
- nErrorCode = ferror( f->bsdFilePtr );
- if ( 0 == nErrorCode )
- {
- /* See if the PAL file error code is set. */
- nErrorCode = f->PALferrorCode;
- }
-
- LOGEXIT( "ferror returns %d\n", nErrorCode );
- PERF_EXIT(ferror);
- return nErrorCode;
-}
-
-
-/*++
-Function :
-
- fclose
-
- See MSDN for more details.
---*/
-int
-_cdecl
-PAL_fclose(PAL_FILE * f)
-{
- INT nRetVal = 0;
-
- PERF_ENTRY(fclose);
- ENTRY( "fclose( f=%p )\n", f );
-
- _ASSERTE(f != NULL);
-
- CLEARERR(f);
-
- nRetVal = fclose( f->bsdFilePtr );
- PAL_free( f );
-
- LOGEXIT( "fclose returning %d\n", nRetVal );
- PERF_EXIT(fclose);
- return nRetVal;
-}
-
-/*++
-Function :
-
- fputs
-
- See MSDN for more details.
---*/
-int
-_cdecl
-PAL_fputs(const char * str, PAL_FILE * f)
-{
- INT nRetVal = 0;
-
- PERF_ENTRY(fputs);
- ENTRY( "fputs( %p (%s), %p )\n", str, str, f);
-
- _ASSERTE(str != NULL);
- _ASSERTE(f != NULL);
-
- CLEARERR(f);
-
- nRetVal = fputs( str, f->bsdFilePtr );
-
- LOGEXIT( "fputs returning %d\n", nRetVal );
- PERF_EXIT(fputs);
- return nRetVal;
-}
-
-/*++
-Function :
-
- ftell
-
- See MSDN for more details.
---*/
-LONG
-_cdecl
-PAL_ftell(PAL_FILE * f)
-{
- long lRetVal = 0;
-
- PERF_ENTRY(ftell);
- ENTRY( "ftell( %p )\n", f );
-
- _ASSERTE(f != NULL);
- lRetVal = ftell( f->bsdFilePtr );
-
-#ifdef HOST_64BIT
- /* Windows does not set an error if the file pointer's position
- is greater than _I32_MAX. It just returns -1. */
- if (lRetVal > _I32_MAX)
- {
- lRetVal = -1;
- }
-#endif
-
- LOGEXIT( "ftell returning %ld\n", lRetVal );
- PERF_EXIT(ftell);
- /* This explicit cast to LONG is used to silence any potential warnings
- due to implicitly casting the native long lRetVal to LONG when returning. */
- return (LONG)lRetVal;
-}
-
-/*++
-Function :
- getc
-
- See MSDN for more details.
---*/
-int
-_cdecl
-PAL_getc(PAL_FILE * f)
-{
- INT nRetVal = 0;
- INT temp =0;
-
- PERF_ENTRY(getc);
- ENTRY( "getc( %p )\n", f );
-
- _ASSERTE(f != NULL);
-
- CLEARERR(f);
-
- nRetVal = getc( f->bsdFilePtr );
-
- if ( (f->bTextMode) && (nRetVal == '\r') )
- {
- if ((temp = getc( f->bsdFilePtr ))== '\n')
- {
- nRetVal ='\n';
- }
- else if (EOF == ungetc( temp, f->bsdFilePtr ))
- {
- ERROR("ungetc operation failed\n");
- }
- }
-
- LOGEXIT( "getc returning %d\n", nRetVal );
- PERF_EXIT(getc);
- return nRetVal;
-}
-
-/*++
-Function :
-
- setvbuf
-
- See MSDN for more details.
---*/
-int
-_cdecl
-PAL_setvbuf(PAL_FILE *f, char *buf, int type, size_t size)
-{
- INT nRetVal = 0;
-
- PERF_ENTRY(setvbuf);
- ENTRY( "setvbuf( %p, %p, %d, %ul )\n", f, buf, type, size);
-
- _ASSERTE(f != NULL);
-
- nRetVal = setvbuf(f->bsdFilePtr, buf, type, size);
-
- LOGEXIT( "setvbuf returning %d\n", nRetVal );
- PERF_EXIT(setvbuf);
- return nRetVal;
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- filecrt.cpp
-
-Abstract:
-
- Implementation of the file functions in the C runtime library that
- are Windows specific.
-
-
-
---*/
-
-#include "pal/thread.hpp"
-#include "pal/file.hpp"
-
-#include "pal/palinternal.h"
-#include "pal/dbgmsg.h"
-#include "pal/file.h"
-#include "pal/cruntime.h"
-
-#include <unistd.h>
-#include <errno.h>
-#include <sys/stat.h>
-
-#ifdef __APPLE__
-#include <sys/syscall.h>
-#endif // __APPLE__
-
-using namespace CorUnix;
-
-SET_DEFAULT_DEBUG_CHANNEL(CRT);
-
-/*++
-Function:
- _open_osfhandle
-
-See MSDN doc.
---*/
-int
-__cdecl
-_open_osfhandle( INT_PTR osfhandle, int flags )
-{
- PAL_ERROR palError = NO_ERROR;
- CPalThread *pthrCurrent = NULL;
- IPalObject *pobjFile = NULL;
- CFileProcessLocalData *pLocalData = NULL;
- IDataLock *pDataLock = NULL;
- INT nRetVal = -1;
- INT openFlags = 0;
-
- PERF_ENTRY(_open_osfhandle);
- ENTRY( "_open_osfhandle (osfhandle=%#x, flags=%#x)\n", osfhandle, flags );
-
- pthrCurrent = InternalGetCurrentThread();
-
- if (flags != _O_RDONLY)
- {
- ASSERT("flag(%#x) not supported\n", flags);
- goto EXIT;
- }
-
- openFlags |= O_RDONLY;
-
- palError = g_pObjectManager->ReferenceObjectByHandle(
- pthrCurrent,
- reinterpret_cast<HANDLE>(osfhandle),
- &aotFile,
- &pobjFile
- );
-
- if (NO_ERROR != palError)
- {
- ERROR("Error dereferencing file handle\n");
- goto EXIT;
- }
-
- palError = pobjFile->GetProcessLocalData(
- pthrCurrent,
- ReadLock,
- &pDataLock,
- reinterpret_cast<void **>(&pLocalData)
- );
-
- if (NO_ERROR == palError)
- {
- if (NULL != pLocalData->unix_filename)
- {
- nRetVal = InternalOpen(pLocalData->unix_filename, openFlags);
- }
- else /* the only file object with no unix_filename is a pipe */
- {
- /* check if the file pipe descrptor is for read or write */
- if (pLocalData->open_flags == O_WRONLY)
- {
- ERROR( "Couldn't open a write pipe on read mode\n");
- goto EXIT;
- }
-
- nRetVal = pLocalData->unix_fd;
- }
-
- if ( nRetVal == -1 )
- {
- ERROR( "Error: %s.\n", strerror( errno ) );
- }
- }
- else
- {
- ASSERT("Unable to access file data");
- }
-
-EXIT:
-
- if (NULL != pDataLock)
- {
- pDataLock->ReleaseLock(pthrCurrent, FALSE);
- }
-
- if (NULL != pobjFile)
- {
- pobjFile->ReleaseReference(pthrCurrent);
- }
-
- LOGEXIT( "_open_osfhandle return nRetVal:%d\n", nRetVal);
- PERF_EXIT(_open_osfhandle);
- return nRetVal;
-}
-
-
-/*++
-Function:
- PAL_fflush
-
-See MSDN for more details.
---*/
-int
-_cdecl
-PAL_fflush( PAL_FILE *stream )
-{
- int nRetVal = 0;
-
- PERF_ENTRY(fflush);
- ENTRY( "fflush( %p )\n", stream );
-
- nRetVal = fflush(stream ? stream->bsdFilePtr : NULL);
-
- LOGEXIT( "fflush returning %d\n", nRetVal );
- PERF_EXIT(fflush);
- return nRetVal;
-}
-
-
-/*++
-PAL__open
-
-Wrapper function for InternalOpen.
-
-Input parameters:
-
-szPath = pointer to a pathname of a file to be opened
-nFlags = arguments that control how the file should be accessed
-mode = file permission settings that are used only when a file is created
-
-Return value:
- File descriptor on success, -1 on failure
---*/
-int
-__cdecl
-PAL__open(
- const char *szPath,
- int nFlags,
- ...
- )
-{
- int nRet = -1;
- int mode = 0;
- va_list ap;
-
- // If nFlags does not contain O_CREAT, the mode parameter will be ignored.
- if (nFlags & O_CREAT)
- {
- va_start(ap, nFlags);
- mode = va_arg(ap, int);
- va_end(ap);
- }
-
- nRet = InternalOpen(szPath, nFlags, mode);
- return nRet;
-}
-
-/*++
-InternalOpen
-
-Wrapper for open.
-
-Input parameters:
-
-szPath = pointer to a pathname of a file to be opened
-nFlags = arguments that control how the file should be accessed
-mode = file permission settings that are used only when a file is created
-
-Return value:
- File descriptor on success, -1 on failure
---*/
-int
-CorUnix::InternalOpen(
- const char *szPath,
- int nFlags,
- ...
- )
-{
- int nRet = -1;
- int mode = 0;
- va_list ap;
-
- // If nFlags does not contain O_CREAT, the mode parameter will be ignored.
- if (nFlags & O_CREAT)
- {
- va_start(ap, nFlags);
- mode = va_arg(ap, int);
- va_end(ap);
- }
-
- do
- {
-#if OPEN64_IS_USED_INSTEAD_OF_OPEN
- nRet = open64(szPath, nFlags, mode);
-#else
- nRet = open(szPath, nFlags, mode);
-#endif
- }
- while ((nRet == -1) && (errno == EINTR));
-
- return nRet;
-}
-
-
-/*++
-PAL_fgets
-
-Wrapper function for InternalFgets.
-
-Input parameters:
-
-sz = stores characters read from the given file stream
-nSize = number of characters to be read
-pf = stream to read characters from
-
-Return value:
- Returns a pointer to the string storing the characters on success
- and NULL on failure.
---*/
-char *
-__cdecl
-PAL_fgets(
- char *sz,
- int nSize,
- PAL_FILE *pf
- )
-{
- char * szBuf;
-
- PERF_ENTRY(fgets);
- ENTRY( "fgets(sz=%p (%s) nSize=%d pf=%p)\n", sz, sz, nSize, pf);
-
- if (pf != NULL)
- {
- szBuf = InternalFgets(sz, nSize, pf->bsdFilePtr, pf->bTextMode);
- }
- else
- {
- szBuf = NULL;
- }
-
- LOGEXIT("fgets() returns %p\n", szBuf);
- PERF_EXIT(fgets);
-
- return szBuf;
-}
-
-/*++
-InternalFgets
-
-Wrapper for fgets.
-
-Input parameters:
-
-sz = stores characters read from the given file stream
-nSize = number of characters to be read
-f = stream to read characters from
-fTextMode = flag that indicates if file contents are text or binary
-
-Return value:
- Returns a pointer to the string storing the characters on success
- and NULL on failure.
-
-Notes:
-In Unix systems, fgets() can return an error if it gets interrupted by a
-signal before reading anything, and errno is set to EINTR. When this
-happens, it is SOP to call fgets again.
---*/
-char *
-CorUnix::InternalFgets(
- char *sz,
- int nSize,
- FILE *f,
- bool fTextMode
- )
-{
- char *retval = NULL;
-
- _ASSERTE(sz != NULL);
- _ASSERTE(f != NULL);
-
-#if FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL
- clearerr(f);
-#endif
-
- do
- {
- retval = fgets(sz, nSize, f);
- if (NULL==retval)
- {
- if (feof(f))
- {
- TRACE("Reached EOF\n");
- break;
- }
- /* The man page suggests using ferror and feof to distinguish
- between error and EOF, but feof and errno is sufficient.
- Not all cases that set errno also flag ferror, so just
- checking errno is the best solution. */
- if (EINTR != errno)
- {
- WARN("got error; errno is %d (%s)\n",errno, strerror(errno));
- break;
- }
- /* we ignored a EINTR error, reset the stream's error state */
- clearerr(f);
- TRACE("call got interrupted (EINTR), trying again\n");
- }
- if (fTextMode)
- {
- int len = strlen(sz);
- if ((len>=2) && (sz[len-1]=='\n') && (sz[len-2]=='\r'))
- {
- sz[len-2]='\n';
- sz[len-1]='\0';
- }
- }
- } while(NULL == retval);
-
- return retval;
-}
-
-/*++
-PAL_fwrite
-
-Wrapper function for InternalFwrite.
-
-Input parameters:
-
-pvBuffer = array of objects to write to the given file stream
-nSize = size of a object in bytes
-nCount = number of objects to write
-pf = stream to write characters to
-
-Return value:
- Returns the number of objects written.
---*/
-size_t
-__cdecl
-PAL_fwrite(
- const void *pvBuffer,
- size_t nSize,
- size_t nCount,
- PAL_FILE *pf
- )
-{
- size_t nWrittenBytes = 0;
-
- PERF_ENTRY(fwrite);
- ENTRY( "fwrite( pvBuffer=%p, nSize=%d, nCount=%d, pf=%p )\n",
- pvBuffer, nSize, nCount, pf);
- _ASSERTE(pf != NULL);
-
- nWrittenBytes = InternalFwrite(pvBuffer, nSize, nCount, pf->bsdFilePtr, &pf->PALferrorCode);
-
- LOGEXIT( "fwrite returning size_t %d\n", nWrittenBytes );
- PERF_EXIT(fwrite);
- return nWrittenBytes;
-}
-
-/*++
-InternalFwrite
-
-Wrapper for fwrite.
-
-Input parameters:
-
-pvBuffer = array of objects to write to the given file stream
-nSize = size of a object in bytes
-nCount = number of objects to write
-f = stream to write characters to
-pnErrorCode = reference to a PAL_FILE's fwrite error code field
-
-Return value:
- Returns the number of objects written.
---*/
-size_t
-CorUnix::InternalFwrite(
- const void *pvBuffer,
- size_t nSize,
- size_t nCount,
- FILE *f,
- INT *pnErrorCode
- )
-{
- size_t nWrittenBytes = 0;
- _ASSERTE(f != NULL);
-
-#if FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL
- clearerr(f);
-#endif
-
- nWrittenBytes = fwrite(pvBuffer, nSize, nCount, f);
-
- // Make sure no error ocurred.
- if ( nWrittenBytes < nCount )
- {
- // Set the FILE* error code
- *pnErrorCode = PAL_FILE_ERROR;
- }
-
- return nWrittenBytes;
-}
-
-
-/*++
-PAL_fseek
-
-Wrapper function for fseek.
-
-Input parameters:
-
-pf = a given file stream
-lOffset = distance from position to set file-position indicator
-nWhence = method used to determine the file_position indicator location relative to lOffset
-
-Return value:
- 0 on success, -1 on failure.
---*/
-int
-_cdecl
-PAL_fseek(
- PAL_FILE * pf,
- LONG lOffset,
- int nWhence
- )
-{
- int nRet = 0;
-
- PERF_ENTRY(fseek);
- ENTRY( "fseek( %p, %ld, %d )\n", pf, lOffset, nWhence );
-
- nRet = fseek(pf ? pf->bsdFilePtr : NULL, lOffset, nWhence);
-
- LOGEXIT("fseek returning %d\n", nRet);
- PERF_EXIT(fseek);
- return nRet;
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- malloc.cpp
-
-Abstract:
-
- Implementation of suspension safe memory allocation functions.
-
-Revision History:
-
-
-
---*/
-
-#include "pal/corunix.hpp"
-#include "pal/thread.hpp"
-#include "pal/malloc.hpp"
-#include "pal/dbgmsg.h"
-
-#include <string.h>
-
-SET_DEFAULT_DEBUG_CHANNEL(CRT);
-
-using namespace CorUnix;
-
-void *
-__cdecl
-PAL_realloc(
- void* pvMemblock,
- size_t szSize
- )
-{
- return InternalRealloc(pvMemblock, szSize);
-}
-
-void *
-CorUnix::InternalRealloc(
- void* pvMemblock,
- size_t szSize
- )
-{
- void *pvMem;
-
- PERF_ENTRY(InternalRealloc);
- ENTRY("realloc (memblock:%p size=%d)\n", pvMemblock, szSize);
-
- if (szSize == 0)
- {
- // If pvMemblock is NULL, there's no reason to call free.
- if (pvMemblock != NULL)
- {
- free(pvMemblock);
- }
- pvMem = NULL;
- }
- else
- {
- pvMem = realloc(pvMemblock, szSize);
- }
-
- LOGEXIT("realloc returns void * %p\n", pvMem);
- PERF_EXIT(InternalRealloc);
- return pvMem;
-}
-
-void
-__cdecl
-PAL_free(
- void *pvMem
- )
-{
- free(pvMem);
-}
-
-void *
-__cdecl
-PAL_malloc(
- size_t szSize
- )
-{
- return InternalMalloc(szSize);
-}
-
-void *
-CorUnix::InternalMalloc(
- size_t szSize
- )
-{
- void *pvMem;
-
- if (szSize == 0)
- {
- // malloc may return null for a requested size of zero bytes. Force a nonzero size to get a valid pointer.
- szSize = 1;
- }
-
- pvMem = (void*)malloc(szSize);
- return pvMem;
-}
-
-char *
-__cdecl
-PAL__strdup(
- const char *c_szStr
- )
-{
- return strdup(c_szStr);
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- math.cpp
-
-Abstract:
-
- Implementation of math family functions.
-
-
-
---*/
-
-#include "pal/palinternal.h"
-#include "pal/dbgmsg.h"
-
-#include <math.h>
-
-#if HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif // HAVE_IEEEFP_H
-
-#include <errno.h>
-
-#define PAL_NAN_DBL sqrt(-1.0)
-#define PAL_POSINF_DBL -log(0.0)
-#define PAL_NEGINF_DBL log(0.0)
-
-#define IS_DBL_NEGZERO(x) (((*((INT64*)((void*)&x))) & I64(0xFFFFFFFFFFFFFFFF)) == I64(0x8000000000000000))
-
-#define PAL_NAN_FLT sqrtf(-1.0f)
-#define PAL_POSINF_FLT -logf(0.0f)
-#define PAL_NEGINF_FLT logf(0.0f)
-
-#define IS_FLT_NEGZERO(x) (((*((INT32*)((void*)&x))) & 0xFFFFFFFF) == 0x80000000)
-
-SET_DEFAULT_DEBUG_CHANNEL(CRT);
-
-/*++
-Function:
- _finite
-
-Determines whether given double-precision floating point value is finite.
-
-Return Value
-
-_finite returns a nonzero value (TRUE) if its argument x is not
-infinite, that is, if -INF < x < +INF. It returns 0 (FALSE) if the
-argument is infinite or a NaN.
-
-Parameter
-
-x Double-precision floating-point value
-
---*/
-int __cdecl _finite(double x)
-{
- int ret;
- PERF_ENTRY(_finite);
- ENTRY("_finite (x=%f)\n", x);
-
- ret = isfinite(x);
-
- LOGEXIT("_finite returns int %d\n", ret);
- PERF_EXIT(_finite);
- return ret;
-}
-
-/*++
-Function:
- _isnan
-
-See MSDN doc
---*/
-int __cdecl _isnan(double x)
-{
- int ret;
- PERF_ENTRY(_isnan);
- ENTRY("_isnan (x=%f)\n", x);
-
- ret = isnan(x);
-
- LOGEXIT("_isnan returns int %d\n", ret);
- PERF_EXIT(_isnan);
- return ret;
-}
-
-/*++
-Function:
- _copysign
-
-See MSDN doc
---*/
-double __cdecl _copysign(double x, double y)
-{
- double ret;
- PERF_ENTRY(_copysign);
- ENTRY("_copysign (x=%f, y=%f)\n", x, y);
-
- ret = copysign(x, y);
-
- LOGEXIT("_copysign returns double %f\n", ret);
- PERF_EXIT(_copysign);
- return ret;
-}
-
-/*++
-Function:
- acos
-
-See MSDN.
---*/
-PALIMPORT double __cdecl PAL_acos(double x)
-{
- double ret;
- PERF_ENTRY(acos);
- ENTRY("acos (x=%f)\n", x);
-
-#if !HAVE_COMPATIBLE_ACOS
- errno = 0;
-#endif // HAVE_COMPATIBLE_ACOS
-
- ret = acos(x);
-
-#if !HAVE_COMPATIBLE_ACOS
- if (errno == EDOM)
- {
- ret = PAL_NAN_DBL; // NaN
- }
-#endif // HAVE_COMPATIBLE_ACOS
-
- LOGEXIT("acos returns double %f\n", ret);
- PERF_EXIT(acos);
- return ret;
-}
-
-/*++
-Function:
- asin
-
-See MSDN.
---*/
-PALIMPORT double __cdecl PAL_asin(double x)
-{
- double ret;
- PERF_ENTRY(asin);
- ENTRY("asin (x=%f)\n", x);
-
-#if !HAVE_COMPATIBLE_ASIN
- errno = 0;
-#endif // HAVE_COMPATIBLE_ASIN
-
- ret = asin(x);
-
-#if !HAVE_COMPATIBLE_ASIN
- if (errno == EDOM)
- {
- ret = PAL_NAN_DBL; // NaN
- }
-#endif // HAVE_COMPATIBLE_ASIN
-
- LOGEXIT("asin returns double %f\n", ret);
- PERF_EXIT(asin);
- return ret;
-}
-
-/*++
-Function:
- atan2
-
-See MSDN.
---*/
-PALIMPORT double __cdecl PAL_atan2(double y, double x)
-{
- double ret;
- PERF_ENTRY(atan2);
- ENTRY("atan2 (y=%f, x=%f)\n", y, x);
-
-#if !HAVE_COMPATIBLE_ATAN2
- errno = 0;
-#endif // !HAVE_COMPATIBLE_ATAN2
-
- ret = atan2(y, x);
-
-#if !HAVE_COMPATIBLE_ATAN2
- if ((errno == EDOM) && (x == 0.0) && (y == 0.0))
- {
- const double sign_x = copysign(1.0, x);
- const double sign_y = copysign(1.0, y);
-
- if (sign_x > 0)
- {
- ret = copysign(0.0, sign_y);
- }
- else
- {
- ret = copysign(atan2(0.0, -1.0), sign_y);
- }
- }
-#endif // !HAVE_COMPATIBLE_ATAN2
-
- LOGEXIT("atan2 returns double %f\n", ret);
- PERF_EXIT(atan2);
- return ret;
-}
-
-/*++
-Function:
- exp
-
-See MSDN.
---*/
-PALIMPORT double __cdecl PAL_exp(double x)
-{
- double ret;
- PERF_ENTRY(exp);
- ENTRY("exp (x=%f)\n", x);
-
-#if !HAVE_COMPATIBLE_EXP
- if (x == 1.0)
- {
- ret = M_E;
- }
- else
- {
-#endif // HAVE_COMPATIBLE_EXP
-
- ret = exp(x);
-
-#if !HAVE_COMPATIBLE_EXP
- }
-#endif // HAVE_COMPATIBLE_EXP
-
- LOGEXIT("exp returns double %f\n", ret);
- PERF_EXIT(exp);
- return ret;
-}
-
-/*++
-Function:
- ilogb
-
-See MSDN.
---*/
-PALIMPORT int __cdecl PAL_ilogb(double x)
-{
- int ret;
- PERF_ENTRY(ilogb);
- ENTRY("ilogb (x=%f)\n", x);
-
-#if !HAVE_COMPATIBLE_ILOGB0
- if (x == 0.0)
- {
- ret = -2147483648;
- }
- else
-#endif // !HAVE_COMPATIBLE_ILOGB0
-
-#if !HAVE_COMPATIBLE_ILOGBNAN
- if (isnan(x))
- {
- ret = 2147483647;
- }
- else
-#endif // !HAVE_COMPATIBLE_ILOGBNAN
-
- {
- ret = ilogb(x);
- }
-
- LOGEXIT("ilogb returns int %d\n", ret);
- PERF_EXIT(ilogb);
- return ret;
-}
-
-/*++
-Function:
- log
-
-See MSDN.
---*/
-PALIMPORT double __cdecl PAL_log(double x)
-{
- double ret;
- PERF_ENTRY(log);
- ENTRY("log (x=%f)\n", x);
-
-#if !HAVE_COMPATIBLE_LOG
- errno = 0;
-#endif // !HAVE_COMPATIBLE_LOG
-
- ret = log(x);
-
-#if !HAVE_COMPATIBLE_LOG
- if ((errno == EDOM) && (x < 0))
- {
- ret = PAL_NAN_DBL; // NaN
- }
-#endif // !HAVE_COMPATIBLE_LOG
-
- LOGEXIT("log returns double %f\n", ret);
- PERF_EXIT(log);
- return ret;
-}
-
-/*++
-Function:
- log10
-
-See MSDN.
---*/
-PALIMPORT double __cdecl PAL_log10(double x)
-{
- double ret;
- PERF_ENTRY(log10);
- ENTRY("log10 (x=%f)\n", x);
-
-#if !HAVE_COMPATIBLE_LOG10
- errno = 0;
-#endif // !HAVE_COMPATIBLE_LOG10
-
- ret = log10(x);
-
-#if !HAVE_COMPATIBLE_LOG10
- if ((errno == EDOM) && (x < 0))
- {
- ret = PAL_NAN_DBL; // NaN
- }
-#endif // !HAVE_COMPATIBLE_LOG10
-
- LOGEXIT("log10 returns double %f\n", ret);
- PERF_EXIT(log10);
- return ret;
-}
-
-/*++
-Function:
- pow
-
-See MSDN.
---*/
-PALIMPORT double __cdecl PAL_pow(double x, double y)
-{
- double ret;
- PERF_ENTRY(pow);
- ENTRY("pow (x=%f, y=%f)\n", x, y);
-
-#if !HAVE_COMPATIBLE_POW
- if ((y == PAL_POSINF_DBL) && !isnan(x)) // +Inf
- {
- if (x == 1.0)
- {
- ret = x;
- }
- else if (x == -1.0)
- {
- ret = 1.0;
- }
- else if ((x > -1.0) && (x < 1.0))
- {
- ret = 0.0;
- }
- else
- {
- ret = PAL_POSINF_DBL; // +Inf
- }
- }
- else if ((y == PAL_NEGINF_DBL) && !isnan(x)) // -Inf
- {
- if (x == 1.0)
- {
- ret = x;
- }
- else if (x == -1.0)
- {
- ret = 1.0;
- }
- else if ((x > -1.0) && (x < 1.0))
- {
- ret = PAL_POSINF_DBL; // +Inf
- }
- else
- {
- ret = 0.0;
- }
- }
- else if (IS_DBL_NEGZERO(x) && (y == -1.0))
- {
- ret = PAL_NEGINF_DBL; // -Inf
- }
- else if ((x == 0.0) && (y < 0.0))
- {
- ret = PAL_POSINF_DBL; // +Inf
- }
- else
-#endif // !HAVE_COMPATIBLE_POW
-
- ret = pow(x, y);
-
-#if !HAVE_VALID_NEGATIVE_INF_POW
- if ((ret == PAL_POSINF_DBL) && (x < 0) && isfinite(x) && (ceil(y / 2) != floor(y / 2)))
- {
- ret = PAL_NEGINF_DBL; // -Inf
- }
-#endif // !HAVE_VALID_NEGATIVE_INF_POW
-
-#if !HAVE_VALID_POSITIVE_INF_POW
- /*
- * The even/odd test in the if (this one and the one above) used to be ((long long) y % 2 == 0)
- * on SPARC (long long) y for large y (>2**63) is always 0x7fffffff7fffffff, which
- * is an odd number, so the test ((long long) y % 2 == 0) will always fail for
- * large y. Since large double numbers are always even (e.g., the representation of
- * 1E20+1 is the same as that of 1E20, the last .+1. is too insignificant to be part
- * of the representation), this test will always return the wrong result for large y.
- *
- * The (ceil(y/2) == floor(y/2)) test is slower, but more robust.
- */
- if ((ret == PAL_NEGINF_DBL) && (x < 0) && isfinite(x) && (ceil(y / 2) == floor(y / 2)))
- {
- ret = PAL_POSINF_DBL; // +Inf
- }
-#endif // !HAVE_VALID_POSITIVE_INF_POW
-
- LOGEXIT("pow returns double %f\n", ret);
- PERF_EXIT(pow);
- return ret;
-}
-
-/*++
-Function:
- sincos
-
-See MSDN.
---*/
-PALIMPORT void __cdecl PAL_sincos(double x, double* sin, double* cos)
-{
- PERF_ENTRY(sincos);
- ENTRY("sincos (x=%f)\n", x);
-
-#if defined(__APPLE__)
- __sincos(x, sin, cos);
-#else
- sincos(x, sin, cos);
-#endif // !__APPLE__
-
- LOGEXIT("sincos returns (double %f, double %f)\n", *sin, *cos);
- PERF_EXIT(sincos);
-}
-
-/*++
-Function:
- _finitef
-
-Determines whether given single-precision floating point value is finite.
-
-Return Value
-
-_finitef returns a nonzero value (TRUE) if its argument x is not
-infinite, that is, if -INF < x < +INF. It returns 0 (FALSE) if the
-argument is infinite or a NaN.
-
-Parameter
-
-x Single-precision floating-point value
-
---*/
-int __cdecl _finitef(float x)
-{
- int ret;
- PERF_ENTRY(_finitef);
- ENTRY("_finitef (x=%f)\n", x);
-
- ret = isfinite(x);
-
- LOGEXIT("_finitef returns int %d\n", ret);
- PERF_EXIT(_finitef);
- return ret;
-}
-
-/*++
-Function:
- _isnanf
-
-See MSDN doc
---*/
-int __cdecl _isnanf(float x)
-{
- int ret;
- PERF_ENTRY(_isnanf);
- ENTRY("_isnanf (x=%f)\n", x);
-
- ret = isnan(x);
-
- LOGEXIT("_isnanf returns int %d\n", ret);
- PERF_EXIT(_isnanf);
- return ret;
-}
-
-/*++
-Function:
- _copysignf
-
-See MSDN doc
---*/
-float __cdecl _copysignf(float x, float y)
-{
- float ret;
- PERF_ENTRY(_copysignf);
- ENTRY("_copysignf (x=%f, y=%f)\n", x, y);
-
- ret = copysign(x, y);
-
- LOGEXIT("_copysignf returns float %f\n", ret);
- PERF_EXIT(_copysignf);
- return ret;
-}
-
-/*++
-Function:
- acosf
-
-See MSDN.
---*/
-PALIMPORT float __cdecl PAL_acosf(float x)
-{
- float ret;
- PERF_ENTRY(acosf);
- ENTRY("acosf (x=%f)\n", x);
-
-#if !HAVE_COMPATIBLE_ACOS
- errno = 0;
-#endif // HAVE_COMPATIBLE_ACOS
-
- ret = acosf(x);
-
-#if !HAVE_COMPATIBLE_ACOS
- if (errno == EDOM)
- {
- ret = PAL_NAN_FLT; // NaN
- }
-#endif // HAVE_COMPATIBLE_ACOS
-
- LOGEXIT("acosf returns float %f\n", ret);
- PERF_EXIT(acosf);
- return ret;
-}
-
-/*++
-Function:
- asinf
-
-See MSDN.
---*/
-PALIMPORT float __cdecl PAL_asinf(float x)
-{
- float ret;
- PERF_ENTRY(asinf);
- ENTRY("asinf (x=%f)\n", x);
-
-#if !HAVE_COMPATIBLE_ASIN
- errno = 0;
-#endif // HAVE_COMPATIBLE_ASIN
-
- ret = asinf(x);
-
-#if !HAVE_COMPATIBLE_ASIN
- if (errno == EDOM)
- {
- ret = PAL_NAN_FLT; // NaN
- }
-#endif // HAVE_COMPATIBLE_ASIN
-
- LOGEXIT("asinf returns float %f\n", ret);
- PERF_EXIT(asinf);
- return ret;
-}
-
-/*++
-Function:
- atan2f
-
-See MSDN.
---*/
-PALIMPORT float __cdecl PAL_atan2f(float y, float x)
-{
- float ret;
- PERF_ENTRY(atan2f);
- ENTRY("atan2f (y=%f, x=%f)\n", y, x);
-
-#if !HAVE_COMPATIBLE_ATAN2
- errno = 0;
-#endif // !HAVE_COMPATIBLE_ATAN2
-
- ret = atan2f(y, x);
-
-#if !HAVE_COMPATIBLE_ATAN2
- if ((errno == EDOM) && (x == 0.0f) && (y == 0.0f))
- {
- const float sign_x = copysign(1.0f, x);
- const float sign_y = copysign(1.0f, y);
-
- if (sign_x > 0)
- {
- ret = copysign(0.0f, sign_y);
- }
- else
- {
- ret = copysign(atan2f(0.0f, -1.0f), sign_y);
- }
- }
-#endif // !HAVE_COMPATIBLE_ATAN2
-
- LOGEXIT("atan2f returns float %f\n", ret);
- PERF_EXIT(atan2f);
- return ret;
-}
-
-/*++
-Function:
- expf
-
-See MSDN.
---*/
-PALIMPORT float __cdecl PAL_expf(float x)
-{
- float ret;
- PERF_ENTRY(expf);
- ENTRY("expf (x=%f)\n", x);
-
-#if !HAVE_COMPATIBLE_EXP
- if (x == 1.0f)
- {
- ret = M_E;
- }
- else
- {
-#endif // HAVE_COMPATIBLE_EXP
-
- ret = expf(x);
-
-#if !HAVE_COMPATIBLE_EXP
- }
-#endif // HAVE_COMPATIBLE_EXP
-
- LOGEXIT("expf returns float %f\n", ret);
- PERF_EXIT(expf);
- return ret;
-}
-
-/*++
-Function:
- ilogbf
-
-See MSDN.
---*/
-PALIMPORT int __cdecl PAL_ilogbf(float x)
-{
- int ret;
- PERF_ENTRY(ilogbf);
- ENTRY("ilogbf (x=%f)\n", x);
-
-#if !HAVE_COMPATIBLE_ILOGB0
- if (x == 0.0f)
- {
- ret = -2147483648;
- }
- else
-#endif // !HAVE_COMPATIBLE_ILOGB0
-
-#if !HAVE_COMPATIBLE_ILOGBNAN
- if (isnan(x))
- {
- ret = 2147483647;
- }
- else
-#endif // !HAVE_COMPATIBLE_ILOGBNAN
-
- {
- ret = ilogbf(x);
- }
-
- LOGEXIT("ilogbf returns int %d\n", ret);
- PERF_EXIT(ilogbf);
- return ret;
-}
-
-/*++
-Function:
- logf
-
-See MSDN.
---*/
-PALIMPORT float __cdecl PAL_logf(float x)
-{
- float ret;
- PERF_ENTRY(logf);
- ENTRY("logf (x=%f)\n", x);
-
-#if !HAVE_COMPATIBLE_LOG
- errno = 0;
-#endif // !HAVE_COMPATIBLE_LOG
-
- ret = logf(x);
-
-#if !HAVE_COMPATIBLE_LOG
- if ((errno == EDOM) && (x < 0))
- {
- ret = PAL_NAN_FLT; // NaN
- }
-#endif // !HAVE_COMPATIBLE_LOG
-
- LOGEXIT("logf returns float %f\n", ret);
- PERF_EXIT(logf);
- return ret;
-}
-
-/*++
-Function:
- log10f
-
-See MSDN.
---*/
-PALIMPORT float __cdecl PAL_log10f(float x)
-{
- float ret;
- PERF_ENTRY(log10f);
- ENTRY("log10f (x=%f)\n", x);
-
-#if !HAVE_COMPATIBLE_LOG10
- errno = 0;
-#endif // !HAVE_COMPATIBLE_LOG10
-
- ret = log10f(x);
-
-#if !HAVE_COMPATIBLE_LOG10
- if ((errno == EDOM) && (x < 0))
- {
- ret = PAL_NAN_FLT; // NaN
- }
-#endif // !HAVE_COMPATIBLE_LOG10
-
- LOGEXIT("log10f returns float %f\n", ret);
- PERF_EXIT(log10f);
- return ret;
-}
-
-/*++
-Function:
- powf
-
-See MSDN.
---*/
-PALIMPORT float __cdecl PAL_powf(float x, float y)
-{
- float ret;
- PERF_ENTRY(powf);
- ENTRY("powf (x=%f, y=%f)\n", x, y);
-
-#if !HAVE_COMPATIBLE_POW
- if ((y == PAL_POSINF_FLT) && !isnan(x)) // +Inf
- {
- if (x == 1.0f)
- {
- ret = x;
- }
- else if (x == -1.0f)
- {
- ret = 1.0f;
- }
- else if ((x > -1.0f) && (x < 1.0f))
- {
- ret = 0.0f;
- }
- else
- {
- ret = PAL_POSINF_FLT; // +Inf
- }
- }
- else if ((y == PAL_NEGINF_FLT) && !isnan(x)) // -Inf
- {
- if (x == 1.0f)
- {
- ret = x;
- }
- else if (x == -1.0f)
- {
- ret = 1.0f;
- }
- else if ((x > -1.0f) && (x < 1.0f))
- {
- ret = PAL_POSINF_FLT; // +Inf
- }
- else
- {
- ret = 0.0f;
- }
- }
- else if (IS_FLT_NEGZERO(x) && (y == -1.0f))
- {
- ret = PAL_NEGINF_FLT; // -Inf
- }
- else if ((x == 0.0f) && (y < 0.0f))
- {
- ret = PAL_POSINF_FLT; // +Inf
- }
- else
-#endif // !HAVE_COMPATIBLE_POW
-
- ret = powf(x, y);
-
-#if !HAVE_VALID_NEGATIVE_INF_POW
- if ((ret == PAL_POSINF_FLT) && (x < 0) && isfinite(x) && (ceilf(y / 2) != floorf(y / 2)))
- {
- ret = PAL_NEGINF_FLT; // -Inf
- }
-#endif // !HAVE_VALID_NEGATIVE_INF_POW
-
-#if !HAVE_VALID_POSITIVE_INF_POW
- /*
- * The (ceil(y/2) == floor(y/2)) test is slower, but more robust for platforms where large y
- * will return the wrong result for ((long) y % 2 == 0). See PAL_pow(double) above for more details.
- */
- if ((ret == PAL_NEGINF_FLT) && (x < 0) && isfinite(x) && (ceilf(y / 2) == floorf(y / 2)))
- {
- ret = PAL_POSINF_FLT; // +Inf
- }
-#endif // !HAVE_VALID_POSITIVE_INF_POW
-
- LOGEXIT("powf returns float %f\n", ret);
- PERF_EXIT(powf);
- return ret;
-}
-
-/*++
-Function:
- sincosf
-
-See MSDN.
---*/
-PALIMPORT void __cdecl PAL_sincosf(float x, float* sin, float* cos)
-{
- PERF_ENTRY(sincosf);
- ENTRY("sincosf (x=%f)\n", x);
-
-#if defined(__APPLE__)
- __sincosf(x, sin, cos);
-#else
- sincosf(x, sin, cos);
-#endif // !__APPLE__
-
- LOGEXIT("sincosf returns (float %f, float %f)\n", *sin, *cos);
- PERF_EXIT(sincosf);
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- cruntime/misc.cpp
-
-Abstract:
-
- Implementation of C runtime functions that don't fit anywhere else.
-
-
-
---*/
-
-#include "pal/thread.hpp"
-#include "pal/threadsusp.hpp"
-#include "pal/palinternal.h"
-#include "pal/dbgmsg.h"
-#include "pal/misc.h"
-
-#include <errno.h>
-/* <stdarg.h> needs to be included after "palinternal.h" to avoid name
- collision for va_start and va_end */
-#include <stdarg.h>
-#include <time.h>
-#include <limits.h>
-
-#if defined(HOST_AMD64) || defined(_x86_)
-#include <xmmintrin.h>
-#endif // defined(HOST_AMD64) || defined(_x86_)
-#if defined(_DEBUG)
-#include <assert.h>
-#endif //defined(_DEBUG)
-
-SET_DEFAULT_DEBUG_CHANNEL(CRT);
-
-using namespace CorUnix;
-
-/*++
-Function:
- _gcvt_s
-
-See MSDN doc.
---*/
-char *
-__cdecl
-_gcvt_s( char * buffer, int iSize, double value, int digits )
-{
- PERF_ENTRY(_gcvt);
- ENTRY( "_gcvt( value:%f digits=%d, buffer=%p )\n", value, digits, buffer );
-
- if ( !buffer )
- {
- ERROR( "buffer was an invalid pointer.\n" );
- }
-
- switch ( digits )
- {
- case 7 :
- /* Fall through */
- case 8 :
- /* Fall through */
- case 15 :
- /* Fall through */
- case 17 :
-
- sprintf_s( buffer, iSize, "%.*g", digits, value );
- break;
-
- default :
- ASSERT( "Only the digits 7, 8, 15, and 17 are valid.\n" );
- *buffer = '\0';
- }
-
- LOGEXIT( "_gcvt returns %p (%s)\n", buffer , buffer );
- PERF_EXIT(_gcvt);
- return buffer;
-}
-
-
-/*++
-Function :
-
- __iscsym
-
-See MSDN for more details.
---*/
-int
-__cdecl
-__iscsym( int c )
-{
- PERF_ENTRY(__iscsym);
- ENTRY( "__iscsym( c=%d )\n", c );
-
- if ( isalnum( c ) || c == '_' )
- {
- LOGEXIT( "__iscsym returning 1\n" );
- PERF_EXIT(__iscsym);
- return 1;
- }
-
- LOGEXIT( "__iscsym returning 0\n" );
- PERF_EXIT(__iscsym);
- return 0;
-}
-
-
-/*++
-
-Function :
-
- PAL_errno
-
- Returns the address of the errno.
-
---*/
-int * __cdecl PAL_errno( int caller )
-{
- int *retval;
- PERF_ENTRY(errno);
- ENTRY( "PAL_errno( void )\n" );
- retval = (INT*)(&errno);
- LOGEXIT("PAL_errno returns %p\n",retval);
- PERF_EXIT(errno);
- return retval;
-}
-
-
-/*++
-Function:
-
- rand
-
- The RAND_MAX value can vary by platform.
-
-See MSDN for more details.
---*/
-int
-__cdecl
-PAL_rand(void)
-{
- int ret;
- PERF_ENTRY(rand);
- ENTRY("rand(void)\n");
-
- ret = (rand() % (PAL_RAND_MAX + 1));
-
- LOGEXIT("rand() returning %d\n", ret);
- PERF_EXIT(rand);
- return ret;
-}
-
-
-/*++
-Function:
-
- time
-
-See MSDN for more details.
---*/
-PAL_time_t
-__cdecl
-PAL_time(PAL_time_t *tloc)
-{
- time_t result;
-
- PERF_ENTRY(time);
- ENTRY( "time( tloc=%p )\n",tloc );
-
- time_t t;
- result = time(&t);
- if (tloc != NULL)
- {
- *tloc = t;
- }
-
- LOGEXIT( "time returning %#lx\n",result );
- PERF_EXIT(time);
- return result;
-}
-
-PALIMPORT
-void __cdecl
-PAL_qsort(void *base, size_t nmemb, size_t size,
- int (__cdecl *compar )(const void *, const void *))
-{
- PERF_ENTRY(qsort);
- ENTRY("qsort(base=%p, nmemb=%lu, size=%lu, compar=%p\n",
- base,(unsigned long) nmemb,(unsigned long) size, compar);
-
-/* reset ENTRY nesting level back to zero, qsort will invoke app-defined
- callbacks and we want their entry traces... */
-#if _ENABLE_DEBUG_MESSAGES_
-{
- int old_level;
- old_level = DBG_change_entrylevel(0);
-#endif /* _ENABLE_DEBUG_MESSAGES_ */
-
- qsort(base,nmemb,size,compar);
-
-/* ...and set nesting level back to what it was */
-#if _ENABLE_DEBUG_MESSAGES_
- DBG_change_entrylevel(old_level);
-}
-#endif /* _ENABLE_DEBUG_MESSAGES_ */
-
- LOGEXIT("qsort returns\n");
- PERF_EXIT(qsort);
-}
-
-PALIMPORT
-void * __cdecl
-PAL_bsearch(const void *key, const void *base, size_t nmemb, size_t size,
- int (__cdecl *compar)(const void *, const void *))
-{
- void *retval;
-
- PERF_ENTRY(bsearch);
- ENTRY("bsearch(key=%p, base=%p, nmemb=%lu, size=%lu, compar=%p\n",
- key, base, (unsigned long) nmemb, (unsigned long) size, compar);
-
-/* reset ENTRY nesting level back to zero, bsearch will invoke app-defined
- callbacks and we want their entry traces... */
-#if _ENABLE_DEBUG_MESSAGES_
-{
- int old_level;
- old_level = DBG_change_entrylevel(0);
-#endif /* _ENABLE_DEBUG_MESSAGES_ */
-
- retval = bsearch(key,base,nmemb,size,compar);
-
-/* ...and set nesting level back to what it was */
-#if _ENABLE_DEBUG_MESSAGES_
- DBG_change_entrylevel(old_level);
-}
-#endif /* _ENABLE_DEBUG_MESSAGES_ */
-
- LOGEXIT("bsearch returns %p\n",retval);
- PERF_EXIT(bsearch);
- return retval;
-}
-
-#ifdef HOST_AMD64
-
-PALIMPORT
-unsigned int PAL__mm_getcsr(void)
-{
- return _mm_getcsr();
-}
-
-PALIMPORT
-void PAL__mm_setcsr(unsigned int i)
-{
- _mm_setcsr(i);
-}
-
-#endif // HOST_AMD64
-
-/*++
-Function:
-PAL_memcpy
-
-Overlapping buffer-safe version of memcpy.
-See MSDN doc for memcpy
---*/
-EXTERN_C
-PALIMPORT
-void *PAL_memcpy (void *dest, const void *src, size_t count)
-{
- UINT_PTR x = (UINT_PTR)dest, y = (UINT_PTR)src;
- _ASSERTE((x + count <= y) || (y + count <= x));
-
- void *ret;
- #undef memcpy
- ret = memcpy(dest, src, count);
- return ret;
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- printf.c
-
-Abstract:
-
- Implementation of the printf family functions.
-
-Revision History:
-
-
-
---*/
-
-#include "pal/palinternal.h"
-#include "pal/dbgmsg.h"
-#include "pal/cruntime.h"
-#include "pal/thread.hpp"
-#include "pal/threadsusp.hpp"
-#include "pal/printfcpp.hpp"
-
-/* <stdarg.h> needs to be included after "palinternal.h" to avoid name
- collision for va_start and va_end */
-#include <stdarg.h>
-#include <errno.h>
-
-SET_DEFAULT_DEBUG_CHANNEL(CRT);
-
-#if SSCANF_SUPPORT_ll
-const static char *scanf_longlongfmt = "ll";
-#else
-const static char *scanf_longlongfmt = "q";
-#endif
-
-#if SSCANF_CANNOT_HANDLE_MISSING_EXPONENT
-static int SscanfFloatCheckExponent(LPCSTR buff, LPCSTR floatFmt,
- void * voidPtr, int * pn);
-#endif // SSCANF_CANNOT_HANDLE_MISSING_EXPONENT
-
-/*******************************************************************************
-Function:
- PAL_printf_arg_remover
-
-Parameters:
- ap
- - pointer to the va_list from which to remove arguments
- Width
- - the width of the current format operation
- Precision
- - the precision of the current format option
- Type
- - the type of the argument for the current format option
- Prefix
- - the prefix for the current format option
-*******************************************************************************/
-void PAL_printf_arg_remover(va_list *ap, INT Width, INT Precision, INT Type, INT Prefix)
-{
- /* remove arg and precision if needed */
- if (PRECISION_STAR == Precision ||
- PRECISION_INVALID == Precision)
- {
- (void)va_arg(*ap, int);
- }
- if (WIDTH_STAR == Width ||
- WIDTH_INVALID == Width)
- {
- (void)va_arg(*ap, int);
- }
- if (Type == PFF_TYPE_FLOAT)
- {
- (void)va_arg(*ap, double);
- }
- else if (Type == PFF_TYPE_INT && Prefix == PFF_PREFIX_LONGLONG)
- {
- (void)va_arg(*ap, INT64);
- }
- else if (Type == PFF_TYPE_INT || Type == PFF_TYPE_CHAR)
- {
- (void)va_arg(*ap, int);
- }
- else
- {
- (void)va_arg(*ap, void *);
- }
-}
-
-/*++
-Function:
- PAL_printf
-
-See MSDN doc.
---*/
-int
-__cdecl
-PAL_printf(
- const char *format,
- ...)
-{
- LONG Length;
- va_list ap;
-
- PERF_ENTRY(printf);
- ENTRY("PAL_printf (format=%p (%s))\n", format, format);
-
- va_start(ap, format);
- Length = PAL_vprintf(format, ap);
- va_end(ap);
-
- LOGEXIT("PAL_printf returns int %d\n", Length);
- PERF_EXIT(printf);
- return Length;
-}
-
-/*++
-Function:
- PAL_fprintf
-
-See MSDN doc.
---*/
-int
-__cdecl
-PAL_fprintf(PAL_FILE *stream,const char *format,...)
-{
- LONG Length = 0;
- va_list ap;
-
- PERF_ENTRY(fprintf);
- ENTRY("PAL_fprintf(stream=%p,format=%p (%s))\n",stream, format, format);
-
- va_start(ap, format);
- Length = PAL_vfprintf( stream, format, ap);
- va_end(ap);
-
- LOGEXIT("PAL_fprintf returns int %d\n", Length);
- PERF_EXIT(fprintf);
- return Length;
-}
-
-/*++
-Function:
- PAL_wprintf
-
-See MSDN doc.
---*/
-int
-__cdecl
-PAL_wprintf(
- const wchar_16 *format,
- ...)
-{
- LONG Length;
- va_list ap;
-
- PERF_ENTRY(wprintf);
- ENTRY("PAL_wprintf (format=%p (%S))\n", format, format);
-
- va_start(ap, format);
- Length = PAL_vfwprintf( PAL_get_stdout(PAL_get_caller), format, ap);
- va_end(ap);
-
- LOGEXIT("PAL_wprintf returns int %d\n", Length);
- PERF_EXIT(wprintf);
- return Length;
-}
-
-
-
-/*++
-Function:
- PAL_vprintf
-
-See MSDN doc.
---*/
-int
-__cdecl
-PAL_vprintf(
- const char *format,
- va_list ap)
-{
- LONG Length;
-
- PERF_ENTRY(vprintf);
- ENTRY("PAL_vprintf (format=%p (%s))\n", format, format);
-
- Length = PAL_vfprintf( PAL_get_stdout(PAL_get_caller), format, ap);
-
- LOGEXIT("PAL_vprintf returns int %d\n", Length);
- PERF_EXIT(vprintf);
- return Length;
-}
-
-
-/*++
-Function:
- fwprintf
-
-See MSDN doc.
---*/
-int
-__cdecl
-PAL_fwprintf(
- PAL_FILE *stream,
- const wchar_16 *format,
- ...)
-{
- LONG Length;
- va_list ap;
-
- PERF_ENTRY(fwprintf);
- ENTRY("PAL_fwprintf (stream=%p, format=%p (%S))\n", stream, format, format);
-
- va_start(ap, format);
- Length = PAL_vfwprintf( stream, format, ap);
- va_end(ap);
-
- LOGEXIT("PAL_fwprintf returns int %d\n", Length);
- PERF_EXIT(fwprintf);
- return Length;
-}
-
-/*******************************************************************************
-Function:
- Internal_ScanfExtractFormatW
-
-Paramaters:
- Fmt
- - format string to parse
- - first character must be a '%'
- - paramater gets updated to point to the character after
- the %<foo> format string
- Out
- - buffer will contain the %<foo> format string
- Store
- - boolean value representing whether to store the type to be parsed
- - '*' flag
- Width
- - will contain the width specified by the format string
- - -1 if none given
- Prefix
- - an enumeration of the type prefix
- Type
- - an enumeration of the value type to be parsed
-
-Notes:
- - I'm also handling the undocumented %ws, %wc, %w...
-*******************************************************************************/
-static BOOL Internal_ScanfExtractFormatW(LPCWSTR *Fmt, LPSTR Out, int iOutSize, LPBOOL Store,
- LPINT Width, LPINT Prefix, LPINT Type)
-{
- BOOL Result = FALSE;
- LPSTR TempStr;
- LPSTR TempStrPtr;
-
- *Width = -1;
- *Store = TRUE;
- *Prefix = -1;
- *Type = -1;
-
- if (*Fmt && **Fmt == '%')
- {
- *Out++ = *(*Fmt)++;
- }
- else
- {
- return Result;
- }
-
- /* we'll never need a temp string longer than the original */
- TempStrPtr = TempStr = (LPSTR) PAL_malloc(PAL_wcslen(*Fmt)+1);
- if (!TempStr)
- {
- ERROR("PAL_malloc failed\n");
- SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return Result;
- }
-
- /* parse '*' flag which means don't store */
- if (**Fmt == '*')
- {
- *Store = FALSE;
- *Out++ = *(*Fmt)++;
- }
-
- /* grab width specifier */
- if (isdigit(**Fmt))
- {
- TempStrPtr = TempStr;
- while (isdigit(**Fmt))
- {
- *TempStrPtr++ = **Fmt;
- *Out++ = *(*Fmt)++;
- }
- *TempStrPtr = 0; /* end string */
- *Width = atoi(TempStr);
- if (*Width < 0)
- {
- ERROR("atoi returned a negative value indicative of an overflow.\n");
- SetLastError(ERROR_INTERNAL_ERROR);
- goto EXIT;
- }
- }
-
-#ifdef HOST_64BIT
- if (**Fmt == 'p')
- {
- *Prefix = SCANF_PREFIX_LONGLONG;
- }
-#endif
- /* grab prefix of 'I64' for __int64 */
- if ((*Fmt)[0] == 'I' && (*Fmt)[1] == '6' && (*Fmt)[2] == '4')
- {
- /* convert to 'q'/'ll' so that Unix sscanf can handle it */
- *Fmt += 3;
- *Prefix = SCANF_PREFIX_LONGLONG;
- }
- /* grab a prefix of 'h' */
- else if (**Fmt == 'h')
- {
- *Prefix = SCANF_PREFIX_SHORT;
- ++(*Fmt);
- }
- /* grab prefix of 'l' or the undocumented 'w' (at least in MSDN) */
- else if (**Fmt == 'l' || **Fmt == 'w')
- {
- ++(*Fmt);
-#ifdef HOST_64BIT
- // Only want to change the prefix on 64 bit when inputing characters.
- if (**Fmt == 'C' || **Fmt == 'S')
-#endif
- {
- *Prefix = SCANF_PREFIX_LONG; /* give it a wide prefix */
- }
- if (**Fmt == 'l')
- {
- *Prefix = SCANF_PREFIX_LONGLONG;
- ++(*Fmt);
- }
- }
- else if (**Fmt == 'L')
- {
- /* a prefix of 'L' seems to be ignored */
- ++(*Fmt);
- }
-
- /* grab type 'c' */
- if (**Fmt == 'c' || **Fmt == 'C')
- {
- *Type = SCANF_TYPE_CHAR;
- if (*Prefix != SCANF_PREFIX_SHORT && **Fmt == 'c')
- {
- *Prefix = SCANF_PREFIX_LONG; /* give it a wide prefix */
- }
- if (*Prefix == SCANF_PREFIX_LONG)
- {
- *Out++ = 'l';
- }
- *Out++ = 'c';
- ++(*Fmt);
- Result = TRUE;
- }
- /* grab type 's' */
- else if (**Fmt == 's' || **Fmt == 'S')
- {
- *Type = SCANF_TYPE_STRING;
- if (*Prefix != SCANF_PREFIX_SHORT && **Fmt == 's')
- {
- *Prefix = SCANF_PREFIX_LONG; /* give it a wide prefix */
- }
- if (*Prefix == SCANF_PREFIX_LONG)
- {
- *Out++ = 'l';
- }
- *Out++ = 's';
- ++(*Fmt);
- Result = TRUE;
- }
- /* grab int types */
- else if (**Fmt == 'd' || **Fmt == 'i' || **Fmt == 'o' ||
- **Fmt == 'u' || **Fmt == 'x' || **Fmt == 'X' ||
- **Fmt == 'p')
- {
- *Type = SCANF_TYPE_INT;
- if (*Prefix == SCANF_PREFIX_SHORT)
- {
- *Out++ = 'h';
- }
- else if (*Prefix == SCANF_PREFIX_LONG)
- {
- *Out++ = 'l';
- }
- else if (*Prefix == SCANF_PREFIX_LONGLONG)
- {
- if (strcpy_s(Out, iOutSize, scanf_longlongfmt) != SAFECRT_SUCCESS)
- {
- ERROR("strcpy_s failed\n");
- SetLastError(ERROR_INSUFFICIENT_BUFFER);
- goto EXIT;
- }
-
- Out += strlen(scanf_longlongfmt);
- }
- *Out++ = *(*Fmt)++;
- Result = TRUE;
- }
- else if (**Fmt == 'e' || **Fmt == 'E' || **Fmt == 'f' ||
- **Fmt == 'g' || **Fmt == 'G')
- {
- /* we can safely ignore the prefixes and only add the type*/
- *Type = SCANF_TYPE_FLOAT;
- /* this gets rid of %E/%G since they're they're the
- same when scanning */
- *Out++ = tolower( *(*Fmt)++ );
- Result = TRUE;
- }
- else if (**Fmt == 'n')
- {
- if (*Prefix == SCANF_PREFIX_SHORT)
- {
- *Out++ = 'h';
- }
- *Out++ = *(*Fmt)++;
- *Type = SCANF_TYPE_N;
- Result = TRUE;
- }
- else if (**Fmt == '[')
- {
- /* There is a small compatibility problem in the handling of the []
- option in FreeBSD vs. Windows. In Windows, you can have [z-a]
- as well as [a-z]. In FreeBSD, [z-a] fails. So, we need to
- reverse the instances of z-a to a-z (and [m-e] to [e-m], etc). */
-
- /* step 1 : copy the leading [ */
- *Out++ = '[';
- (*Fmt)++;
-
- /* step 2 : copy a leading ^, if present */
- if( '^' == **Fmt )
- {
- *Out++ = '^';
- (*Fmt)++;
- }
-
- /* step 3 : copy a leading ], if present; a ] immediately after the
- leading [ (or [^) does *not* end the sequence, it is part of the
- characters to match */
- if( ']' == **Fmt )
- {
- *Out++ = ']';
- (*Fmt)++;
- }
-
- /* step 4 : if the next character is already a '-', it's not part of an
- interval specifier, so just copy it */
- if('-' == **Fmt )
- {
- *Out++ = '-';
- (*Fmt)++;
- }
-
- /* ok then, process the rest of it */
- while( '\0' != **Fmt )
- {
- if(']' == **Fmt)
- {
- /* ']' marks end of the format specifier; we're done */
- *Out++ = ']';
- (*Fmt)++;
- break;
- }
- if('-' == **Fmt)
- {
- if( ']' == (*Fmt)[1] )
- {
- /* got a '-', next character is the terminating ']';
- copy '-' literally */
- *Out++ = '-';
- (*Fmt)++;
- }
- else
- {
- /* got a '-' indicating an interval specifier */
- unsigned char prev, next;
-
- /* get the interval boundaries */
- prev = (*Fmt)[-1];
- next = (*Fmt)[1];
-
- /* if boundaries were inverted, replace the already-copied
- low boundary by the 'real' low boundary */
- if( prev > next )
- {
- Out[-1] = next;
-
- /* ...and save the 'real' upper boundary, which will be
- copied to 'Out' below */
- next = prev;
- }
-
- *Out++ = '-';
- *Out++ = next;
-
- /* skip over the '-' and the next character, which we
- already copied */
- (*Fmt)+=2;
- }
- }
- else
- {
- /* plain character; just copy it */
- *Out++ = **Fmt;
- (*Fmt)++;
- }
- }
-
- *Type = SCANF_TYPE_BRACKETS;
- Result = TRUE;
- }
- else if (**Fmt == ' ')
- {
- *Type = SCANF_TYPE_SPACE;
- }
-
- /* add %n so we know how far to increment the pointer */
- *Out++ = '%';
- *Out++ = 'n';
-
- *Out = 0; /* end the string */
-
-EXIT:
- PAL_free(TempStr);
- return Result;
-}
-
-/*******************************************************************************
-Function:
- PAL_wvsscanf
-
- Buffer
- - buffer to parse values from
- Format
- - format string
- ap
- - stdarg parameter list
-*******************************************************************************/
-int PAL_wvsscanf(LPCWSTR Buffer, LPCWSTR Format, va_list ap)
-{
- INT Length = 0;
- LPCWSTR Buff = Buffer;
- LPCWSTR Fmt = Format;
- CHAR TempBuff[1024]; /* used to hold a single %<foo> format string */
- BOOL Store;
- INT Width;
- INT Prefix;
- INT Type = -1;
-
- while (*Fmt)
- {
- if (!*Buff && Length == 0)
- {
- Length = EOF;
- break;
- }
- /* remove any number of blanks */
- else if (isspace(*Fmt))
- {
- while (isspace(*Buff))
- {
- ++Buff;
- }
- ++Fmt;
- }
- else if (*Fmt == '%' &&
- Internal_ScanfExtractFormatW(&Fmt, TempBuff, sizeof(TempBuff), &Store,
- &Width, &Prefix, &Type))
- {
- if (Prefix == SCANF_PREFIX_LONG &&
- (Type == SCANF_TYPE_STRING || Type == SCANF_TYPE_CHAR))
- {
- int len = 0;
- WCHAR *charPtr = 0;
-
- /* a single character */
- if (Type == SCANF_TYPE_CHAR && Width == -1)
- {
- len = Width = 1;
- }
-
- /* calculate length of string to copy */
- while (Buff[len] && !isspace(Buff[len]))
- {
- if (Width != -1 && len >= Width)
- {
- break;
- }
- ++len;
- }
-
- if (Store)
- {
- int i;
- charPtr = va_arg(ap, WCHAR *);
-
- for (i = 0; i < len; i++)
- {
- charPtr[i] = Buff[i];
- }
- if (Type == SCANF_TYPE_STRING)
- {
- /* end string */
- charPtr[len] = 0;
- }
- ++Length;
- }
- Buff += len;
- }
- /* this places the number of bytes stored into the next arg */
- else if (Type == SCANF_TYPE_N)
- {
- if (Prefix == SCANF_PREFIX_SHORT)
- {
- *(va_arg(ap, short *)) = Buff - Buffer;
- }
- else
- {
- *(va_arg(ap, LPLONG)) = Buff - Buffer;
- }
- }
- /* types that sscanf can handle */
- else
- {
- int ret;
- int n;
- int size;
- LPSTR newBuff = 0;
- LPVOID voidPtr = NULL;
-
- size = WideCharToMultiByte(CP_ACP, 0, Buff, -1, 0, 0, 0, 0);
- if (!size)
- {
- ASSERT("WideCharToMultiByte failed. Error is %d\n",
- GetLastError());
- return -1;
- }
- newBuff = (LPSTR) PAL_malloc(size);
- if (!newBuff)
- {
- ERROR("PAL_malloc failed\n");
- SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return -1;
- }
- size = WideCharToMultiByte(CP_ACP, 0, Buff, size,
- newBuff, size, 0, 0);
- if (!size)
- {
- ASSERT("WideCharToMultiByte failed. Error is %d\n",
- GetLastError());
- PAL_free(newBuff);
- return -1;
- }
-
- if (Store)
- {
- if (Type == SCANF_TYPE_BRACKETS)
- {
- WCHAR *strPtr;
- int i;
-
- /* add a '*' to %[] --> %*[] */
- i = strlen(TempBuff) + 1;
- while (i)
- {
- /* shift everything right one */
- TempBuff[i] = TempBuff[i - 1];
- --i;
- }
- TempBuff[0] = '%';
- TempBuff[1] = '*';
-
- /* %n doesn't count as a conversion. Since we're
- suppressing conversion of the %[], sscanf will
- always return 0, so we can't use the return value
- to determine success. Set n to 0 before the call; if
- it's still 0 afterwards, we know the call failed */
- n = 0;
- sscanf_s(newBuff, TempBuff, &n);
- if(0 == n)
- {
- /* sscanf failed, nothing matched. set ret to 0,
- so we know we have to break */
- ret = 0;
- }
- else
- {
- strPtr = va_arg(ap, WCHAR *);
- for (i = 0; i < n; i++)
- {
- strPtr[i] = Buff[i];
- }
- strPtr[n] = 0; /* end string */
- ret = 1;
- }
- }
- else
- {
- voidPtr = va_arg(ap, LPVOID);
- // sscanf_s requires that if we are trying to read "%s" or "%c", then
- // the size of the buffer must follow the buffer we are trying to read into.
- unsigned typeLen = 0;
- if (Type == SCANF_TYPE_STRING)
- {
- // We don’t really know the size of the destination buffer provided by the
- // caller. So we have to assume that the caller has allocated enough space
- // to hold either the width specified in the format or the entire input
- // string plus ‘\0’.
- typeLen = ((Width > 0) ? Width : PAL_wcslen(Buffer)) + 1;
- }
- else if (Type == SCANF_TYPE_CHAR)
- {
- // Check whether the format string contains number of characters
- // that should be read from the input string.
- // Note: ‘\0’ does not get appended in the “%c” case.
- typeLen = (Width > 0) ? Width : 1;
- }
-
- if (typeLen > 0)
- {
- ret = sscanf_s(newBuff, TempBuff, voidPtr, typeLen, &n);
- }
- else
- ret = sscanf_s(newBuff, TempBuff, voidPtr, &n);
- }
- }
- else
- {
- ret = sscanf_s(newBuff, TempBuff, &n);
- }
-
-#if SSCANF_CANNOT_HANDLE_MISSING_EXPONENT
- if ((ret == 0) && (Type == SCANF_TYPE_FLOAT))
- {
- ret = SscanfFloatCheckExponent(newBuff, TempBuff, voidPtr, &n);
- }
-#endif // SSCANF_CANNOT_HANDLE_MISSING_EXPONENT
-
- PAL_free(newBuff);
- if (ret > 0)
- {
- Length += ret;
- }
- else
- {
- /* no match; break scan */
- break;
- }
- Buff += n;
- }
- }
- else
- {
- /* grab, but not store */
- if (*Fmt == *Buff && Type != SCANF_TYPE_SPACE)
- {
- ++Fmt;
- ++Buff;
- }
- /* doesn't match, break scan */
- else
- {
- break;
- }
- }
- }
-
- return Length;
-}
-
-/*++
-Function:
- PAL_swscanf
-
-See MSDN doc.
---*/
-int
-__cdecl
-PAL_swscanf(
- const wchar_16 *buffer,
- const wchar_16 *format,
- ...)
-{
- int Length;
- va_list ap;
-
- PERF_ENTRY(swscanf);
- ENTRY("PAL_swscanf (buffer=%p (%S), format=%p (%S))\n", buffer, buffer, format, format);
-
- va_start(ap, format);
- Length = PAL_wvsscanf(buffer, format, ap);
- va_end(ap);
-
- LOGEXIT("PAL_swscanf returns int %d\n", Length);
- PERF_EXIT(swscanf);
- return Length;
-}
-
-
-#if SSCANF_CANNOT_HANDLE_MISSING_EXPONENT
-/*++
-Function:
- SscanfFloatCheckExponent
-
- Parameters:
- buff: pointer to the buffer to be parsed; the target float must be at
- the beginning of the buffer, except for any number of leading
- spaces
- floatFmt: must be "%e%n" (or "%f%n" or "%g%n")
- voidptr: optional pointer to output variable (which should be a float)
- pn: pointer to an int to receive the number of bytes parsed.
-
- Notes:
- On some platforms (specifically AIX) sscanf fails to parse a float from
- a string such as 12.34e (while it succeeds for e.g. 12.34a). Sscanf
- initially interprets the 'e' as the keyword for the beginning of a
- 10-exponent of a floating point in scientific notation (as in 12.34e5),
- but then it fails to parse the actual exponent. At this point sscanf should
- be able to fall back on the narrower pattern, and parse the floating point
- in common decimal notation (i.e. 12.34). However AIX's sscanf fails to do
- so and it does not parse any number.
- This function checks the given string for a such case and removes
- the 'e' before parsing the float.
-
---*/
-
-static int SscanfFloatCheckExponent(LPCSTR buff, LPCSTR floatFmt,
- void * voidPtr, int * pn)
-{
- int ret = 0;
- int digits = 0;
- int points = 0;
- LPCSTR pos = buff;
-
- /* skip initial spaces */
- while (*pos && isspace(*pos))
- pos++;
-
- /* go to the end of a float, if there is one */
- while (*pos)
- {
- if (isdigit(*pos))
- digits++;
- else if (*pos == '.')
- {
- if (++points > 1)
- break;
- }
- else
- break;
-
- pos++;
- }
-
- /* check if it is something like 12.34e and the trailing 'e' is not
- the suffix of a valid exponent of 10, such as 12.34e+5 */
- if ( digits > 0 && *pos && tolower(*pos) == 'e' &&
- !( *(pos+1) &&
- ( isdigit(*(pos+1)) ||
- ( (*(pos+1) == '+' || *(pos+1) == '-') && isdigit(*(pos+2)) )
- )
- )
- )
- {
- CHAR * pLocBuf = (CHAR *)PAL_malloc((pos-buff+1)*sizeof(CHAR));
- if (pLocBuf)
- {
- memcpy(pLocBuf, buff, (pos-buff)*sizeof(CHAR));
- pLocBuf[pos-buff] = 0;
- if (voidPtr)
- ret = sscanf_s(pLocBuf, floatFmt, voidPtr, pn);
- else
- ret = sscanf_s(pLocBuf, floatFmt, pn);
- PAL_free (pLocBuf);
- }
- }
- return ret;
-}
-#endif // SSCANF_CANNOT_HANDLE_MISSING_EXPONENT
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- printfcpp.cpp
-
-Abstract:
-
- Implementation of suspension safe printf functions.
-
-Revision History:
-
-
-
---*/
-
-#include "pal/corunix.hpp"
-#include "pal/thread.hpp"
-#include "pal/malloc.hpp"
-#include "pal/file.hpp"
-#include "pal/printfcpp.hpp"
-#include "pal/palinternal.h"
-#include "pal/dbgmsg.h"
-#include "pal/cruntime.h"
-
-#include <errno.h>
-
-SET_DEFAULT_DEBUG_CHANNEL(CRT);
-
-using namespace CorUnix;
-
-static const char __nullstring[] = "(null)"; /* string to print on null ptr */
-static const WCHAR __wnullstring[] = W("(null)"); /* string to print on null ptr */
-
-int CoreVfprintf(CPalThread *pthrCurrent, PAL_FILE *stream, const char *format, va_list ap);
-int CoreVfwprintf(CPalThread *pthrCurrent, PAL_FILE *stream, const wchar_16 *format, va_list ap);
-
-extern "C"
-{
-
-/*******************************************************************************
-Function:
- Internal_Convertfwrite
- This function is a wrapper around fwrite for cases where the buffer has
- to be converted from WideChar to MultiByte
-*******************************************************************************/
-
-static int Internal_Convertfwrite(CPalThread *pthrCurrent, const void *buffer, size_t size, size_t count, FILE *stream, BOOL convert)
-{
- int ret;
- int iError = 0;
-
-#if FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL
- clearerr (stream);
-#endif
-
-
- if(convert)
- {
- int nsize;
- LPSTR newBuff = 0;
- nsize = WideCharToMultiByte(CP_ACP, 0,(LPCWSTR)buffer, count, 0, 0, 0, 0);
- if (!nsize)
- {
- if (count == 0)
- return 0;
- ASSERT("WideCharToMultiByte failed. Error is %d\n", GetLastError());
- return -1;
- }
- newBuff = (LPSTR) InternalMalloc(nsize);
- if (!newBuff)
- {
- ERROR("InternalMalloc failed\n");
- pthrCurrent->SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return -1;
- }
- nsize = WideCharToMultiByte(CP_ACP, 0, (LPCWSTR)buffer, count, newBuff, nsize, 0, 0);
- if (!nsize)
- {
- ASSERT("WideCharToMultiByte failed. Error is %d\n", GetLastError());
- free(newBuff);
- return -1;
- }
- ret = InternalFwrite(newBuff, 1, nsize, stream, &iError);
- if (iError != 0)
- {
- ERROR("InternalFwrite did not write the whole buffer. Error is %d\n", iError);
- free(newBuff);
- return -1;
- }
- free(newBuff);
- }
- else
- {
- ret = InternalFwrite(buffer, size, count, stream, &iError);
- if (iError != 0)
- {
- ERROR("InternalFwrite did not write the whole buffer. Error is %d\n", iError);
- return -1;
- }
- }
- return ret;
-
-}
-
-/*******************************************************************************
-Function:
- Internal_ExtractFormatA
-
-Paramaters:
- Fmt
- - format string to parse
- - first character must be a '%'
- - paramater gets updated to point to the character after
- the %<foo> format string
- Out
- - buffer will contain the %<foo> format string
- Flags
- - paramater will be set with the PRINTF_FORMAT_FLAGS defined above
- Width
- - will contain the width specified by the format string
- - -1 if none given
- Precision
- - will contain the precision specified in the format string
- - -1 if none given
- Prefix
- - an enumeration of the type prefix
- Type
- - an enumeration of the type value
-
-Notes:
- - I'm also handling the undocumented %ws, %wc, %w...
- - %#10x, when we have a width greater than the length (i.e padding) the
- length of the padding is not consistent with MS's wsprintf
- (MS adds an extra 2 padding chars, length of "0x")
- - MS's wsprintf seems to ingore a 'h' prefix for number types
- - MS's "%p" is different than gcc's
- e.g. printf("%p", NULL);
- MS --> 00000000
- gcc --> 0x0
- - the length of the exponent (precision) for floating types is different
- between MS and gcc
- e.g. printf("%E", 256.0);
- MS --> 2.560000E+002
- gcc --> 2.560000E+02
-*******************************************************************************/
-BOOL Internal_ExtractFormatA(CPalThread *pthrCurrent, LPCSTR *Fmt, LPSTR Out, LPINT Flags,
- LPINT Width, LPINT Precision, LPINT Prefix, LPINT Type)
-{
- BOOL Result = FALSE;
- LPSTR TempStr;
- LPSTR TempStrPtr;
-
- *Width = WIDTH_DEFAULT;
- *Precision = PRECISION_DEFAULT;
- *Flags = PFF_NONE;
- *Prefix = PFF_PREFIX_DEFAULT;
- *Type = PFF_TYPE_DEFAULT;
-
- if (*Fmt && **Fmt == '%')
- {
- *Out++ = *(*Fmt)++;
- }
- else
- {
- return Result;
- }
-
- /* we'll never need a temp string longer than the original */
- TempStrPtr = TempStr = (LPSTR) InternalMalloc(strlen(*Fmt)+1);
- if (!TempStr)
- {
- ERROR("InternalMalloc failed\n");
- pthrCurrent->SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return Result;
- }
-
- /* parse flags */
- while (**Fmt && (**Fmt == '-' || **Fmt == '+' ||
- **Fmt == '0' || **Fmt == ' ' || **Fmt == '#'))
- {
- switch (**Fmt)
- {
- case '-':
- *Flags |= PFF_MINUS; break;
- case '+':
- *Flags |= PFF_PLUS; break;
- case '0':
- *Flags |= PFF_ZERO; break;
- case ' ':
- *Flags |= PFF_SPACE; break;
- case '#':
- *Flags |= PFF_POUND; break;
- }
- *Out++ = *(*Fmt)++;
- }
- /* '-' flag negates '0' flag */
- if ((*Flags & PFF_MINUS) && (*Flags & PFF_ZERO))
- {
- *Flags -= PFF_ZERO;
- }
-
- /* grab width specifier */
- if (isdigit((unsigned char) **Fmt))
- {
- TempStrPtr = TempStr;
- while (isdigit((unsigned char) **Fmt))
- {
- *TempStrPtr++ = **Fmt;
- *Out++ = *(*Fmt)++;
- }
- *TempStrPtr = 0; /* end string */
- *Width = atoi(TempStr);
- if (*Width < 0)
- {
- ERROR("atoi returned a negative value indicative of an overflow.\n");
- pthrCurrent->SetLastError(ERROR_INTERNAL_ERROR);
- goto EXIT;
- }
- }
- else if (**Fmt == '*')
- {
- *Width = WIDTH_STAR;
- *Out++ = *(*Fmt)++;
- if (isdigit((unsigned char) **Fmt))
- {
- /* this is an invalid width because we have a * then a number */
- /* printf handles this by just printing the whole string */
- *Width = WIDTH_INVALID;
- while (isdigit((unsigned char) **Fmt))
- {
- *Out++ = *(*Fmt)++;
- }
- }
- }
-
-
- /* grab precision specifier */
- if (**Fmt == '.')
- {
- *Out++ = *(*Fmt)++;
- if (isdigit((unsigned char) **Fmt))
- {
- TempStrPtr = TempStr;
- while (isdigit((unsigned char) **Fmt))
- {
- *TempStrPtr++ = **Fmt;
- *Out++ = *(*Fmt)++;
- }
- *TempStrPtr = 0; /* end string */
- *Precision = atoi(TempStr);
- if (*Precision < 0)
- {
- ERROR("atoi returned a negative value indicative of an overflow.\n");
- pthrCurrent->SetLastError(ERROR_INTERNAL_ERROR);
- goto EXIT;
- }
- }
- else if (**Fmt == '*')
- {
- *Precision = PRECISION_STAR;
- *Out++ = *(*Fmt)++;
- if (isdigit((unsigned char) **Fmt))
- {
- /* this is an invalid precision because we have a .* then a number */
- /* printf handles this by just printing the whole string */
- *Precision = PRECISION_INVALID;
- while (isdigit((unsigned char) **Fmt))
- {
- *Out++ = *(*Fmt)++;
- }
- }
- }
- else
- {
- *Precision = PRECISION_DOT;
- }
- }
-
-#ifdef HOST_64BIT
- if (**Fmt == 'p')
- {
- *Prefix = PFF_PREFIX_LONGLONG;
- }
-#endif
- if ((*Fmt)[0] == 'I')
- {
- /* grab prefix of 'I64' for __int64 */
- if ((*Fmt)[1] == '6' && (*Fmt)[2] == '4')
- {
- /* convert to 'll' so that Unix snprintf can handle it */
- *Fmt += 3;
- *Prefix = PFF_PREFIX_LONGLONG;
- }
- /* grab prefix of 'I32' for __int32 */
- else if ((*Fmt)[1] == '3' && (*Fmt)[2] == '2')
- {
- *Fmt += 3;
- }
- else
- {
- ++(*Fmt);
- #ifdef HOST_64BIT
- /* convert to 'll' so that Unix snprintf can handle it */
- *Prefix = PFF_PREFIX_LONGLONG;
- #endif
- }
- }
- /* grab a prefix of 'h' */
- else if (**Fmt == 'h')
- {
- *Prefix = PFF_PREFIX_SHORT;
- ++(*Fmt);
- }
- /* grab prefix of 'l' or the undocumented 'w' (at least in MSDN) */
- else if (**Fmt == 'l' || **Fmt == 'w')
- {
- ++(*Fmt);
-#ifdef HOST_64BIT
- // Only want to change the prefix on 64 bit when printing characters.
- if (**Fmt == 'c' || **Fmt == 's')
-#endif
- {
- *Prefix = PFF_PREFIX_LONG;
- }
- if (**Fmt == 'l')
- {
- *Prefix = PFF_PREFIX_LONGLONG;
- ++(*Fmt);
- }
- }
- else if (**Fmt == 'L')
- {
- /* a prefix of 'L' seems to be ignored */
- ++(*Fmt);
- }
-
- /* grab type 'c' */
- if (**Fmt == 'c' || **Fmt == 'C')
- {
- *Type = PFF_TYPE_CHAR;
- if (*Prefix != PFF_PREFIX_SHORT && **Fmt == 'C')
- {
- *Prefix = PFF_PREFIX_LONG; /* give it a wide prefix */
- }
- if (*Prefix == PFF_PREFIX_LONG)
- {
- *Out++ = 'l';
- }
- *Out++ = 'c';
- ++(*Fmt);
- Result = TRUE;
- }
- /* grab type 's' */
- else if (**Fmt == 's' || **Fmt == 'S')
- {
- *Type = PFF_TYPE_STRING;
- if (*Prefix != PFF_PREFIX_SHORT && **Fmt == 'S')
- {
- *Prefix = PFF_PREFIX_LONG; /* give it a wide prefix */
- }
- if (*Prefix == PFF_PREFIX_LONG)
- {
- *Out++ = 'l';
- }
- *Out++ = 's';
- ++(*Fmt);
- Result = TRUE;
- }
- /* grab int types */
- else if (**Fmt == 'd' || **Fmt == 'i' || **Fmt == 'o' ||
- **Fmt == 'u' || **Fmt == 'x' || **Fmt == 'X')
- {
- *Type = PFF_TYPE_INT;
- if (*Prefix == PFF_PREFIX_SHORT)
- {
- *Out++ = 'h';
- }
- else if (*Prefix == PFF_PREFIX_LONG)
- {
- *Out++ = 'l';
- }
- else if (*Prefix == PFF_PREFIX_LONGLONG)
- {
- *Out++ = 'l';
- *Out++ = 'l';
- }
- *Out++ = *(*Fmt)++;
- Result = TRUE;
- }
- else if (**Fmt == 'e' || **Fmt == 'E' || **Fmt == 'f' ||
- **Fmt == 'g' || **Fmt == 'G')
- {
- /* we can safely ignore the prefixes and only add the type*/
- *Type = PFF_TYPE_FLOAT;
- *Out++ = *(*Fmt)++;
- Result = TRUE;
- }
- else if (**Fmt == 'n')
- {
- if (*Prefix == PFF_PREFIX_SHORT)
- {
- *Out++ = 'h';
- }
- *Out++ = *(*Fmt)++;
- *Type = PFF_TYPE_N;
- Result = TRUE;
- }
- else if (**Fmt == 'p')
- {
- *Type = PFF_TYPE_P;
- (*Fmt)++;
-
- if (*Prefix == PFF_PREFIX_LONGLONG)
- {
- if (*Precision == PRECISION_DEFAULT)
- {
- *Precision = 16;
- *Out++ = '.';
- *Out++ = '1';
- *Out++ = '6';
- }
- /* native *printf does not support %I64p
- (actually %llp), so we need to cheat a little bit */
- *Out++ = 'l';
- *Out++ = 'l';
- }
- else
- {
- if (*Precision == PRECISION_DEFAULT)
- {
- *Precision = 8;
- *Out++ = '.';
- *Out++ = '8';
- }
- }
- *Out++ = 'X';
- Result = TRUE;
- }
-
- *Out = 0; /* end the string */
-
-EXIT:
- free(TempStr);
- return Result;
-}
-
-/*******************************************************************************
-Function:
- Internal_ExtractFormatW
-
- -- see Internal_ExtractFormatA above
-*******************************************************************************/
-BOOL Internal_ExtractFormatW(CPalThread *pthrCurrent, LPCWSTR *Fmt, LPSTR Out, LPINT Flags,
- LPINT Width, LPINT Precision, LPINT Prefix, LPINT Type)
-{
- BOOL Result = FALSE;
- LPSTR TempStr;
- LPSTR TempStrPtr;
-
- *Width = WIDTH_DEFAULT;
- *Precision = PRECISION_DEFAULT;
- *Flags = PFF_NONE;
- *Prefix = PFF_PREFIX_DEFAULT;
- *Type = PFF_TYPE_DEFAULT;
-
- if (*Fmt && **Fmt == '%')
- {
- *Out++ = (CHAR) *(*Fmt)++;
- }
- else
- {
- return Result;
- }
-
- /* we'll never need a temp string longer than the original */
- TempStrPtr = TempStr = (LPSTR) InternalMalloc(PAL_wcslen(*Fmt)+1);
- if (!TempStr)
- {
- ERROR("InternalMalloc failed\n");
- pthrCurrent->SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return Result;
- }
-
- /* parse flags */
- while (**Fmt && (**Fmt == '-' || **Fmt == '+' ||
- **Fmt == '0' || **Fmt == ' ' || **Fmt == '#'))
- {
- switch (**Fmt)
- {
- case '-':
- *Flags |= PFF_MINUS; break;
- case '+':
- *Flags |= PFF_PLUS; break;
- case '0':
- *Flags |= PFF_ZERO; break;
- case ' ':
- *Flags |= PFF_SPACE; break;
- case '#':
- *Flags |= PFF_POUND; break;
- }
- *Out++ = (CHAR) *(*Fmt)++;
- }
- /* '-' flag negates '0' flag */
- if ((*Flags & PFF_MINUS) && (*Flags & PFF_ZERO))
- {
- *Flags -= PFF_ZERO;
- }
-
- /* grab width specifier */
- if (isdigit(**Fmt))
- {
- TempStrPtr = TempStr;
- while (isdigit(**Fmt))
- {
- *TempStrPtr++ = (CHAR) **Fmt;
- *Out++ = (CHAR) *(*Fmt)++;
- }
- *TempStrPtr = 0; /* end string */
- *Width = atoi(TempStr);
- if (*Width < 0)
- {
- ERROR("atoi returned a negative value indicative of an overflow.\n");
- pthrCurrent->SetLastError(ERROR_INTERNAL_ERROR);
- goto EXIT;
- }
- }
- else if (**Fmt == '*')
- {
- *Width = WIDTH_STAR;
- *Out++ = (CHAR) *(*Fmt)++;
- if (isdigit(**Fmt))
- {
- /* this is an invalid width because we have a * then a number */
- /* printf handles this by just printing the whole string */
- *Width = WIDTH_INVALID;
- while (isdigit(**Fmt))
- {
- *Out++ = (CHAR) *(*Fmt)++;
- }
- }
- }
-
- /* grab precision specifier */
- if (**Fmt == '.')
- {
- *Out++ = (CHAR) *(*Fmt)++;
- if (isdigit(**Fmt))
- {
- TempStrPtr = TempStr;
- while (isdigit(**Fmt))
- {
- *TempStrPtr++ = (CHAR) **Fmt;
- *Out++ = (CHAR) *(*Fmt)++;
- }
- *TempStrPtr = 0; /* end string */
- *Precision = atoi(TempStr);
- if (*Precision < 0)
- {
- ERROR("atoi returned a negative value indicative of an overflow.\n");
- pthrCurrent->SetLastError(ERROR_INTERNAL_ERROR);
- goto EXIT;
- }
- }
- else if (**Fmt == '*')
- {
- *Precision = PRECISION_STAR;
- *Out++ = (CHAR) *(*Fmt)++;
- if (isdigit(**Fmt))
- {
- /* this is an invalid precision because we have a .* then a number */
- /* printf handles this by just printing the whole string */
- *Precision = PRECISION_INVALID;
- while (isdigit(**Fmt))
- {
- *Out++ = (CHAR) *(*Fmt)++;
- }
- }
- }
- else
- {
- *Precision = PRECISION_DOT;
- }
- }
-
-#ifdef HOST_64BIT
- if (**Fmt == 'p')
- {
- *Prefix = PFF_PREFIX_LONGLONG;
- }
-#endif
- if ((*Fmt)[0] == 'I')
- {
- /* grab prefix of 'I64' for __int64 */
- if ((*Fmt)[1] == '6' && (*Fmt)[2] == '4')
- {
- /* convert to 'll' so that Unix snprintf can handle it */
- *Fmt += 3;
- *Prefix = PFF_PREFIX_LONGLONG;
- }
- /* grab prefix of 'I32' for __int32 */
- else if ((*Fmt)[1] == '3' && (*Fmt)[2] == '2')
- {
- *Fmt += 3;
- }
- else
- {
- ++(*Fmt);
- #ifdef HOST_64BIT
- /* convert to 'll' so that Unix snprintf can handle it */
- *Prefix = PFF_PREFIX_LONGLONG;
- #endif
- }
- }
- /* grab a prefix of 'h' */
- else if (**Fmt == 'h')
- {
- *Prefix = PFF_PREFIX_SHORT;
- ++(*Fmt);
- }
- else if (**Fmt == 'l' || **Fmt == 'w')
- {
- ++(*Fmt);
- #ifdef HOST_64BIT
- // Only want to change the prefix on 64 bit when printing characters.
- if (**Fmt == 'C' || **Fmt == 'S')
-#endif
- {
- *Prefix = PFF_PREFIX_LONG_W;
- }
- if (**Fmt == 'l')
- {
- *Prefix = PFF_PREFIX_LONGLONG;
- ++(*Fmt);
- }
- }
- else if (**Fmt == 'L')
- {
- /* a prefix of 'L' seems to be ignored */
- ++(*Fmt);
- }
-
-
- /* grab type 'c' */
- if (**Fmt == 'c' || **Fmt == 'C')
- {
- *Type = PFF_TYPE_CHAR;
- if (*Prefix != PFF_PREFIX_SHORT && **Fmt == 'c')
- {
- *Prefix = PFF_PREFIX_LONG; /* give it a wide prefix */
- }
- if (*Prefix == PFF_PREFIX_LONG || *Prefix == PFF_PREFIX_LONG_W)
- {
- *Out++ = 'l';
- *Prefix = PFF_PREFIX_LONG;
- }
- *Out++ = 'c';
- ++(*Fmt);
- Result = TRUE;
- }
- /* grab type 's' */
- else if (**Fmt == 's' || **Fmt == 'S' )
- {
- if ( **Fmt == 'S' )
- {
- *Type = PFF_TYPE_WSTRING;
- }
- else
- {
- *Type = PFF_TYPE_STRING;
- }
- if (*Prefix != PFF_PREFIX_SHORT && **Fmt == 's')
- {
- *Prefix = PFF_PREFIX_LONG; /* give it a wide prefix */
- }
- if (*Prefix == PFF_PREFIX_LONG)
- {
- *Out++ = 'l';
- }
-
- *Out++ = 's';
- ++(*Fmt);
- Result = TRUE;
- }
- /* grab int types */
- else if (**Fmt == 'd' || **Fmt == 'i' || **Fmt == 'o' ||
- **Fmt == 'u' || **Fmt == 'x' || **Fmt == 'X')
- {
- *Type = PFF_TYPE_INT;
- if (*Prefix == PFF_PREFIX_SHORT)
- {
- *Out++ = 'h';
- }
- else if (*Prefix == PFF_PREFIX_LONG || *Prefix == PFF_PREFIX_LONG_W)
- {
- *Out++ = 'l';
- *Prefix = PFF_PREFIX_LONG;
- }
- else if (*Prefix == PFF_PREFIX_LONGLONG)
- {
- *Out++ = 'l';
- *Out++ = 'l';
- }
- *Out++ = *(*Fmt)++;
- Result = TRUE;
- }
- else if (**Fmt == 'e' || **Fmt == 'E' || **Fmt == 'f' ||
- **Fmt == 'g' || **Fmt == 'G')
- {
- /* we can safely ignore the prefixes and only add the type*/
- if (*Prefix == PFF_PREFIX_LONG_W)
- {
- *Prefix = PFF_PREFIX_LONG;
- }
-
- *Type = PFF_TYPE_FLOAT;
- *Out++ = *(*Fmt)++;
- Result = TRUE;
- }
- else if (**Fmt == 'n')
- {
- if (*Prefix == PFF_PREFIX_LONG_W)
- {
- *Prefix = PFF_PREFIX_LONG;
- }
-
- if (*Prefix == PFF_PREFIX_SHORT)
- {
- *Out++ = 'h';
- }
- *Out++ = *(*Fmt)++;
- *Type = PFF_TYPE_N;
- Result = TRUE;
- }
- else if (**Fmt == 'p')
- {
- *Type = PFF_TYPE_P;
- (*Fmt)++;
-
- if (*Prefix == PFF_PREFIX_LONGLONG)
- {
- if (*Precision == PRECISION_DEFAULT)
- {
- *Precision = 16;
- *Out++ = '.';
- *Out++ = '1';
- *Out++ = '6';
- }
- /* native *printf does not support %I64p
- (actually %llp), so we need to cheat a little bit */
- *Out++ = 'l';
- *Out++ = 'l';
- }
- else
- {
- if (*Precision == PRECISION_DEFAULT)
- {
- *Precision = 8;
- *Out++ = '.';
- *Out++ = '8';
- }
- if (*Prefix == PFF_PREFIX_LONG_W)
- {
- *Prefix = PFF_PREFIX_LONG;
- }
- }
- *Out++ = 'X';
- Result = TRUE;
- }
-
- *Out = 0; /* end the string */
-
-EXIT:
- free(TempStr);
- return Result;
-}
-
-/*******************************************************************************
-Function:
- Internal_AddPaddingVfprintf
-
-Parameters:
- stream
- - file stream to place padding and given string (In)
- In
- - string to place into (Out) accompanied with padding
- Padding
- - number of padding chars to add
- Flags
- - padding style flags (PRINTF_FORMAT_FLAGS)
-*******************************************************************************/
-
-INT Internal_AddPaddingVfprintf(CPalThread *pthrCurrent, PAL_FILE *stream, LPCSTR In,
- INT Padding, INT Flags)
-{
- LPSTR Out;
- INT LengthInStr;
- INT Length;
- LPSTR OutOriginal;
- INT Written;
-
- LengthInStr = strlen(In);
- Length = LengthInStr;
-
- if (Padding > 0)
- {
- Length += Padding;
- }
- Out = (LPSTR) InternalMalloc(Length+1);
- int iLength = Length+1;
- if (!Out)
- {
- ERROR("InternalMalloc failed\n");
- pthrCurrent->SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return -1;
- }
- OutOriginal = Out;
-
- if (Flags & PFF_MINUS) /* pad on right */
- {
- if (strcpy_s(Out, iLength, In) != SAFECRT_SUCCESS)
- {
- ERROR("strcpy_s failed\n");
- pthrCurrent->SetLastError(ERROR_INSUFFICIENT_BUFFER);
- Written = -1;
- goto Done;
- }
-
- Out += LengthInStr;
- iLength -= LengthInStr;
- }
- if (Padding > 0)
- {
- iLength -= Padding;
- if (Flags & PFF_ZERO) /* '0', pad with zeros */
- {
- while (Padding--)
- {
- *Out++ = '0';
- }
- }
- else /* pad with spaces */
- {
- while (Padding--)
- {
- *Out++ = ' ';
- }
- }
- }
- if (!(Flags & PFF_MINUS)) /* put 'In' after padding */
- {
- if (strcpy_s(Out, iLength, In) != SAFECRT_SUCCESS)
- {
- ERROR("strcpy_s failed\n");
- pthrCurrent->SetLastError(ERROR_INSUFFICIENT_BUFFER);
- Written = -1;
- goto Done;
- }
-
- Out += LengthInStr;
- iLength -= LengthInStr;
- }
-
-#if FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL
- clearerr (stream->bsdFilePtr);
-#endif
-
- Written = InternalFwrite(OutOriginal, 1, Length, stream->bsdFilePtr, &stream->PALferrorCode);
- if (stream->PALferrorCode == PAL_FILE_ERROR)
- {
- ERROR("fwrite() failed with errno == %d\n", errno);
- }
-
-Done:
- free(OutOriginal);
-
- return Written;
-}
-
-/*******************************************************************************
-Function:
- Internal_AddPaddingVfwprintf
-
-Parameters:
- stream
- - file stream to place padding and given string (In)
- In
- - string to place into (Out) accompanied with padding
- Padding
- - number of padding chars to add
- Flags
- - padding style flags (PRINTF_FORMAT_FLAGS)
-*******************************************************************************/
-static INT Internal_AddPaddingVfwprintf(CPalThread *pthrCurrent, PAL_FILE *stream, LPWSTR In,
- INT Padding, INT Flags,BOOL convert)
-{
- LPWSTR Out;
- LPWSTR OutOriginal;
- INT LengthInStr;
- INT Length;
- INT Written = -1;
-
- LengthInStr = PAL_wcslen(In);
- Length = LengthInStr;
-
- if (Padding > 0)
- {
- Length += Padding;
- }
-
- int iLen = (Length+1);
- Out = (LPWSTR) InternalMalloc(iLen * sizeof(WCHAR));
- if (!Out)
- {
- ERROR("InternalMalloc failed\n");
- pthrCurrent->SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return -1;
- }
- OutOriginal = Out;
-
- if (Flags & PFF_MINUS) /* pad on right */
- {
- if (wcscpy_s(Out, iLen, In) != SAFECRT_SUCCESS)
- {
- ERROR("wcscpy_s failed!\n");
- pthrCurrent->SetLastError(ERROR_INSUFFICIENT_BUFFER);
- goto EXIT;
- }
- Out += LengthInStr;
- iLen -= LengthInStr;
- }
- if (Padding > 0)
- {
- iLen -= Padding;
- if (Flags & PFF_ZERO) /* '0', pad with zeros */
- {
- while (Padding--)
- {
- *Out++ = '0';
- }
- }
- else /* pad with spaces */
- {
- while (Padding--)
- {
- *Out++ = ' ';
- }
- }
- }
- if (!(Flags & PFF_MINUS)) /* put 'In' after padding */
- {
- if (wcscpy_s(Out, iLen, In) != SAFECRT_SUCCESS)
- {
- ERROR("wcscpy_s failed!\n");
- pthrCurrent->SetLastError(ERROR_INSUFFICIENT_BUFFER);
- goto EXIT;
- }
-
- Out += LengthInStr;
- iLen -= LengthInStr;
- }
-
- if (Length > 0) {
- Written = Internal_Convertfwrite(pthrCurrent, OutOriginal, sizeof(wchar_16), Length,
- (FILE*)(stream->bsdFilePtr), convert);
-
- if (-1 == Written)
- {
- ERROR("fwrite() failed with errno == %d\n", errno);
- }
- }
- else
- {
- Written = 0;
- }
-
-EXIT:
- free(OutOriginal);
- return Written;
-}
-
-/*******************************************************************************
-Function:
- PAL_vfprintf
-
-Parameters:
- stream
- - out stream
- Format
- - format string
- ap
- - stdarg parameter list
-*******************************************************************************/
-
-int __cdecl PAL_vfprintf(PAL_FILE *stream, const char *format, va_list ap)
-{
- return CoreVfprintf(InternalGetCurrentThread(), stream, format, ap);
-}
-
-/*******************************************************************************
-Function:
- PAL_vfwprintf
-
-Parameters:
- stream
- - out stream
- Format
- - format string
- ap
- - stdarg parameter list
-*******************************************************************************/
-
-int __cdecl PAL_vfwprintf(PAL_FILE *stream, const wchar_16 *format, va_list ap)
-{
- return CoreVfwprintf(InternalGetCurrentThread(), stream, format, ap);
-}
-
-} // end extern "C"
-
-int CorUnix::InternalVfprintf(CPalThread *pthrCurrent, PAL_FILE *stream, const char *format, va_list ap)
-{
- return CoreVfprintf(pthrCurrent, stream, format, ap);
-}
-
-int CoreVfwprintf(CPalThread *pthrCurrent, PAL_FILE *stream, const wchar_16 *format, va_list aparg)
-{
- CHAR TempBuff[1024]; /* used to hold a single %<foo> format string */
- LPCWSTR Fmt = format;
- LPCWSTR TempWStr = NULL;
- LPWSTR AllocedTempWStr = NULL;
- LPWSTR WorkingWStr = NULL;
- WCHAR TempWChar[2];
- INT Flags;
- INT Width;
- INT Precision;
- INT Prefix;
- INT Type;
- INT TempInt;
- int mbtowcResult;
- int written=0;
- int paddingReturnValue;
- int ret;
- va_list ap;
-
- /* fwprintf for now in the PAL is always used on file opened
- in text mode. In those case the output should be ANSI not Unicode */
- BOOL textMode = TRUE;
-
- PERF_ENTRY(vfwprintf);
- ENTRY("vfwprintf (stream=%p, format=%p (%S))\n",
- stream, format, format);
-
- va_copy(ap, aparg);
-
- while (*Fmt)
- {
- if(*Fmt == '%' &&
- TRUE == Internal_ExtractFormatW(pthrCurrent, &Fmt, TempBuff, &Flags,
- &Width, &Precision,
- &Prefix, &Type))
- {
- if (((Prefix == PFF_PREFIX_LONG || Prefix == PFF_PREFIX_LONG_W) &&
- (Type == PFF_TYPE_STRING || Type == PFF_TYPE_WSTRING)) ||
- (Type == PFF_TYPE_WSTRING && (Flags & PFF_ZERO) != 0))
- {
- AllocedTempWStr = NULL;
-
- if (WIDTH_STAR == Width)
- {
- Width = va_arg(ap, INT);
- }
- else if (WIDTH_INVALID == Width)
- {
- /* both a '*' and a number, ignore, but remove arg */
- TempInt = va_arg(ap, INT); /* value not used */
- }
-
- if (PRECISION_STAR == Precision)
- {
- Precision = va_arg(ap, INT);
- }
- else if (PRECISION_INVALID == Precision)
- {
- /* both a '*' and a number, ignore, but remove arg */
- TempInt = va_arg(ap, INT); /* value not used */
- }
-
- if (Type == PFF_TYPE_STRING || Prefix == PFF_PREFIX_LONG_W)
- {
- TempWStr = va_arg(ap, LPWSTR);
- }
- else
- {
- /* %lS assumes a LPSTR argument. */
- LPCSTR s = va_arg(ap, LPSTR );
- if (s == NULL)
- {
- TempWStr = NULL;
- }
- else
- {
- UINT Length = 0;
- Length = MultiByteToWideChar( CP_ACP, 0, s, -1, NULL, 0 );
- if ( Length != 0 )
- {
- AllocedTempWStr =
- (LPWSTR)InternalMalloc( (Length) * sizeof( WCHAR ) );
-
- if ( AllocedTempWStr )
- {
- MultiByteToWideChar( CP_ACP, 0, s, -1,
- AllocedTempWStr, Length );
- TempWStr = AllocedTempWStr;
- }
- else
- {
- ERROR( "InternalMalloc failed.\n" );
- LOGEXIT("vfwprintf returns int -1\n");
- PERF_EXIT(vfwprintf);
- va_end(ap);
- return -1;
- }
- }
- else
- {
- ASSERT( "Unable to convert from multibyte "
- " to wide char.\n" );
- LOGEXIT("vfwprintf returns int -1\n");
- PERF_EXIT(vfwprintf);
- va_end(ap);
- return -1;
- }
- }
- }
-
- if (TempWStr == NULL)
- {
- TempWStr = __wnullstring;
- }
-
- INT Length = PAL_wcslen(TempWStr);
- WorkingWStr = (LPWSTR) InternalMalloc((sizeof(WCHAR) * (Length + 1)));
- if (!WorkingWStr)
- {
- ERROR("InternalMalloc failed\n");
- LOGEXIT("vfwprintf returns int -1\n");
- PERF_EXIT(vfwprintf);
- pthrCurrent->SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- free(AllocedTempWStr);
- va_end(ap);
- return -1;
- }
- if (PRECISION_DOT == Precision)
- {
- /* copy nothing */
- *WorkingWStr = 0;
- Length = 0;
- }
- else if (Precision > 0 && Precision < Length)
- {
- if (wcsncpy_s(WorkingWStr, (Length + 1), TempWStr, Precision+1) != SAFECRT_SUCCESS)
- {
- ERROR("Internal_AddPaddingVfwprintf failed\n");
- free(AllocedTempWStr);
- free(WorkingWStr);
- LOGEXIT("wcsncpy_s failed!\n");
- PERF_EXIT(vfwprintf);
- va_end(ap);
- return (-1);
- }
-
- Length = Precision;
- }
- /* copy everything */
- else
- {
- PAL_wcscpy(WorkingWStr, TempWStr);
- }
-
-
- /* do the padding (if needed)*/
- paddingReturnValue =
- Internal_AddPaddingVfwprintf( pthrCurrent, stream, WorkingWStr,
- Width - Length,
- Flags,textMode);
-
- if (paddingReturnValue == -1)
- {
- ERROR("Internal_AddPaddingVfwprintf failed\n");
- free(AllocedTempWStr);
- free(WorkingWStr);
- LOGEXIT("vfwprintf returns int -1\n");
- PERF_EXIT(vfwprintf);
- va_end(ap);
- return (-1);
- }
- written += paddingReturnValue;
-
- free(WorkingWStr);
- free(AllocedTempWStr);
- }
- else if (Prefix == PFF_PREFIX_LONG && Type == PFF_TYPE_CHAR)
- {
- if (WIDTH_STAR == Width ||
- WIDTH_INVALID == Width)
- {
- /* ignore (because it's a char), and remove arg */
- TempInt = va_arg(ap, INT); /* value not used */
- }
-
- if (PRECISION_STAR == Precision ||
- PRECISION_INVALID == Precision)
- {
- /* ignore (because it's a char), and remove arg */
- TempInt = va_arg(ap, INT); /* value not used */
- }
-
- TempWChar[0] = va_arg(ap, int);
- TempWChar[1] = 0;
-
- /* do the padding (if needed)*/
- paddingReturnValue =
- Internal_AddPaddingVfwprintf(pthrCurrent, stream, TempWChar,
- Width - 1,
- Flags,textMode);
- if (paddingReturnValue == -1)
- {
- ERROR("Internal_AddPaddingVfwprintf failed\n");
- LOGEXIT("vfwprintf returns int -1\n");
- PERF_EXIT(vfwprintf);
- va_end(ap);
- return(-1);
- }
- written += paddingReturnValue;
- }
- /* this places the number of bytes written to the buffer in the
- next arg */
- else if (Type == PFF_TYPE_N)
- {
- if (WIDTH_STAR == Width)
- {
- Width = va_arg(ap, INT);
- }
-
- if (PRECISION_STAR == Precision)
- {
- Precision = va_arg(ap, INT);
- }
-
- if (Prefix == PFF_PREFIX_SHORT)
- {
- *(va_arg(ap, short *)) = written;
- }
- else
- {
- *(va_arg(ap, LPLONG)) = written;
- }
- }
- else
- {
- // Types that sprintf can handle.
-
- /* note: I'm using the wide buffer as a (char *) buffer when I
- pass it to sprintf(). After I get the buffer back I make a
- backup of the chars copied and then convert them to wide
- and place them in the buffer (BufferPtr) */
-
- // This argument will be limited to 1024 characters.
- // It should be enough.
- size_t TEMP_COUNT = 1024;
- char TempSprintfStrBuffer[1024];
- char *TempSprintfStrPtr = NULL;
- char *TempSprintfStr = TempSprintfStrBuffer;
- LPWSTR TempWideBuffer;
-
- TempInt = 0;
- // %h (short) doesn't seem to be handled properly by local sprintf,
- // so we do the truncation ourselves for some cases.
- if (Type == PFF_TYPE_P && Prefix == PFF_PREFIX_SHORT)
- {
- // Convert from pointer -> int -> short to avoid warnings.
- long trunc1;
- short trunc2;
-
- trunc1 = va_arg(ap, LONG);
- trunc2 = (short)trunc1;
- trunc1 = trunc2;
-
- TempInt = snprintf(TempSprintfStr, TEMP_COUNT, TempBuff, trunc1);
-
- if (TempInt < 0 || static_cast<size_t>(TempInt) >= TEMP_COUNT)
- {
- if (NULL == (TempSprintfStrPtr = (char*)InternalMalloc(++TempInt)))
- {
- ERROR("InternalMalloc failed\n");
- LOGEXIT("vfwprintf returns int -1\n");
- PERF_EXIT(vfwprintf);
- pthrCurrent->SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- va_end(ap);
- return -1;
- }
-
- TempSprintfStr = TempSprintfStrPtr;
- snprintf(TempSprintfStr, TempInt, TempBuff, trunc2);
- }
- }
- else if (Type == PFF_TYPE_INT && Prefix == PFF_PREFIX_SHORT)
- {
- // Convert explicitly from int to short to get
- // correct sign extension for shorts on all systems.
- int n;
- short s;
-
- n = va_arg(ap, int);
- s = (short) n;
-
- TempInt = snprintf(TempSprintfStr, TEMP_COUNT, TempBuff, s);
-
- if (TempInt < 0 || static_cast<size_t>(TempInt) >= TEMP_COUNT)
- {
- if (NULL == (TempSprintfStrPtr = (char*)InternalMalloc(++TempInt)))
- {
- ERROR("InternalMalloc failed\n");
- LOGEXIT("vfwprintf returns int -1\n");
- PERF_EXIT(vfwprintf);
- pthrCurrent->SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- va_end(ap);
- return -1;
- }
-
- TempSprintfStr = TempSprintfStrPtr;
- snprintf(TempSprintfStr, TempInt, TempBuff, s);
- }
- }
- else
- {
- va_list apcopy;
-
- va_copy(apcopy, ap);
- TempInt = _vsnprintf_s(TempSprintfStr, TEMP_COUNT, _TRUNCATE, TempBuff, apcopy);
- va_end(apcopy);
- PAL_printf_arg_remover(&ap, Width, Precision, Type, Prefix);
-
- if (TempInt < 0 || static_cast<size_t>(TempInt) >= TEMP_COUNT)
- {
- if (NULL == (TempSprintfStrPtr = (char*)InternalMalloc(++TempInt)))
- {
- ERROR("InternalMalloc failed\n");
- LOGEXIT("vfwprintf returns int -1\n");
- PERF_EXIT(vfwprintf);
- pthrCurrent->SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- va_end(ap);
- return -1;
- }
-
- TempSprintfStr = TempSprintfStrPtr;
- va_copy(apcopy, ap);
- _vsnprintf_s(TempSprintfStr, TempInt, _TRUNCATE, TempBuff, apcopy);
- va_end(apcopy);
- PAL_printf_arg_remover(&ap, Width, Precision, Type, Prefix);
- }
- }
-
- mbtowcResult = MultiByteToWideChar(CP_ACP, 0,
- TempSprintfStr, -1,
- NULL, 0);
-
- if (mbtowcResult == 0)
- {
- ERROR("MultiByteToWideChar failed\n");
- if(TempSprintfStrPtr)
- {
- free(TempSprintfStrPtr);
- }
- LOGEXIT("vfwprintf returns int -1\n");
- PERF_EXIT(vfwprintf);
- va_end(ap);
- return -1;
- }
-
- TempWideBuffer = (LPWSTR) InternalMalloc(mbtowcResult*sizeof(WCHAR));
- if (!TempWideBuffer)
- {
- ERROR("InternalMalloc failed\n");
- LOGEXIT("vfwprintf returns int -1\n");
- PERF_EXIT(vfwprintf);
- pthrCurrent->SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- if(TempSprintfStrPtr)
- {
- free(TempSprintfStrPtr);
- }
- va_end(ap);
- return -1;
- }
-
- MultiByteToWideChar(CP_ACP, 0, TempSprintfStr, -1,
- TempWideBuffer, mbtowcResult);
-
- ret = Internal_Convertfwrite(
- pthrCurrent,
- TempWideBuffer,
- sizeof(wchar_16),
- mbtowcResult-1,
- (FILE*)stream->bsdFilePtr,
- textMode);
-
- if (-1 == ret)
- {
- ERROR("fwrite() failed with errno == %d (%s)\n", errno, strerror(errno));
- LOGEXIT("vfwprintf returns int -1\n");
- PERF_EXIT(vfwprintf);
- free(TempWideBuffer);
- if(TempSprintfStrPtr)
- {
- free(TempSprintfStrPtr);
- }
- va_end(ap);
- return -1;
- }
- if(TempSprintfStrPtr)
- {
- free(TempSprintfStrPtr);
- }
- free(TempWideBuffer);
- }
- }
- else
- {
- ret = Internal_Convertfwrite(
- pthrCurrent,
- Fmt++,
- sizeof(wchar_16),
- 1,
- (FILE*)stream->bsdFilePtr,
- textMode); /* copy regular chars into buffer */
-
- if (-1 == ret)
- {
- ERROR("fwrite() failed with errno == %d\n", errno);
- LOGEXIT("vfwprintf returns int -1\n");
- PERF_EXIT(vfwprintf);
- va_end(ap);
- return -1;
- }
- ++written;
- }
- }
-
- LOGEXIT("vfwprintf returns int %d\n", written);
- PERF_EXIT(vfwprintf);
- va_end(ap);
- return (written);
-}
-
-int CoreVfprintf(CPalThread *pthrCurrent, PAL_FILE *stream, const char *format, va_list aparg)
-{
- CHAR TempBuff[1024]; /* used to hold a single %<foo> format string */
- LPCSTR Fmt = format;
- LPCWSTR TempWStr;
- LPSTR TempStr;
- WCHAR TempWChar;
- INT Flags;
- INT Width;
- INT Precision;
- INT Prefix;
- INT Type;
- INT Length;
- INT TempInt;
- int wctombResult;
- int written = 0;
- int paddingReturnValue;
- va_list ap;
-
- PERF_ENTRY(vfprintf);
-
- va_copy(ap, aparg);
-
- while (*Fmt)
- {
- if (*Fmt == '%' &&
- TRUE == Internal_ExtractFormatA(pthrCurrent, &Fmt, TempBuff, &Flags,
- &Width, &Precision,
- &Prefix, &Type))
- {
- if (Prefix == PFF_PREFIX_LONG && Type == PFF_TYPE_STRING)
- {
- if (WIDTH_STAR == Width)
- {
- Width = va_arg(ap, INT);
- }
- else if (WIDTH_INVALID == Width)
- {
- /* both a '*' and a number, ignore, but remove arg */
- TempInt = va_arg(ap, INT); /* value not used */
- }
-
- if (PRECISION_STAR == Precision)
- {
- Precision = va_arg(ap, INT);
- }
- else if (PRECISION_INVALID == Precision)
- {
- /* both a '*' and a number, ignore, but remove arg */
- TempInt = va_arg(ap, INT); /* value not used */
- }
-
- TempWStr = va_arg(ap, LPWSTR);
- if (TempWStr == NULL)\
- {
- TempWStr = __wnullstring;
- }
- Length = WideCharToMultiByte(CP_ACP, 0, TempWStr, -1, 0,
- 0, 0, 0);
- if (!Length)
- {
- ASSERT("WideCharToMultiByte failed. Error is %d\n",
- GetLastError());
- PERF_EXIT(vfprintf);
- va_end(ap);
- return -1;
- }
- TempStr = (LPSTR) InternalMalloc(Length);
- if (!TempStr)
- {
- ERROR("InternalMalloc failed\n");
- pthrCurrent->SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- PERF_EXIT(vfprintf);
- va_end(ap);
- return -1;
- }
- if (PRECISION_DOT == Precision)
- {
- /* copy nothing */
- *TempStr = 0;
- Length = 0;
- }
- else if (Precision > 0 && Precision < Length - 1)
- {
- Length = WideCharToMultiByte(CP_ACP, 0, TempWStr,
- Precision, TempStr, Length,
- 0, 0);
- if (!Length)
- {
- ASSERT("WideCharToMultiByte failed. Error is %d\n",
- GetLastError());
- free(TempStr);
- PERF_EXIT(vfprintf);
- va_end(ap);
- return -1;
- }
- TempStr[Length] = 0;
- Length = Precision;
- }
- /* copy everything */
- else
- {
- wctombResult = WideCharToMultiByte(CP_ACP, 0, TempWStr, -1,
- TempStr, Length, 0, 0);
- if (!wctombResult)
- {
- ASSERT("WideCharToMultiByte failed. Error is %d\n",
- GetLastError());
- free(TempStr);
- PERF_EXIT(vfprintf);
- va_end(ap);
- return -1;
- }
- --Length; /* exclude null char */
- }
-
- /* do the padding (if needed)*/
- paddingReturnValue =
- Internal_AddPaddingVfprintf(pthrCurrent, stream, TempStr,
- Width - Length, Flags);
- if (-1 == paddingReturnValue)
- {
- ERROR("Internal_AddPaddingVfprintf failed\n");
- free(TempStr);
- PERF_EXIT(vfprintf);
- va_end(ap);
- return -1;
- }
- written += paddingReturnValue;
-
- free(TempStr);
- }
- else if (Prefix == PFF_PREFIX_LONG && Type == PFF_TYPE_CHAR)
- {
- CHAR TempBuffer[5];
- if (WIDTH_STAR == Width ||
- WIDTH_INVALID == Width)
- {
- /* ignore (because it's a char), and remove arg */
- TempInt = va_arg(ap, INT); /* value not used */
- }
- if (PRECISION_STAR == Precision ||
- PRECISION_INVALID == Precision)
- {
- /* ignore (because it's a char), and remove arg */
- TempInt = va_arg(ap, INT); /* value not used */
- }
-
- TempWChar = va_arg(ap, int);
- Length = WideCharToMultiByte(CP_ACP, 0, &TempWChar, 1,
- TempBuffer, sizeof(TempBuffer),
- 0, 0);
- if (!Length)
- {
- ASSERT("WideCharToMultiByte failed. Error is %d\n",
- GetLastError());
- PERF_EXIT(vfprintf);
- va_end(ap);
- return -1;
- }
- TempBuffer[Length] = 0;
-
- /* do the padding (if needed)*/
- paddingReturnValue =
- Internal_AddPaddingVfprintf(pthrCurrent, stream, TempBuffer,
- Width - Length, Flags);
- if (-1 == paddingReturnValue)
- {
- ERROR("Internal_AddPaddingVfprintf failed\n");
- PERF_EXIT(vfprintf);
- va_end(ap);
- return -1;
- }
- written += paddingReturnValue;
-
- }
- /* this places the number of bytes written to the buffer in the
- next arg */
- else if (Type == PFF_TYPE_N)
- {
- if (WIDTH_STAR == Width)
- {
- Width = va_arg(ap, INT);
- }
- if (PRECISION_STAR == Precision)
- {
- Precision = va_arg(ap, INT);
- }
-
- if (Prefix == PFF_PREFIX_SHORT)
- {
- *(va_arg(ap, short *)) = written;
- }
- else
- {
- *(va_arg(ap, LPLONG)) = written;
- }
- }
- else if (Type == PFF_TYPE_CHAR && (Flags & PFF_ZERO) != 0)
- {
- // Some versions of fprintf don't support 0-padded chars,
- // so we handle them here.
- char ch[2];
-
- ch[0] = (char) va_arg(ap, int);
- ch[1] = '\0';
- Length = 1;
- paddingReturnValue = Internal_AddPaddingVfprintf(
- pthrCurrent,
- stream,
- ch,
- Width - Length,
- Flags);
- if (-1 == paddingReturnValue)
- {
- ERROR("Internal_AddPaddingVfprintf failed\n");
- PERF_EXIT(vfprintf);
- va_end(ap);
- return -1;
- }
- written += paddingReturnValue;
- }
- else if (Type == PFF_TYPE_STRING && (Flags & PFF_ZERO) != 0)
- {
- // Some versions of fprintf don't support 0-padded strings,
- // so we handle them here.
- const char *tempStr;
-
- tempStr = va_arg(ap, char *);
- if (tempStr == NULL)
- {
- tempStr = __nullstring;
- }
- Length = strlen(tempStr);
- paddingReturnValue = Internal_AddPaddingVfprintf(
- pthrCurrent,
- stream,
- tempStr,
- Width - Length,
- Flags);
- if (-1 == paddingReturnValue)
- {
- ERROR("Internal_AddPaddingVfprintf failed\n");
- PERF_EXIT(vfprintf);
- va_end(ap);
- return -1;
- }
- written += paddingReturnValue;
- }
- else
- {
- // Types that fprintf can handle.
- TempInt = 0;
-
- // %h (short) doesn't seem to be handled properly by local sprintf,
- // so we do the truncation ourselves for some cases.
- if (Type == PFF_TYPE_P && Prefix == PFF_PREFIX_SHORT)
- {
- // Convert from pointer -> int -> short to avoid warnings.
- long trunc1;
- short trunc2;
-
- trunc1 = va_arg(ap, LONG);
- trunc2 = (short)trunc1;
- trunc1 = trunc2;
-
- TempInt = fprintf(stream->bsdFilePtr, TempBuff, trunc1);
- }
- else if (Type == PFF_TYPE_INT && Prefix == PFF_PREFIX_SHORT)
- {
- // Convert explicitly from int to short to get
- // correct sign extension for shorts on all systems.
- int n;
- short s;
-
- n = va_arg(ap, int);
- s = (short) n;
-
- TempInt = fprintf( stream->bsdFilePtr, TempBuff, s);
- }
- else
- {
- va_list apcopy;
- va_copy(apcopy, ap);
- TempInt = vfprintf(stream->bsdFilePtr, TempBuff, apcopy);
- va_end(apcopy);
- PAL_printf_arg_remover(&ap, Width, Precision, Type, Prefix);
- }
-
- if (-1 == TempInt)
- {
- ERROR("vfprintf returned an error\n");
- }
- else
- {
- written += TempInt;
- }
- }
- }
- else
- {
-
-#if FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL
- clearerr (stream->bsdFilePtr);
-#endif
-
- InternalFwrite(Fmt++, 1, 1, stream->bsdFilePtr, &stream->PALferrorCode); /* copy regular chars into buffer */
- if (stream->PALferrorCode == PAL_FILE_ERROR)
- {
- ERROR("fwrite() failed with errno == %d\n", errno);
- PERF_EXIT(vfprintf);
- va_end(ap);
- return -1;
- }
- ++written;
- }
- }
-
- va_end(ap);
-
- PERF_EXIT(vfprintf);
- return written;
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- silent_printf.c
-
-Abstract:
-
- Implementation of a silent version of PAL_vsprintf and PAL_vfprintf function.
- (without any reference to TRACE/ERROR/... macros, needed by the tracing macros)
-
-Revision History:
-
-
-
---*/
-
-
-#include "pal/palinternal.h"
-#include "pal/cruntime.h"
-#include "pal/printfcpp.hpp"
-#include "pal/thread.hpp"
-
-/* clip strings (%s, %S) at this number of characters */
-#define MAX_STR_LEN 300
-
-static int Silent_WideCharToMultiByte(LPCWSTR lpWideCharStr, int cchWideChar,
- LPSTR lpMultiByteStr, int cbMultiByte);
-static BOOL Silent_ExtractFormatA(LPCSTR *Fmt, LPSTR Out, LPINT Flags, LPINT Width,
- LPINT Precision, LPINT Prefix, LPINT Type);
-static INT Silent_AddPaddingVfprintf(PAL_FILE *stream, LPSTR In, INT Padding,
- INT Flags);
-
-static size_t Silent_PAL_wcslen(const wchar_16 *string);
-
-/*++
-Function:
- PAL_vfprintf (silent version)
-
- for more details, see PAL_vfprintf in printf.c
---*/
-int Silent_PAL_vfprintf(PAL_FILE *stream, const char *format, va_list aparg)
-{
- CHAR TempBuff[1024]; /* used to hold a single %<foo> format string */
- LPCSTR Fmt = format;
- LPWSTR TempWStr;
- LPSTR TempStr;
- WCHAR TempWChar;
- INT Flags;
- INT Width;
- INT Precision;
- INT Prefix;
- INT Type;
- INT Length;
- INT TempInt;
- int wctombResult;
- int written = 0;
- int paddingReturnValue;
- va_list ap;
-
- va_copy(ap, aparg);
-
- while (*Fmt)
- {
- if (*Fmt == '%' &&
- TRUE == Silent_ExtractFormatA(&Fmt, TempBuff, &Flags, &Width,
- &Precision, &Prefix, &Type))
- {
- if (Prefix == PFF_PREFIX_LONG && Type == PFF_TYPE_STRING)
- {
- if (WIDTH_STAR == Width)
- {
- Width = va_arg(ap, INT);
- }
- else if (WIDTH_INVALID == Width)
- {
- /* both a '*' and a number, ignore, but remove arg */
- TempInt = va_arg(ap, INT); /* value not used */
- }
-
- if (PRECISION_STAR == Precision)
- {
- Precision = va_arg(ap, INT);
- }
- else if (PRECISION_INVALID == Precision)
- {
- /* both a '*' and a number, ignore, but remove arg */
- TempInt = va_arg(ap, INT); /* value not used */
- }
-
- TempWStr = va_arg(ap, LPWSTR);
- Length = Silent_WideCharToMultiByte(TempWStr, -1, 0, 0);
- if (!Length)
- {
- va_end(ap);
- return -1;
- }
- TempStr = (LPSTR) PAL_malloc(Length);
- if (!TempStr)
- {
- va_end(ap);
- return -1;
- }
- if (PRECISION_DOT == Precision)
- {
- /* copy nothing */
- *TempStr = 0;
- Length = 0;
- }
- else if (Precision > 0 && Precision < Length - 1)
- {
- Length = Silent_WideCharToMultiByte(TempWStr, Precision,
- TempStr, Length);
- if (!Length)
- {
- PAL_free(TempStr);
- va_end(ap);
- return -1;
- }
- TempStr[Length] = 0;
- Length = Precision;
- }
- /* copy everything */
- else
- {
- wctombResult = Silent_WideCharToMultiByte(TempWStr, -1,
- TempStr, Length);
- if (!wctombResult)
- {
- PAL_free(TempStr);
- va_end(ap);
- return -1;
- }
- --Length; /* exclude null char */
- }
-
- /* do the padding (if needed)*/
- paddingReturnValue =
- Silent_AddPaddingVfprintf(stream, TempStr, Width - Length, Flags);
- if (-1 == paddingReturnValue)
- {
- PAL_free(TempStr);
- va_end(ap);
- return -1;
- }
- written += paddingReturnValue;
-
- PAL_free(TempStr);
- }
- else if (Prefix == PFF_PREFIX_LONG && Type == PFF_TYPE_CHAR)
- {
- CHAR TempBuffer[4];
- if (WIDTH_STAR == Width ||
- WIDTH_INVALID == Width)
- {
- /* ignore (because it's a char), and remove arg */
- TempInt = va_arg(ap, INT); /* value not used */
- }
- if (PRECISION_STAR == Precision ||
- PRECISION_INVALID == Precision)
- {
- /* ignore (because it's a char), and remove arg */
- TempInt = va_arg(ap, INT); /* value not used */
- }
-
- TempWChar = va_arg(ap, int);
- Length = Silent_WideCharToMultiByte(&TempWChar, 1, TempBuffer, 4);
- if (!Length)
- {
- va_end(ap);
- return -1;
- }
- TempBuffer[Length] = 0;
-
- /* do the padding (if needed)*/
- paddingReturnValue =
- Silent_AddPaddingVfprintf(stream, TempBuffer,
- Width - Length, Flags);
- if (-1 == paddingReturnValue)
- {
- va_end(ap);
- return -1;
- }
- written += paddingReturnValue;
-
- }
- /* this places the number of bytes written to the buffer in the
- next arg */
- else if (Type == PFF_TYPE_N)
- {
- if (WIDTH_STAR == Width)
- {
- Width = va_arg(ap, INT);
- }
- if (PRECISION_STAR == Precision)
- {
- Precision = va_arg(ap, INT);
- }
-
- if (Prefix == PFF_PREFIX_SHORT)
- {
- *(va_arg(ap, short *)) = written;
- }
- else
- {
- *(va_arg(ap, LPLONG)) = written;
- }
- }
- /* types that sprintf can handle */
- else
- {
- TempInt = 0;
-
- /* %h (short) doesn't seem to be handled properly by local sprintf,
- so lets do the truncation ourselves. (ptr -> int -> short to avoid
- warnings */
- if (Type == PFF_TYPE_P && Prefix == PFF_PREFIX_SHORT)
- {
- long trunc1;
- short trunc2;
-
- trunc1 = va_arg(ap, LONG);
- trunc2 = (short)trunc1;
-
- TempInt = fprintf((FILE*)stream, TempBuff, trunc2);
- }
- else if (Type == PFF_TYPE_INT && Prefix == PFF_PREFIX_SHORT)
- {
- // Convert explicitly from int to short to get
- // correct sign extension for shorts on all systems.
- int n;
- short s;
-
- n = va_arg(ap, int);
- s = (short)n;
-
- TempInt = fprintf((FILE*)stream, TempBuff, s);
- }
- else
- {
- va_list apcopy;
- va_copy(apcopy, ap);
- TempInt = PAL_vfprintf(stream, TempBuff, apcopy);
- va_end(apcopy);
- PAL_printf_arg_remover(&ap, Width, Precision, Type, Prefix);
- }
-
- if (-1 != TempInt)
- {
- written += TempInt;
- }
- }
- }
- else
- {
-#if FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL
- clearerr((FILE*)stream);
-#endif
-
- PAL_fwrite(Fmt++, 1, 1, stream); /* copy regular chars into buffer */
- if (stream->PALferrorCode == PAL_FILE_ERROR)
- {
- va_end(ap);
- return -1;
- }
- ++written;
- }
- }
-
- va_end(ap);
- return written;
-}
-
-/*++
-Function:
- WideCharToMultiByte (reduced and silent version)
-
-See MSDN doc.
---*/
-int Silent_WideCharToMultiByte(LPCWSTR lpWideCharStr, int cchWideChar,
- LPSTR lpMultiByteStr, int cbMultiByte)
-{
- INT retval =0;
-
- if ((lpWideCharStr == NULL)||
- (lpWideCharStr == (LPCWSTR) lpMultiByteStr))
- {
- goto EXIT;
- }
-
- if (cchWideChar == -1)
- {
- cchWideChar = Silent_PAL_wcslen(lpWideCharStr) + 1;
- }
-
- if (cbMultiByte == 0)
- {
- retval = cchWideChar;
- goto EXIT;
- }
- else if(cbMultiByte < cchWideChar)
- {
- retval = 0;
- goto EXIT;
- }
-
- retval = cchWideChar;
- while(cchWideChar > 0)
- {
- if(*lpWideCharStr > 255)
- {
- *lpMultiByteStr = '?';
- }
- else
- {
- *lpMultiByteStr = (unsigned char)*lpWideCharStr;
- }
- lpMultiByteStr++;
- lpWideCharStr++;
- cchWideChar--;
- }
-
-EXIT:
- return retval;
-}
-
-/*******************************************************************************
-Function:
- Internal_ExtractFormatA (silent version)
-
- see Internal_ExtractFormatA function in printf.c
-*******************************************************************************/
-BOOL Silent_ExtractFormatA(LPCSTR *Fmt, LPSTR Out, LPINT Flags, LPINT Width, LPINT Precision, LPINT Prefix, LPINT Type)
-{
- BOOL Result = FALSE;
- LPSTR TempStr;
- LPSTR TempStrPtr;
-
- *Width = WIDTH_DEFAULT;
- *Precision = PRECISION_DEFAULT;
- *Flags = PFF_NONE;
- *Prefix = PFF_PREFIX_DEFAULT;
- *Type = PFF_TYPE_DEFAULT;
-
- if (*Fmt && **Fmt == '%')
- {
- *Out++ = *(*Fmt)++;
- }
- else
- {
- return Result;
- }
-
- /* we'll never need a temp string longer than the original */
- TempStrPtr = TempStr = (LPSTR) PAL_malloc(strlen(*Fmt)+1);
- if (!TempStr)
- {
- return Result;
- }
-
- /* parse flags */
- while (**Fmt && (**Fmt == '-' || **Fmt == '+' ||
- **Fmt == '0' || **Fmt == ' ' || **Fmt == '#'))
- {
- switch (**Fmt)
- {
- case '-':
- *Flags |= PFF_MINUS; break;
- case '+':
- *Flags |= PFF_PLUS; break;
- case '0':
- *Flags |= PFF_ZERO; break;
- case ' ':
- *Flags |= PFF_SPACE; break;
- case '#':
- *Flags |= PFF_POUND; break;
- }
- *Out++ = *(*Fmt)++;
- }
- /* '-' flag negates '0' flag */
- if ((*Flags & PFF_MINUS) && (*Flags & PFF_ZERO))
- {
- *Flags -= PFF_ZERO;
- }
-
- /* grab width specifier */
- if (isdigit((unsigned char) **Fmt))
- {
- TempStrPtr = TempStr;
- while (isdigit((unsigned char) **Fmt))
- {
- *TempStrPtr++ = **Fmt;
- *Out++ = *(*Fmt)++;
- }
- *TempStrPtr = 0; /* end string */
- *Width = atoi(TempStr);
- if (*Width < 0)
- {
- SetLastError(ERROR_INTERNAL_ERROR);
- goto EXIT;
- }
- }
- else if (**Fmt == '*')
- {
- *Width = WIDTH_STAR;
- *Out++ = *(*Fmt)++;
- if (isdigit((unsigned char) **Fmt))
- {
- /* this is an invalid width because we have a * then a number */
- /* printf handles this by just printing the whole string */
- *Width = WIDTH_INVALID;
- while (isdigit((unsigned char) **Fmt))
- {
- *Out++ = *(*Fmt)++;
- }
- }
- }
-
-
- /* grab precision specifier */
- if (**Fmt == '.')
- {
- *Out++ = *(*Fmt)++;
- if (isdigit((unsigned char) **Fmt))
- {
- TempStrPtr = TempStr;
- while (isdigit((unsigned char) **Fmt))
- {
- *TempStrPtr++ = **Fmt;
- *Out++ = *(*Fmt)++;
- }
- *TempStrPtr = 0; /* end string */
- *Precision = atoi(TempStr);
- if (*Precision < 0)
- {
- SetLastError(ERROR_INTERNAL_ERROR);
- goto EXIT;
- }
- }
- else if (**Fmt == '*')
- {
- *Precision = PRECISION_STAR;
- *Out++ = *(*Fmt)++;
- if (isdigit((unsigned char) **Fmt))
- {
- /* this is an invalid precision because we have a .* then a
- number */
- /* printf handles this by just printing the whole string */
- *Precision = PRECISION_INVALID;
- while (isdigit((unsigned char) **Fmt))
- {
- *Out++ = *(*Fmt)++;
- }
- }
- }
- else
- {
- *Precision = PRECISION_DOT;
- }
- }
-
-#ifdef HOST_64BIT
- if (**Fmt == 'p')
- {
- *Prefix = PFF_PREFIX_LONGLONG;
- }
-#endif
- /* grab prefix of 'I64' for __int64 */
- if ((*Fmt)[0] == 'I' && (*Fmt)[1] == '6' && (*Fmt)[2] == '4')
- {
- /* convert to 'll' so BSD's snprintf can handle it */
- *Fmt += 3;
- *Prefix = PFF_PREFIX_LONGLONG;
- }
- /* grab a prefix of 'h' */
- else if (**Fmt == 'h')
- {
- *Prefix = PFF_PREFIX_SHORT;
- ++(*Fmt);
- }
- /* grab prefix of 'l' or the undocumented 'w' (at least in MSDN) */
- else if (**Fmt == 'l' || **Fmt == 'w')
- {
- ++(*Fmt);
-#ifdef HOST_64BIT
- // Only want to change the prefix on 64 bit when printing characters.
- if (**Fmt == 'c' || **Fmt == 's')
-#endif
- {
- *Prefix = PFF_PREFIX_LONG;
- }
- }
- else if (**Fmt == 'L')
- {
- /* a prefix of 'L' seems to be ignored */
- ++(*Fmt);
- }
-
- /* grab type 'c' */
- if (**Fmt == 'c' || **Fmt == 'C')
- {
- *Type = PFF_TYPE_CHAR;
- if (*Prefix != PFF_PREFIX_SHORT && **Fmt == 'C')
- {
- *Prefix = PFF_PREFIX_LONG; /* give it a wide prefix */
- }
- if (*Prefix == PFF_PREFIX_LONG)
- {
- *Out++ = 'l';
- }
- *Out++ = 'c';
- ++(*Fmt);
- Result = TRUE;
- }
- /* grab type 's' */
- else if (**Fmt == 's' || **Fmt == 'S')
- {
- *Type = PFF_TYPE_STRING;
- if (*Prefix != PFF_PREFIX_SHORT && **Fmt == 'S')
- {
- *Prefix = PFF_PREFIX_LONG; /* give it a wide prefix */
- }
- if (*Prefix == PFF_PREFIX_LONG)
- {
- *Out++ = 'l';
- }
- *Out++ = 's';
- ++(*Fmt);
- Result = TRUE;
- }
- /* grab int types types */
- else if (**Fmt == 'd' || **Fmt == 'i' || **Fmt == 'o' ||
- **Fmt == 'u' || **Fmt == 'x' || **Fmt == 'X')
- {
- *Type = PFF_TYPE_INT;
- if (*Prefix == PFF_PREFIX_SHORT)
- {
- *Out++ = 'h';
- }
- else if (*Prefix == PFF_PREFIX_LONG)
- {
- *Out++ = 'l';
- }
- else if (*Prefix == PFF_PREFIX_LONGLONG)
- {
- *Out++ = 'l';
- *Out++ = 'l';
- }
- *Out++ = *(*Fmt)++;
- Result = TRUE;
- }
- else if (**Fmt == 'e' || **Fmt == 'E' || **Fmt == 'f' ||
- **Fmt == 'g' || **Fmt == 'G')
- {
- /* we can safely ignore the prefixes and only add the type*/
- *Type = PFF_TYPE_FLOAT;
- *Out++ = *(*Fmt)++;
- Result = TRUE;
- }
- else if (**Fmt == 'n')
- {
- if (*Prefix == PFF_PREFIX_SHORT)
- {
- *Out++ = 'h';
- }
- *Out++ = *(*Fmt)++;
- *Type = PFF_TYPE_N;
- Result = TRUE;
- }
- else if (**Fmt == 'p')
- {
- *Type = PFF_TYPE_P;
- *Out++ = *(*Fmt)++;
-
- if (*Prefix == PFF_PREFIX_LONGLONG)
- {
- if (*Precision == PRECISION_DEFAULT)
- {
- *Precision = 16;
- }
- }
- else
- {
- if (*Precision == PRECISION_DEFAULT)
- {
- *Precision = 8;
- }
- }
- Result = TRUE;
- }
-
- *Out = 0; /* end the string */
-
-EXIT:
- PAL_free(TempStr);
- return Result;
-}
-
-/*******************************************************************************
-Function:
- AddPaddingVfprintf (silent version)
- see Internal_AddPaddingVfprintf in printf.c
-*******************************************************************************/
-INT Silent_AddPaddingVfprintf(PAL_FILE *stream, LPSTR In, INT Padding, INT Flags)
-{
- LPSTR Out;
- INT LengthInStr;
- INT Length;
- LPSTR OutOriginal;
- INT Written;
-
- LengthInStr = strlen(In);
- Length = LengthInStr;
-
-
- if (Padding > 0)
- {
- Length += Padding;
- }
- Out = (LPSTR) PAL_malloc(Length+1);
- int iLen = Length+1;
- if (!Out)
- {
- return -1;
- }
- OutOriginal = Out;
-
- if (Flags & PFF_MINUS) /* pad on right */
- {
- if (strcpy_s(Out, iLen, In) != SAFECRT_SUCCESS)
- {
- Written = -1;
- goto Done;
- }
-
- Out += LengthInStr;
- iLen -= LengthInStr;
- }
- if (Padding > 0)
- {
- iLen -= Padding;
- if (Flags & PFF_ZERO) /* '0', pad with zeros */
- {
- while (Padding--)
- {
- *Out++ = '0';
- }
- }
- else /* pad with spaces */
- {
- while (Padding--)
- {
- *Out++ = ' ';
- }
- }
- }
- if (!(Flags & PFF_MINUS)) /* put 'In' after padding */
- {
- if (strcpy_s(Out, Length+1, In) != SAFECRT_SUCCESS)
- {
- Written = -1;
- goto Done;
- }
-
- Out += LengthInStr;
- iLen -= LengthInStr;
- }
-
-#if FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL
- clearerr((FILE*)stream);
-#endif
-
- Written = PAL_fwrite(OutOriginal, 1, Length, stream);
- if (stream->PALferrorCode == PAL_FILE_ERROR)
- {
- Written = -1;
- }
-
-Done:
- PAL_free(OutOriginal);
- return Written;
-}
-
-/*++
-Function:
- PAL_wcslen (silent version)
-
-See MSDN or the man page for wcslen.
-
---*/
-size_t Silent_PAL_wcslen(const wchar_16 *string)
-{
- size_t nChar = 0;
-
- if ( !string )
- {
- return 0;
- }
- while (*string++)
- {
- nChar++;
- }
-
- return nChar;
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- string.cpp
-
-Abstract:
-
- Implementation of the string functions in the C runtime library that are Windows specific.
-
-
-
---*/
-
-#include "pal/palinternal.h"
-#include "pal/dbgmsg.h"
-#include "pal/cruntime.h"
-
-#include <string.h>
-#include <ctype.h>
-#include <pthread.h>
-#include <errno.h>
-#include <limits.h>
-#include <unistd.h>
-
-
-SET_DEFAULT_DEBUG_CHANNEL(CRT);
-
-/*++
-Function:
- _strnicmp
-
-compare at most count characters from two strings, ignoring case
-
-The strnicmp() function compares, with case insensitivity, at most count
-characters from s1 to s2. All uppercase characters from s1 and s2 are
-mapped to lowercase for the purposes of doing the comparison.
-
-Returns:
-
-Value Meaning
-
-< 0 s1 is less than s2
-0 s1 is equal to s2
-> 0 s1 is greater than s2
-
---*/
-int
-__cdecl
-_strnicmp( const char *s1, const char *s2, size_t count )
-{
- int ret;
-
- PERF_ENTRY(_strnicmp);
- ENTRY("_strnicmp (s1=%p (%s), s2=%p (%s), count=%d)\n", s1?s1:"NULL", s1?s1:"NULL", s2?s2:"NULL", s2?s2:"NULL", count);
-
- ret = strncasecmp(s1, s2, count );
-
- LOGEXIT("_strnicmp returning int %d\n", ret);
- PERF_EXIT(_strnicmp);
- return ret;
-}
-
-/*++
-Function:
- _stricmp
-
-compare two strings, ignoring case
-
-The stricmp() function compares, with case insensitivity, the string
-pointed to by s1 to the string pointed to by s2. All uppercase
-characters from s1 and s2 are mapped to lowercase for the purposes of
-doing the comparison.
-
-Returns:
-
-Value Meaning
-
-< 0 s1 is less than s2
-0 s1 is equal to s2
-> 0 s1 is greater than s2
-
---*/
-int
-__cdecl
-_stricmp(
- const char *s1,
- const char *s2)
-{
- int ret;
-
- PERF_ENTRY(_stricmp);
- ENTRY("_stricmp (s1=%p (%s), s2=%p (%s))\n", s1?s1:"NULL", s1?s1:"NULL", s2?s2:"NULL", s2?s2:"NULL");
-
- ret = strcasecmp(s1, s2);
-
- LOGEXIT("_stricmp returning int %d\n", ret);
- PERF_EXIT(_stricmp);
- return ret;
-}
-
-
-/*++
-Function:
- PAL_strtoul
-
-Convert string to an unsigned long-integer value.
-
-Return Value
-
-strtoul returns the converted value, if any, or UINT32_MAX on
-overflow. It returns 0 if no conversion can be performed. errno is
-set to ERANGE if overflow or underflow occurs.
-
-Parameters
-
-szNumber Null-terminated string to convert to a ULONG
-pszEnd Pointer to character that stops scan
-nBase Number base to use
-
-Remarks
-
-strtoul stops reading the string szNumber at the first character it cannot
-recognize as part of a number. This may be the terminating null
-character, or it may be the first numeric character greater than or
-equal to base. The LC_NUMERIC category setting of the current locale
-determines recognition of the radix character in szNumber; for more
-information, see setlocale. If pszEnd is not NULL, a pointer to the
-character that stopped the scan is stored at the location pointed to
-by pszEnd. If no conversion can be performed (no valid digits were
-found or an invalid base was specified), the value of szNumber is stored
-at the location pointed to by pszEnd.
-
-Notes :
- MSDN states that only space and tab are accepted as leading whitespace, but
- tests indicate that other whitespace characters (newline, carriage return,
- etc) are also accepted. This matches the behavior on Unix systems.
-
- For strtoul, we need to check if the value to be returned
- is outside the 32 bit range. If so, the returned value needs to be set
- as appropriate, according to the MSDN pages and in all instances errno
- must be set to ERANGE (The one exception is converting a string
- representing a negative value to unsigned long).
- Note that on 64 bit Windows, long's are still 32 bit. Thus, to match
- Windows behavior, we must return long's in the 32 bit range.
- --*/
-
-/* The use of ULONG is by design, to ensure that a 32 bit value is always
-returned from this function. If "unsigned long" is used instead of ULONG,
-then a 64 bit value could be returned on 64 bit platforms like HP-UX, thus
-breaking Windows behavior. */
-ULONG
-__cdecl
-PAL_strtoul(const char *szNumber, char **pszEnd, int nBase)
-{
- unsigned long ulResult;
-
- PERF_ENTRY(strtoul);
- ENTRY("strtoul (szNumber=%p (%s), pszEnd=%p, nBase=%d)\n",
- szNumber?szNumber:"NULL",
- szNumber?szNumber:"NULL",
- pszEnd,
- nBase);
-
- ulResult = strtoul(szNumber, pszEnd, nBase);
-
-#ifdef HOST_64BIT
- if (ulResult > UINT32_MAX)
- {
- char ch = *szNumber;
- while (isspace(ch))
- {
- ch = *szNumber++;
- }
- /* If the string represents a positive number that is greater than
- _UI32_MAX, set errno to ERANGE. Otherwise, don't set errno
- to match Windows behavior. */
- if (ch != '-')
- {
- ulResult = UINT32_MAX;
- errno = ERANGE;
- }
- }
-#endif
-
- LOGEXIT("strtoul returning unsigned long %lu\n", ulResult);
- PERF_EXIT(wcstoul);
-
- /* When returning unsigned long res from this function, it will be
- implicitly cast to ULONG. This handles situations where a string that
- represents a negative number is passed in to strtoul. The Windows
- behavior is analogous to taking the binary equivalent of the negative
- value and treating it as a positive number. Returning a ULONG from
- this function, as opposed to native unsigned long, allows us to match
- this behavior. The explicit cast to ULONG below is used to silence any
- potential warnings due to the implicit casting. */
- return (ULONG)ulResult;
-
-}
-
-/*++
-Function:
- PAL_strtoull
-
-Convert string to an unsigned long long-integer value.
-
-Return Value
-
-strtoull returns the converted value, if any, or UINT64_MAX on
-overflow. It returns 0 if no conversion can be performed. errno is
-set to ERANGE if overflow or underflow occurs.
-
-Parameters
-
-szNumber Null-terminated string to convert to a ULONGLONG
-pszEnd Pointer to character that stops scan
-nBase Number base to use
-
-Remarks
-
-strtoull stops reading the string szNumber at the first character it cannot
-recognize as part of a number. This may be the terminating null
-character, or it may be the first numeric character greater than or
-equal to base. The LC_NUMERIC category setting of the current locale
-determines recognition of the radix character in szNumber; for more
-information, see setlocale. If pszEnd is not NULL, a pointer to the
-character that stopped the scan is stored at the location pointed to
-by pszEnd. If no conversion can be performed (no valid digits were
-found or an invalid base was specified), the value of szNumber is stored
-at the location pointed to by pszEnd.
-
-Notes :
- MSDN states that only space and tab are accepted as leading whitespace, but
- tests indicate that other whitespace characters (newline, carriage return,
- etc) are also accepted. This matches the behavior on Unix systems.
-
- For strtoull, we need to check if the value to be returned
- is outside the 64 bit range. If so, the returned value needs to be set
- as appropriate, according to the MSDN pages and in all instances errno
- must be set to ERANGE (The one exception is converting a string
- representing a negative value to unsigned long).
- --*/
-
-/* The use of ULONGLONG is by design, to ensure that a 64 bit value is always
-returned from this function. */
-ULONGLONG
-__cdecl
-PAL_strtoull(const char *szNumber, char **pszEnd, int nBase)
-{
- unsigned long long ullResult;
-
- PERF_ENTRY(strtoull);
- ENTRY("strtoull (szNumber=%p (%s), pszEnd=%p, nBase=%d)\n",
- szNumber?szNumber:"NULL",
- szNumber?szNumber:"NULL",
- pszEnd,
- nBase);
-
- ullResult = strtoull(szNumber, pszEnd, nBase);
-
- if (ullResult > UINT64_MAX)
- {
- char ch = *szNumber;
- while (isspace(ch))
- {
- ch = *szNumber++;
- }
- /* If the string represents a positive number that is greater than
- UINT64_MAX, set errno to ERANGE. Otherwise, don't set errno
- to match Windows behavior. */
- if (ch != '-')
- {
- ullResult = UINT64_MAX;
- errno = ERANGE;
- }
- }
-
- LOGEXIT("strtoull returning unsigned long long %llu\n", ullResult);
- PERF_EXIT(strtoull);
-
- /* When returning unsigned long long res from this function, it will be
- implicitly cast to ULONGLONG. This handles situations where a string that
- represents a negative number is passed in to strtoull. The Windows
- behavior is analogous to taking the binary equivalent of the negative
- value and treating it as a positive number. Returning a ULONGLONG from
- this function, as opposed to native unsigned long long, allows us to match
- this behavior. The explicit cast to ULONGLONG below is used to silence any
- potential warnings due to the implicit casting. */
- return (ULONGLONG)ullResult;
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- stringtls.cpp
-
-Abstract:
-
- Implementation of the string functions in the C runtime library that
- are Windows specific and depend on per-thread data
-
-
-
---*/
-
-#include "pal/thread.hpp"
-#include "pal/dbgmsg.h"
-
-#include <string.h>
-#include <ctype.h>
-#include <pthread.h>
-#include <limits.h>
-#include <unistd.h>
-
-using namespace CorUnix;
-
-SET_DEFAULT_DEBUG_CHANNEL(CRT);
-
-/*++
-Function:
- PAL_strtok
-
-Finds the next token in a string.
-
-Return value:
-
-A pointer to the next token found in strToken. Returns NULL when no more
-tokens are found. Each call modifies strToken by substituting a NULL
-character for each delimiter that is encountered.
-
-Parameters:
-strToken String cotaining token(s)
-strDelimit Set of delimiter characters
-
-Remarks:
-In FreeBSD, strtok is not re-entrant, strtok_r is. It manages re-entrancy
-by using a passed-in context pointer (which will be stored in thread local
-storage) According to the strtok MSDN documentation, "Calling these functions
-simultaneously from multiple threads does not have undesirable effects", so
-we need to use strtok_r.
---*/
-char *
-__cdecl
-PAL_strtok(char *strToken, const char *strDelimit)
-{
- CPalThread *pThread = NULL;
- char *retval=NULL;
-
- PERF_ENTRY(strtok);
- ENTRY("strtok (strToken=%p (%s), strDelimit=%p (%s))\n",
- strToken?strToken:"NULL",
- strToken?strToken:"NULL", strDelimit?strDelimit:"NULL", strDelimit?strDelimit:"NULL");
-
- pThread = InternalGetCurrentThread();
-
- retval = strtok_r(strToken, strDelimit, &pThread->crtInfo.strtokContext);
-
- LOGEXIT("strtok returns %p (%s)\n", retval?retval:"NULL", retval?retval:"NULL");
- PERF_EXIT(strtok);
-
- return retval;
-}
#include "config.h"
#endif
-#include <wctype.h>
#include <errno.h>
#include <algorithm>
GetLastError());
return -1;
}
- tempStr = (char *) PAL_malloc(len);
+ tempStr = (char *) malloc(len);
if (!tempStr)
{
- ERROR("PAL_malloc failed\n");
+ ERROR("malloc failed\n");
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
return -1;
}
{
ASSERT("WideCharToMultiByte failed. Error is %d\n",
GetLastError());
- PAL_free(tempStr);
+ free(tempStr);
return -1;
}
ret = atoi(tempStr);
- PAL_free(tempStr);
+ free(tempStr);
LOGEXIT("_wtoi returns int %d\n", ret);
PERF_EXIT(_wtoi);
return ret;
Remarks
-The _strnicmp function lexicographically compares, at most, the first
+The _wcsnicmp function lexicographically compares, at most, the first
count characters of string1 and string2. The comparison is performed
-without regard to case; _strnicmp is a case-insensitive version of
+without regard to case; _wcsnicmp is a case-insensitive version of
strncmp. The comparison ends if a terminating null character is
reached in either string before count characters are compared. If the
strings are equal when a terminating null character is reached in
res = 0;
goto PAL_wcstoulExit;
}
- s_nptr = (char *)PAL_malloc(size);
+ s_nptr = (char *)malloc(size);
if (!s_nptr)
{
- ERROR("PAL_malloc failed\n");
+ ERROR("malloc failed\n");
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
res = 0;
goto PAL_wcstoulExit;
}
PAL_wcstoulExit:
- PAL_free(s_nptr);
+ free(s_nptr);
LOGEXIT("wcstoul returning unsigned long %lu\n", res);
PERF_EXIT(wcstoul);
res = 0;
goto PAL__wcstoui64Exit;
}
- s_nptr = (char *)PAL_malloc(size);
+ s_nptr = (char *)malloc(size);
if (!s_nptr)
{
- ERROR("PAL_malloc failed\n");
+ ERROR("malloc failed\n");
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
res = 0;
goto PAL__wcstoui64Exit;
}
PAL__wcstoui64Exit:
- PAL_free(s_nptr);
+ free(s_nptr);
LOGEXIT("_wcstoui64 returning unsigned long long %llu\n", res);
PERF_EXIT(_wcstoui64);
if ( lpEndOfExpression != lpStartOfExpression )
{
Length = lpEndOfExpression - lpStartOfExpression;
- lpStringRep = (LPSTR)PAL_malloc( Length + 1);
+ lpStringRep = (LPSTR)malloc( Length + 1);
if ( lpStringRep )
{
*endptr = lpEndOfExpression;
}
- PAL_free( lpStringRep );
+ free( lpStringRep );
LOGEXIT( "wcstod returning %f.\n", RetVal );
PERF_EXIT(wcstod);
return RetVal;
/*++
Function:
+ _wfopen
- iswprint
-
-See MSDN for more details.
---*/
-int
-__cdecl
-PAL_iswprint( wchar_16 c )
-{
- int ret;
-
-
- PERF_ENTRY(iswprint);
- ENTRY("PAL_iswprint (%#X)\n", c);
-
- ret = iswprint(c);
-
- LOGEXIT("PAL_iswprint returns %d\n", ret);
- PERF_EXIT(iswprint);
- return (ret);
-}
-
-/*++
-Function:
-
- PAL_wcscspn
-
-Finds the number of consecutive characters from the start of the string
-that are not in the set.
-
-Return value:
-
-The number of characters from the start of the string that are not in
-the set.
-
-Parameters:
-string String
-strCharSet Set of delimiter characters
+see MSDN doc.
--*/
-size_t
+extern "C"
+FILE *
__cdecl
-PAL_wcscspn(const wchar_16 *string, const wchar_16 *strCharSet)
+_wfopen(
+ const wchar_16 *fileName,
+ const wchar_16 *mode)
{
- const wchar_16 *temp;
- size_t count = 0;
+ CHAR mbFileName[ _MAX_PATH ];
+ CHAR mbMode[ 10 ];
+ FILE * filePtr = NULL;
- PERF_ENTRY(wcscspn);
+ PERF_ENTRY(_wfopen);
+ ENTRY("_wfopen(fileName:%p (%S), mode:%p (%S))\n", fileName, fileName, mode, mode);
- while(*string != 0)
+ _ASSERTE(fileName != NULL);
+ _ASSERTE(mode != NULL);
+
+ /* Convert the parameters to ASCII and defer to PAL_fopen */
+ if ( WideCharToMultiByte( CP_ACP, 0, fileName, -1, mbFileName,
+ sizeof mbFileName, NULL, NULL ) != 0 )
{
- for(temp = strCharSet; *temp != 0; temp++)
+ if ( WideCharToMultiByte( CP_ACP, 0, mode, -1, mbMode,
+ sizeof mbMode, NULL, NULL ) != 0 )
{
- if (*string == *temp)
- {
- PERF_EXIT(wcscspn);
- return count;
- }
+ filePtr = fopen(mbFileName, mbMode);
}
- count++;
- string++;
+ else
+ {
+ ERROR( "An error occurred while converting mode to ANSI.\n" );
+ }
+ }
+ else
+ {
+ ERROR( "An error occurred while converting"
+ " fileName to ANSI string.\n" );
}
- PERF_EXIT(wcscspn);
- return count;
+ LOGEXIT("_wfopen returning FILE* %p\n", filePtr);
+ PERF_EXIT(_wfopen);
+ return filePtr;
}
#include <signal.h>
#include <unistd.h>
+#include <fcntl.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/wait.h>
}
/* strLen includes the null terminator */
- if ((lpOutputStringA = (LPSTR) InternalMalloc((strLen * sizeof(CHAR)))) == NULL)
+ if ((lpOutputStringA = (LPSTR) malloc((strLen * sizeof(CHAR)))) == NULL)
{
ERROR("Insufficient memory available !\n");
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
goto done;
}
- if (((mb_dir = (char *)PAL_malloc(mb_size)) == NULL) ||
+ if (((mb_dir = (char *)malloc(mb_size)) == NULL) ||
(WideCharToMultiByte( CP_ACP, 0, lpPathName, -1, mb_dir, mb_size, NULL,
NULL) != mb_size))
{
- ASSERT("WideCharToMultiByte or PAL_malloc failure! LastError:%d errno:%d\n",
+ ASSERT("WideCharToMultiByte or malloc failure! LastError:%d errno:%d\n",
GetLastError(), errno);
dwLastError = ERROR_INTERNAL_ERROR;
goto done;
}
if (mb_dir != NULL)
{
- PAL_free(mb_dir);
+ free(mb_dir);
}
LOGEXIT("CreateDirectoryW returns BOOL %d\n", bRet);
PERF_EXIT(CreateDirectoryW);
BOOL bRet = FALSE;
*dwLastError = 0;
- FILEDosToUnixPathA( lpPathName );
-
if ( rmdir(lpPathName) != 0 )
{
TRACE("Removal of directory [%s] was unsuccessful, errno = %d.\n",
dwDirLen = strlen( current_dir );
lpBuffer.Set(current_dir, dwDirLen);
- PAL_free(current_dir);
+ free(current_dir);
done:
if ( dwLastError )
return dwDirLen;
}
-/*++
-Function:
- GetCurrentDirectoryA
-
-See MSDN doc.
---*/
-DWORD
-PALAPI
-GetCurrentDirectoryA(
- IN DWORD nBufferLength,
- OUT LPSTR lpBuffer)
-{
-
- PathCharString lpBufferString;
- DWORD dwDirLen = GetCurrentDirectoryA(lpBufferString);
-
- /* if the supplied buffer isn't long enough, return the required
- length, including room for the NULL terminator */
- if ( nBufferLength <= dwDirLen )
- {
- ++dwDirLen; /* include space for the NULL */
- }
- else
- {
- strcpy_s( lpBuffer, nBufferLength, lpBufferString );
- }
-
- return dwDirLen;
-}
-
-/*++
-Function:
- GetCurrentDirectoryW
-
-See MSDN doc.
---*/
-DWORD
-PALAPI
-GetCurrentDirectoryW(
- IN DWORD nBufferLength,
- OUT LPWSTR lpBuffer)
-{
- DWORD dwWideLen = 0;
- DWORD dwLastError = ERROR_BAD_PATHNAME;
- int dir_len;
- PathCharString current_dir;
-
- PERF_ENTRY(GetCurrentDirectoryW);
- ENTRY("GetCurrentDirectoryW(nBufferLength=%u, lpBuffer=%p)\n",
- nBufferLength, lpBuffer);
-
-
- dir_len = GetCurrentDirectoryA(current_dir);
-
- if( dir_len == 0)
- {
- dwLastError = DIRGetLastErrorFromErrno();
- goto done;
- }
-
- dwWideLen = MultiByteToWideChar( CP_ACP, 0,
- current_dir, dir_len,
- NULL, 0 );
-
- /* if the supplied buffer isn't long enough, return the required
- length, including room for the NULL terminator */
- if ( nBufferLength > dwWideLen )
- {
- if(!MultiByteToWideChar( CP_ACP, 0, current_dir, dir_len + 1,
- lpBuffer, nBufferLength ))
- {
- ASSERT("MultiByteToWideChar failure!\n");
- dwWideLen = 0;
- dwLastError = ERROR_INTERNAL_ERROR;
- }
- }
- else
- {
- ++dwWideLen; /* include the space for the NULL */
- }
-
-done:
-
- if ( dwLastError )
- {
- SetLastError(dwLastError);
- }
-
- LOGEXIT("GetCurrentDirectoryW returns DWORD %u\n", dwWideLen);
- PERF_EXIT(GetCurrentDirectoryW);
- return dwWideLen;
-}
-
-
/*++
Function:
SetCurrentDirectoryW
goto done;
}
- unixPathName = PAL__strdup(lpPathName);
+ unixPathName = strdup(lpPathName);
if (unixPathName == NULL )
{
- ERROR("PAL__strdup() failed\n");
+ ERROR("strdup() failed\n");
dwLastError = ERROR_NOT_ENOUGH_MEMORY;
goto done;
}
- FILEDosToUnixPathA( unixPathName );
// Remove any trailing slashes at the end because mkdir might not
// handle them appropriately on all platforms.
pathLength = strlen(unixPathName);
{
SetLastError( dwLastError );
}
- PAL_free( unixPathName );
+ free( unixPathName );
LOGEXIT("CreateDirectoryA returns BOOL %d\n", bRet);
PERF_EXIT(CreateDirectoryA);
return bRet;
BOOL bRet = FALSE;
DWORD dwLastError = 0;
int result;
- LPSTR unixPathName = NULL;
PERF_ENTRY(SetCurrentDirectoryA);
ENTRY("SetCurrentDirectoryA(lpPathName=%p (%s))\n",
goto done;
}
- unixPathName = PAL__strdup(lpPathName);
- if (unixPathName == NULL )
- {
- ERROR("PAL__strdup() failed\n");
- dwLastError = ERROR_NOT_ENOUGH_MEMORY;
- goto done;
- }
- FILEDosToUnixPathA( unixPathName );
-
- TRACE("Attempting to open Unix dir [%s]\n", unixPathName);
- result = chdir(unixPathName);
+ TRACE("Attempting to open Unix dir [%s]\n", lpPathName);
+ result = chdir(lpPathName);
if ( result == 0 )
{
{
struct stat stat_data;
- if ( stat( unixPathName, &stat_data) == 0 &&
+ if ( stat( lpPathName, &stat_data) == 0 &&
(stat_data.st_mode & S_IFMT) == S_IFREG )
{
/* Not a directory, it is a file. */
}
else
{
- FILEGetProperNotFoundError( unixPathName, &dwLastError );
+ FILEGetProperNotFoundError( lpPathName, &dwLastError );
}
TRACE("chdir() failed, path was invalid.\n");
}
SetLastError(dwLastError);
}
- if(unixPathName != NULL)
- {
- PAL_free( unixPathName );
- }
-
LOGEXIT("SetCurrentDirectoryA returns BOOL %d\n", bRet);
PERF_EXIT(SetCurrentDirectoryA);
return bRet;
/*++
-
-
Module Name:
file.cpp
Implementation of the file WIN API for the PAL
-
-
--*/
#include "pal/dbgmsg.h"
#include <sys/mount.h>
#include <errno.h>
#include <limits.h>
+#include <fcntl.h>
using namespace CorUnix;
// check if we are going to truncate the "/" corresponding to the
// root folder (e.g. case of "/Volumes"). If so:
//
- // 1) Set the seperator to point to the NULL terminator of the specified
+ // 1) Set the separator to point to the NULL terminator of the specified
// file/folder name.
//
// 2) Null terminate lpBuffer
goto done;
}
- FILEDosToUnixPathA( lpUnixPath );
-
// Compute the absolute pathname to the file. This pathname is used
// to determine if two file names represent the same file.
palError = InternalCanonicalizeRealPath(lpUnixPath, lpFullUnixPath);
goto done;
}
- FILEDosToUnixPathA( lpunixFileName );
-
// Compute the absolute pathname to the file. This pathname is used
// to determine if two file names represent the same file.
palError = InternalCanonicalizeRealPath(lpunixFileName, lpFullunixFileName);
return bRet;
}
-/*++
-Function:
- DeleteFileW
-
-See MSDN doc.
---*/
-BOOL
-PALAPI
-DeleteFileW(
- IN LPCWSTR lpFileName)
-{
- CPalThread *pThread;
- int size;
- PathCharString namePS;
- char * name;
- int length = 0;
- BOOL bRet = FALSE;
-
- PERF_ENTRY(DeleteFileW);
- ENTRY("DeleteFileW(lpFileName=%p (%S))\n",
- lpFileName?lpFileName:W16_NULLSTRING,
- lpFileName?lpFileName:W16_NULLSTRING);
-
- pThread = InternalGetCurrentThread();
-
- if (lpFileName != NULL)
- {
- length = (PAL_wcslen(lpFileName)+1) * MaxWCharToAcpLengthFactor;
- }
-
- name = namePS.OpenStringBuffer(length);
- if (NULL == name)
- {
- pThread->SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- goto done;
- }
-
- size = WideCharToMultiByte( CP_ACP, 0, lpFileName, -1, name, length,
- NULL, NULL );
-
- if( size == 0 )
- {
- namePS.CloseBuffer(0);
- DWORD dwLastError = GetLastError();
- ASSERT("WideCharToMultiByte failure! error is %d\n", dwLastError);
- pThread->SetLastError(ERROR_INTERNAL_ERROR);
- bRet = FALSE;
- goto done;
- }
-
- namePS.CloseBuffer(size - 1);
- bRet = DeleteFileA( name );
-
-done:
- LOGEXIT("DeleteFileW returns BOOL %d\n", bRet);
- PERF_EXIT(DeleteFileW);
- return bRet;
-}
-
-
-/*++
-Function:
- MoveFileExA
-
-See MSDN doc.
---*/
-BOOL
-PALAPI
-MoveFileExA(
- IN LPCSTR lpExistingFileName,
- IN LPCSTR lpNewFileName,
- IN DWORD dwFlags)
-{
- CPalThread *pThread;
- int result;
- PathCharString source;
- PathCharString dest;
- BOOL bRet = TRUE;
- DWORD dwLastError = 0;
-
- PERF_ENTRY(MoveFileExA);
- ENTRY("MoveFileExA(lpExistingFileName=%p (%S), lpNewFileName=%p (%S), "
- "dwFlags=%#x)\n",
- lpExistingFileName?lpExistingFileName:"NULL",
- lpExistingFileName?lpExistingFileName:"NULL",
- lpNewFileName?lpNewFileName:"NULL",
- lpNewFileName?lpNewFileName:"NULL", dwFlags);
-
- pThread = InternalGetCurrentThread();
- /* only two flags are accepted */
- if ( dwFlags & ~(MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING) )
- {
- ASSERT( "dwFlags is invalid\n" );
- dwLastError = ERROR_INVALID_PARAMETER;
- goto done;
- }
-
-
- if( !source.Set(lpExistingFileName, strlen(lpExistingFileName)))
- {
- dwLastError = ERROR_NOT_ENOUGH_MEMORY;
- goto done;
- }
-
- FILEDosToUnixPathA( source );
-
- if( !dest.Set(lpNewFileName, strlen(lpNewFileName)))
- {
- dwLastError = ERROR_NOT_ENOUGH_MEMORY;
- goto done;
- }
-
- FILEDosToUnixPathA( dest );
-
- if ( !(dwFlags & MOVEFILE_REPLACE_EXISTING) )
- {
-#if HAVE_CASE_SENSITIVE_FILESYSTEM
- if ( strcmp(source, dest) != 0 )
-#else // HAVE_CASE_SENSITIVE_FILESYSTEM
- if ( strcasecmp(source, dest) != 0 )
-#endif // HAVE_CASE_SENSITIVE_FILESYSTEM
- {
- // Let things proceed normally if source and
- // dest are the same.
- if ( access(dest, F_OK) == 0 )
- {
- dwLastError = ERROR_ALREADY_EXISTS;
- goto done;
- }
- }
- }
-
- result = rename( source, dest );
- if ((result < 0) && (dwFlags & MOVEFILE_REPLACE_EXISTING) &&
- ((errno == ENOTDIR) || (errno == EEXIST)))
- {
- bRet = DeleteFileA( lpNewFileName );
-
- if ( bRet )
- {
- result = rename( source, dest );
- }
- else
- {
- dwLastError = GetLastError();
- }
- }
-
- if ( result < 0 )
- {
- switch( errno )
- {
- case EXDEV: /* we tried to link across devices */
-
- if ( dwFlags & MOVEFILE_COPY_ALLOWED )
- {
- BOOL bFailIfExists = !(dwFlags & MOVEFILE_REPLACE_EXISTING);
-
- /* if CopyFile fails here, so should MoveFailEx */
- bRet = CopyFileA( lpExistingFileName,
- lpNewFileName,
- bFailIfExists );
- /* CopyFile should set the appropriate error */
- if ( !bRet )
- {
- dwLastError = GetLastError();
- }
- else
- {
- if (!DeleteFileA(lpExistingFileName))
- {
- ERROR("Failed to delete the source file\n");
- dwLastError = GetLastError();
-
- /* Delete the destination file if we're unable to delete
- the source file */
- if (!DeleteFileA(lpNewFileName))
- {
- ERROR("Failed to delete the destination file\n");
- }
- }
- }
- }
- else
- {
- dwLastError = ERROR_ACCESS_DENIED;
- }
- break;
- case EINVAL: // tried to rename "." or ".."
- dwLastError = ERROR_SHARING_VIOLATION;
- break;
- case ENOENT:
- {
- struct stat buf;
- if (lstat(source, &buf) == -1)
- {
- FILEGetProperNotFoundError(source, &dwLastError);
- }
- else
- {
- dwLastError = ERROR_PATH_NOT_FOUND;
- }
- }
- break;
- default:
- dwLastError = FILEGetLastErrorFromErrno();
- break;
- }
- }
-
-done:
- if ( dwLastError )
- {
- pThread->SetLastError( dwLastError );
- bRet = FALSE;
- }
-
- LOGEXIT( "MoveFileExA returns BOOL %d\n", bRet );
- PERF_EXIT(MoveFileExA);
- return bRet;
-}
-
-/*++
-Function:
- MoveFileExW
-
-See MSDN doc.
---*/
-BOOL
-PALAPI
-MoveFileExW(
- IN LPCWSTR lpExistingFileName,
- IN LPCWSTR lpNewFileName,
- IN DWORD dwFlags)
-{
- CPalThread *pThread;
- PathCharString sourcePS;
- PathCharString destPS;
- char * source;
- char * dest;
- int length = 0;
- int src_size,dest_size;
- BOOL bRet = FALSE;
-
- PERF_ENTRY(MoveFileExW);
- ENTRY("MoveFileExW(lpExistingFileName=%p (%S), lpNewFileName=%p (%S), dwFlags=%#x)\n",
- lpExistingFileName?lpExistingFileName:W16_NULLSTRING,
- lpExistingFileName?lpExistingFileName:W16_NULLSTRING,
- lpNewFileName?lpNewFileName:W16_NULLSTRING,
- lpNewFileName?lpNewFileName:W16_NULLSTRING, dwFlags);
-
- pThread = InternalGetCurrentThread();
-
- if (lpExistingFileName != NULL)
- {
- length = (PAL_wcslen(lpExistingFileName)+1) * MaxWCharToAcpLengthFactor;
- }
-
- source = sourcePS.OpenStringBuffer(length);
- if (NULL == source)
- {
- pThread->SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- goto done;
- }
- src_size = WideCharToMultiByte( CP_ACP, 0, lpExistingFileName, -1, source, length,
- NULL, NULL );
- if( src_size == 0 )
- {
- sourcePS.CloseBuffer(0);
- DWORD dwLastError = GetLastError();
- ASSERT("WideCharToMultiByte failure! error is %d\n", dwLastError);
- pThread->SetLastError(ERROR_INTERNAL_ERROR);
- goto done;
- }
-
- sourcePS.CloseBuffer(src_size - 1);
- length = 0;
- if (lpNewFileName != NULL)
- {
- length = (PAL_wcslen(lpNewFileName)+1) * MaxWCharToAcpLengthFactor;
- }
-
- dest = destPS.OpenStringBuffer(length);
- if (NULL == dest)
- {
- pThread->SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- goto done;
- }
- dest_size = WideCharToMultiByte( CP_ACP, 0, lpNewFileName, -1, dest, length,
- NULL, NULL );
-
- if( dest_size == 0 )
- {
- destPS.CloseBuffer(0);
- DWORD dwLastError = GetLastError();
- ASSERT("WideCharToMultiByte failure! error is %d\n", dwLastError);
- pThread->SetLastError(ERROR_INTERNAL_ERROR);
- goto done;
- }
-
- destPS.CloseBuffer(dest_size - 1);
- bRet = MoveFileExA(source,dest,dwFlags);
-
-done:
- LOGEXIT("MoveFileExW returns BOOL %d\n", bRet);
- PERF_EXIT(MoveFileExW);
- return bRet;
-}
/*++
Function:
struct stat stat_data;
DWORD dwAttr = 0;
DWORD dwLastError = 0;
- PathCharString unixFileName;
PERF_ENTRY(GetFileAttributesA);
ENTRY("GetFileAttributesA(lpFileName=%p (%s))\n", lpFileName?lpFileName:"NULL", lpFileName?lpFileName:"NULL");
goto done;
}
-
- if( !unixFileName.Set(lpFileName, strlen(lpFileName)))
+ if ( stat(lpFileName, &stat_data) != 0 )
{
- dwLastError = ERROR_NOT_ENOUGH_MEMORY;
- goto done;
- }
-
- FILEDosToUnixPathA( unixFileName );
-
- if ( stat(unixFileName, &stat_data) != 0 )
- {
- dwLastError = FILEGetLastErrorFromErrnoAndFilename(unixFileName);
+ dwLastError = FILEGetLastErrorFromErrnoAndFilename(lpFileName);
goto done;
}
goto done;
}
- FILEDosToUnixPathA(name);
/* do the stat */
if ( stat(name, &stat_data) != 0 )
{
return bRet;
}
+/*++
+Function:
+ SetFileAttributesA
+
+Notes:
+ Used for setting read-only attribute on file only.
+
+--*/
+BOOL
+PALAPI
+SetFileAttributesA(
+ IN LPCSTR lpFileName,
+ IN DWORD dwFileAttributes)
+{
+ CPalThread *pThread;
+ struct stat stat_data;
+ mode_t new_mode;
+
+ DWORD dwLastError = 0;
+ BOOL bRet = FALSE;
+
+ PERF_ENTRY(SetFileAttributesA);
+ ENTRY("SetFileAttributesA(lpFileName=%p (%s), dwFileAttributes=%#x)\n",
+ lpFileName?lpFileName:"NULL",
+ lpFileName?lpFileName:"NULL", dwFileAttributes);
+
+ pThread = InternalGetCurrentThread();
+
+ /* Windows behavior for SetFileAttributes is that any valid attributes
+ are set on a file and any invalid attributes are ignored. SetFileAttributes
+ returns success and does not set an error even if some or all of the
+ attributes are invalid. If all the attributes are invalid, SetFileAttributes
+ sets a file's attribute to NORMAL. */
+
+ /* If dwFileAttributes does not contain READONLY or NORMAL, set it to NORMAL
+ and print a warning message. */
+ if ( !(dwFileAttributes & (FILE_ATTRIBUTE_READONLY |FILE_ATTRIBUTE_NORMAL)) )
+ {
+ dwFileAttributes = FILE_ATTRIBUTE_NORMAL;
+ WARN("dwFileAttributes(%#x) contains attributes that are either not supported "
+ "or cannot be set via SetFileAttributes.\n");
+ }
+
+ if ( (dwFileAttributes & FILE_ATTRIBUTE_NORMAL) &&
+ (dwFileAttributes != FILE_ATTRIBUTE_NORMAL) )
+ {
+ WARN("Ignoring FILE_ATTRIBUTE_NORMAL -- it must be used alone\n");
+ }
+
+ if (lpFileName == NULL)
+ {
+ dwLastError = ERROR_FILE_NOT_FOUND;
+ goto done;
+ }
+
+ if ( stat(lpFileName, &stat_data) != 0 )
+ {
+ TRACE("stat failed on %s; errno is %d (%s)\n",
+ lpFileName, errno, strerror(errno));
+ dwLastError = FILEGetLastErrorFromErrnoAndFilename(lpFileName);
+ goto done;
+ }
+
+ new_mode = stat_data.st_mode;
+ TRACE("st_mode is %#x\n", new_mode);
+
+ /* if we can't do GetFileAttributesA on it, don't do SetFileAttributesA */
+ if ( !(new_mode & S_IFREG) && !(new_mode & S_IFDIR) )
+ {
+ ERROR("Not a regular file or directory, S_IFMT is %#x\n",
+ new_mode & S_IFMT);
+ dwLastError = ERROR_ACCESS_DENIED;
+ goto done;
+ }
+
+ /* set or unset the "read-only" attribute */
+ if (dwFileAttributes & FILE_ATTRIBUTE_READONLY)
+ {
+ /* remove the write bit from everybody */
+ new_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);
+ }
+ else
+ {
+ /* give write permission to the owner if the owner
+ * already has read permission */
+ if ( new_mode & S_IRUSR )
+ {
+ new_mode |= S_IWUSR;
+ }
+ }
+ TRACE("new mode is %#x\n", new_mode);
+
+ bRet = TRUE;
+ if ( new_mode != stat_data.st_mode )
+ {
+ if ( chmod(lpFileName, new_mode) != 0 )
+ {
+ ERROR("chmod(%s, %#x) failed\n", lpFileName, new_mode);
+ dwLastError = FILEGetLastErrorFromErrnoAndFilename(lpFileName);
+ bRet = FALSE;
+ }
+ }
+
+done:
+ if (dwLastError)
+ {
+ pThread->SetLastError(dwLastError);
+ }
+
+ LOGEXIT("SetFileAttributesA returns BOOL %d\n", bRet);
+ PERF_EXIT(SetFileAttributesA);
+ return bRet;
+}
+
+/*++
+Function:
+ SetFileAttributesW
+
+Notes:
+ Used for setting read-only attribute on file only.
+
+--*/
+BOOL
+PALAPI
+SetFileAttributesW(
+ IN LPCWSTR lpFileName,
+ IN DWORD dwFileAttributes)
+{
+ CPalThread *pThread;
+ char * name;
+ PathCharString namePS;
+ int length = 0;
+ int size;
+
+ DWORD dwLastError = 0;
+ BOOL bRet = FALSE;
+
+ PERF_ENTRY(SetFileAttributesW);
+ ENTRY("SetFileAttributesW(lpFileName=%p (%S), dwFileAttributes=%#x)\n",
+ lpFileName?lpFileName:W16_NULLSTRING,
+ lpFileName?lpFileName:W16_NULLSTRING, dwFileAttributes);
+
+ pThread = InternalGetCurrentThread();
+ if (lpFileName == NULL)
+ {
+ dwLastError = ERROR_PATH_NOT_FOUND;
+ goto done;
+ }
+
+ length = (PAL_wcslen(lpFileName)+1) * MaxWCharToAcpLengthFactor;
+ name = namePS.OpenStringBuffer(length);
+ if (NULL == name)
+ {
+ dwLastError = ERROR_NOT_ENOUGH_MEMORY;
+ goto done;
+ }
+ size = WideCharToMultiByte( CP_ACP, 0, lpFileName, -1, name, length,
+ NULL, NULL );
+
+ if( size == 0 )
+ {
+ namePS.CloseBuffer(0);
+ dwLastError = GetLastError();
+ ASSERT("WideCharToMultiByte failure! error is %d\n", dwLastError);
+ dwLastError = ERROR_INVALID_PARAMETER;
+ goto done;
+ }
+ namePS.CloseBuffer(size - 1);
+ bRet = SetFileAttributesA(name,dwFileAttributes);
+
+done:
+ if (dwLastError) pThread->SetLastError(dwLastError);
+
+ LOGEXIT("SetFileAttributes returns BOOL %d\n", bRet);
+ PERF_EXIT(SetFileAttributesW);
+ return bRet;
+}
+
+/*++
+InternalOpen
+
+Wrapper for open.
+
+Input parameters:
+
+szPath = pointer to a pathname of a file to be opened
+nFlags = arguments that control how the file should be accessed
+mode = file permission settings that are used only when a file is created
+
+Return value:
+ File descriptor on success, -1 on failure
+--*/
+int
+CorUnix::InternalOpen(
+ const char *szPath,
+ int nFlags,
+ ...
+ )
+{
+ int nRet = -1;
+ int mode = 0;
+ va_list ap;
+
+ // If nFlags does not contain O_CREAT, the mode parameter will be ignored.
+ if (nFlags & O_CREAT)
+ {
+ va_start(ap, nFlags);
+ mode = va_arg(ap, int);
+ va_end(ap);
+ }
+
+ do
+ {
+#if OPEN64_IS_USED_INSTEAD_OF_OPEN
+ nRet = open64(szPath, nFlags, mode);
+#else
+ nRet = open(szPath, nFlags, mode);
+#endif
+ }
+ while ((nRet == -1) && (errno == EINTR));
+
+ return nRet;
+}
+
PAL_ERROR
CorUnix::InternalWriteFile(
CPalThread *pThread,
return hRet;
}
-PAL_ERROR
-CorUnix::InternalSetEndOfFile(
- CPalThread *pThread,
- HANDLE hFile
- )
-{
- PAL_ERROR palError = 0;
- IPalObject *pFileObject = NULL;
- CFileProcessLocalData *pLocalData = NULL;
- IDataLock *pLocalDataLock = NULL;
-
- off_t curr = 0;
-
- if (INVALID_HANDLE_VALUE == hFile)
- {
- ERROR( "Invalid file handle\n" );
- palError = ERROR_INVALID_HANDLE;
- goto InternalSetEndOfFileExit;
- }
-
- palError = g_pObjectManager->ReferenceObjectByHandle(
- pThread,
- hFile,
- &aotFile,
- &pFileObject
- );
-
- if (NO_ERROR != palError)
- {
- goto InternalSetEndOfFileExit;
- }
-
- palError = pFileObject->GetProcessLocalData(
- pThread,
- ReadLock,
- &pLocalDataLock,
- reinterpret_cast<void**>(&pLocalData)
- );
-
- if (NO_ERROR != palError)
- {
- goto InternalSetEndOfFileExit;
- }
-
- if (pLocalData->open_flags_deviceaccessonly == TRUE)
- {
- ERROR("File open for device access only\n");
- palError = ERROR_ACCESS_DENIED;
- goto InternalSetEndOfFileExit;
- }
-
- curr = lseek(pLocalData->unix_fd, 0, SEEK_CUR);
-
- TRACE("current file pointer offset is %u\n", curr);
- if ( curr < 0 )
- {
- ERROR("lseek returned %ld\n", curr);
- palError = FILEGetLastErrorFromErrno();
- goto InternalSetEndOfFileExit;
- }
-
-#if SIZEOF_OFF_T > 4
-#if !HAVE_FTRUNCATE_LARGE_LENGTH_SUPPORT
- // ftruncate will return the wrong value for some large lengths.
- // We'll short-circuit the process and simply return failure for
- // the set of values that covers those cases, all of which would
- // have failed anyway on any standard-sized hard drive.
- if (curr >= 0xFFFFFFFF000ULL)
- {
- ERROR("Skipping ftruncate because the offset is too large\n");
- palError = ERROR_INVALID_PARAMETER;
- goto InternalSetEndOfFileExit;
- }
-#endif // !HAVE_FTRUNCATE_LARGE_LENGTH_SUPPORT
-#endif // SIZEOF_OFF_T
-
-#if HAS_FTRUNCATE_LENGTH_ISSUE
- // Perform an additional check to make sure that there's likely to be enough free space to satisfy the
- // request. Do this because it's been observed on Mac OSX that ftruncate can return failure but still
- // extend the file to consume the remainder of free space.
- //
- struct statfs sFileSystemStats;
- off_t cbFreeSpace;
- if (fstatfs(pLocalData->unix_fd, &sFileSystemStats) != 0)
- {
- ERROR("fstatfs failed\n");
- palError = FILEGetLastErrorFromErrno();
- goto InternalSetEndOfFileExit;
- }
-
- // Free space is free blocks times the size of each block in bytes.
- cbFreeSpace = (off_t)sFileSystemStats.f_bavail * (off_t)sFileSystemStats.f_bsize;
-
- if (curr > cbFreeSpace)
- {
- ERROR("Not enough disk space for ftruncate\n");
- palError = ERROR_DISK_FULL;
- goto InternalSetEndOfFileExit;
- }
-#endif // HAS_FTRUNCATE_LENGTH_ISSUE
-
- if ( ftruncate(pLocalData->unix_fd, curr) != 0 )
- {
- ERROR("ftruncate failed\n");
- if ( errno == EACCES )
- {
- ERROR("file may not be writable\n");
- }
- palError = FILEGetLastErrorFromErrno();
- goto InternalSetEndOfFileExit;
- }
-
-
-InternalSetEndOfFileExit:
-
- // Windows starts returning ERROR_INVALID_PARAMETER at an arbitrary file size (~16TB). The file system
- // underneath us may be able to support larger and it would be a shame to prevent that. As a compromise,
- // if the operation fails and the file size was above the Windows limit map ERROR_DISK_FULL to
- // ERROR_INVALID_PARAMETER.
- // curr has been checked to be positive after getting the value from lseek. The following cast is put to
- // suppress the compilation warning.
- if (palError == ERROR_DISK_FULL && (static_cast<UINT64>(curr) > 0x00000fffffff0000ULL ) )
- palError = ERROR_INVALID_PARAMETER;
-
- if (NULL != pLocalDataLock)
- {
- pLocalDataLock->ReleaseLock(pThread, FALSE);
- }
-
- if (NULL != pFileObject)
- {
- pFileObject->ReleaseReference(pThread);
- }
-
- return palError;
-}
-
-
-
-/*++
-Function:
- SetEndOfFile
-
-See MSDN doc.
---*/
-BOOL
-PALAPI
-SetEndOfFile(
- IN HANDLE hFile)
-{
- PAL_ERROR palError = NO_ERROR;
- CPalThread *pThread;;
-
- PERF_ENTRY(SetEndOfFile);
- ENTRY("SetEndOfFile(hFile=%p)\n", hFile);
-
- pThread = InternalGetCurrentThread();
-
- palError = InternalSetEndOfFile(
- pThread,
- hFile
- );
-
- if (NO_ERROR != palError)
- {
- pThread->SetLastError(palError);
- }
-
- LOGEXIT("SetEndOfFile returns BOOL %d\n", NO_ERROR == palError);
- PERF_EXIT(SetEndOfFile);
- return NO_ERROR == palError;
-}
-
//
// We need to break out the actual mechanics of setting the file pointer
// on the unix FD for InternalReadFile and InternalWriteFile, as they
{
PAL_ERROR palError = NO_ERROR;
int seek_whence = 0;
- __int64 seek_offset = 0LL;
- __int64 seek_res = 0LL;
+ int64_t seek_offset = 0LL;
+ int64_t seek_res = 0LL;
off_t old_offset;
switch( dwMoveMethod )
if ( lpDistanceToMoveHigh )
{
/* set the high 32 bits of the offset */
- seek_offset = ((__int64)*lpDistanceToMoveHigh << 32);
+ seek_offset = ((int64_t)*lpDistanceToMoveHigh << 32);
/* set the low 32 bits */
/* cast to unsigned long to avoid sign extension */
}
}
- seek_res = (__int64)lseek( iUnixFd,
+ seek_res = (int64_t)lseek( iUnixFd,
seek_offset,
seek_whence );
if ( seek_res < 0 )
file_templatePS.CloseBuffer(length);
chLastPathNameChar = file_template[strlen(file_template)-1];
- if (chLastPathNameChar != '\\' && chLastPathNameChar != '/')
+ if (chLastPathNameChar != '/')
{
- strcat_s( file_template, file_templatePS.GetSizeOf(), "\\" );
+ strcat_s( file_template, file_templatePS.GetSizeOf(), "/" );
}
if ( lpPrefixString )
{
strncat_s( file_template, file_templatePS.GetSizeOf(), lpPrefixString, MAX_PREFIX );
}
- FILEDosToUnixPathA( file_template );
strncat_s( file_template, file_templatePS.GetSizeOf(), "%.4x.TMP", MAX_SEEDSIZE );
/* Create the file. */
prefix_stringPS.CloseBuffer(prefix_size - 1);
}
- tempfile_name = (char*)InternalMalloc(MAX_LONGPATH);
+ tempfile_name = (char*)malloc(MAX_LONGPATH);
if (tempfile_name == NULL)
{
pThread->SetLastError(ERROR_NOT_ENOUGH_MEMORY);
DWORD dwSrcFileAttributes;
struct stat SrcFileStats;
- LPSTR lpUnixPath = NULL;
const int buffer_size = 16*1024;
char *buffer = (char*)alloca(buffer_size);
DWORD bytes_read;
}
/* Need to preserve the owner/group and chmod() flags */
- lpUnixPath = strdup(lpExistingFileName);
- if ( lpUnixPath == NULL )
- {
- ERROR("strdup() failed\n");
- pThread->SetLastError(FILEGetLastErrorFromErrno());
- goto done;
- }
- FILEDosToUnixPathA(lpUnixPath);
- if (stat (lpUnixPath, &SrcFileStats) == -1)
+ if (stat (lpExistingFileName, &SrcFileStats) == -1)
{
ERROR("stat() failed for %s\n", lpExistingFileName);
- pThread->SetLastError(FILEGetLastErrorFromErrnoAndFilename(lpUnixPath));
+ pThread->SetLastError(FILEGetLastErrorFromErrnoAndFilename(lpExistingFileName));
goto done;
}
goto done;
}
- free(lpUnixPath);
- lpUnixPath = strdup(lpNewFileName);
- if ( lpUnixPath == NULL )
- {
- ERROR("strdup() failed\n");
- pThread->SetLastError(FILEGetLastErrorFromErrno());
- goto done;
- }
- FILEDosToUnixPathA( lpUnixPath );
-
-
// We don't set file attributes in CreateFile. The only attribute
// that is reflected on disk in Unix is read-only, and we set that
// here.
}
/* Make sure the new file has the same chmod() flags. */
- if (chmod(lpUnixPath, SrcFileStats.st_mode & permissions) == -1)
+ if (chmod(lpNewFileName, SrcFileStats.st_mode & permissions) == -1)
{
WARN ("chmod() failed to set mode 0x%x on new file\n",
SrcFileStats.st_mode & permissions);
- pThread->SetLastError(FILEGetLastErrorFromErrnoAndFilename(lpUnixPath));
+ pThread->SetLastError(FILEGetLastErrorFromErrnoAndFilename(lpNewFileName));
goto done;
}
{
CloseHandle( hDest );
}
- if (lpUnixPath)
- {
- free(lpUnixPath);
- }
LOGEXIT("CopyFileA returns BOOL %d\n", bGood);
PERF_EXIT(CopyFileA);
return bGood;
}
-
PAL_ERROR
CorUnix::InternalCreatePipe(
CPalThread *pThread,
pStdErr = INVALID_HANDLE_VALUE;
return FALSE;
}
-
-/*++
-FILECleanupStdHandles
-
-Remove all regions, locked by a file pointer, from shared memory
-
-(no parameters)
-
---*/
-void FILECleanupStdHandles(void)
-{
- HANDLE stdin_handle;
- HANDLE stdout_handle;
- HANDLE stderr_handle;
-
- TRACE("closing standard handles\n");
- stdin_handle = pStdIn;
- stdout_handle = pStdOut;
- stderr_handle = pStdErr;
-
- pStdIn = INVALID_HANDLE_VALUE;
- pStdOut = INVALID_HANDLE_VALUE;
- pStdErr = INVALID_HANDLE_VALUE;
-
- if (stdin_handle != INVALID_HANDLE_VALUE)
- {
- CloseHandle(stdin_handle);
- }
-
- if (stdout_handle != INVALID_HANDLE_VALUE)
- {
- CloseHandle(stdout_handle);
- }
-
- if (stderr_handle != INVALID_HANDLE_VALUE)
- {
- CloseHandle(stderr_handle);
- }
-}
This result is also confirmed in the MSDN documentation on how
to convert a time_t value to a win32 FILETIME.
*/
-static const __int64 SECS_BETWEEN_1601_AND_1970_EPOCHS = 11644473600LL;
-static const __int64 SECS_TO_100NS = 10000000; /* 10^7 */
+static const int64_t SECS_BETWEEN_1601_AND_1970_EPOCHS = 11644473600LL;
+static const int64_t SECS_TO_100NS = 10000000; /* 10^7 */
#ifdef __APPLE__
-static const __int64 SECS_BETWEEN_1601_AND_2001_EPOCHS = 12622780800LL;
+static const int64_t SECS_BETWEEN_1601_AND_2001_EPOCHS = 12622780800LL;
#endif // __APPLE__
/*++
IN CONST FILETIME *lpFileTime1,
IN CONST FILETIME *lpFileTime2)
{
- __int64 First;
- __int64 Second;
+ int64_t First;
+ int64_t Second;
long Ret;
ENTRY("CompareFileTime(lpFileTime1=%p lpFileTime2=%p)\n",
lpFileTime1, lpFileTime2);
- First = ((__int64)lpFileTime1->dwHighDateTime << 32) +
+ First = ((int64_t)lpFileTime1->dwHighDateTime << 32) +
lpFileTime1->dwLowDateTime;
- Second = ((__int64)lpFileTime2->dwHighDateTime << 32) +
+ Second = ((int64_t)lpFileTime2->dwHighDateTime << 32) +
lpFileTime2->dwLowDateTime;
if ( First < Second )
}
-#ifdef __APPLE__
-/*++
-Function:
- FILECFAbsoluteTimeToFileTime
-
-Convert a CFAbsoluteTime value to a win32 FILETIME structure, as described
-in MSDN documentation. CFAbsoluteTime is the number of seconds elapsed since
-00:00 01 January 2001 UTC (Mac OS X epoch), while FILETIME represents a
-64-bit number of 100-nanosecond intervals that have passed since 00:00
-01 January 1601 UTC (win32 epoch).
---*/
-FILETIME FILECFAbsoluteTimeToFileTime( CFAbsoluteTime sec )
-{
- __int64 Result;
- FILETIME Ret;
-
- Result = ((__int64)sec + SECS_BETWEEN_1601_AND_2001_EPOCHS) * SECS_TO_100NS;
-
- Ret.dwLowDateTime = (DWORD)Result;
- Ret.dwHighDateTime = (DWORD)(Result >> 32);
-
- TRACE("CFAbsoluteTime = [%9f] converts to Win32 FILETIME = [%#x:%#x]\n",
- sec, Ret.dwHighDateTime, Ret.dwLowDateTime);
-
- return Ret;
-}
-#endif // __APPLE__
-
-
/*++
Function:
FILEUnixTimeToFileTime
--*/
FILETIME FILEUnixTimeToFileTime( time_t sec, long nsec )
{
- __int64 Result;
+ int64_t Result;
FILETIME Ret;
- Result = ((__int64)sec + SECS_BETWEEN_1601_AND_1970_EPOCHS) * SECS_TO_100NS +
+ Result = ((int64_t)sec + SECS_BETWEEN_1601_AND_1970_EPOCHS) * SECS_TO_100NS +
(nsec / 100);
Ret.dwLowDateTime = (DWORD)Result;
#else /* HAVE_GMTIME_R */
UnixSystemTime = gmtime( &UnixFileTime );
#endif /* HAVE_GMTIME_R */
-
+ if (!UnixSystemTime)
+ {
+ ERROR( "gmtime failed.\n" );
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
/* Convert unix system time to Windows system time. */
- lpSystemTime->wDay = UnixSystemTime->tm_mday;
+ lpSystemTime->wDay = (WORD)UnixSystemTime->tm_mday;
/* Unix time counts January as a 0, under Windows it is 1*/
- lpSystemTime->wMonth = UnixSystemTime->tm_mon + 1;
+ lpSystemTime->wMonth = (WORD)UnixSystemTime->tm_mon + 1;
/* Unix time returns the year - 1900, Windows returns the current year*/
- lpSystemTime->wYear = UnixSystemTime->tm_year + 1900;
+ lpSystemTime->wYear = (WORD)UnixSystemTime->tm_year + 1900;
- lpSystemTime->wSecond = UnixSystemTime->tm_sec;
- lpSystemTime->wMinute = UnixSystemTime->tm_min;
- lpSystemTime->wHour = UnixSystemTime->tm_hour;
+ lpSystemTime->wSecond = (WORD)UnixSystemTime->tm_sec;
+ lpSystemTime->wMinute = (WORD)UnixSystemTime->tm_min;
+ lpSystemTime->wHour = (WORD)UnixSystemTime->tm_hour;
return TRUE;
}
else
goto done;
}
- find_data = (find_obj *)InternalMalloc(sizeof(find_obj));
+ find_data = (find_obj *)malloc(sizeof(find_obj));
if ( find_data == NULL )
{
ERROR("Unable to allocate memory for find_data\n");
SetLastError( ERROR_INTERNAL_ERROR );
goto done;
}
- FILEDosToUnixPathA( lpTemp );
FILEGetProperNotFoundError( lpTemp, &dwLastError );
if ( ERROR_PATH_NOT_FOUND == dwLastError )
goto done;
}
- if (Dir[0] != 0)
- {
- FILEDosToUnixPathA( Dir );
- }
-
/* The meat of the routine happens below. Basically, there are three
special things to check for:
}
/* find out if lpFileName is a partial or full path */
- if ('\\' == *lpFileName || '/' == *lpFileName)
+ if ('/' == *lpFileName)
{
fullPath = TRUE;
}
}
unixPathBuf = unixPath.OpenStringBuffer(unixPath.GetCount());
- /* do conversion to Unix path */
- FILEDosToUnixPathA( unixPathBuf );
/* now we can canonicalize this */
FILECanonicalizePath(unixPathBuf);
}
-
-/*++
-Function:
- FileDosToUnixPathA
-
-Abstract:
- Change a DOS path to a Unix path.
-
- Replaces '\' by '/'
-
-Parameter:
- IN/OUT lpPath: path to be modified
---*/
-void
-FILEDosToUnixPathA(
- LPSTR lpPath)
-{
- LPSTR p;
-
- TRACE("Original DOS path = [%s]\n", lpPath);
-
- if (!lpPath)
- {
- return;
- }
-
- for (p = lpPath; *p; p++)
- {
- /* Replace \ with / */
- if (*p == '\\')
- {
- *p = '/';
- }
- }
-
- TRACE("Resulting Unix path = [%s]\n", lpPath);
-}
-
-void
-FILEDosToUnixPathA(
- PathCharString& lpPath)
-{
-
- SIZE_T len = lpPath.GetCount();
- LPSTR lpPathBuf = lpPath.OpenStringBuffer(len);
- FILEDosToUnixPathA(lpPathBuf);
- lpPath.CloseBuffer(len);
-
-}
-
-
/*++
Function:
FILEGetDirectoryFromFullPathA
/* look for the first path separator backwards */
lpDirEnd = lpFullPath + full_len - 1;
- while( lpDirEnd >= lpFullPath && *lpDirEnd != '/' && *lpDirEnd != '\\')
+ while( lpDirEnd >= lpFullPath && *lpDirEnd != '/')
--lpDirEnd;
dir_len = lpDirEnd - lpFullPath + 1; /* +1 for fencepost */
}
}
- /* step 5 : remove a traling '/.' */
+ /* step 5 : remove a trailing '/.' */
slashdotptr = strstr(lpUnixPath,"/.");
if (slashdotptr != NULL && slashdotptr[2] == '\0')
/* special case : if file name contains absolute path, don't search the
provided path */
- if('\\' == lpFileName[0] || '/' == lpFileName[0])
+ if(L'/' == lpFileName[0])
{
/* Canonicalize the path to deal with back-to-back '/', etc. */
length = MAX_LONGPATH; //Use it for first try
PERF_EXIT(SearchPathW);
return nRet;
}
-
-/*++
-Function:
- PathFindFileNameW
-
-See MSDN doc.
---*/
-LPWSTR
-PALAPI
-PathFindFileNameW(
- IN LPCWSTR pPath
- )
-{
- PERF_ENTRY(PathFindFileNameW);
- ENTRY("PathFindFileNameW(pPath=%p (%S))\n",
- pPath?pPath:W16_NULLSTRING,
- pPath?pPath:W16_NULLSTRING);
-
- LPWSTR ret = (LPWSTR)pPath;
- if (ret != NULL && *ret != W('\0'))
- {
- ret = PAL_wcschr(ret, W('\0')) - 1;
- if (ret > pPath && *ret == W('/'))
- {
- ret--;
- }
- while (ret > pPath && *ret != W('/'))
- {
- ret--;
- }
- if (*ret == W('/') && *(ret + 1) != W('\0'))
- {
- ret++;
- }
- }
-
- LOGEXIT("PathFindFileNameW returns %S\n", ret);
- PERF_EXIT(PathFindFileNameW);
- return ret;
-}
field, with the head in the global 'm_hiFreeListStart'. */
m_dwTableSize = m_dwTableGrowthRate;
- m_rghteHandleTable = reinterpret_cast<HANDLE_TABLE_ENTRY*>(InternalMalloc((m_dwTableSize * sizeof(HANDLE_TABLE_ENTRY))));
+ m_rghteHandleTable = reinterpret_cast<HANDLE_TABLE_ENTRY*>(malloc((m_dwTableSize * sizeof(HANDLE_TABLE_ENTRY))));
if(NULL == m_rghteHandleTable)
{
ERROR("Unable to create initial handle table array");
}
/* grow handle table */
- rghteTempTable = reinterpret_cast<HANDLE_TABLE_ENTRY*>(InternalRealloc(
+ rghteTempTable = reinterpret_cast<HANDLE_TABLE_ENTRY*>(realloc(
m_rghteHandleTable,
(m_dwTableSize + m_dwTableGrowthRate) * sizeof(HANDLE_TABLE_ENTRY)));
// have already deleted it. ($$REIVEW -- would someone ever need access
// to the shared data in order to cleanup process local state?)
//
- // When the third paramter (fShutdown) is TRUE the process is in
+ // When the third parameter (fShutdown) is TRUE the process is in
// the act of exiting. The cleanup routine should not perform any
// unnecessary cleanup operations (e.g., closing file descriptors,
// since the OS will automatically close them when the process exits)
enum PalObjectTypeId
{
- otiFile = 0,
+ otiMutex,
+ otiFile,
otiFileMapping,
otiProcess,
otiThread,
enum ThreadWakeupReason
{
WaitSucceeded,
- MutexAbondoned,
+ MutexAbandoned,
WaitTimeout,
WaitFailed
};
#ifdef __cplusplus
typedef char16_t wchar_16; // __wchar_16 (which is defined in palinternal.h) is defined as wchar_16_cpp.
-extern "C"
-{
-#endif // __cplusplus
-
-typedef enum
-{
- PFF_NONE = 0,
- PFF_MINUS = 1,
- PFF_POUND = 2,
- PFF_ZERO = 4,
- PFF_SPACE = 8,
- PFF_PLUS = 16
-}PRINTF_FORMAT_FLAGS;
-
-typedef enum
-{
- WIDTH_DEFAULT = -1,
- WIDTH_STAR = -2, /* e.g. "%*.10s" */
- WIDTH_INVALID = -3 /* e.g. "%*3.10s" */
-}WIDTH_FLAGS;
-
-typedef enum
-{
- PRECISION_DEFAULT = -1,
- PRECISION_STAR = -2, /* e.g. "%10.*s" */
- PRECISION_DOT = -3, /* e.g. "%10.s" */
- PRECISION_INVALID = -4 /* e.g. "%10.*3s" */
-}PRECISION_FLAGS;
-
-typedef enum
-{
- PFF_PREFIX_DEFAULT = -1,
- PFF_PREFIX_SHORT = 1,
- PFF_PREFIX_LONG = 2,
- PFF_PREFIX_LONGLONG = 3,
- PFF_PREFIX_LONG_W = 4
-}PRINTF_PREFIXES;
-
-typedef enum
-{
- PFF_TYPE_DEFAULT = -1,
- PFF_TYPE_CHAR = 1,
- PFF_TYPE_STRING = 2,
- PFF_TYPE_WSTRING = 3,
- PFF_TYPE_INT = 4,
- PFF_TYPE_P = 5,
- PFF_TYPE_N = 6,
- PFF_TYPE_FLOAT = 7
-}PRINTF_TYPES;
-
-typedef enum
-{
- SCANF_PREFIX_SHORT = 1,
- SCANF_PREFIX_LONG = 2,
- SCANF_PREFIX_LONGLONG = 3
-}SCANF_PREFIXES;
-
-typedef enum
-{
- SCANF_TYPE_CHAR = 1,
- SCANF_TYPE_STRING = 2,
- SCANF_TYPE_INT = 3,
- SCANF_TYPE_N = 4,
- SCANF_TYPE_FLOAT = 5,
- SCANF_TYPE_BRACKETS = 6,
- SCANF_TYPE_SPACE = 7
-}SCANF_TYPES;
-
-/*******************************************************************************
-Function:
- PAL_printf_arg_remover
-
-Parameters:
- ap
- - pointer to the va_list from which to remove arguments
- Width
- - the width of the current format option
- Precision
- - the precision of the current format option
- Type
- - the type of the argument for the current format option
- Prefix
- - the prefix for the current format option
-*******************************************************************************/
-void PAL_printf_arg_remover(va_list *ap, INT Width, INT Precision, INT Type, INT Prefix);
-
-/*++
-Function:
- Silent_PAL_vsnprintf
-
-See MSDN doc.
---*/
-INT Silent_PAL_vsnprintf(LPSTR Buffer, INT Count, LPCSTR Format, va_list ap);
-
-/*++
-Function:
- Silent_PAL_vfprintf
-
-See MSDN doc.
---*/
-int Silent_PAL_vfprintf(PAL_FILE *stream, const char *format, va_list ap);
-
-
-
-
-/*++
-
-struct PAL_FILE.
-Used to mimic the behavior of windows.
-fwrite under windows can set the ferror flag,
-under BSD fwrite doesn't.
---*/
-struct _FILE
-{
- FILE * bsdFilePtr; /* The BSD file to be passed to the
- functions needing it. */
-
- INT PALferrorCode; /* The ferror code that fwrite sets,
- incase of error */
-
- BOOL bTextMode; /* Boolean variable to denote that the
- fle is opened in text/binary mode*/
-#if UNGETC_NOT_RETURN_EOF
- BOOL bWriteOnlyMode;/* Boolean variable to denote that the
- fle is opened in write-only mode*/
-#endif //UNGETC_NOT_RETURN_EOF
-};
-
-enum CRT_ERROR_CODES
-{
- PAL_FILE_NOERROR = 0,
- PAL_FILE_ERROR
-};
-
-/* Global variables storing the std streams. Defined in cruntime/file.c. */
-extern PAL_FILE PAL_Stdout;
-extern PAL_FILE PAL_Stdin;
-extern PAL_FILE PAL_Stderr;
-
-/*++
-
-Functio:
-
- CRTInitStdStreams.
-
- Initilizes the standard streams.
- Returns TRUE on success, FALSE otherwise.
---*/
-BOOL CRTInitStdStreams( void );
-
-#ifdef __cplusplus
-}
#endif // __cplusplus
#endif /* _PAL_CRUNTIME_H_ */
CRITICAL_SECTION *pcs
);
- bool InternalTryEnterCriticalSection(
- CPalThread * pThread,
- PCRITICAL_SECTION pCriticalSection);
-
#ifdef _DEBUG
void PALCS_ReportStatisticalData(void);
void PALCS_DumpCSList();
This defines the channel to use with the macros TRACE, ERROR, etc
Use this macro once at the beginning of your source file.
(impl. details : this declares a constant static variable defdbgchan and
- sets it to the apropriate channel)
+ sets it to the appropriate channel)
usage : SET_DEFAULT_DEBUG_CHANNEL(somechannel);
#include "pal/stackstring.hpp"
#include <sys/types.h>
#include <dirent.h>
+#include <glob.h>
#ifdef __cplusplus
extern "C"
--*/
void FILECanonicalizePath(LPSTR lpUnixPath);
-/*++
-Function:
- FileDosToUnixPathA
-
-Abstract:
- Change a DOS path to a Unix path. Replace '\' by '/'.
-
-Parameter:
- IN/OUT lpPath: path to be modified
---*/
-void
-FILEDosToUnixPathA(LPSTR lpPath);
-
/*++
Function:
FILEGetDirectoryFromFullPathA
--*/
BOOL FILEInitStdHandles(void);
-/*++
-FILECleanupStdHandles
-
-Close promary handles for stdin, stdout and stderr
-
-(no parameters, no return value)
---*/
-void FILECleanupStdHandles(void);
-
/*++
Function :
*/
void FILEGetProperNotFoundError( LPCSTR lpPath, LPDWORD lpErrorCode );
-/*++
-PAL_fflush
-
-Calls fflush
-
-Input parameters:
-
-PAL_FILE *stream = stream to be flushed.
-
-Return value:
- 0 is returned on success, otherwise EOF is returned.
---*/
-int _cdecl PAL_fflush( PAL_FILE *stream );
-
-/*++
-PAL_fgets
-
-Wrapper function for InternalFgets.
-
-Input parameters:
-
-sz = stores characters read from the given file stream
-nSize = number of characters to be read
-pf = stream to read characters from
-
-Return value:
- Returns a pointer to the string storing the characters on success
- and NULL on failure.
---*/
-char * __cdecl PAL_fgets(char *sz, int nSize, PAL_FILE *pf);
-
-/*++
-PAL_fwrite
-
-Wrapper function for InternalFwrite
-
-Input parameters:
-
-pvBuffer = array of objects to write to the given file stream
-nSize = size of a object in bytes
-nCount = number of objects to write
-pf = stream to write characters to
-
-Return value:
- Returns the number of objects written.
---*/
-size_t __cdecl PAL_fwrite(const void *pvBuffer, size_t nSize, size_t nCount, PAL_FILE *pf);
-
-/*++
-PAL__open
-
-Wrapper function for InternalOpen.
-
-Input parameters:
-
-szPath = pointer to a pathname of a file to be opened
-nFlags = arguments that control how the file should be accessed
-mode = file permission settings that are used only when a file is created
-
-Return value:
- File descriptor on success, -1 on failure
---*/
-int __cdecl PAL__open(const char *szPath, int nFlags, ...);
-
-/*++
-PAL_fseek
-
-Wrapper function for fseek
-
-Input parameters:
-
-pf = a given file stream
-lOffset = distance from position to set file-position indicator
-nWhence = method used to determine the file_position indicator location relative to lOffset
-
-Return value:
- 0 on success, -1 on failure.
---*/
-int _cdecl PAL_fseek(PAL_FILE *pf, LONG lOffset, int nWhence);
-
#ifdef __cplusplus
}
#endif // __cplusplus
LPOVERLAPPED lpOverlapped
);
- PAL_ERROR
- InternalSetEndOfFile(
- CPalThread *pThread,
- HANDLE hFile
- );
-
PAL_ERROR
InternalGetFileSize(
CPalThread *pThread,
PathCharString& lpBuffer
);
- /*++
- InternalFgets
- Wraps fgets
- --*/
- char *
- InternalFgets(
- char *sz,
- int nSize,
- FILE *f,
- bool fTextMode
- );
-
- /*++
- InternalFwrite
- Wraps fwrite
- --*/
- size_t
- InternalFwrite(
- const void *pvBuffer,
- size_t nSize,
- size_t nCount,
- FILE *f,
- INT *pnErrorCode
- );
-
/*++
InternalOpen
Wraps open
//
// These routines should all be separated out into something along the lines
-// of fileutils.* (instead of being commingled with the core file object
+// of fileutils.* (instead of being comingled with the core file object
// code).
//
--*/
void FILECanonicalizePath(LPSTR lpUnixPath);
-/*++
-Function:
- FileDosToUnixPathA
-
-Abstract:
- Change a DOS path to a Unix path. Replace '\' by '/'.
-
-Parameter:
- IN/OUT lpPath: path to be modified
---*/
-void
-FILEDosToUnixPathA(LPSTR lpPath);
-
/*++
Function:
FILEGetDirectoryFromFullPathA
--*/
BOOL FILEInitStdHandles(void);
-/*++
-FILECleanupStdHandles
-
-Close primary handles for stdin, stdout and stderr
-
-(no parameters, no return value)
---*/
-void FILECleanupStdHandles(void);
-
/*++
Function :
FILETIME FILEUnixTimeToFileTime( time_t sec, long nsec );
-#ifdef __APPLE__
-#include <CoreFoundation/CFDate.h>
-
-FILETIME FILECFAbsoluteTimeToFileTime( CFAbsoluteTime sec );
-#endif // __APPLE__
-
#ifdef __cplusplus
}
#endif // __cplusplus
Function:
PALInitLock
-Take the initializaiton critical section (init_critsec). necessary to serialize
+Take the initialization critical section (init_critsec). necessary to serialize
TerminateProcess along with PAL_Terminate and PAL_Initialize
(no parameters)
Return value :
TRUE if critical section existed (and was acquired)
- FALSE if critical section doens't exist yet
+ FALSE if critical section doesn't exist yet
--*/
BOOL PALInitLock(void);
{
#endif // __cplusplus
+#include <cstddef>
+
typedef struct _LIST_ENTRY {
struct _LIST_ENTRY *Flink;
struct _LIST_ENTRY *Blink;
#define CONTAINING_RECORD(address, type, field) ((type *)( \
(PCHAR)(address) - \
- (ULONG_PTR)(&((type *)0)->field)))
+ (ULONG_PTR)offsetof(type, field)))
#ifdef __cplusplus
}
#include <stdlib.h>
#include <new>
-extern "C"
-{
- void *
- __cdecl
- PAL_realloc(
- void* pvMemblock,
- size_t szSize
- );
-
- void *
- __cdecl
- PAL_malloc(
- size_t szSize
- );
-
- void
- __cdecl
- PAL_free(
- void *pvMem
- );
-
- char *
- __cdecl
- PAL__strdup(
- const char *c_szStr
- );
-}
-
namespace CorUnix{
-
- void *
- InternalRealloc(
- void *pvMemblock,
- size_t szSize
- );
-
- void *
- InternalMalloc(
- size_t szSize
- );
-
- // Define common code for "new" style allocators below.
-#define INTERNAL_NEW_COMMON() \
- T *pMem = (T*)InternalMalloc(sizeof(T)); \
- if (pMem == NULL) \
- return NULL;
-
- // Define "new" style allocators (which allocate then call a constructor) for different numbers of
- // constructor arguments. Added based on usage.
-
- // Default constructor (0 args) case.
- template<class T>
- T* InternalNew()
+ // Define "new" style allocators (which allocate then call a constructor).
+ template<class T, class... Ts>
+ T* InternalNew(Ts... args)
{
- INTERNAL_NEW_COMMON();
- return new (pMem) T();
- }
+ T* pMem = (T*)malloc(sizeof(T));
- // 1 arg case.
- template<class T, class A1>
- T* InternalNew(A1 arg1)
- {
- INTERNAL_NEW_COMMON();
- return new (pMem) T(arg1);
- }
-
- // 2 args case.
- template<class T, class A1, class A2>
- T* InternalNew(A1 arg1, A2 arg2)
- {
- INTERNAL_NEW_COMMON();
- return new (pMem) T(arg1, arg2);
- }
-
- // 3 args case.
- template<class T, class A1, class A2, class A3>
- T* InternalNew(A1 arg1, A2 arg2, A3 arg3)
- {
- INTERNAL_NEW_COMMON();
- return new (pMem) T(arg1, arg2, arg3);
- }
-
- // 4 args case.
- template<class T, class A1, class A2, class A3, class A4>
- T* InternalNew(A1 arg1, A2 arg2, A3 arg3, A4 arg4)
- {
- INTERNAL_NEW_COMMON();
- return new (pMem) T(arg1, arg2, arg3, arg4);
- }
+ if (pMem == NULL)
+ return NULL;
- // 5 args case.
- template<class T, class A1, class A2, class A3, class A4, class A5>
- T* InternalNew(A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5)
- {
- INTERNAL_NEW_COMMON();
- return new (pMem) T(arg1, arg2, arg3, arg4, arg5);
+ return new (pMem) T(args...);
}
template<class T> T* InternalNewArray(size_t cElements)
size_t cbSize = (cElements * sizeof(T)) + sizeof(size_t);
T *pMem;
- pMem = (T*)InternalMalloc(cbSize);
+ pMem = (T*)malloc(cbSize);
if (pMem == NULL)
return NULL;
{
#endif // __cplusplus
-/*++
-Function :
-
- PAL_rand
-
- Calls rand and mitigates the difference between RAND_MAX
- on Windows and FreeBSD.
---*/
-int __cdecl PAL_rand(void);
-
-/*++
-Function :
-
- PAL_time
---*/
-PAL_time_t __cdecl PAL_time(PAL_time_t*);
-
/*++
Function :
MsgBoxInitialize
--*/
void UnlockModuleList();
-/*++
-Function :
- LOADGetPalLibrary
-
- Load and initialize the PAL module.
-
-Parameters :
- None
-
-Return value :
- handle to loaded module
-
---*/
-MODSTRUCT *LOADGetPalLibrary();
-
#ifdef __cplusplus
}
#endif // __cplusplus
about the multiple declarations.
To avoid this, the inclusion of pal.h must be wrapped in a
- #define/#undef pair, which will effectiveily "hide" the pal.h
+ #define/#undef pair, which will effectively "hide" the pal.h
declaration by renaming it to something else. this is done by palinternal.h
in this way :
implementation (with some_function)
[side note : for the Win32 PAL, this can be accomplished without touching
- pal.h. In Windows, symbols in in dynamic libraries are resolved at
+ pal.h. In Windows, symbols in dynamic libraries are resolved at
compile time. if an application that uses some_function is only linked to
pal.dll, some_function will be resolved to the version in that DLL,
even if other DLLs in the system provide other implementations. In addition,
/* Include our configuration information so it's always present when
compiling PAL implementation files. */
#include "config.h"
-#include <minipal/utils.h>
#ifdef DEBUG
#define _ENABLE_DEBUG_MESSAGES_ 1
#include "pal_perf.h"
#endif
-/* C runtime functions needed to be renamed to avoid duplicate definition
- of those functions when including standard C header files */
-#if !defined(_DEBUG)
-#define memcpy DUMMY_memcpy
-#endif //!defined(_DEBUG)
-#define memcmp DUMMY_memcmp
-#define memset DUMMY_memset
-#define memmove DUMMY_memmove
-#define memchr DUMMY_memchr
-#define atoll DUMMY_atoll
-#define strlen DUMMY_strlen
-#define stricmp DUMMY_stricmp
-#define strstr DUMMY_strstr
-#define strcmp DUMMY_strcmp
-#define strcat DUMMY_strcat
-#define strncat DUMMY_strncat
-#define strcpy DUMMY_strcpy
-#define strcspn DUMMY_strcspn
-#define strncmp DUMMY_strncmp
-#define strncpy DUMMY_strncpy
-#define strchr DUMMY_strchr
-#define strrchr DUMMY_strrchr
-#define strpbrk DUMMY_strpbrk
-#define strtod DUMMY_strtod
-#define strspn DUMMY_strspn
-#define tolower DUMMY_tolower
-#define toupper DUMMY_toupper
-#define islower DUMMY_islower
-#define isupper DUMMY_isupper
-#define isprint DUMMY_isprint
-#define isdigit DUMMY_isdigit
-#define iswalpha DUMMY_iswalpha
-#define iswdigit DUMMY_iswdigit
-#define iswupper DUMMY_iswupper
-#define towupper DUMMY_towupper
-#define towlower DUMMY_towlower
-#define iswspace DUMMY_iswspace
-#define iswxdigit DUMMY_iswxdigit
-#define wint_t DUMMY_wint_t
-#define srand DUMMY_srand
-#define atoi DUMMY_atoi
-#define atof DUMMY_atof
-#define size_t DUMMY_size_t
-#define time_t PAL_time_t
-#define va_list DUMMY_va_list
-#define abs DUMMY_abs
-#define llabs DUMMY_llabs
-#define ceil DUMMY_ceil
-#define cos DUMMY_cos
-#define cosh DUMMY_cosh
-#define fabs DUMMY_fabs
-#define floor DUMMY_floor
-#define fmod DUMMY_fmod
-#define modf DUMMY_modf
-#define sin DUMMY_sin
-#define sinh DUMMY_sinh
-#define sqrt DUMMY_sqrt
-#define tan DUMMY_tan
-#define tanh DUMMY_tanh
-#define ceilf DUMMY_ceilf
-#define cosf DUMMY_cosf
-#define coshf DUMMY_coshf
-#define fabsf DUMMY_fabsf
-#define floorf DUMMY_floorf
-#define fmodf DUMMY_fmodf
-#define modff DUMMY_modff
-#define sinf DUMMY_sinf
-#define sinhf DUMMY_sinhf
-#define sqrtf DUMMY_sqrtf
-#define tanf DUMMY_tanf
-#define tanhf DUMMY_tanhf
-
-/* RAND_MAX needed to be renamed to avoid duplicate definition when including
- stdlib.h header files. PAL_RAND_MAX should have the same value as RAND_MAX
- defined in pal.h */
-#define PAL_RAND_MAX 0x7fff
-
-/* The standard headers define isspace and isxdigit as macros and functions,
- To avoid redefinition problems, undefine those macros. */
-#ifdef isspace
-#undef isspace
-#endif
-#ifdef isxdigit
-#undef isxdigit
-#endif
-#ifdef isalpha
-#undef isalpha
-#endif
-#ifdef isalnum
-#undef isalnum
-#endif
-#define isspace DUMMY_isspace
-#define isxdigit DUMMY_isxdigit
-#define isalpha DUMMY_isalpha
-#define isalnum DUMMY_isalnum
-
-#ifdef stdin
-#undef stdin
-#endif
-#ifdef stdout
-#undef stdout
-#endif
-#ifdef stderr
-#undef stderr
-#endif
-
-#ifdef SCHAR_MIN
-#undef SCHAR_MIN
-#endif
-#ifdef SCHAR_MAX
-#undef SCHAR_MAX
-#endif
-#ifdef SHRT_MIN
-#undef SHRT_MIN
-#endif
-#ifdef SHRT_MAX
-#undef SHRT_MAX
-#endif
-#ifdef UCHAR_MAX
-#undef UCHAR_MAX
-#endif
-#ifdef USHRT_MAX
-#undef USHRT_MAX
-#endif
-#ifdef ULONG_MAX
-#undef ULONG_MAX
-#endif
-#ifdef LONG_MIN
-#undef LONG_MIN
-#endif
-#ifdef LONG_MAX
-#undef LONG_MAX
-#endif
-#ifdef RAND_MAX
-#undef RAND_MAX
-#endif
-#ifdef DBL_MAX
-#undef DBL_MAX
-#endif
-#ifdef FLT_MAX
-#undef FLT_MAX
-#endif
#ifdef __record_type_class
#undef __record_type_class
#endif
#undef __real_type_class
#endif
-// The standard headers define va_start and va_end as macros,
-// To avoid redefinition problems, undefine those macros.
-#ifdef va_start
-#undef va_start
-#endif
-#ifdef va_end
-#undef va_end
-#endif
-#ifdef va_copy
-#undef va_copy
-#endif
-
-#define ptrdiff_t PAL_ptrdiff_t
-#define intptr_t PAL_intptr_t
-#define uintptr_t PAL_uintptr_t
-#define timeval PAL_timeval
-#define FILE PAL_FILE
#include "pal.h"
#include "palprivate.h"
#undef _BitScanReverse64
#endif
-/* pal.h defines alloca(3) as a compiler builtin.
- Redefining it to native libc will result in undefined breakage because
- a compiler is allowed to make assumptions about the stack and frame
- pointers. */
-
-/* Undef all functions and types previously defined so those functions and
- types could be mapped to the C runtime and socket implementation of the
- native OS */
-#undef exit
-#undef memcpy
-#undef memcmp
-#undef memset
-#undef memmove
-#undef memchr
-#undef atoll
-#undef strlen
-#undef strnlen
-#undef wcsnlen
-#undef stricmp
-#undef strstr
-#undef strcmp
-#undef strcat
-#undef strcspn
-#undef strncat
-#undef strcpy
-#undef strncmp
-#undef strncpy
-#undef strchr
-#undef strrchr
-#undef strpbrk
-#undef strtoul
-#undef strtoull
-#undef strtod
-#undef strspn
-#undef strtok
-#undef strdup
-#undef tolower
-#undef toupper
-#undef islower
-#undef isupper
-#undef isprint
-#undef isdigit
-#undef isspace
-#undef iswdigit
-#undef iswxdigit
-#undef iswalpha
-#undef iswprint
-#undef isxdigit
-#undef isalpha
-#undef isalnum
-#undef iswalpha
-#undef iswdigit
-#undef iswupper
-#undef towupper
-#undef towlower
-#undef wint_t
-#undef atoi
-#undef atof
-#undef malloc
-#undef realloc
-#undef free
-#undef qsort
-#undef bsearch
-#undef time
-#undef FILE
-#undef fclose
-#undef fopen
-#undef fread
-#undef ferror
-#undef ftell
-#undef fflush
-#undef fwrite
-#undef fgets
-#undef fputs
-#undef fseek
-#undef fgetpos
-#undef fsetpos
-#undef getcwd
-#undef _flushall
-#undef setvbuf
-#undef unlink
-#undef size_t
-#undef time_t
-#undef va_list
-#undef va_start
-#undef va_end
-#undef va_copy
-#undef va_arg
-#undef stdin
-#undef stdout
-#undef stderr
-#undef abs
-#undef llabs
-#undef acos
-#undef acosh
-#undef asin
-#undef asinh
-#undef atan
-#undef atanh
-#undef atan2
-#undef cbrt
-#undef ceil
-#undef cos
-#undef cosh
-#undef exp
-#undef fabs
-#undef floor
-#undef fmod
-#undef fma
-#undef ilogb
-#undef log
-#undef log2
-#undef log10
-#undef modf
-#undef pow
-#undef sin
-#undef sincos
-#undef sinh
-#undef sqrt
-#undef tan
-#undef tanh
-#undef acosf
-#undef acoshf
-#undef asinf
-#undef asinhf
-#undef atanf
-#undef atanhf
-#undef atan2f
-#undef cbrtf
-#undef ceilf
-#undef cosf
-#undef coshf
-#undef expf
-#undef fabsf
-#undef floorf
-#undef fmodf
-#undef fmaf
-#undef ilogbf
-#undef logf
-#undef log2f
-#undef log10f
-#undef modff
-#undef powf
-#undef sinf
-#undef sincosf
-#undef sinhf
-#undef sqrtf
-#undef tanf
-#undef tanhf
-#undef rand
-#undef srand
-#undef errno
-#undef getenv
-#undef open
-#undef glob
-
-#undef ptrdiff_t
-#undef intptr_t
-#undef uintptr_t
-#undef timeval
-
-
-#undef printf
-#undef fprintf
-#undef fwprintf
-#undef vfprintf
-#undef vfwprintf
-#undef vprintf
-#undef wprintf
-#undef wcstod
-#undef wcstoul
-#undef _wcstoui64
-#undef wcscat
-#undef wcscpy
-#undef wcslen
-#undef wcsncmp
-#undef wcschr
-#undef wcsrchr
-#undef swscanf
-#undef wcspbrk
-#undef wcsstr
-#undef wcscmp
-#undef wcsncpy
-#undef wcstok
-#undef wcscspn
-#undef iswupper
-#undef iswspace
-#undef towlower
-#undef towupper
-#undef wvsnprintf
-
-#ifdef HOST_AMD64
-#undef _mm_getcsr
-#undef _mm_setcsr
-#endif // HOST_AMD64
-
-#undef min
-#undef max
-
-#undef SCHAR_MIN
-#undef SCHAR_MAX
-#undef UCHAR_MAX
-#undef SHRT_MIN
-#undef SHRT_MAX
-#undef USHRT_MAX
-#undef LONG_MIN
-#undef LONG_MAX
-#undef ULONG_MAX
-#undef RAND_MAX
-#undef DBL_MAX
-#undef FLT_MAX
-#undef __record_type_class
-#undef __real_type_class
-
-#if HAVE_CHAR_BIT
-#undef CHAR_BIT
-#endif
-
// We need a sigsetjmp prototype in pal.h for the SEH macros, but we
// can't use the "real" prototype (because we don't want to define sigjmp_buf).
// So we must rename the "real" sigsetjmp to avoid redefinition errors.
// https://gcc.gnu.org/ml/libstdc++/2016-01/msg00025.html
#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS 1
-#define _WITH_GETLINE
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <string.h>
-#include <sys/types.h>
-#include <pwd.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <glob.h>
-
#ifdef __APPLE__
#undef GetCurrentThread
#ifdef __cplusplus
}
-bool
-ReadMemoryValueFromFile(const char* filename, uint64_t* val);
-
#ifdef __APPLE__
bool
GetApplicationContainerFolder(PathCharString& buffer, const char *applicationGroupId, int applicationGroupIdLength);
template <typename T>
inline T* InterlockedCompareExchangePointerT(
T* volatile * destination,
- int exchange, // When NULL is provided as argument.
+ std::nullptr_t exchange, // When NULL is provided as argument.
T* comparand)
{
//STATIC_ASSERT(exchange == 0);
- return InterlockedCompareExchangePointerT(destination, reinterpret_cast<T*>(exchange), comparand);
+ return InterlockedCompareExchangePointerT(destination, (T*)(void*)exchange, comparand);
}
template <typename T>
#endif // __cplusplus
-#if __has_cpp_attribute(fallthrough)
-#define FALLTHROUGH [[fallthrough]]
-#else
-#define FALLTHROUGH
-#endif
+DWORD PALAPI GetCurrentSessionId();
#endif /* _PAL_INTERNAL_H_ */
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- pal/printfcpp.hpp
-
-Abstract:
- Declarations for suspension safe memory allocation functions
-
-
-
---*/
-
-#ifndef _PRINTFCPP_HPP
-#define _PRINTFCPP_HPP
-
-#ifdef __cplusplus
-#include "pal/threadinfo.hpp"
-#endif
-
-#include <stdarg.h>
-
-#ifdef __cplusplus
-typedef char16_t wchar_16; // __wchar_16_cpp (which is defined in palinternal.h) needs to be redefined to wchar_16.
-
-extern "C"
-{
- int
- __cdecl
- PAL_vfprintf(
- PAL_FILE *stream,
- const char *format,
- va_list ap);
-
- int
- __cdecl
- PAL_vfwprintf(
- PAL_FILE *stream,
- const wchar_16 *format,
- va_list ap);
-}
-
-namespace CorUnix
-{
- int
- InternalVfprintf(
- CPalThread *pthrCurrent,
- PAL_FILE *stream,
- const char *format,
- va_list ap);
-
-}
-#else // __cplusplus
-
- int
- __cdecl
- PAL_vfprintf(
- PAL_FILE *stream,
- const char *format,
- va_list ap);
-
- int
- __cdecl
- PAL_vfwprintf(
- PAL_FILE *stream,
- const wchar_16 *format,
- va_list ap);
-
-#endif // __cplusplus
-
-#endif // _PRINTFCPP_HPP
-
Aborts the process after calling the shutdown cleanup handler. This function
should be called instead of calling abort() directly.
+Parameters:
+ signal - POSIX signal number
+ siginfo - POSIX signal info
+
Does not return
--*/
+#if !defined(HOST_ARM) // PAL_NORETURN produces broken unwinding information for this method
+ // making crash dumps impossible to analyze
PAL_NORETURN
-VOID PROCAbort();
+#endif
+VOID PROCAbort(int signal = SIGABRT, siginfo_t* siginfo = nullptr);
#ifdef __cplusplus
}
{
};
- ~CProcProcessLocalData();
+ ~CProcProcessLocalData()
+ {
+ };
DWORD dwProcessId;
PROCESS_STATE ps;
void DeleteBuffer()
{
if (m_innerBuffer != m_buffer)
- PAL_free(m_buffer);
+ free(m_buffer);
m_buffer = NULL;
return;
m_buffer = NULL;
}
- T * newBuffer = (T *)PAL_realloc(m_buffer, (count_allocated + 1) * sizeof(T));
+ T * newBuffer = (T *)realloc(m_buffer, (count_allocated + 1) * sizeof(T));
if (NULL == newBuffer)
{
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
#endif
// Some Helper Definitions
-BOOL
-PAL_GetPALDirectoryW(
- PathWCharString& lpDirectoryName);
-BOOL
-PAL_GetPALDirectoryA(
- PathCharString& lpDirectoryName);
DWORD
GetCurrentDirectoryA(
PathCharString& lpBuffer);
-void
-FILEDosToUnixPathA(
- PathCharString& lpPath);
HANDLE *phThread
);
- /* In the windows CRT there is a constant defined for the max width
- of a _ecvt conversion. That constant is 348. 348 for the value, plus
- the exponent value, decimal, and sign if required. */
-#define ECVT_MAX_COUNT_SIZE 348
-#define ECVT_MAX_BUFFER_SIZE 357
-
- /*STR_TIME_SIZE is defined as 26 the size of the
- return val by ctime_r*/
-#define STR_TIME_SIZE 26
class CThreadCRTInfo : public CThreadInfoInitializer
{
//
// The only other spot the refcount is touched is from within
// CPalObjectBase::ReleaseReference -- incremented before the
- // destructors for an ojbect are called, and decremented afterwords.
+ // destructors for an object are called, and decremented afterwords.
// This permits the freeing of the thread structure to happen after
// the freeing of the enclosing thread object has completed.
//
include/pal/threadinfo.hpp
Abstract:
- Header file for thread info initialzer
+ Header file for thread info initializer
// instantiation time.
#include "pal/threadinfo.hpp"
#include "pal/thread.hpp"
-#include "pal/printfcpp.hpp"
#include "pal/mutex.hpp"
#include "pal/init.h"
#include <signal.h>
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#ifndef _PAL_UNICODEDATA_H_
-#define _PAL_UNICODEDATA_H_
-
-#include "pal/palinternal.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif // __cplusplus
-
-#define UPPER_CASE 1
-#define LOWER_CASE 2
-
-typedef struct
-{
- WCHAR nUnicodeValue;
- WORD nFlag;
- WCHAR nOpposingCase;
-} UnicodeDataRec;
-
-extern CONST UnicodeDataRec UnicodeData[];
-extern CONST UINT UNICODE_DATA_SIZE;
-
-#ifdef __cplusplus
-}
-#endif // __cplusplus
-
-#endif /* _UNICODE_DATA_H_ */
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-
-
-Module Name:
-
- include/pal/utf8.h
-
-Abstract:
- Header file for UTF-8 conversion functions.
-
-Revision History:
-
-
-
---*/
-
-#ifndef _PAL_UTF8_H_
-#define _PAL_UTF8_H_
-
-#include <pal/palinternal.h> /* for WCHAR */
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif // __cplusplus
-
-/*++
-Function :
- UTF8ToUnicode
-
- Convert a string from UTF-8 to UTF-16 (UCS-2)
---*/
-int UTF8ToUnicode(LPCSTR lpSrcStr, int cchSrc, LPWSTR lpDestStr, int cchDest, DWORD dwFlags);
-
-
-/*++
-Function :
- UnicodeToUTF8
-
- Convert a string from UTF-16 (UCS-2) to UTF-8
---*/
-int UnicodeToUTF8(LPCWSTR lpSrcStr, int cchSrc, LPSTR lpDestStr, int cchDest);
-
-#ifdef __cplusplus
-}
-#endif // __cplusplus
-
-#endif /* _PAL_UTF8_H_ */
StringHolder() : data(NULL) { }
~StringHolder()
{
- PAL_free( data);
+ free( data);
}
operator LPSTR () { return data;}
};
#endif /* _PAL_UTILS_H_ */
+
+const char *GetFriendlyErrorCodeString(int errorCode);
DWORD accessProtection; /* Initial allocation access protection. */
DWORD allocationType; /* Initial allocation type. */
-
- BYTE * pAllocState; /* Individual allocation type tracking for each */
- /* page in the region. */
-
- BYTE * pProtectionState; /* Individual allocation type tracking for each */
- /* page in the region. */
-
} CMI, * PCMI;
enum VIRTUAL_CONSTANTS
int32_t GenerateRandomStartOffset();
private:
+
// There does not seem to be an easy way find the size of a library on Unix.
- // So this constant represents an approximation of the libcoreclr size (on debug build)
+ // So this constant represents an approximation of the libcoreclr size
// that can be used to calculate an approximate location of the memory that
// is in 2GB range from the coreclr library. In addition, having precise size of libcoreclr
// is not necessary for the calculations.
- static const int32_t CoreClrLibrarySize = 100 * 1024 * 1024;
+ static const int32_t CoreClrLibrarySize = 16 * 1024 * 1024;
// This constant represent the max size of the virtual memory that this allocator
// will try to reserve during initialization. We want all JIT-ed code and the
- // entire libcoreclr to be located in a 2GB range.
+ // entire libcoreclr to be located in a 2GB range on x86
+#if defined(TARGET_ARM) || defined(TARGET_ARM64)
+ // It seems to be more difficult to reserve a 2Gb chunk on arm so we'll try smaller one
+ static const int32_t MaxExecutableMemorySize = 1024 * 1024 * 1024;
+#else
static const int32_t MaxExecutableMemorySize = 0x7FFF0000;
+#endif
+
static const int32_t MaxExecutableMemorySizeNearCoreClr = MaxExecutableMemorySize - CoreClrLibrarySize;
// Start address of the reserved virtual address space
Function :
ReserveMemoryFromExecutableAllocator
- This function is used to reserve a region of virual memory (not commited)
+ This function is used to reserve a region of virual memory (not committed)
that is located close to the coreclr library. The memory comes from the virtual
address range that is managed by ExecutableMemoryAllocator.
--*/
#ifdef __FreeBSD__
#include <sys/user.h>
-#include <sys/sysctl.h>
#endif
#include <algorithm>
using namespace CorUnix;
-//
-// $$TODO The C++ compiler doesn't like pal/cruntime.h so duplicate the
-// necessary prototype here
-//
-
-extern "C" BOOL CRTInitStdStreams( void );
Volatile<INT> init_count = 0;
Volatile<BOOL> shutdown_intent = 0;
{
int ret = 0;
size_t sz = sizeof(ret);
- if (sysctlbyname("sysctl.proc_native", &ret, &sz, NULL, 0) != 0)
+ if (sysctlbyname("sysctl.proc_native", &ret, &sz, nullptr, 0) != 0)
{
// if the sysctl failed, we'll assume this OS does not support
// binary translation - so we must be running natively.
DWORD flags)
{
PAL_ERROR palError = ERROR_GEN_FAILURE;
- CPalThread *pThread = NULL;
- CSharedMemoryObjectManager *pshmom = NULL;
+ CPalThread *pThread = nullptr;
+ CSharedMemoryObjectManager *pshmom = nullptr;
int retval = -1;
bool fFirstTimeInit = false;
CriticalSectionSubSysInitialize();
- if(NULL == init_critsec)
+ if(nullptr == init_critsec)
{
pthread_mutex_lock(&init_critsec_mutex); // prevents race condition of two threads
// initializing the critical section.
- if(NULL == init_critsec)
+ if(nullptr == init_critsec)
{
static CRITICAL_SECTION temp_critsec;
// Want this critical section to NOT be internal to avoid the use of unsafe region markers.
InternalInitializeCriticalSectionAndSpinCount(&temp_critsec, 0, false);
- if(NULL != InterlockedCompareExchangePointer(&init_critsec, &temp_critsec, NULL))
+ if(nullptr != InterlockedCompareExchangePointer(&init_critsec, &temp_critsec, nullptr))
{
// Another thread got in before us! shouldn't happen, if the PAL
// isn't initialized there shouldn't be any other threads
pthread_mutex_unlock(&init_critsec_mutex);
}
- InternalEnterCriticalSection(pThread, init_critsec); // here pThread is always NULL
+ InternalEnterCriticalSection(pThread, init_critsec); // here pThread is always nullptr
if (init_count == 0)
{
//
pshmom = InternalNew<CSharedMemoryObjectManager>();
- if (NULL == pshmom)
+ if (nullptr == pshmom)
{
ERROR("Unable to allocate new object manager\n");
palError = ERROR_OUTOFMEMORY;
g_pSynchronizationManager =
CPalSynchMgrController::CreatePalSynchronizationManager();
- if (NULL == g_pSynchronizationManager)
+ if (nullptr == g_pSynchronizationManager)
{
palError = ERROR_NOT_ENOUGH_MEMORY;
ERROR("Failure creating synchronization manager\n");
}
}
- if (FALSE == CRTInitStdStreams())
- {
- ERROR("Unable to initialize CRT standard streams\n");
- palError = ERROR_PALINIT_STD_STREAMS;
- goto CLEANUP15;
- }
-
TRACE("First-time PAL initialization complete.\n");
init_count++;
}
goto done;
- /* No cleanup required for CRTInitStdStreams */
-CLEANUP15:
- FILECleanupStdHandles();
CLEANUP14:
CLEANUP13:
VIRTUALCleanup();
if (fFirstTimeInit && 0 == retval)
{
- _ASSERTE(NULL != pThread);
+ _ASSERTE(nullptr != pThread);
}
if (retval != 0 && GetLastError() == ERROR_SUCCESS)
struct kinfo_proc info = {};
size_t size = sizeof(info);
int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid() };
- int ret = sysctl(mib, sizeof(mib)/sizeof(*mib), &info, &size, NULL, 0);
+ int ret = sysctl(mib, sizeof(mib)/sizeof(*mib), &info, &size, nullptr, 0);
if (ret == 0)
#if defined(__APPLE__)
struct kinfo_proc *info;
- kd = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, "kvm_open");
- if (kd == NULL)
+ kd = kvm_open(nullptr, nullptr, nullptr, KVM_NO_FILES, "kvm_open");
+ if (kd == nullptr)
return FALSE;
info = kvm_getprocs(kd, KERN_PROC_PID, getpid(), &cnt);
- if (info == NULL || cnt < 1)
+ if (info == nullptr || cnt < 1)
{
kvm_close(kd);
return FALSE;
Function:
PALInitLock
-Take the initializaiton critical section (init_critsec). necessary to serialize
+Take the initialization critical section (init_critsec). necessary to serialize
TerminateProcess along with PAL_Terminate and PAL_Initialize
(no parameters)
Return value :
TRUE if critical section existed (and was acquired)
- FALSE if critical section doens't exist yet
+ FALSE if critical section doesn't exist yet
--*/
BOOL PALInitLock(void)
{
}
CPalThread * pThread =
- (PALIsThreadDataInitialized() ? InternalGetCurrentThread() : NULL);
+ (PALIsThreadDataInitialized() ? InternalGetCurrentThread() : nullptr);
InternalEnterCriticalSection(pThread, init_critsec);
return TRUE;
}
CPalThread * pThread =
- (PALIsThreadDataInitialized() ? InternalGetCurrentThread() : NULL);
+ (PALIsThreadDataInitialized() ? InternalGetCurrentThread() : nullptr);
InternalLeaveCriticalSection(pThread, init_critsec);
}
MODSTRUCT exe_module;
MODSTRUCT *pal_module = nullptr;
-char * g_szCoreCLRPath = nullptr;
bool g_running_in_exe = false;
int MaxWCharToAcpLength = 3;
return nullptr;
}
- LPSTR lpstr = nullptr;
HMODULE hModule = nullptr;
- PERF_ENTRY(LoadLibraryA);
+ PERF_ENTRY(LoadLibraryExA);
ENTRY("LoadLibraryExA (lpLibFileName=%p (%s)) \n",
(lpLibFileName) ? lpLibFileName : "NULL",
(lpLibFileName) ? lpLibFileName : "NULL");
}
/* do the Dos/Unix conversion on our own copy of the name */
- lpstr = strdup(lpLibFileName);
- if (!lpstr)
- {
- ERROR("strdup failure!\n");
- SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- goto Done;
- }
- FILEDosToUnixPathA(lpstr);
-
- hModule = LOADLoadLibrary(lpstr, TRUE);
+ hModule = LOADLoadLibrary(lpLibFileName, TRUE);
/* let LOADLoadLibrary call SetLastError */
Done:
- if (lpstr != nullptr)
- {
- free(lpstr);
- }
LOGEXIT("LoadLibraryExA returns HMODULE %p\n", hModule);
PERF_EXIT(LoadLibraryExA);
goto done;
}
- /* do the Dos/Unix conversion on our own copy of the name */
- FILEDosToUnixPathA(lpstr);
pathstr.CloseBuffer(name_length);
/* let LOADLoadLibrary call SetLastError in case of failure */
}
// Get the symbol's address.
-
- // If we're looking for a symbol inside the PAL, we try the PAL_ variant
- // first because otherwise we run the risk of having the non-PAL_
- // variant preferred over the PAL's implementation.
- if (pal_module && module->dl_handle == pal_module->dl_handle)
- {
- int iLen = 4 + strlen(lpProcName) + 1;
- LPSTR lpPALProcName = (LPSTR) alloca(iLen);
-
- if (strcpy_s(lpPALProcName, iLen, "PAL_") != SAFECRT_SUCCESS)
- {
- ERROR("strcpy_s failed!\n");
- SetLastError(ERROR_INSUFFICIENT_BUFFER);
- goto done;
- }
-
- if (strcat_s(lpPALProcName, iLen, lpProcName) != SAFECRT_SUCCESS)
- {
- ERROR("strcat_s failed!\n");
- SetLastError(ERROR_INSUFFICIENT_BUFFER);
- goto done;
- }
-
- ProcAddress = (FARPROC) dlsym(module->dl_handle, lpPALProcName);
- symbolName = lpPALProcName;
- }
-
- // If we aren't looking inside the PAL or we didn't find a PAL_ variant
- // inside the PAL, fall back to a normal search.
- if (ProcAddress == nullptr)
- {
- ProcAddress = (FARPROC) dlsym(module->dl_handle, lpProcName);
- }
-
+ ProcAddress = (FARPROC) dlsym(module->dl_handle, lpProcName);
if (ProcAddress)
{
TRACE("Symbol %s found at address %p in module %p (named %S)\n",
goto done;
}
- /* do the Dos/Unix conversion on our own copy of the name */
- FILEDosToUnixPathA(lpstr);
pathstr.CloseBuffer(name_length);
lpcstr = FixLibCName(lpstr);
goes in MODSTRUCT::lib_name
Return value:
- a pointer to a new, initialized MODSTRUCT strucutre, or NULL on failure.
+ a pointer to a new, initialized MODSTRUCT structure, or NULL on failure.
Notes :
'name' is used to initialize MODSTRUCT::lib_name. The other member is set to NULL
LPWSTR wide_name;
/* no match found : try to create a new module structure */
- module = (MODSTRUCT *)InternalMalloc(sizeof(MODSTRUCT));
+ module = (MODSTRUCT *)malloc(sizeof(MODSTRUCT));
if (nullptr == module)
{
ERROR("malloc() failed! errno is %d (%s)\n", errno, strerror(errno));
return module;
}
-/*++
-Function :
- LOADGetPalLibrary
-
- Load and initialize the PAL module.
-
-Parameters :
- None
-
-Return value :
- pointer to module struct
-
---*/
-MODSTRUCT *LOADGetPalLibrary()
-{
- if (pal_module == nullptr)
- {
- // Initialize the pal module (the module containing LOADGetPalLibrary). Assumes that
- // the PAL is linked into the coreclr module because we use the module name containing
- // this function for the coreclr path.
- TRACE("Loading module for PAL library\n");
-
- Dl_info info;
- if (dladdr((PVOID)&LOADGetPalLibrary, &info) == 0)
- {
- ERROR("LOADGetPalLibrary: dladdr() failed.\n");
- goto exit;
- }
- // Stash a copy of the CoreCLR installation path in a global variable.
- // Make sure it's terminated with a slash.
- if (g_szCoreCLRPath == nullptr)
- {
- size_t cbszCoreCLRPath = strlen(info.dli_fname) + 1;
- g_szCoreCLRPath = (char*) InternalMalloc(cbszCoreCLRPath);
-
- if (g_szCoreCLRPath == nullptr)
- {
- ERROR("LOADGetPalLibrary: InternalMalloc failed!");
- goto exit;
- }
-
- if (strcpy_s(g_szCoreCLRPath, cbszCoreCLRPath, info.dli_fname) != SAFECRT_SUCCESS)
- {
- ERROR("LOADGetPalLibrary: strcpy_s failed!");
- goto exit;
- }
- }
-
- if (g_running_in_exe)
- {
- pal_module = (MODSTRUCT*)LOADLoadLibrary(nullptr, FALSE);
- }
- else
- {
- pal_module = (MODSTRUCT*)LOADLoadLibrary(info.dli_fname, FALSE);
- }
- }
-
-exit:
- return pal_module;
-}
-
/*++
Function:
LockModuleList
// The .NET Foundation licenses this file to you under the MIT license.
/*++
-
-
-
Module Name:
-
unicode.cpp
Abstract:
-
Implementation of all functions related to Unicode support
-
-Revision History:
-
-
-
--*/
#include "pal/thread.hpp"
#include "pal/palinternal.h"
#include "pal/dbgmsg.h"
#include "pal/file.h"
-#include "pal/utf8.h"
+#include <minipal/utf8.h>
#include "pal/cruntime.h"
#include "pal/stackstring.hpp"
-#include "pal/unicodedata.h"
#include <pthread.h>
#include <locale.h>
SET_DEFAULT_DEBUG_CHANNEL(UNICODE);
-/*++
-Function:
-UnicodeDataComp
-This is the comparison function used by the bsearch function to search
-for unicode characters in the UnicodeData array.
-
-Parameter:
-pnKey
-The unicode character value to search for.
-elem
-A pointer to a UnicodeDataRec.
-
-Return value:
-<0 if pnKey < elem->nUnicodeValue
-0 if pnKey == elem->nUnicodeValue
->0 if pnKey > elem->nUnicodeValue
---*/
-static int UnicodeDataComp(const void *pnKey, const void *elem)
-{
- WCHAR uValue = ((UnicodeDataRec*)elem)->nUnicodeValue;
-
- if (*((INT*)pnKey) < uValue)
- {
- return -1;
- }
- else if (*((INT*)pnKey) > uValue)
- {
- return 1;
- }
- else
- {
- return 0;
- }
-}
-
-/*++
-Function:
-GetUnicodeData
-This function is used to get information about a Unicode character.
-
-Parameters:
-nUnicodeValue
-The numeric value of the Unicode character to get information about.
-pDataRec
-The UnicodeDataRec to fill in with the data for the Unicode character.
-
-Return value:
-TRUE if the Unicode character was found.
-
---*/
-BOOL GetUnicodeData(INT nUnicodeValue, UnicodeDataRec *pDataRec)
-{
- BOOL bRet;
-
- UnicodeDataRec *dataRec;
- INT nNumOfChars = UNICODE_DATA_SIZE;
- dataRec = (UnicodeDataRec *) bsearch(&nUnicodeValue, UnicodeData, nNumOfChars,
- sizeof(UnicodeDataRec), UnicodeDataComp);
- if (dataRec == NULL)
- {
- bRet = FALSE;
- }
- else
- {
- bRet = TRUE;
- *pDataRec = *dataRec;
- }
- return bRet;
-}
-
-wchar_16
-__cdecl
-PAL_ToUpperInvariant( wchar_16 c )
-{
- UnicodeDataRec dataRec;
-
- PERF_ENTRY(PAL_ToUpperInvariant);
- ENTRY("PAL_ToUpperInvariant (c=%d)\n", c);
-
- if (!GetUnicodeData(c, &dataRec))
- {
- TRACE( "Unable to retrieve unicode data for the character %c.\n", c );
- LOGEXIT("PAL_ToUpperInvariant returns int %d\n", c );
- PERF_EXIT(PAL_ToUpperInvariant);
- return c;
- }
-
- if ( dataRec.nFlag != LOWER_CASE )
- {
- LOGEXIT("PAL_ToUpperInvariant returns int %d\n", c );
- PERF_EXIT(PAL_ToUpperInvariant);
- return c;
- }
- else
- {
- LOGEXIT("PAL_ToUpperInvariant returns int %d\n", dataRec.nOpposingCase );
- PERF_EXIT(PAL_ToUpperInvariant);
- return dataRec.nOpposingCase;
- }
-}
-
-wchar_16
-__cdecl
-PAL_ToLowerInvariant( wchar_16 c )
-{
- UnicodeDataRec dataRec;
-
- PERF_ENTRY(PAL_ToLowerInvariant);
- ENTRY("PAL_ToLowerInvariant (c=%d)\n", c);
-
- if (!GetUnicodeData(c, &dataRec))
- {
- TRACE( "Unable to retrieve unicode data for the character %c.\n", c );
- LOGEXIT("PAL_ToLowerInvariant returns int %d\n", c );
- PERF_EXIT(PAL_ToLowerInvariant);
- return c;
- }
-
- if ( dataRec.nFlag != UPPER_CASE )
- {
- LOGEXIT("PAL_ToLowerInvariant returns int %d\n", c );
- PERF_EXIT(PAL_ToLowerInvariant);
- return c;
- }
- else
- {
- LOGEXIT("PAL_ToLowerInvariant returns int %d\n", dataRec.nOpposingCase );
- PERF_EXIT(PAL_ToLowerInvariant);
- return dataRec.nOpposingCase;
- }
-}
-
/*++
Function:
GetConsoleOutputCP
goto EXIT;
}
- // Use UTF8ToUnicode on all systems, since it replaces
- // invalid characters and Core Foundation doesn't do that.
if (CodePage == CP_UTF8 || CodePage == CP_ACP)
{
- if (cbMultiByte <= -1)
+ if (cbMultiByte < 0)
+ cbMultiByte = strlen(lpMultiByteStr) + 1;
+
+ if (!lpWideCharStr || cchWideChar == 0)
+ retval = minipal_get_length_utf8_to_utf16(lpMultiByteStr, cbMultiByte, dwFlags);
+
+ if (lpWideCharStr)
{
- cbMultiByte = strlen(lpMultiByteStr) + 1;
+ if (cchWideChar == 0) cchWideChar = retval;
+ retval = minipal_convert_utf8_to_utf16(lpMultiByteStr, cbMultiByte, (CHAR16_T*)lpWideCharStr, cchWideChar, dwFlags);
}
- retval = UTF8ToUnicode(lpMultiByteStr, cbMultiByte, lpWideCharStr, cchWideChar, dwFlags);
goto EXIT;
}
defaultChar = *lpDefaultChar;
}
- // Use UnicodeToUTF8 on all systems because we use
- // UTF8ToUnicode in MultiByteToWideChar() on all systems.
if (CodePage == CP_UTF8 || CodePage == CP_ACP)
{
- if (cchWideChar == -1)
- {
+ if (cchWideChar < 0)
cchWideChar = PAL_wcslen(lpWideCharStr) + 1;
+
+ if (!lpMultiByteStr || cbMultiByte == 0)
+ retval = minipal_get_length_utf16_to_utf8((CHAR16_T*)lpWideCharStr, cchWideChar, dwFlags);
+
+ if (lpMultiByteStr)
+ {
+ if (cbMultiByte == 0) cbMultiByte = retval;
+ retval = minipal_convert_utf16_to_utf8((CHAR16_T*)lpWideCharStr, cchWideChar, lpMultiByteStr, cbMultiByte, dwFlags);
}
- retval = UnicodeToUTF8(lpWideCharStr, cchWideChar, lpMultiByteStr, cbMultiByte);
+
goto EXIT;
}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-#include "pal/unicodedata.h"
-
-//
-// THIS FILE IS GENERATED. DO NOT HAND EDIT.
-//
-
-CONST UnicodeDataRec UnicodeData[] = {
- { 0x41, UPPER_CASE, 0x61 },
- { 0x42, UPPER_CASE, 0x62 },
- { 0x43, UPPER_CASE, 0x63 },
- { 0x44, UPPER_CASE, 0x64 },
- { 0x45, UPPER_CASE, 0x65 },
- { 0x46, UPPER_CASE, 0x66 },
- { 0x47, UPPER_CASE, 0x67 },
- { 0x48, UPPER_CASE, 0x68 },
- { 0x49, UPPER_CASE, 0x69 },
- { 0x4A, UPPER_CASE, 0x6A },
- { 0x4B, UPPER_CASE, 0x6B },
- { 0x4C, UPPER_CASE, 0x6C },
- { 0x4D, UPPER_CASE, 0x6D },
- { 0x4E, UPPER_CASE, 0x6E },
- { 0x4F, UPPER_CASE, 0x6F },
- { 0x50, UPPER_CASE, 0x70 },
- { 0x51, UPPER_CASE, 0x71 },
- { 0x52, UPPER_CASE, 0x72 },
- { 0x53, UPPER_CASE, 0x73 },
- { 0x54, UPPER_CASE, 0x74 },
- { 0x55, UPPER_CASE, 0x75 },
- { 0x56, UPPER_CASE, 0x76 },
- { 0x57, UPPER_CASE, 0x77 },
- { 0x58, UPPER_CASE, 0x78 },
- { 0x59, UPPER_CASE, 0x79 },
- { 0x5A, UPPER_CASE, 0x7A },
- { 0x61, LOWER_CASE, 0x41 },
- { 0x62, LOWER_CASE, 0x42 },
- { 0x63, LOWER_CASE, 0x43 },
- { 0x64, LOWER_CASE, 0x44 },
- { 0x65, LOWER_CASE, 0x45 },
- { 0x66, LOWER_CASE, 0x46 },
- { 0x67, LOWER_CASE, 0x47 },
- { 0x68, LOWER_CASE, 0x48 },
- { 0x69, LOWER_CASE, 0x49 },
- { 0x6A, LOWER_CASE, 0x4A },
- { 0x6B, LOWER_CASE, 0x4B },
- { 0x6C, LOWER_CASE, 0x4C },
- { 0x6D, LOWER_CASE, 0x4D },
- { 0x6E, LOWER_CASE, 0x4E },
- { 0x6F, LOWER_CASE, 0x4F },
- { 0x70, LOWER_CASE, 0x50 },
- { 0x71, LOWER_CASE, 0x51 },
- { 0x72, LOWER_CASE, 0x52 },
- { 0x73, LOWER_CASE, 0x53 },
- { 0x74, LOWER_CASE, 0x54 },
- { 0x75, LOWER_CASE, 0x55 },
- { 0x76, LOWER_CASE, 0x56 },
- { 0x77, LOWER_CASE, 0x57 },
- { 0x78, LOWER_CASE, 0x58 },
- { 0x79, LOWER_CASE, 0x59 },
- { 0x7A, LOWER_CASE, 0x5A },
- { 0xB5, LOWER_CASE, 0x39C },
- { 0xC0, UPPER_CASE, 0xE0 },
- { 0xC1, UPPER_CASE, 0xE1 },
- { 0xC2, UPPER_CASE, 0xE2 },
- { 0xC3, UPPER_CASE, 0xE3 },
- { 0xC4, UPPER_CASE, 0xE4 },
- { 0xC5, UPPER_CASE, 0xE5 },
- { 0xC6, UPPER_CASE, 0xE6 },
- { 0xC7, UPPER_CASE, 0xE7 },
- { 0xC8, UPPER_CASE, 0xE8 },
- { 0xC9, UPPER_CASE, 0xE9 },
- { 0xCA, UPPER_CASE, 0xEA },
- { 0xCB, UPPER_CASE, 0xEB },
- { 0xCC, UPPER_CASE, 0xEC },
- { 0xCD, UPPER_CASE, 0xED },
- { 0xCE, UPPER_CASE, 0xEE },
- { 0xCF, UPPER_CASE, 0xEF },
- { 0xD0, UPPER_CASE, 0xF0 },
- { 0xD1, UPPER_CASE, 0xF1 },
- { 0xD2, UPPER_CASE, 0xF2 },
- { 0xD3, UPPER_CASE, 0xF3 },
- { 0xD4, UPPER_CASE, 0xF4 },
- { 0xD5, UPPER_CASE, 0xF5 },
- { 0xD6, UPPER_CASE, 0xF6 },
- { 0xD8, UPPER_CASE, 0xF8 },
- { 0xD9, UPPER_CASE, 0xF9 },
- { 0xDA, UPPER_CASE, 0xFA },
- { 0xDB, UPPER_CASE, 0xFB },
- { 0xDC, UPPER_CASE, 0xFC },
- { 0xDD, UPPER_CASE, 0xFD },
- { 0xDE, UPPER_CASE, 0xFE },
- { 0xE0, LOWER_CASE, 0xC0 },
- { 0xE1, LOWER_CASE, 0xC1 },
- { 0xE2, LOWER_CASE, 0xC2 },
- { 0xE3, LOWER_CASE, 0xC3 },
- { 0xE4, LOWER_CASE, 0xC4 },
- { 0xE5, LOWER_CASE, 0xC5 },
- { 0xE6, LOWER_CASE, 0xC6 },
- { 0xE7, LOWER_CASE, 0xC7 },
- { 0xE8, LOWER_CASE, 0xC8 },
- { 0xE9, LOWER_CASE, 0xC9 },
- { 0xEA, LOWER_CASE, 0xCA },
- { 0xEB, LOWER_CASE, 0xCB },
- { 0xEC, LOWER_CASE, 0xCC },
- { 0xED, LOWER_CASE, 0xCD },
- { 0xEE, LOWER_CASE, 0xCE },
- { 0xEF, LOWER_CASE, 0xCF },
- { 0xF0, LOWER_CASE, 0xD0 },
- { 0xF1, LOWER_CASE, 0xD1 },
- { 0xF2, LOWER_CASE, 0xD2 },
- { 0xF3, LOWER_CASE, 0xD3 },
- { 0xF4, LOWER_CASE, 0xD4 },
- { 0xF5, LOWER_CASE, 0xD5 },
- { 0xF6, LOWER_CASE, 0xD6 },
- { 0xF8, LOWER_CASE, 0xD8 },
- { 0xF9, LOWER_CASE, 0xD9 },
- { 0xFA, LOWER_CASE, 0xDA },
- { 0xFB, LOWER_CASE, 0xDB },
- { 0xFC, LOWER_CASE, 0xDC },
- { 0xFD, LOWER_CASE, 0xDD },
- { 0xFE, LOWER_CASE, 0xDE },
- { 0xFF, LOWER_CASE, 0x178 },
- { 0x100, UPPER_CASE, 0x101 },
- { 0x101, LOWER_CASE, 0x100 },
- { 0x102, UPPER_CASE, 0x103 },
- { 0x103, LOWER_CASE, 0x102 },
- { 0x104, UPPER_CASE, 0x105 },
- { 0x105, LOWER_CASE, 0x104 },
- { 0x106, UPPER_CASE, 0x107 },
- { 0x107, LOWER_CASE, 0x106 },
- { 0x108, UPPER_CASE, 0x109 },
- { 0x109, LOWER_CASE, 0x108 },
- { 0x10A, UPPER_CASE, 0x10B },
- { 0x10B, LOWER_CASE, 0x10A },
- { 0x10C, UPPER_CASE, 0x10D },
- { 0x10D, LOWER_CASE, 0x10C },
- { 0x10E, UPPER_CASE, 0x10F },
- { 0x10F, LOWER_CASE, 0x10E },
- { 0x110, UPPER_CASE, 0x111 },
- { 0x111, LOWER_CASE, 0x110 },
- { 0x112, UPPER_CASE, 0x113 },
- { 0x113, LOWER_CASE, 0x112 },
- { 0x114, UPPER_CASE, 0x115 },
- { 0x115, LOWER_CASE, 0x114 },
- { 0x116, UPPER_CASE, 0x117 },
- { 0x117, LOWER_CASE, 0x116 },
- { 0x118, UPPER_CASE, 0x119 },
- { 0x119, LOWER_CASE, 0x118 },
- { 0x11A, UPPER_CASE, 0x11B },
- { 0x11B, LOWER_CASE, 0x11A },
- { 0x11C, UPPER_CASE, 0x11D },
- { 0x11D, LOWER_CASE, 0x11C },
- { 0x11E, UPPER_CASE, 0x11F },
- { 0x11F, LOWER_CASE, 0x11E },
- { 0x120, UPPER_CASE, 0x121 },
- { 0x121, LOWER_CASE, 0x120 },
- { 0x122, UPPER_CASE, 0x123 },
- { 0x123, LOWER_CASE, 0x122 },
- { 0x124, UPPER_CASE, 0x125 },
- { 0x125, LOWER_CASE, 0x124 },
- { 0x126, UPPER_CASE, 0x127 },
- { 0x127, LOWER_CASE, 0x126 },
- { 0x128, UPPER_CASE, 0x129 },
- { 0x129, LOWER_CASE, 0x128 },
- { 0x12A, UPPER_CASE, 0x12B },
- { 0x12B, LOWER_CASE, 0x12A },
- { 0x12C, UPPER_CASE, 0x12D },
- { 0x12D, LOWER_CASE, 0x12C },
- { 0x12E, UPPER_CASE, 0x12F },
- { 0x12F, LOWER_CASE, 0x12E },
- { 0x130, UPPER_CASE, 0x69 },
- { 0x131, LOWER_CASE, 0x49 },
- { 0x132, UPPER_CASE, 0x133 },
- { 0x133, LOWER_CASE, 0x132 },
- { 0x134, UPPER_CASE, 0x135 },
- { 0x135, LOWER_CASE, 0x134 },
- { 0x136, UPPER_CASE, 0x137 },
- { 0x137, LOWER_CASE, 0x136 },
- { 0x139, UPPER_CASE, 0x13A },
- { 0x13A, LOWER_CASE, 0x139 },
- { 0x13B, UPPER_CASE, 0x13C },
- { 0x13C, LOWER_CASE, 0x13B },
- { 0x13D, UPPER_CASE, 0x13E },
- { 0x13E, LOWER_CASE, 0x13D },
- { 0x13F, UPPER_CASE, 0x140 },
- { 0x140, LOWER_CASE, 0x13F },
- { 0x141, UPPER_CASE, 0x142 },
- { 0x142, LOWER_CASE, 0x141 },
- { 0x143, UPPER_CASE, 0x144 },
- { 0x144, LOWER_CASE, 0x143 },
- { 0x145, UPPER_CASE, 0x146 },
- { 0x146, LOWER_CASE, 0x145 },
- { 0x147, UPPER_CASE, 0x148 },
- { 0x148, LOWER_CASE, 0x147 },
- { 0x14A, UPPER_CASE, 0x14B },
- { 0x14B, LOWER_CASE, 0x14A },
- { 0x14C, UPPER_CASE, 0x14D },
- { 0x14D, LOWER_CASE, 0x14C },
- { 0x14E, UPPER_CASE, 0x14F },
- { 0x14F, LOWER_CASE, 0x14E },
- { 0x150, UPPER_CASE, 0x151 },
- { 0x151, LOWER_CASE, 0x150 },
- { 0x152, UPPER_CASE, 0x153 },
- { 0x153, LOWER_CASE, 0x152 },
- { 0x154, UPPER_CASE, 0x155 },
- { 0x155, LOWER_CASE, 0x154 },
- { 0x156, UPPER_CASE, 0x157 },
- { 0x157, LOWER_CASE, 0x156 },
- { 0x158, UPPER_CASE, 0x159 },
- { 0x159, LOWER_CASE, 0x158 },
- { 0x15A, UPPER_CASE, 0x15B },
- { 0x15B, LOWER_CASE, 0x15A },
- { 0x15C, UPPER_CASE, 0x15D },
- { 0x15D, LOWER_CASE, 0x15C },
- { 0x15E, UPPER_CASE, 0x15F },
- { 0x15F, LOWER_CASE, 0x15E },
- { 0x160, UPPER_CASE, 0x161 },
- { 0x161, LOWER_CASE, 0x160 },
- { 0x162, UPPER_CASE, 0x163 },
- { 0x163, LOWER_CASE, 0x162 },
- { 0x164, UPPER_CASE, 0x165 },
- { 0x165, LOWER_CASE, 0x164 },
- { 0x166, UPPER_CASE, 0x167 },
- { 0x167, LOWER_CASE, 0x166 },
- { 0x168, UPPER_CASE, 0x169 },
- { 0x169, LOWER_CASE, 0x168 },
- { 0x16A, UPPER_CASE, 0x16B },
- { 0x16B, LOWER_CASE, 0x16A },
- { 0x16C, UPPER_CASE, 0x16D },
- { 0x16D, LOWER_CASE, 0x16C },
- { 0x16E, UPPER_CASE, 0x16F },
- { 0x16F, LOWER_CASE, 0x16E },
- { 0x170, UPPER_CASE, 0x171 },
- { 0x171, LOWER_CASE, 0x170 },
- { 0x172, UPPER_CASE, 0x173 },
- { 0x173, LOWER_CASE, 0x172 },
- { 0x174, UPPER_CASE, 0x175 },
- { 0x175, LOWER_CASE, 0x174 },
- { 0x176, UPPER_CASE, 0x177 },
- { 0x177, LOWER_CASE, 0x176 },
- { 0x178, UPPER_CASE, 0xFF },
- { 0x179, UPPER_CASE, 0x17A },
- { 0x17A, LOWER_CASE, 0x179 },
- { 0x17B, UPPER_CASE, 0x17C },
- { 0x17C, LOWER_CASE, 0x17B },
- { 0x17D, UPPER_CASE, 0x17E },
- { 0x17E, LOWER_CASE, 0x17D },
- { 0x17F, LOWER_CASE, 0x53 },
- { 0x180, LOWER_CASE, 0x243 },
- { 0x181, UPPER_CASE, 0x253 },
- { 0x182, UPPER_CASE, 0x183 },
- { 0x183, LOWER_CASE, 0x182 },
- { 0x184, UPPER_CASE, 0x185 },
- { 0x185, LOWER_CASE, 0x184 },
- { 0x186, UPPER_CASE, 0x254 },
- { 0x187, UPPER_CASE, 0x188 },
- { 0x188, LOWER_CASE, 0x187 },
- { 0x189, UPPER_CASE, 0x256 },
- { 0x18A, UPPER_CASE, 0x257 },
- { 0x18B, UPPER_CASE, 0x18C },
- { 0x18C, LOWER_CASE, 0x18B },
- { 0x18E, UPPER_CASE, 0x1DD },
- { 0x18F, UPPER_CASE, 0x259 },
- { 0x190, UPPER_CASE, 0x25B },
- { 0x191, UPPER_CASE, 0x192 },
- { 0x192, LOWER_CASE, 0x191 },
- { 0x193, UPPER_CASE, 0x260 },
- { 0x194, UPPER_CASE, 0x263 },
- { 0x195, LOWER_CASE, 0x1F6 },
- { 0x196, UPPER_CASE, 0x269 },
- { 0x197, UPPER_CASE, 0x268 },
- { 0x198, UPPER_CASE, 0x199 },
- { 0x199, LOWER_CASE, 0x198 },
- { 0x19A, LOWER_CASE, 0x23D },
- { 0x19C, UPPER_CASE, 0x26F },
- { 0x19D, UPPER_CASE, 0x272 },
- { 0x19E, LOWER_CASE, 0x220 },
- { 0x19F, UPPER_CASE, 0x275 },
- { 0x1A0, UPPER_CASE, 0x1A1 },
- { 0x1A1, LOWER_CASE, 0x1A0 },
- { 0x1A2, UPPER_CASE, 0x1A3 },
- { 0x1A3, LOWER_CASE, 0x1A2 },
- { 0x1A4, UPPER_CASE, 0x1A5 },
- { 0x1A5, LOWER_CASE, 0x1A4 },
- { 0x1A6, UPPER_CASE, 0x280 },
- { 0x1A7, UPPER_CASE, 0x1A8 },
- { 0x1A8, LOWER_CASE, 0x1A7 },
- { 0x1A9, UPPER_CASE, 0x283 },
- { 0x1AC, UPPER_CASE, 0x1AD },
- { 0x1AD, LOWER_CASE, 0x1AC },
- { 0x1AE, UPPER_CASE, 0x288 },
- { 0x1AF, UPPER_CASE, 0x1B0 },
- { 0x1B0, LOWER_CASE, 0x1AF },
- { 0x1B1, UPPER_CASE, 0x28A },
- { 0x1B2, UPPER_CASE, 0x28B },
- { 0x1B3, UPPER_CASE, 0x1B4 },
- { 0x1B4, LOWER_CASE, 0x1B3 },
- { 0x1B5, UPPER_CASE, 0x1B6 },
- { 0x1B6, LOWER_CASE, 0x1B5 },
- { 0x1B7, UPPER_CASE, 0x292 },
- { 0x1B8, UPPER_CASE, 0x1B9 },
- { 0x1B9, LOWER_CASE, 0x1B8 },
- { 0x1BC, UPPER_CASE, 0x1BD },
- { 0x1BD, LOWER_CASE, 0x1BC },
- { 0x1BF, LOWER_CASE, 0x1F7 },
- { 0x1C4, UPPER_CASE, 0x1C6 },
- { 0x1C5, LOWER_CASE, 0x1C4 },
- { 0x1C6, LOWER_CASE, 0x1C4 },
- { 0x1C7, UPPER_CASE, 0x1C9 },
- { 0x1C8, LOWER_CASE, 0x1C7 },
- { 0x1C9, LOWER_CASE, 0x1C7 },
- { 0x1CA, UPPER_CASE, 0x1CC },
- { 0x1CB, LOWER_CASE, 0x1CA },
- { 0x1CC, LOWER_CASE, 0x1CA },
- { 0x1CD, UPPER_CASE, 0x1CE },
- { 0x1CE, LOWER_CASE, 0x1CD },
- { 0x1CF, UPPER_CASE, 0x1D0 },
- { 0x1D0, LOWER_CASE, 0x1CF },
- { 0x1D1, UPPER_CASE, 0x1D2 },
- { 0x1D2, LOWER_CASE, 0x1D1 },
- { 0x1D3, UPPER_CASE, 0x1D4 },
- { 0x1D4, LOWER_CASE, 0x1D3 },
- { 0x1D5, UPPER_CASE, 0x1D6 },
- { 0x1D6, LOWER_CASE, 0x1D5 },
- { 0x1D7, UPPER_CASE, 0x1D8 },
- { 0x1D8, LOWER_CASE, 0x1D7 },
- { 0x1D9, UPPER_CASE, 0x1DA },
- { 0x1DA, LOWER_CASE, 0x1D9 },
- { 0x1DB, UPPER_CASE, 0x1DC },
- { 0x1DC, LOWER_CASE, 0x1DB },
- { 0x1DD, LOWER_CASE, 0x18E },
- { 0x1DE, UPPER_CASE, 0x1DF },
- { 0x1DF, LOWER_CASE, 0x1DE },
- { 0x1E0, UPPER_CASE, 0x1E1 },
- { 0x1E1, LOWER_CASE, 0x1E0 },
- { 0x1E2, UPPER_CASE, 0x1E3 },
- { 0x1E3, LOWER_CASE, 0x1E2 },
- { 0x1E4, UPPER_CASE, 0x1E5 },
- { 0x1E5, LOWER_CASE, 0x1E4 },
- { 0x1E6, UPPER_CASE, 0x1E7 },
- { 0x1E7, LOWER_CASE, 0x1E6 },
- { 0x1E8, UPPER_CASE, 0x1E9 },
- { 0x1E9, LOWER_CASE, 0x1E8 },
- { 0x1EA, UPPER_CASE, 0x1EB },
- { 0x1EB, LOWER_CASE, 0x1EA },
- { 0x1EC, UPPER_CASE, 0x1ED },
- { 0x1ED, LOWER_CASE, 0x1EC },
- { 0x1EE, UPPER_CASE, 0x1EF },
- { 0x1EF, LOWER_CASE, 0x1EE },
- { 0x1F1, UPPER_CASE, 0x1F3 },
- { 0x1F2, LOWER_CASE, 0x1F1 },
- { 0x1F3, LOWER_CASE, 0x1F1 },
- { 0x1F4, UPPER_CASE, 0x1F5 },
- { 0x1F5, LOWER_CASE, 0x1F4 },
- { 0x1F6, UPPER_CASE, 0x195 },
- { 0x1F7, UPPER_CASE, 0x1BF },
- { 0x1F8, UPPER_CASE, 0x1F9 },
- { 0x1F9, LOWER_CASE, 0x1F8 },
- { 0x1FA, UPPER_CASE, 0x1FB },
- { 0x1FB, LOWER_CASE, 0x1FA },
- { 0x1FC, UPPER_CASE, 0x1FD },
- { 0x1FD, LOWER_CASE, 0x1FC },
- { 0x1FE, UPPER_CASE, 0x1FF },
- { 0x1FF, LOWER_CASE, 0x1FE },
- { 0x200, UPPER_CASE, 0x201 },
- { 0x201, LOWER_CASE, 0x200 },
- { 0x202, UPPER_CASE, 0x203 },
- { 0x203, LOWER_CASE, 0x202 },
- { 0x204, UPPER_CASE, 0x205 },
- { 0x205, LOWER_CASE, 0x204 },
- { 0x206, UPPER_CASE, 0x207 },
- { 0x207, LOWER_CASE, 0x206 },
- { 0x208, UPPER_CASE, 0x209 },
- { 0x209, LOWER_CASE, 0x208 },
- { 0x20A, UPPER_CASE, 0x20B },
- { 0x20B, LOWER_CASE, 0x20A },
- { 0x20C, UPPER_CASE, 0x20D },
- { 0x20D, LOWER_CASE, 0x20C },
- { 0x20E, UPPER_CASE, 0x20F },
- { 0x20F, LOWER_CASE, 0x20E },
- { 0x210, UPPER_CASE, 0x211 },
- { 0x211, LOWER_CASE, 0x210 },
- { 0x212, UPPER_CASE, 0x213 },
- { 0x213, LOWER_CASE, 0x212 },
- { 0x214, UPPER_CASE, 0x215 },
- { 0x215, LOWER_CASE, 0x214 },
- { 0x216, UPPER_CASE, 0x217 },
- { 0x217, LOWER_CASE, 0x216 },
- { 0x218, UPPER_CASE, 0x219 },
- { 0x219, LOWER_CASE, 0x218 },
- { 0x21A, UPPER_CASE, 0x21B },
- { 0x21B, LOWER_CASE, 0x21A },
- { 0x21C, UPPER_CASE, 0x21D },
- { 0x21D, LOWER_CASE, 0x21C },
- { 0x21E, UPPER_CASE, 0x21F },
- { 0x21F, LOWER_CASE, 0x21E },
- { 0x220, UPPER_CASE, 0x19E },
- { 0x222, UPPER_CASE, 0x223 },
- { 0x223, LOWER_CASE, 0x222 },
- { 0x224, UPPER_CASE, 0x225 },
- { 0x225, LOWER_CASE, 0x224 },
- { 0x226, UPPER_CASE, 0x227 },
- { 0x227, LOWER_CASE, 0x226 },
- { 0x228, UPPER_CASE, 0x229 },
- { 0x229, LOWER_CASE, 0x228 },
- { 0x22A, UPPER_CASE, 0x22B },
- { 0x22B, LOWER_CASE, 0x22A },
- { 0x22C, UPPER_CASE, 0x22D },
- { 0x22D, LOWER_CASE, 0x22C },
- { 0x22E, UPPER_CASE, 0x22F },
- { 0x22F, LOWER_CASE, 0x22E },
- { 0x230, UPPER_CASE, 0x231 },
- { 0x231, LOWER_CASE, 0x230 },
- { 0x232, UPPER_CASE, 0x233 },
- { 0x233, LOWER_CASE, 0x232 },
- { 0x23A, UPPER_CASE, 0x2C65 },
- { 0x23B, UPPER_CASE, 0x23C },
- { 0x23C, LOWER_CASE, 0x23B },
- { 0x23D, UPPER_CASE, 0x19A },
- { 0x23E, UPPER_CASE, 0x2C66 },
- { 0x23F, LOWER_CASE, 0x2C7E },
- { 0x240, LOWER_CASE, 0x2C7F },
- { 0x241, UPPER_CASE, 0x242 },
- { 0x242, LOWER_CASE, 0x241 },
- { 0x243, UPPER_CASE, 0x180 },
- { 0x244, UPPER_CASE, 0x289 },
- { 0x245, UPPER_CASE, 0x28C },
- { 0x246, UPPER_CASE, 0x247 },
- { 0x247, LOWER_CASE, 0x246 },
- { 0x248, UPPER_CASE, 0x249 },
- { 0x249, LOWER_CASE, 0x248 },
- { 0x24A, UPPER_CASE, 0x24B },
- { 0x24B, LOWER_CASE, 0x24A },
- { 0x24C, UPPER_CASE, 0x24D },
- { 0x24D, LOWER_CASE, 0x24C },
- { 0x24E, UPPER_CASE, 0x24F },
- { 0x24F, LOWER_CASE, 0x24E },
- { 0x250, LOWER_CASE, 0x2C6F },
- { 0x251, LOWER_CASE, 0x2C6D },
- { 0x252, LOWER_CASE, 0x2C70 },
- { 0x253, LOWER_CASE, 0x181 },
- { 0x254, LOWER_CASE, 0x186 },
- { 0x256, LOWER_CASE, 0x189 },
- { 0x257, LOWER_CASE, 0x18A },
- { 0x259, LOWER_CASE, 0x18F },
- { 0x25B, LOWER_CASE, 0x190 },
- { 0x25C, LOWER_CASE, 0xA7AB },
- { 0x260, LOWER_CASE, 0x193 },
- { 0x261, LOWER_CASE, 0xA7AC },
- { 0x263, LOWER_CASE, 0x194 },
- { 0x265, LOWER_CASE, 0xA78D },
- { 0x266, LOWER_CASE, 0xA7AA },
- { 0x268, LOWER_CASE, 0x197 },
- { 0x269, LOWER_CASE, 0x196 },
- { 0x26A, LOWER_CASE, 0xA7AE },
- { 0x26B, LOWER_CASE, 0x2C62 },
- { 0x26C, LOWER_CASE, 0xA7AD },
- { 0x26F, LOWER_CASE, 0x19C },
- { 0x271, LOWER_CASE, 0x2C6E },
- { 0x272, LOWER_CASE, 0x19D },
- { 0x275, LOWER_CASE, 0x19F },
- { 0x27D, LOWER_CASE, 0x2C64 },
- { 0x280, LOWER_CASE, 0x1A6 },
- { 0x282, LOWER_CASE, 0xA7C5 },
- { 0x283, LOWER_CASE, 0x1A9 },
- { 0x287, LOWER_CASE, 0xA7B1 },
- { 0x288, LOWER_CASE, 0x1AE },
- { 0x289, LOWER_CASE, 0x244 },
- { 0x28A, LOWER_CASE, 0x1B1 },
- { 0x28B, LOWER_CASE, 0x1B2 },
- { 0x28C, LOWER_CASE, 0x245 },
- { 0x292, LOWER_CASE, 0x1B7 },
- { 0x29D, LOWER_CASE, 0xA7B2 },
- { 0x29E, LOWER_CASE, 0xA7B0 },
- { 0x345, LOWER_CASE, 0x399 },
- { 0x370, UPPER_CASE, 0x371 },
- { 0x371, LOWER_CASE, 0x370 },
- { 0x372, UPPER_CASE, 0x373 },
- { 0x373, LOWER_CASE, 0x372 },
- { 0x376, UPPER_CASE, 0x377 },
- { 0x377, LOWER_CASE, 0x376 },
- { 0x37B, LOWER_CASE, 0x3FD },
- { 0x37C, LOWER_CASE, 0x3FE },
- { 0x37D, LOWER_CASE, 0x3FF },
- { 0x37F, UPPER_CASE, 0x3F3 },
- { 0x386, UPPER_CASE, 0x3AC },
- { 0x388, UPPER_CASE, 0x3AD },
- { 0x389, UPPER_CASE, 0x3AE },
- { 0x38A, UPPER_CASE, 0x3AF },
- { 0x38C, UPPER_CASE, 0x3CC },
- { 0x38E, UPPER_CASE, 0x3CD },
- { 0x38F, UPPER_CASE, 0x3CE },
- { 0x391, UPPER_CASE, 0x3B1 },
- { 0x392, UPPER_CASE, 0x3B2 },
- { 0x393, UPPER_CASE, 0x3B3 },
- { 0x394, UPPER_CASE, 0x3B4 },
- { 0x395, UPPER_CASE, 0x3B5 },
- { 0x396, UPPER_CASE, 0x3B6 },
- { 0x397, UPPER_CASE, 0x3B7 },
- { 0x398, UPPER_CASE, 0x3B8 },
- { 0x399, UPPER_CASE, 0x3B9 },
- { 0x39A, UPPER_CASE, 0x3BA },
- { 0x39B, UPPER_CASE, 0x3BB },
- { 0x39C, UPPER_CASE, 0x3BC },
- { 0x39D, UPPER_CASE, 0x3BD },
- { 0x39E, UPPER_CASE, 0x3BE },
- { 0x39F, UPPER_CASE, 0x3BF },
- { 0x3A0, UPPER_CASE, 0x3C0 },
- { 0x3A1, UPPER_CASE, 0x3C1 },
- { 0x3A3, UPPER_CASE, 0x3C3 },
- { 0x3A4, UPPER_CASE, 0x3C4 },
- { 0x3A5, UPPER_CASE, 0x3C5 },
- { 0x3A6, UPPER_CASE, 0x3C6 },
- { 0x3A7, UPPER_CASE, 0x3C7 },
- { 0x3A8, UPPER_CASE, 0x3C8 },
- { 0x3A9, UPPER_CASE, 0x3C9 },
- { 0x3AA, UPPER_CASE, 0x3CA },
- { 0x3AB, UPPER_CASE, 0x3CB },
- { 0x3AC, LOWER_CASE, 0x386 },
- { 0x3AD, LOWER_CASE, 0x388 },
- { 0x3AE, LOWER_CASE, 0x389 },
- { 0x3AF, LOWER_CASE, 0x38A },
- { 0x3B1, LOWER_CASE, 0x391 },
- { 0x3B2, LOWER_CASE, 0x392 },
- { 0x3B3, LOWER_CASE, 0x393 },
- { 0x3B4, LOWER_CASE, 0x394 },
- { 0x3B5, LOWER_CASE, 0x395 },
- { 0x3B6, LOWER_CASE, 0x396 },
- { 0x3B7, LOWER_CASE, 0x397 },
- { 0x3B8, LOWER_CASE, 0x398 },
- { 0x3B9, LOWER_CASE, 0x399 },
- { 0x3BA, LOWER_CASE, 0x39A },
- { 0x3BB, LOWER_CASE, 0x39B },
- { 0x3BC, LOWER_CASE, 0x39C },
- { 0x3BD, LOWER_CASE, 0x39D },
- { 0x3BE, LOWER_CASE, 0x39E },
- { 0x3BF, LOWER_CASE, 0x39F },
- { 0x3C0, LOWER_CASE, 0x3A0 },
- { 0x3C1, LOWER_CASE, 0x3A1 },
- { 0x3C2, LOWER_CASE, 0x3A3 },
- { 0x3C3, LOWER_CASE, 0x3A3 },
- { 0x3C4, LOWER_CASE, 0x3A4 },
- { 0x3C5, LOWER_CASE, 0x3A5 },
- { 0x3C6, LOWER_CASE, 0x3A6 },
- { 0x3C7, LOWER_CASE, 0x3A7 },
- { 0x3C8, LOWER_CASE, 0x3A8 },
- { 0x3C9, LOWER_CASE, 0x3A9 },
- { 0x3CA, LOWER_CASE, 0x3AA },
- { 0x3CB, LOWER_CASE, 0x3AB },
- { 0x3CC, LOWER_CASE, 0x38C },
- { 0x3CD, LOWER_CASE, 0x38E },
- { 0x3CE, LOWER_CASE, 0x38F },
- { 0x3CF, UPPER_CASE, 0x3D7 },
- { 0x3D0, LOWER_CASE, 0x392 },
- { 0x3D1, LOWER_CASE, 0x398 },
- { 0x3D5, LOWER_CASE, 0x3A6 },
- { 0x3D6, LOWER_CASE, 0x3A0 },
- { 0x3D7, LOWER_CASE, 0x3CF },
- { 0x3D8, UPPER_CASE, 0x3D9 },
- { 0x3D9, LOWER_CASE, 0x3D8 },
- { 0x3DA, UPPER_CASE, 0x3DB },
- { 0x3DB, LOWER_CASE, 0x3DA },
- { 0x3DC, UPPER_CASE, 0x3DD },
- { 0x3DD, LOWER_CASE, 0x3DC },
- { 0x3DE, UPPER_CASE, 0x3DF },
- { 0x3DF, LOWER_CASE, 0x3DE },
- { 0x3E0, UPPER_CASE, 0x3E1 },
- { 0x3E1, LOWER_CASE, 0x3E0 },
- { 0x3E2, UPPER_CASE, 0x3E3 },
- { 0x3E3, LOWER_CASE, 0x3E2 },
- { 0x3E4, UPPER_CASE, 0x3E5 },
- { 0x3E5, LOWER_CASE, 0x3E4 },
- { 0x3E6, UPPER_CASE, 0x3E7 },
- { 0x3E7, LOWER_CASE, 0x3E6 },
- { 0x3E8, UPPER_CASE, 0x3E9 },
- { 0x3E9, LOWER_CASE, 0x3E8 },
- { 0x3EA, UPPER_CASE, 0x3EB },
- { 0x3EB, LOWER_CASE, 0x3EA },
- { 0x3EC, UPPER_CASE, 0x3ED },
- { 0x3ED, LOWER_CASE, 0x3EC },
- { 0x3EE, UPPER_CASE, 0x3EF },
- { 0x3EF, LOWER_CASE, 0x3EE },
- { 0x3F0, LOWER_CASE, 0x39A },
- { 0x3F1, LOWER_CASE, 0x3A1 },
- { 0x3F2, LOWER_CASE, 0x3F9 },
- { 0x3F3, LOWER_CASE, 0x37F },
- { 0x3F4, UPPER_CASE, 0x3B8 },
- { 0x3F5, LOWER_CASE, 0x395 },
- { 0x3F7, UPPER_CASE, 0x3F8 },
- { 0x3F8, LOWER_CASE, 0x3F7 },
- { 0x3F9, UPPER_CASE, 0x3F2 },
- { 0x3FA, UPPER_CASE, 0x3FB },
- { 0x3FB, LOWER_CASE, 0x3FA },
- { 0x3FD, UPPER_CASE, 0x37B },
- { 0x3FE, UPPER_CASE, 0x37C },
- { 0x3FF, UPPER_CASE, 0x37D },
- { 0x400, UPPER_CASE, 0x450 },
- { 0x401, UPPER_CASE, 0x451 },
- { 0x402, UPPER_CASE, 0x452 },
- { 0x403, UPPER_CASE, 0x453 },
- { 0x404, UPPER_CASE, 0x454 },
- { 0x405, UPPER_CASE, 0x455 },
- { 0x406, UPPER_CASE, 0x456 },
- { 0x407, UPPER_CASE, 0x457 },
- { 0x408, UPPER_CASE, 0x458 },
- { 0x409, UPPER_CASE, 0x459 },
- { 0x40A, UPPER_CASE, 0x45A },
- { 0x40B, UPPER_CASE, 0x45B },
- { 0x40C, UPPER_CASE, 0x45C },
- { 0x40D, UPPER_CASE, 0x45D },
- { 0x40E, UPPER_CASE, 0x45E },
- { 0x40F, UPPER_CASE, 0x45F },
- { 0x410, UPPER_CASE, 0x430 },
- { 0x411, UPPER_CASE, 0x431 },
- { 0x412, UPPER_CASE, 0x432 },
- { 0x413, UPPER_CASE, 0x433 },
- { 0x414, UPPER_CASE, 0x434 },
- { 0x415, UPPER_CASE, 0x435 },
- { 0x416, UPPER_CASE, 0x436 },
- { 0x417, UPPER_CASE, 0x437 },
- { 0x418, UPPER_CASE, 0x438 },
- { 0x419, UPPER_CASE, 0x439 },
- { 0x41A, UPPER_CASE, 0x43A },
- { 0x41B, UPPER_CASE, 0x43B },
- { 0x41C, UPPER_CASE, 0x43C },
- { 0x41D, UPPER_CASE, 0x43D },
- { 0x41E, UPPER_CASE, 0x43E },
- { 0x41F, UPPER_CASE, 0x43F },
- { 0x420, UPPER_CASE, 0x440 },
- { 0x421, UPPER_CASE, 0x441 },
- { 0x422, UPPER_CASE, 0x442 },
- { 0x423, UPPER_CASE, 0x443 },
- { 0x424, UPPER_CASE, 0x444 },
- { 0x425, UPPER_CASE, 0x445 },
- { 0x426, UPPER_CASE, 0x446 },
- { 0x427, UPPER_CASE, 0x447 },
- { 0x428, UPPER_CASE, 0x448 },
- { 0x429, UPPER_CASE, 0x449 },
- { 0x42A, UPPER_CASE, 0x44A },
- { 0x42B, UPPER_CASE, 0x44B },
- { 0x42C, UPPER_CASE, 0x44C },
- { 0x42D, UPPER_CASE, 0x44D },
- { 0x42E, UPPER_CASE, 0x44E },
- { 0x42F, UPPER_CASE, 0x44F },
- { 0x430, LOWER_CASE, 0x410 },
- { 0x431, LOWER_CASE, 0x411 },
- { 0x432, LOWER_CASE, 0x412 },
- { 0x433, LOWER_CASE, 0x413 },
- { 0x434, LOWER_CASE, 0x414 },
- { 0x435, LOWER_CASE, 0x415 },
- { 0x436, LOWER_CASE, 0x416 },
- { 0x437, LOWER_CASE, 0x417 },
- { 0x438, LOWER_CASE, 0x418 },
- { 0x439, LOWER_CASE, 0x419 },
- { 0x43A, LOWER_CASE, 0x41A },
- { 0x43B, LOWER_CASE, 0x41B },
- { 0x43C, LOWER_CASE, 0x41C },
- { 0x43D, LOWER_CASE, 0x41D },
- { 0x43E, LOWER_CASE, 0x41E },
- { 0x43F, LOWER_CASE, 0x41F },
- { 0x440, LOWER_CASE, 0x420 },
- { 0x441, LOWER_CASE, 0x421 },
- { 0x442, LOWER_CASE, 0x422 },
- { 0x443, LOWER_CASE, 0x423 },
- { 0x444, LOWER_CASE, 0x424 },
- { 0x445, LOWER_CASE, 0x425 },
- { 0x446, LOWER_CASE, 0x426 },
- { 0x447, LOWER_CASE, 0x427 },
- { 0x448, LOWER_CASE, 0x428 },
- { 0x449, LOWER_CASE, 0x429 },
- { 0x44A, LOWER_CASE, 0x42A },
- { 0x44B, LOWER_CASE, 0x42B },
- { 0x44C, LOWER_CASE, 0x42C },
- { 0x44D, LOWER_CASE, 0x42D },
- { 0x44E, LOWER_CASE, 0x42E },
- { 0x44F, LOWER_CASE, 0x42F },
- { 0x450, LOWER_CASE, 0x400 },
- { 0x451, LOWER_CASE, 0x401 },
- { 0x452, LOWER_CASE, 0x402 },
- { 0x453, LOWER_CASE, 0x403 },
- { 0x454, LOWER_CASE, 0x404 },
- { 0x455, LOWER_CASE, 0x405 },
- { 0x456, LOWER_CASE, 0x406 },
- { 0x457, LOWER_CASE, 0x407 },
- { 0x458, LOWER_CASE, 0x408 },
- { 0x459, LOWER_CASE, 0x409 },
- { 0x45A, LOWER_CASE, 0x40A },
- { 0x45B, LOWER_CASE, 0x40B },
- { 0x45C, LOWER_CASE, 0x40C },
- { 0x45D, LOWER_CASE, 0x40D },
- { 0x45E, LOWER_CASE, 0x40E },
- { 0x45F, LOWER_CASE, 0x40F },
- { 0x460, UPPER_CASE, 0x461 },
- { 0x461, LOWER_CASE, 0x460 },
- { 0x462, UPPER_CASE, 0x463 },
- { 0x463, LOWER_CASE, 0x462 },
- { 0x464, UPPER_CASE, 0x465 },
- { 0x465, LOWER_CASE, 0x464 },
- { 0x466, UPPER_CASE, 0x467 },
- { 0x467, LOWER_CASE, 0x466 },
- { 0x468, UPPER_CASE, 0x469 },
- { 0x469, LOWER_CASE, 0x468 },
- { 0x46A, UPPER_CASE, 0x46B },
- { 0x46B, LOWER_CASE, 0x46A },
- { 0x46C, UPPER_CASE, 0x46D },
- { 0x46D, LOWER_CASE, 0x46C },
- { 0x46E, UPPER_CASE, 0x46F },
- { 0x46F, LOWER_CASE, 0x46E },
- { 0x470, UPPER_CASE, 0x471 },
- { 0x471, LOWER_CASE, 0x470 },
- { 0x472, UPPER_CASE, 0x473 },
- { 0x473, LOWER_CASE, 0x472 },
- { 0x474, UPPER_CASE, 0x475 },
- { 0x475, LOWER_CASE, 0x474 },
- { 0x476, UPPER_CASE, 0x477 },
- { 0x477, LOWER_CASE, 0x476 },
- { 0x478, UPPER_CASE, 0x479 },
- { 0x479, LOWER_CASE, 0x478 },
- { 0x47A, UPPER_CASE, 0x47B },
- { 0x47B, LOWER_CASE, 0x47A },
- { 0x47C, UPPER_CASE, 0x47D },
- { 0x47D, LOWER_CASE, 0x47C },
- { 0x47E, UPPER_CASE, 0x47F },
- { 0x47F, LOWER_CASE, 0x47E },
- { 0x480, UPPER_CASE, 0x481 },
- { 0x481, LOWER_CASE, 0x480 },
- { 0x48A, UPPER_CASE, 0x48B },
- { 0x48B, LOWER_CASE, 0x48A },
- { 0x48C, UPPER_CASE, 0x48D },
- { 0x48D, LOWER_CASE, 0x48C },
- { 0x48E, UPPER_CASE, 0x48F },
- { 0x48F, LOWER_CASE, 0x48E },
- { 0x490, UPPER_CASE, 0x491 },
- { 0x491, LOWER_CASE, 0x490 },
- { 0x492, UPPER_CASE, 0x493 },
- { 0x493, LOWER_CASE, 0x492 },
- { 0x494, UPPER_CASE, 0x495 },
- { 0x495, LOWER_CASE, 0x494 },
- { 0x496, UPPER_CASE, 0x497 },
- { 0x497, LOWER_CASE, 0x496 },
- { 0x498, UPPER_CASE, 0x499 },
- { 0x499, LOWER_CASE, 0x498 },
- { 0x49A, UPPER_CASE, 0x49B },
- { 0x49B, LOWER_CASE, 0x49A },
- { 0x49C, UPPER_CASE, 0x49D },
- { 0x49D, LOWER_CASE, 0x49C },
- { 0x49E, UPPER_CASE, 0x49F },
- { 0x49F, LOWER_CASE, 0x49E },
- { 0x4A0, UPPER_CASE, 0x4A1 },
- { 0x4A1, LOWER_CASE, 0x4A0 },
- { 0x4A2, UPPER_CASE, 0x4A3 },
- { 0x4A3, LOWER_CASE, 0x4A2 },
- { 0x4A4, UPPER_CASE, 0x4A5 },
- { 0x4A5, LOWER_CASE, 0x4A4 },
- { 0x4A6, UPPER_CASE, 0x4A7 },
- { 0x4A7, LOWER_CASE, 0x4A6 },
- { 0x4A8, UPPER_CASE, 0x4A9 },
- { 0x4A9, LOWER_CASE, 0x4A8 },
- { 0x4AA, UPPER_CASE, 0x4AB },
- { 0x4AB, LOWER_CASE, 0x4AA },
- { 0x4AC, UPPER_CASE, 0x4AD },
- { 0x4AD, LOWER_CASE, 0x4AC },
- { 0x4AE, UPPER_CASE, 0x4AF },
- { 0x4AF, LOWER_CASE, 0x4AE },
- { 0x4B0, UPPER_CASE, 0x4B1 },
- { 0x4B1, LOWER_CASE, 0x4B0 },
- { 0x4B2, UPPER_CASE, 0x4B3 },
- { 0x4B3, LOWER_CASE, 0x4B2 },
- { 0x4B4, UPPER_CASE, 0x4B5 },
- { 0x4B5, LOWER_CASE, 0x4B4 },
- { 0x4B6, UPPER_CASE, 0x4B7 },
- { 0x4B7, LOWER_CASE, 0x4B6 },
- { 0x4B8, UPPER_CASE, 0x4B9 },
- { 0x4B9, LOWER_CASE, 0x4B8 },
- { 0x4BA, UPPER_CASE, 0x4BB },
- { 0x4BB, LOWER_CASE, 0x4BA },
- { 0x4BC, UPPER_CASE, 0x4BD },
- { 0x4BD, LOWER_CASE, 0x4BC },
- { 0x4BE, UPPER_CASE, 0x4BF },
- { 0x4BF, LOWER_CASE, 0x4BE },
- { 0x4C0, UPPER_CASE, 0x4CF },
- { 0x4C1, UPPER_CASE, 0x4C2 },
- { 0x4C2, LOWER_CASE, 0x4C1 },
- { 0x4C3, UPPER_CASE, 0x4C4 },
- { 0x4C4, LOWER_CASE, 0x4C3 },
- { 0x4C5, UPPER_CASE, 0x4C6 },
- { 0x4C6, LOWER_CASE, 0x4C5 },
- { 0x4C7, UPPER_CASE, 0x4C8 },
- { 0x4C8, LOWER_CASE, 0x4C7 },
- { 0x4C9, UPPER_CASE, 0x4CA },
- { 0x4CA, LOWER_CASE, 0x4C9 },
- { 0x4CB, UPPER_CASE, 0x4CC },
- { 0x4CC, LOWER_CASE, 0x4CB },
- { 0x4CD, UPPER_CASE, 0x4CE },
- { 0x4CE, LOWER_CASE, 0x4CD },
- { 0x4CF, LOWER_CASE, 0x4C0 },
- { 0x4D0, UPPER_CASE, 0x4D1 },
- { 0x4D1, LOWER_CASE, 0x4D0 },
- { 0x4D2, UPPER_CASE, 0x4D3 },
- { 0x4D3, LOWER_CASE, 0x4D2 },
- { 0x4D4, UPPER_CASE, 0x4D5 },
- { 0x4D5, LOWER_CASE, 0x4D4 },
- { 0x4D6, UPPER_CASE, 0x4D7 },
- { 0x4D7, LOWER_CASE, 0x4D6 },
- { 0x4D8, UPPER_CASE, 0x4D9 },
- { 0x4D9, LOWER_CASE, 0x4D8 },
- { 0x4DA, UPPER_CASE, 0x4DB },
- { 0x4DB, LOWER_CASE, 0x4DA },
- { 0x4DC, UPPER_CASE, 0x4DD },
- { 0x4DD, LOWER_CASE, 0x4DC },
- { 0x4DE, UPPER_CASE, 0x4DF },
- { 0x4DF, LOWER_CASE, 0x4DE },
- { 0x4E0, UPPER_CASE, 0x4E1 },
- { 0x4E1, LOWER_CASE, 0x4E0 },
- { 0x4E2, UPPER_CASE, 0x4E3 },
- { 0x4E3, LOWER_CASE, 0x4E2 },
- { 0x4E4, UPPER_CASE, 0x4E5 },
- { 0x4E5, LOWER_CASE, 0x4E4 },
- { 0x4E6, UPPER_CASE, 0x4E7 },
- { 0x4E7, LOWER_CASE, 0x4E6 },
- { 0x4E8, UPPER_CASE, 0x4E9 },
- { 0x4E9, LOWER_CASE, 0x4E8 },
- { 0x4EA, UPPER_CASE, 0x4EB },
- { 0x4EB, LOWER_CASE, 0x4EA },
- { 0x4EC, UPPER_CASE, 0x4ED },
- { 0x4ED, LOWER_CASE, 0x4EC },
- { 0x4EE, UPPER_CASE, 0x4EF },
- { 0x4EF, LOWER_CASE, 0x4EE },
- { 0x4F0, UPPER_CASE, 0x4F1 },
- { 0x4F1, LOWER_CASE, 0x4F0 },
- { 0x4F2, UPPER_CASE, 0x4F3 },
- { 0x4F3, LOWER_CASE, 0x4F2 },
- { 0x4F4, UPPER_CASE, 0x4F5 },
- { 0x4F5, LOWER_CASE, 0x4F4 },
- { 0x4F6, UPPER_CASE, 0x4F7 },
- { 0x4F7, LOWER_CASE, 0x4F6 },
- { 0x4F8, UPPER_CASE, 0x4F9 },
- { 0x4F9, LOWER_CASE, 0x4F8 },
- { 0x4FA, UPPER_CASE, 0x4FB },
- { 0x4FB, LOWER_CASE, 0x4FA },
- { 0x4FC, UPPER_CASE, 0x4FD },
- { 0x4FD, LOWER_CASE, 0x4FC },
- { 0x4FE, UPPER_CASE, 0x4FF },
- { 0x4FF, LOWER_CASE, 0x4FE },
- { 0x500, UPPER_CASE, 0x501 },
- { 0x501, LOWER_CASE, 0x500 },
- { 0x502, UPPER_CASE, 0x503 },
- { 0x503, LOWER_CASE, 0x502 },
- { 0x504, UPPER_CASE, 0x505 },
- { 0x505, LOWER_CASE, 0x504 },
- { 0x506, UPPER_CASE, 0x507 },
- { 0x507, LOWER_CASE, 0x506 },
- { 0x508, UPPER_CASE, 0x509 },
- { 0x509, LOWER_CASE, 0x508 },
- { 0x50A, UPPER_CASE, 0x50B },
- { 0x50B, LOWER_CASE, 0x50A },
- { 0x50C, UPPER_CASE, 0x50D },
- { 0x50D, LOWER_CASE, 0x50C },
- { 0x50E, UPPER_CASE, 0x50F },
- { 0x50F, LOWER_CASE, 0x50E },
- { 0x510, UPPER_CASE, 0x511 },
- { 0x511, LOWER_CASE, 0x510 },
- { 0x512, UPPER_CASE, 0x513 },
- { 0x513, LOWER_CASE, 0x512 },
- { 0x514, UPPER_CASE, 0x515 },
- { 0x515, LOWER_CASE, 0x514 },
- { 0x516, UPPER_CASE, 0x517 },
- { 0x517, LOWER_CASE, 0x516 },
- { 0x518, UPPER_CASE, 0x519 },
- { 0x519, LOWER_CASE, 0x518 },
- { 0x51A, UPPER_CASE, 0x51B },
- { 0x51B, LOWER_CASE, 0x51A },
- { 0x51C, UPPER_CASE, 0x51D },
- { 0x51D, LOWER_CASE, 0x51C },
- { 0x51E, UPPER_CASE, 0x51F },
- { 0x51F, LOWER_CASE, 0x51E },
- { 0x520, UPPER_CASE, 0x521 },
- { 0x521, LOWER_CASE, 0x520 },
- { 0x522, UPPER_CASE, 0x523 },
- { 0x523, LOWER_CASE, 0x522 },
- { 0x524, UPPER_CASE, 0x525 },
- { 0x525, LOWER_CASE, 0x524 },
- { 0x526, UPPER_CASE, 0x527 },
- { 0x527, LOWER_CASE, 0x526 },
- { 0x528, UPPER_CASE, 0x529 },
- { 0x529, LOWER_CASE, 0x528 },
- { 0x52A, UPPER_CASE, 0x52B },
- { 0x52B, LOWER_CASE, 0x52A },
- { 0x52C, UPPER_CASE, 0x52D },
- { 0x52D, LOWER_CASE, 0x52C },
- { 0x52E, UPPER_CASE, 0x52F },
- { 0x52F, LOWER_CASE, 0x52E },
- { 0x531, UPPER_CASE, 0x561 },
- { 0x532, UPPER_CASE, 0x562 },
- { 0x533, UPPER_CASE, 0x563 },
- { 0x534, UPPER_CASE, 0x564 },
- { 0x535, UPPER_CASE, 0x565 },
- { 0x536, UPPER_CASE, 0x566 },
- { 0x537, UPPER_CASE, 0x567 },
- { 0x538, UPPER_CASE, 0x568 },
- { 0x539, UPPER_CASE, 0x569 },
- { 0x53A, UPPER_CASE, 0x56A },
- { 0x53B, UPPER_CASE, 0x56B },
- { 0x53C, UPPER_CASE, 0x56C },
- { 0x53D, UPPER_CASE, 0x56D },
- { 0x53E, UPPER_CASE, 0x56E },
- { 0x53F, UPPER_CASE, 0x56F },
- { 0x540, UPPER_CASE, 0x570 },
- { 0x541, UPPER_CASE, 0x571 },
- { 0x542, UPPER_CASE, 0x572 },
- { 0x543, UPPER_CASE, 0x573 },
- { 0x544, UPPER_CASE, 0x574 },
- { 0x545, UPPER_CASE, 0x575 },
- { 0x546, UPPER_CASE, 0x576 },
- { 0x547, UPPER_CASE, 0x577 },
- { 0x548, UPPER_CASE, 0x578 },
- { 0x549, UPPER_CASE, 0x579 },
- { 0x54A, UPPER_CASE, 0x57A },
- { 0x54B, UPPER_CASE, 0x57B },
- { 0x54C, UPPER_CASE, 0x57C },
- { 0x54D, UPPER_CASE, 0x57D },
- { 0x54E, UPPER_CASE, 0x57E },
- { 0x54F, UPPER_CASE, 0x57F },
- { 0x550, UPPER_CASE, 0x580 },
- { 0x551, UPPER_CASE, 0x581 },
- { 0x552, UPPER_CASE, 0x582 },
- { 0x553, UPPER_CASE, 0x583 },
- { 0x554, UPPER_CASE, 0x584 },
- { 0x555, UPPER_CASE, 0x585 },
- { 0x556, UPPER_CASE, 0x586 },
- { 0x561, LOWER_CASE, 0x531 },
- { 0x562, LOWER_CASE, 0x532 },
- { 0x563, LOWER_CASE, 0x533 },
- { 0x564, LOWER_CASE, 0x534 },
- { 0x565, LOWER_CASE, 0x535 },
- { 0x566, LOWER_CASE, 0x536 },
- { 0x567, LOWER_CASE, 0x537 },
- { 0x568, LOWER_CASE, 0x538 },
- { 0x569, LOWER_CASE, 0x539 },
- { 0x56A, LOWER_CASE, 0x53A },
- { 0x56B, LOWER_CASE, 0x53B },
- { 0x56C, LOWER_CASE, 0x53C },
- { 0x56D, LOWER_CASE, 0x53D },
- { 0x56E, LOWER_CASE, 0x53E },
- { 0x56F, LOWER_CASE, 0x53F },
- { 0x570, LOWER_CASE, 0x540 },
- { 0x571, LOWER_CASE, 0x541 },
- { 0x572, LOWER_CASE, 0x542 },
- { 0x573, LOWER_CASE, 0x543 },
- { 0x574, LOWER_CASE, 0x544 },
- { 0x575, LOWER_CASE, 0x545 },
- { 0x576, LOWER_CASE, 0x546 },
- { 0x577, LOWER_CASE, 0x547 },
- { 0x578, LOWER_CASE, 0x548 },
- { 0x579, LOWER_CASE, 0x549 },
- { 0x57A, LOWER_CASE, 0x54A },
- { 0x57B, LOWER_CASE, 0x54B },
- { 0x57C, LOWER_CASE, 0x54C },
- { 0x57D, LOWER_CASE, 0x54D },
- { 0x57E, LOWER_CASE, 0x54E },
- { 0x57F, LOWER_CASE, 0x54F },
- { 0x580, LOWER_CASE, 0x550 },
- { 0x581, LOWER_CASE, 0x551 },
- { 0x582, LOWER_CASE, 0x552 },
- { 0x583, LOWER_CASE, 0x553 },
- { 0x584, LOWER_CASE, 0x554 },
- { 0x585, LOWER_CASE, 0x555 },
- { 0x586, LOWER_CASE, 0x556 },
- { 0x10A0, UPPER_CASE, 0x2D00 },
- { 0x10A1, UPPER_CASE, 0x2D01 },
- { 0x10A2, UPPER_CASE, 0x2D02 },
- { 0x10A3, UPPER_CASE, 0x2D03 },
- { 0x10A4, UPPER_CASE, 0x2D04 },
- { 0x10A5, UPPER_CASE, 0x2D05 },
- { 0x10A6, UPPER_CASE, 0x2D06 },
- { 0x10A7, UPPER_CASE, 0x2D07 },
- { 0x10A8, UPPER_CASE, 0x2D08 },
- { 0x10A9, UPPER_CASE, 0x2D09 },
- { 0x10AA, UPPER_CASE, 0x2D0A },
- { 0x10AB, UPPER_CASE, 0x2D0B },
- { 0x10AC, UPPER_CASE, 0x2D0C },
- { 0x10AD, UPPER_CASE, 0x2D0D },
- { 0x10AE, UPPER_CASE, 0x2D0E },
- { 0x10AF, UPPER_CASE, 0x2D0F },
- { 0x10B0, UPPER_CASE, 0x2D10 },
- { 0x10B1, UPPER_CASE, 0x2D11 },
- { 0x10B2, UPPER_CASE, 0x2D12 },
- { 0x10B3, UPPER_CASE, 0x2D13 },
- { 0x10B4, UPPER_CASE, 0x2D14 },
- { 0x10B5, UPPER_CASE, 0x2D15 },
- { 0x10B6, UPPER_CASE, 0x2D16 },
- { 0x10B7, UPPER_CASE, 0x2D17 },
- { 0x10B8, UPPER_CASE, 0x2D18 },
- { 0x10B9, UPPER_CASE, 0x2D19 },
- { 0x10BA, UPPER_CASE, 0x2D1A },
- { 0x10BB, UPPER_CASE, 0x2D1B },
- { 0x10BC, UPPER_CASE, 0x2D1C },
- { 0x10BD, UPPER_CASE, 0x2D1D },
- { 0x10BE, UPPER_CASE, 0x2D1E },
- { 0x10BF, UPPER_CASE, 0x2D1F },
- { 0x10C0, UPPER_CASE, 0x2D20 },
- { 0x10C1, UPPER_CASE, 0x2D21 },
- { 0x10C2, UPPER_CASE, 0x2D22 },
- { 0x10C3, UPPER_CASE, 0x2D23 },
- { 0x10C4, UPPER_CASE, 0x2D24 },
- { 0x10C5, UPPER_CASE, 0x2D25 },
- { 0x10C7, UPPER_CASE, 0x2D27 },
- { 0x10CD, UPPER_CASE, 0x2D2D },
- { 0x10D0, LOWER_CASE, 0x1C90 },
- { 0x10D1, LOWER_CASE, 0x1C91 },
- { 0x10D2, LOWER_CASE, 0x1C92 },
- { 0x10D3, LOWER_CASE, 0x1C93 },
- { 0x10D4, LOWER_CASE, 0x1C94 },
- { 0x10D5, LOWER_CASE, 0x1C95 },
- { 0x10D6, LOWER_CASE, 0x1C96 },
- { 0x10D7, LOWER_CASE, 0x1C97 },
- { 0x10D8, LOWER_CASE, 0x1C98 },
- { 0x10D9, LOWER_CASE, 0x1C99 },
- { 0x10DA, LOWER_CASE, 0x1C9A },
- { 0x10DB, LOWER_CASE, 0x1C9B },
- { 0x10DC, LOWER_CASE, 0x1C9C },
- { 0x10DD, LOWER_CASE, 0x1C9D },
- { 0x10DE, LOWER_CASE, 0x1C9E },
- { 0x10DF, LOWER_CASE, 0x1C9F },
- { 0x10E0, LOWER_CASE, 0x1CA0 },
- { 0x10E1, LOWER_CASE, 0x1CA1 },
- { 0x10E2, LOWER_CASE, 0x1CA2 },
- { 0x10E3, LOWER_CASE, 0x1CA3 },
- { 0x10E4, LOWER_CASE, 0x1CA4 },
- { 0x10E5, LOWER_CASE, 0x1CA5 },
- { 0x10E6, LOWER_CASE, 0x1CA6 },
- { 0x10E7, LOWER_CASE, 0x1CA7 },
- { 0x10E8, LOWER_CASE, 0x1CA8 },
- { 0x10E9, LOWER_CASE, 0x1CA9 },
- { 0x10EA, LOWER_CASE, 0x1CAA },
- { 0x10EB, LOWER_CASE, 0x1CAB },
- { 0x10EC, LOWER_CASE, 0x1CAC },
- { 0x10ED, LOWER_CASE, 0x1CAD },
- { 0x10EE, LOWER_CASE, 0x1CAE },
- { 0x10EF, LOWER_CASE, 0x1CAF },
- { 0x10F0, LOWER_CASE, 0x1CB0 },
- { 0x10F1, LOWER_CASE, 0x1CB1 },
- { 0x10F2, LOWER_CASE, 0x1CB2 },
- { 0x10F3, LOWER_CASE, 0x1CB3 },
- { 0x10F4, LOWER_CASE, 0x1CB4 },
- { 0x10F5, LOWER_CASE, 0x1CB5 },
- { 0x10F6, LOWER_CASE, 0x1CB6 },
- { 0x10F7, LOWER_CASE, 0x1CB7 },
- { 0x10F8, LOWER_CASE, 0x1CB8 },
- { 0x10F9, LOWER_CASE, 0x1CB9 },
- { 0x10FA, LOWER_CASE, 0x1CBA },
- { 0x10FD, LOWER_CASE, 0x1CBD },
- { 0x10FE, LOWER_CASE, 0x1CBE },
- { 0x10FF, LOWER_CASE, 0x1CBF },
- { 0x13A0, UPPER_CASE, 0xAB70 },
- { 0x13A1, UPPER_CASE, 0xAB71 },
- { 0x13A2, UPPER_CASE, 0xAB72 },
- { 0x13A3, UPPER_CASE, 0xAB73 },
- { 0x13A4, UPPER_CASE, 0xAB74 },
- { 0x13A5, UPPER_CASE, 0xAB75 },
- { 0x13A6, UPPER_CASE, 0xAB76 },
- { 0x13A7, UPPER_CASE, 0xAB77 },
- { 0x13A8, UPPER_CASE, 0xAB78 },
- { 0x13A9, UPPER_CASE, 0xAB79 },
- { 0x13AA, UPPER_CASE, 0xAB7A },
- { 0x13AB, UPPER_CASE, 0xAB7B },
- { 0x13AC, UPPER_CASE, 0xAB7C },
- { 0x13AD, UPPER_CASE, 0xAB7D },
- { 0x13AE, UPPER_CASE, 0xAB7E },
- { 0x13AF, UPPER_CASE, 0xAB7F },
- { 0x13B0, UPPER_CASE, 0xAB80 },
- { 0x13B1, UPPER_CASE, 0xAB81 },
- { 0x13B2, UPPER_CASE, 0xAB82 },
- { 0x13B3, UPPER_CASE, 0xAB83 },
- { 0x13B4, UPPER_CASE, 0xAB84 },
- { 0x13B5, UPPER_CASE, 0xAB85 },
- { 0x13B6, UPPER_CASE, 0xAB86 },
- { 0x13B7, UPPER_CASE, 0xAB87 },
- { 0x13B8, UPPER_CASE, 0xAB88 },
- { 0x13B9, UPPER_CASE, 0xAB89 },
- { 0x13BA, UPPER_CASE, 0xAB8A },
- { 0x13BB, UPPER_CASE, 0xAB8B },
- { 0x13BC, UPPER_CASE, 0xAB8C },
- { 0x13BD, UPPER_CASE, 0xAB8D },
- { 0x13BE, UPPER_CASE, 0xAB8E },
- { 0x13BF, UPPER_CASE, 0xAB8F },
- { 0x13C0, UPPER_CASE, 0xAB90 },
- { 0x13C1, UPPER_CASE, 0xAB91 },
- { 0x13C2, UPPER_CASE, 0xAB92 },
- { 0x13C3, UPPER_CASE, 0xAB93 },
- { 0x13C4, UPPER_CASE, 0xAB94 },
- { 0x13C5, UPPER_CASE, 0xAB95 },
- { 0x13C6, UPPER_CASE, 0xAB96 },
- { 0x13C7, UPPER_CASE, 0xAB97 },
- { 0x13C8, UPPER_CASE, 0xAB98 },
- { 0x13C9, UPPER_CASE, 0xAB99 },
- { 0x13CA, UPPER_CASE, 0xAB9A },
- { 0x13CB, UPPER_CASE, 0xAB9B },
- { 0x13CC, UPPER_CASE, 0xAB9C },
- { 0x13CD, UPPER_CASE, 0xAB9D },
- { 0x13CE, UPPER_CASE, 0xAB9E },
- { 0x13CF, UPPER_CASE, 0xAB9F },
- { 0x13D0, UPPER_CASE, 0xABA0 },
- { 0x13D1, UPPER_CASE, 0xABA1 },
- { 0x13D2, UPPER_CASE, 0xABA2 },
- { 0x13D3, UPPER_CASE, 0xABA3 },
- { 0x13D4, UPPER_CASE, 0xABA4 },
- { 0x13D5, UPPER_CASE, 0xABA5 },
- { 0x13D6, UPPER_CASE, 0xABA6 },
- { 0x13D7, UPPER_CASE, 0xABA7 },
- { 0x13D8, UPPER_CASE, 0xABA8 },
- { 0x13D9, UPPER_CASE, 0xABA9 },
- { 0x13DA, UPPER_CASE, 0xABAA },
- { 0x13DB, UPPER_CASE, 0xABAB },
- { 0x13DC, UPPER_CASE, 0xABAC },
- { 0x13DD, UPPER_CASE, 0xABAD },
- { 0x13DE, UPPER_CASE, 0xABAE },
- { 0x13DF, UPPER_CASE, 0xABAF },
- { 0x13E0, UPPER_CASE, 0xABB0 },
- { 0x13E1, UPPER_CASE, 0xABB1 },
- { 0x13E2, UPPER_CASE, 0xABB2 },
- { 0x13E3, UPPER_CASE, 0xABB3 },
- { 0x13E4, UPPER_CASE, 0xABB4 },
- { 0x13E5, UPPER_CASE, 0xABB5 },
- { 0x13E6, UPPER_CASE, 0xABB6 },
- { 0x13E7, UPPER_CASE, 0xABB7 },
- { 0x13E8, UPPER_CASE, 0xABB8 },
- { 0x13E9, UPPER_CASE, 0xABB9 },
- { 0x13EA, UPPER_CASE, 0xABBA },
- { 0x13EB, UPPER_CASE, 0xABBB },
- { 0x13EC, UPPER_CASE, 0xABBC },
- { 0x13ED, UPPER_CASE, 0xABBD },
- { 0x13EE, UPPER_CASE, 0xABBE },
- { 0x13EF, UPPER_CASE, 0xABBF },
- { 0x13F0, UPPER_CASE, 0x13F8 },
- { 0x13F1, UPPER_CASE, 0x13F9 },
- { 0x13F2, UPPER_CASE, 0x13FA },
- { 0x13F3, UPPER_CASE, 0x13FB },
- { 0x13F4, UPPER_CASE, 0x13FC },
- { 0x13F5, UPPER_CASE, 0x13FD },
- { 0x13F8, LOWER_CASE, 0x13F0 },
- { 0x13F9, LOWER_CASE, 0x13F1 },
- { 0x13FA, LOWER_CASE, 0x13F2 },
- { 0x13FB, LOWER_CASE, 0x13F3 },
- { 0x13FC, LOWER_CASE, 0x13F4 },
- { 0x13FD, LOWER_CASE, 0x13F5 },
- { 0x1C80, LOWER_CASE, 0x412 },
- { 0x1C81, LOWER_CASE, 0x414 },
- { 0x1C82, LOWER_CASE, 0x41E },
- { 0x1C83, LOWER_CASE, 0x421 },
- { 0x1C84, LOWER_CASE, 0x422 },
- { 0x1C85, LOWER_CASE, 0x422 },
- { 0x1C86, LOWER_CASE, 0x42A },
- { 0x1C87, LOWER_CASE, 0x462 },
- { 0x1C88, LOWER_CASE, 0xA64A },
- { 0x1C90, UPPER_CASE, 0x10D0 },
- { 0x1C91, UPPER_CASE, 0x10D1 },
- { 0x1C92, UPPER_CASE, 0x10D2 },
- { 0x1C93, UPPER_CASE, 0x10D3 },
- { 0x1C94, UPPER_CASE, 0x10D4 },
- { 0x1C95, UPPER_CASE, 0x10D5 },
- { 0x1C96, UPPER_CASE, 0x10D6 },
- { 0x1C97, UPPER_CASE, 0x10D7 },
- { 0x1C98, UPPER_CASE, 0x10D8 },
- { 0x1C99, UPPER_CASE, 0x10D9 },
- { 0x1C9A, UPPER_CASE, 0x10DA },
- { 0x1C9B, UPPER_CASE, 0x10DB },
- { 0x1C9C, UPPER_CASE, 0x10DC },
- { 0x1C9D, UPPER_CASE, 0x10DD },
- { 0x1C9E, UPPER_CASE, 0x10DE },
- { 0x1C9F, UPPER_CASE, 0x10DF },
- { 0x1CA0, UPPER_CASE, 0x10E0 },
- { 0x1CA1, UPPER_CASE, 0x10E1 },
- { 0x1CA2, UPPER_CASE, 0x10E2 },
- { 0x1CA3, UPPER_CASE, 0x10E3 },
- { 0x1CA4, UPPER_CASE, 0x10E4 },
- { 0x1CA5, UPPER_CASE, 0x10E5 },
- { 0x1CA6, UPPER_CASE, 0x10E6 },
- { 0x1CA7, UPPER_CASE, 0x10E7 },
- { 0x1CA8, UPPER_CASE, 0x10E8 },
- { 0x1CA9, UPPER_CASE, 0x10E9 },
- { 0x1CAA, UPPER_CASE, 0x10EA },
- { 0x1CAB, UPPER_CASE, 0x10EB },
- { 0x1CAC, UPPER_CASE, 0x10EC },
- { 0x1CAD, UPPER_CASE, 0x10ED },
- { 0x1CAE, UPPER_CASE, 0x10EE },
- { 0x1CAF, UPPER_CASE, 0x10EF },
- { 0x1CB0, UPPER_CASE, 0x10F0 },
- { 0x1CB1, UPPER_CASE, 0x10F1 },
- { 0x1CB2, UPPER_CASE, 0x10F2 },
- { 0x1CB3, UPPER_CASE, 0x10F3 },
- { 0x1CB4, UPPER_CASE, 0x10F4 },
- { 0x1CB5, UPPER_CASE, 0x10F5 },
- { 0x1CB6, UPPER_CASE, 0x10F6 },
- { 0x1CB7, UPPER_CASE, 0x10F7 },
- { 0x1CB8, UPPER_CASE, 0x10F8 },
- { 0x1CB9, UPPER_CASE, 0x10F9 },
- { 0x1CBA, UPPER_CASE, 0x10FA },
- { 0x1CBD, UPPER_CASE, 0x10FD },
- { 0x1CBE, UPPER_CASE, 0x10FE },
- { 0x1CBF, UPPER_CASE, 0x10FF },
- { 0x1D79, LOWER_CASE, 0xA77D },
- { 0x1D7D, LOWER_CASE, 0x2C63 },
- { 0x1D8E, LOWER_CASE, 0xA7C6 },
- { 0x1E00, UPPER_CASE, 0x1E01 },
- { 0x1E01, LOWER_CASE, 0x1E00 },
- { 0x1E02, UPPER_CASE, 0x1E03 },
- { 0x1E03, LOWER_CASE, 0x1E02 },
- { 0x1E04, UPPER_CASE, 0x1E05 },
- { 0x1E05, LOWER_CASE, 0x1E04 },
- { 0x1E06, UPPER_CASE, 0x1E07 },
- { 0x1E07, LOWER_CASE, 0x1E06 },
- { 0x1E08, UPPER_CASE, 0x1E09 },
- { 0x1E09, LOWER_CASE, 0x1E08 },
- { 0x1E0A, UPPER_CASE, 0x1E0B },
- { 0x1E0B, LOWER_CASE, 0x1E0A },
- { 0x1E0C, UPPER_CASE, 0x1E0D },
- { 0x1E0D, LOWER_CASE, 0x1E0C },
- { 0x1E0E, UPPER_CASE, 0x1E0F },
- { 0x1E0F, LOWER_CASE, 0x1E0E },
- { 0x1E10, UPPER_CASE, 0x1E11 },
- { 0x1E11, LOWER_CASE, 0x1E10 },
- { 0x1E12, UPPER_CASE, 0x1E13 },
- { 0x1E13, LOWER_CASE, 0x1E12 },
- { 0x1E14, UPPER_CASE, 0x1E15 },
- { 0x1E15, LOWER_CASE, 0x1E14 },
- { 0x1E16, UPPER_CASE, 0x1E17 },
- { 0x1E17, LOWER_CASE, 0x1E16 },
- { 0x1E18, UPPER_CASE, 0x1E19 },
- { 0x1E19, LOWER_CASE, 0x1E18 },
- { 0x1E1A, UPPER_CASE, 0x1E1B },
- { 0x1E1B, LOWER_CASE, 0x1E1A },
- { 0x1E1C, UPPER_CASE, 0x1E1D },
- { 0x1E1D, LOWER_CASE, 0x1E1C },
- { 0x1E1E, UPPER_CASE, 0x1E1F },
- { 0x1E1F, LOWER_CASE, 0x1E1E },
- { 0x1E20, UPPER_CASE, 0x1E21 },
- { 0x1E21, LOWER_CASE, 0x1E20 },
- { 0x1E22, UPPER_CASE, 0x1E23 },
- { 0x1E23, LOWER_CASE, 0x1E22 },
- { 0x1E24, UPPER_CASE, 0x1E25 },
- { 0x1E25, LOWER_CASE, 0x1E24 },
- { 0x1E26, UPPER_CASE, 0x1E27 },
- { 0x1E27, LOWER_CASE, 0x1E26 },
- { 0x1E28, UPPER_CASE, 0x1E29 },
- { 0x1E29, LOWER_CASE, 0x1E28 },
- { 0x1E2A, UPPER_CASE, 0x1E2B },
- { 0x1E2B, LOWER_CASE, 0x1E2A },
- { 0x1E2C, UPPER_CASE, 0x1E2D },
- { 0x1E2D, LOWER_CASE, 0x1E2C },
- { 0x1E2E, UPPER_CASE, 0x1E2F },
- { 0x1E2F, LOWER_CASE, 0x1E2E },
- { 0x1E30, UPPER_CASE, 0x1E31 },
- { 0x1E31, LOWER_CASE, 0x1E30 },
- { 0x1E32, UPPER_CASE, 0x1E33 },
- { 0x1E33, LOWER_CASE, 0x1E32 },
- { 0x1E34, UPPER_CASE, 0x1E35 },
- { 0x1E35, LOWER_CASE, 0x1E34 },
- { 0x1E36, UPPER_CASE, 0x1E37 },
- { 0x1E37, LOWER_CASE, 0x1E36 },
- { 0x1E38, UPPER_CASE, 0x1E39 },
- { 0x1E39, LOWER_CASE, 0x1E38 },
- { 0x1E3A, UPPER_CASE, 0x1E3B },
- { 0x1E3B, LOWER_CASE, 0x1E3A },
- { 0x1E3C, UPPER_CASE, 0x1E3D },
- { 0x1E3D, LOWER_CASE, 0x1E3C },
- { 0x1E3E, UPPER_CASE, 0x1E3F },
- { 0x1E3F, LOWER_CASE, 0x1E3E },
- { 0x1E40, UPPER_CASE, 0x1E41 },
- { 0x1E41, LOWER_CASE, 0x1E40 },
- { 0x1E42, UPPER_CASE, 0x1E43 },
- { 0x1E43, LOWER_CASE, 0x1E42 },
- { 0x1E44, UPPER_CASE, 0x1E45 },
- { 0x1E45, LOWER_CASE, 0x1E44 },
- { 0x1E46, UPPER_CASE, 0x1E47 },
- { 0x1E47, LOWER_CASE, 0x1E46 },
- { 0x1E48, UPPER_CASE, 0x1E49 },
- { 0x1E49, LOWER_CASE, 0x1E48 },
- { 0x1E4A, UPPER_CASE, 0x1E4B },
- { 0x1E4B, LOWER_CASE, 0x1E4A },
- { 0x1E4C, UPPER_CASE, 0x1E4D },
- { 0x1E4D, LOWER_CASE, 0x1E4C },
- { 0x1E4E, UPPER_CASE, 0x1E4F },
- { 0x1E4F, LOWER_CASE, 0x1E4E },
- { 0x1E50, UPPER_CASE, 0x1E51 },
- { 0x1E51, LOWER_CASE, 0x1E50 },
- { 0x1E52, UPPER_CASE, 0x1E53 },
- { 0x1E53, LOWER_CASE, 0x1E52 },
- { 0x1E54, UPPER_CASE, 0x1E55 },
- { 0x1E55, LOWER_CASE, 0x1E54 },
- { 0x1E56, UPPER_CASE, 0x1E57 },
- { 0x1E57, LOWER_CASE, 0x1E56 },
- { 0x1E58, UPPER_CASE, 0x1E59 },
- { 0x1E59, LOWER_CASE, 0x1E58 },
- { 0x1E5A, UPPER_CASE, 0x1E5B },
- { 0x1E5B, LOWER_CASE, 0x1E5A },
- { 0x1E5C, UPPER_CASE, 0x1E5D },
- { 0x1E5D, LOWER_CASE, 0x1E5C },
- { 0x1E5E, UPPER_CASE, 0x1E5F },
- { 0x1E5F, LOWER_CASE, 0x1E5E },
- { 0x1E60, UPPER_CASE, 0x1E61 },
- { 0x1E61, LOWER_CASE, 0x1E60 },
- { 0x1E62, UPPER_CASE, 0x1E63 },
- { 0x1E63, LOWER_CASE, 0x1E62 },
- { 0x1E64, UPPER_CASE, 0x1E65 },
- { 0x1E65, LOWER_CASE, 0x1E64 },
- { 0x1E66, UPPER_CASE, 0x1E67 },
- { 0x1E67, LOWER_CASE, 0x1E66 },
- { 0x1E68, UPPER_CASE, 0x1E69 },
- { 0x1E69, LOWER_CASE, 0x1E68 },
- { 0x1E6A, UPPER_CASE, 0x1E6B },
- { 0x1E6B, LOWER_CASE, 0x1E6A },
- { 0x1E6C, UPPER_CASE, 0x1E6D },
- { 0x1E6D, LOWER_CASE, 0x1E6C },
- { 0x1E6E, UPPER_CASE, 0x1E6F },
- { 0x1E6F, LOWER_CASE, 0x1E6E },
- { 0x1E70, UPPER_CASE, 0x1E71 },
- { 0x1E71, LOWER_CASE, 0x1E70 },
- { 0x1E72, UPPER_CASE, 0x1E73 },
- { 0x1E73, LOWER_CASE, 0x1E72 },
- { 0x1E74, UPPER_CASE, 0x1E75 },
- { 0x1E75, LOWER_CASE, 0x1E74 },
- { 0x1E76, UPPER_CASE, 0x1E77 },
- { 0x1E77, LOWER_CASE, 0x1E76 },
- { 0x1E78, UPPER_CASE, 0x1E79 },
- { 0x1E79, LOWER_CASE, 0x1E78 },
- { 0x1E7A, UPPER_CASE, 0x1E7B },
- { 0x1E7B, LOWER_CASE, 0x1E7A },
- { 0x1E7C, UPPER_CASE, 0x1E7D },
- { 0x1E7D, LOWER_CASE, 0x1E7C },
- { 0x1E7E, UPPER_CASE, 0x1E7F },
- { 0x1E7F, LOWER_CASE, 0x1E7E },
- { 0x1E80, UPPER_CASE, 0x1E81 },
- { 0x1E81, LOWER_CASE, 0x1E80 },
- { 0x1E82, UPPER_CASE, 0x1E83 },
- { 0x1E83, LOWER_CASE, 0x1E82 },
- { 0x1E84, UPPER_CASE, 0x1E85 },
- { 0x1E85, LOWER_CASE, 0x1E84 },
- { 0x1E86, UPPER_CASE, 0x1E87 },
- { 0x1E87, LOWER_CASE, 0x1E86 },
- { 0x1E88, UPPER_CASE, 0x1E89 },
- { 0x1E89, LOWER_CASE, 0x1E88 },
- { 0x1E8A, UPPER_CASE, 0x1E8B },
- { 0x1E8B, LOWER_CASE, 0x1E8A },
- { 0x1E8C, UPPER_CASE, 0x1E8D },
- { 0x1E8D, LOWER_CASE, 0x1E8C },
- { 0x1E8E, UPPER_CASE, 0x1E8F },
- { 0x1E8F, LOWER_CASE, 0x1E8E },
- { 0x1E90, UPPER_CASE, 0x1E91 },
- { 0x1E91, LOWER_CASE, 0x1E90 },
- { 0x1E92, UPPER_CASE, 0x1E93 },
- { 0x1E93, LOWER_CASE, 0x1E92 },
- { 0x1E94, UPPER_CASE, 0x1E95 },
- { 0x1E95, LOWER_CASE, 0x1E94 },
- { 0x1E9B, LOWER_CASE, 0x1E60 },
- { 0x1E9E, UPPER_CASE, 0xDF },
- { 0x1EA0, UPPER_CASE, 0x1EA1 },
- { 0x1EA1, LOWER_CASE, 0x1EA0 },
- { 0x1EA2, UPPER_CASE, 0x1EA3 },
- { 0x1EA3, LOWER_CASE, 0x1EA2 },
- { 0x1EA4, UPPER_CASE, 0x1EA5 },
- { 0x1EA5, LOWER_CASE, 0x1EA4 },
- { 0x1EA6, UPPER_CASE, 0x1EA7 },
- { 0x1EA7, LOWER_CASE, 0x1EA6 },
- { 0x1EA8, UPPER_CASE, 0x1EA9 },
- { 0x1EA9, LOWER_CASE, 0x1EA8 },
- { 0x1EAA, UPPER_CASE, 0x1EAB },
- { 0x1EAB, LOWER_CASE, 0x1EAA },
- { 0x1EAC, UPPER_CASE, 0x1EAD },
- { 0x1EAD, LOWER_CASE, 0x1EAC },
- { 0x1EAE, UPPER_CASE, 0x1EAF },
- { 0x1EAF, LOWER_CASE, 0x1EAE },
- { 0x1EB0, UPPER_CASE, 0x1EB1 },
- { 0x1EB1, LOWER_CASE, 0x1EB0 },
- { 0x1EB2, UPPER_CASE, 0x1EB3 },
- { 0x1EB3, LOWER_CASE, 0x1EB2 },
- { 0x1EB4, UPPER_CASE, 0x1EB5 },
- { 0x1EB5, LOWER_CASE, 0x1EB4 },
- { 0x1EB6, UPPER_CASE, 0x1EB7 },
- { 0x1EB7, LOWER_CASE, 0x1EB6 },
- { 0x1EB8, UPPER_CASE, 0x1EB9 },
- { 0x1EB9, LOWER_CASE, 0x1EB8 },
- { 0x1EBA, UPPER_CASE, 0x1EBB },
- { 0x1EBB, LOWER_CASE, 0x1EBA },
- { 0x1EBC, UPPER_CASE, 0x1EBD },
- { 0x1EBD, LOWER_CASE, 0x1EBC },
- { 0x1EBE, UPPER_CASE, 0x1EBF },
- { 0x1EBF, LOWER_CASE, 0x1EBE },
- { 0x1EC0, UPPER_CASE, 0x1EC1 },
- { 0x1EC1, LOWER_CASE, 0x1EC0 },
- { 0x1EC2, UPPER_CASE, 0x1EC3 },
- { 0x1EC3, LOWER_CASE, 0x1EC2 },
- { 0x1EC4, UPPER_CASE, 0x1EC5 },
- { 0x1EC5, LOWER_CASE, 0x1EC4 },
- { 0x1EC6, UPPER_CASE, 0x1EC7 },
- { 0x1EC7, LOWER_CASE, 0x1EC6 },
- { 0x1EC8, UPPER_CASE, 0x1EC9 },
- { 0x1EC9, LOWER_CASE, 0x1EC8 },
- { 0x1ECA, UPPER_CASE, 0x1ECB },
- { 0x1ECB, LOWER_CASE, 0x1ECA },
- { 0x1ECC, UPPER_CASE, 0x1ECD },
- { 0x1ECD, LOWER_CASE, 0x1ECC },
- { 0x1ECE, UPPER_CASE, 0x1ECF },
- { 0x1ECF, LOWER_CASE, 0x1ECE },
- { 0x1ED0, UPPER_CASE, 0x1ED1 },
- { 0x1ED1, LOWER_CASE, 0x1ED0 },
- { 0x1ED2, UPPER_CASE, 0x1ED3 },
- { 0x1ED3, LOWER_CASE, 0x1ED2 },
- { 0x1ED4, UPPER_CASE, 0x1ED5 },
- { 0x1ED5, LOWER_CASE, 0x1ED4 },
- { 0x1ED6, UPPER_CASE, 0x1ED7 },
- { 0x1ED7, LOWER_CASE, 0x1ED6 },
- { 0x1ED8, UPPER_CASE, 0x1ED9 },
- { 0x1ED9, LOWER_CASE, 0x1ED8 },
- { 0x1EDA, UPPER_CASE, 0x1EDB },
- { 0x1EDB, LOWER_CASE, 0x1EDA },
- { 0x1EDC, UPPER_CASE, 0x1EDD },
- { 0x1EDD, LOWER_CASE, 0x1EDC },
- { 0x1EDE, UPPER_CASE, 0x1EDF },
- { 0x1EDF, LOWER_CASE, 0x1EDE },
- { 0x1EE0, UPPER_CASE, 0x1EE1 },
- { 0x1EE1, LOWER_CASE, 0x1EE0 },
- { 0x1EE2, UPPER_CASE, 0x1EE3 },
- { 0x1EE3, LOWER_CASE, 0x1EE2 },
- { 0x1EE4, UPPER_CASE, 0x1EE5 },
- { 0x1EE5, LOWER_CASE, 0x1EE4 },
- { 0x1EE6, UPPER_CASE, 0x1EE7 },
- { 0x1EE7, LOWER_CASE, 0x1EE6 },
- { 0x1EE8, UPPER_CASE, 0x1EE9 },
- { 0x1EE9, LOWER_CASE, 0x1EE8 },
- { 0x1EEA, UPPER_CASE, 0x1EEB },
- { 0x1EEB, LOWER_CASE, 0x1EEA },
- { 0x1EEC, UPPER_CASE, 0x1EED },
- { 0x1EED, LOWER_CASE, 0x1EEC },
- { 0x1EEE, UPPER_CASE, 0x1EEF },
- { 0x1EEF, LOWER_CASE, 0x1EEE },
- { 0x1EF0, UPPER_CASE, 0x1EF1 },
- { 0x1EF1, LOWER_CASE, 0x1EF0 },
- { 0x1EF2, UPPER_CASE, 0x1EF3 },
- { 0x1EF3, LOWER_CASE, 0x1EF2 },
- { 0x1EF4, UPPER_CASE, 0x1EF5 },
- { 0x1EF5, LOWER_CASE, 0x1EF4 },
- { 0x1EF6, UPPER_CASE, 0x1EF7 },
- { 0x1EF7, LOWER_CASE, 0x1EF6 },
- { 0x1EF8, UPPER_CASE, 0x1EF9 },
- { 0x1EF9, LOWER_CASE, 0x1EF8 },
- { 0x1EFA, UPPER_CASE, 0x1EFB },
- { 0x1EFB, LOWER_CASE, 0x1EFA },
- { 0x1EFC, UPPER_CASE, 0x1EFD },
- { 0x1EFD, LOWER_CASE, 0x1EFC },
- { 0x1EFE, UPPER_CASE, 0x1EFF },
- { 0x1EFF, LOWER_CASE, 0x1EFE },
- { 0x1F00, LOWER_CASE, 0x1F08 },
- { 0x1F01, LOWER_CASE, 0x1F09 },
- { 0x1F02, LOWER_CASE, 0x1F0A },
- { 0x1F03, LOWER_CASE, 0x1F0B },
- { 0x1F04, LOWER_CASE, 0x1F0C },
- { 0x1F05, LOWER_CASE, 0x1F0D },
- { 0x1F06, LOWER_CASE, 0x1F0E },
- { 0x1F07, LOWER_CASE, 0x1F0F },
- { 0x1F08, UPPER_CASE, 0x1F00 },
- { 0x1F09, UPPER_CASE, 0x1F01 },
- { 0x1F0A, UPPER_CASE, 0x1F02 },
- { 0x1F0B, UPPER_CASE, 0x1F03 },
- { 0x1F0C, UPPER_CASE, 0x1F04 },
- { 0x1F0D, UPPER_CASE, 0x1F05 },
- { 0x1F0E, UPPER_CASE, 0x1F06 },
- { 0x1F0F, UPPER_CASE, 0x1F07 },
- { 0x1F10, LOWER_CASE, 0x1F18 },
- { 0x1F11, LOWER_CASE, 0x1F19 },
- { 0x1F12, LOWER_CASE, 0x1F1A },
- { 0x1F13, LOWER_CASE, 0x1F1B },
- { 0x1F14, LOWER_CASE, 0x1F1C },
- { 0x1F15, LOWER_CASE, 0x1F1D },
- { 0x1F18, UPPER_CASE, 0x1F10 },
- { 0x1F19, UPPER_CASE, 0x1F11 },
- { 0x1F1A, UPPER_CASE, 0x1F12 },
- { 0x1F1B, UPPER_CASE, 0x1F13 },
- { 0x1F1C, UPPER_CASE, 0x1F14 },
- { 0x1F1D, UPPER_CASE, 0x1F15 },
- { 0x1F20, LOWER_CASE, 0x1F28 },
- { 0x1F21, LOWER_CASE, 0x1F29 },
- { 0x1F22, LOWER_CASE, 0x1F2A },
- { 0x1F23, LOWER_CASE, 0x1F2B },
- { 0x1F24, LOWER_CASE, 0x1F2C },
- { 0x1F25, LOWER_CASE, 0x1F2D },
- { 0x1F26, LOWER_CASE, 0x1F2E },
- { 0x1F27, LOWER_CASE, 0x1F2F },
- { 0x1F28, UPPER_CASE, 0x1F20 },
- { 0x1F29, UPPER_CASE, 0x1F21 },
- { 0x1F2A, UPPER_CASE, 0x1F22 },
- { 0x1F2B, UPPER_CASE, 0x1F23 },
- { 0x1F2C, UPPER_CASE, 0x1F24 },
- { 0x1F2D, UPPER_CASE, 0x1F25 },
- { 0x1F2E, UPPER_CASE, 0x1F26 },
- { 0x1F2F, UPPER_CASE, 0x1F27 },
- { 0x1F30, LOWER_CASE, 0x1F38 },
- { 0x1F31, LOWER_CASE, 0x1F39 },
- { 0x1F32, LOWER_CASE, 0x1F3A },
- { 0x1F33, LOWER_CASE, 0x1F3B },
- { 0x1F34, LOWER_CASE, 0x1F3C },
- { 0x1F35, LOWER_CASE, 0x1F3D },
- { 0x1F36, LOWER_CASE, 0x1F3E },
- { 0x1F37, LOWER_CASE, 0x1F3F },
- { 0x1F38, UPPER_CASE, 0x1F30 },
- { 0x1F39, UPPER_CASE, 0x1F31 },
- { 0x1F3A, UPPER_CASE, 0x1F32 },
- { 0x1F3B, UPPER_CASE, 0x1F33 },
- { 0x1F3C, UPPER_CASE, 0x1F34 },
- { 0x1F3D, UPPER_CASE, 0x1F35 },
- { 0x1F3E, UPPER_CASE, 0x1F36 },
- { 0x1F3F, UPPER_CASE, 0x1F37 },
- { 0x1F40, LOWER_CASE, 0x1F48 },
- { 0x1F41, LOWER_CASE, 0x1F49 },
- { 0x1F42, LOWER_CASE, 0x1F4A },
- { 0x1F43, LOWER_CASE, 0x1F4B },
- { 0x1F44, LOWER_CASE, 0x1F4C },
- { 0x1F45, LOWER_CASE, 0x1F4D },
- { 0x1F48, UPPER_CASE, 0x1F40 },
- { 0x1F49, UPPER_CASE, 0x1F41 },
- { 0x1F4A, UPPER_CASE, 0x1F42 },
- { 0x1F4B, UPPER_CASE, 0x1F43 },
- { 0x1F4C, UPPER_CASE, 0x1F44 },
- { 0x1F4D, UPPER_CASE, 0x1F45 },
- { 0x1F51, LOWER_CASE, 0x1F59 },
- { 0x1F53, LOWER_CASE, 0x1F5B },
- { 0x1F55, LOWER_CASE, 0x1F5D },
- { 0x1F57, LOWER_CASE, 0x1F5F },
- { 0x1F59, UPPER_CASE, 0x1F51 },
- { 0x1F5B, UPPER_CASE, 0x1F53 },
- { 0x1F5D, UPPER_CASE, 0x1F55 },
- { 0x1F5F, UPPER_CASE, 0x1F57 },
- { 0x1F60, LOWER_CASE, 0x1F68 },
- { 0x1F61, LOWER_CASE, 0x1F69 },
- { 0x1F62, LOWER_CASE, 0x1F6A },
- { 0x1F63, LOWER_CASE, 0x1F6B },
- { 0x1F64, LOWER_CASE, 0x1F6C },
- { 0x1F65, LOWER_CASE, 0x1F6D },
- { 0x1F66, LOWER_CASE, 0x1F6E },
- { 0x1F67, LOWER_CASE, 0x1F6F },
- { 0x1F68, UPPER_CASE, 0x1F60 },
- { 0x1F69, UPPER_CASE, 0x1F61 },
- { 0x1F6A, UPPER_CASE, 0x1F62 },
- { 0x1F6B, UPPER_CASE, 0x1F63 },
- { 0x1F6C, UPPER_CASE, 0x1F64 },
- { 0x1F6D, UPPER_CASE, 0x1F65 },
- { 0x1F6E, UPPER_CASE, 0x1F66 },
- { 0x1F6F, UPPER_CASE, 0x1F67 },
- { 0x1F70, LOWER_CASE, 0x1FBA },
- { 0x1F71, LOWER_CASE, 0x1FBB },
- { 0x1F72, LOWER_CASE, 0x1FC8 },
- { 0x1F73, LOWER_CASE, 0x1FC9 },
- { 0x1F74, LOWER_CASE, 0x1FCA },
- { 0x1F75, LOWER_CASE, 0x1FCB },
- { 0x1F76, LOWER_CASE, 0x1FDA },
- { 0x1F77, LOWER_CASE, 0x1FDB },
- { 0x1F78, LOWER_CASE, 0x1FF8 },
- { 0x1F79, LOWER_CASE, 0x1FF9 },
- { 0x1F7A, LOWER_CASE, 0x1FEA },
- { 0x1F7B, LOWER_CASE, 0x1FEB },
- { 0x1F7C, LOWER_CASE, 0x1FFA },
- { 0x1F7D, LOWER_CASE, 0x1FFB },
- { 0x1F80, LOWER_CASE, 0x1F88 },
- { 0x1F81, LOWER_CASE, 0x1F89 },
- { 0x1F82, LOWER_CASE, 0x1F8A },
- { 0x1F83, LOWER_CASE, 0x1F8B },
- { 0x1F84, LOWER_CASE, 0x1F8C },
- { 0x1F85, LOWER_CASE, 0x1F8D },
- { 0x1F86, LOWER_CASE, 0x1F8E },
- { 0x1F87, LOWER_CASE, 0x1F8F },
- { 0x1F88, UPPER_CASE, 0x1F80 },
- { 0x1F89, UPPER_CASE, 0x1F81 },
- { 0x1F8A, UPPER_CASE, 0x1F82 },
- { 0x1F8B, UPPER_CASE, 0x1F83 },
- { 0x1F8C, UPPER_CASE, 0x1F84 },
- { 0x1F8D, UPPER_CASE, 0x1F85 },
- { 0x1F8E, UPPER_CASE, 0x1F86 },
- { 0x1F8F, UPPER_CASE, 0x1F87 },
- { 0x1F90, LOWER_CASE, 0x1F98 },
- { 0x1F91, LOWER_CASE, 0x1F99 },
- { 0x1F92, LOWER_CASE, 0x1F9A },
- { 0x1F93, LOWER_CASE, 0x1F9B },
- { 0x1F94, LOWER_CASE, 0x1F9C },
- { 0x1F95, LOWER_CASE, 0x1F9D },
- { 0x1F96, LOWER_CASE, 0x1F9E },
- { 0x1F97, LOWER_CASE, 0x1F9F },
- { 0x1F98, UPPER_CASE, 0x1F90 },
- { 0x1F99, UPPER_CASE, 0x1F91 },
- { 0x1F9A, UPPER_CASE, 0x1F92 },
- { 0x1F9B, UPPER_CASE, 0x1F93 },
- { 0x1F9C, UPPER_CASE, 0x1F94 },
- { 0x1F9D, UPPER_CASE, 0x1F95 },
- { 0x1F9E, UPPER_CASE, 0x1F96 },
- { 0x1F9F, UPPER_CASE, 0x1F97 },
- { 0x1FA0, LOWER_CASE, 0x1FA8 },
- { 0x1FA1, LOWER_CASE, 0x1FA9 },
- { 0x1FA2, LOWER_CASE, 0x1FAA },
- { 0x1FA3, LOWER_CASE, 0x1FAB },
- { 0x1FA4, LOWER_CASE, 0x1FAC },
- { 0x1FA5, LOWER_CASE, 0x1FAD },
- { 0x1FA6, LOWER_CASE, 0x1FAE },
- { 0x1FA7, LOWER_CASE, 0x1FAF },
- { 0x1FA8, UPPER_CASE, 0x1FA0 },
- { 0x1FA9, UPPER_CASE, 0x1FA1 },
- { 0x1FAA, UPPER_CASE, 0x1FA2 },
- { 0x1FAB, UPPER_CASE, 0x1FA3 },
- { 0x1FAC, UPPER_CASE, 0x1FA4 },
- { 0x1FAD, UPPER_CASE, 0x1FA5 },
- { 0x1FAE, UPPER_CASE, 0x1FA6 },
- { 0x1FAF, UPPER_CASE, 0x1FA7 },
- { 0x1FB0, LOWER_CASE, 0x1FB8 },
- { 0x1FB1, LOWER_CASE, 0x1FB9 },
- { 0x1FB3, LOWER_CASE, 0x1FBC },
- { 0x1FB8, UPPER_CASE, 0x1FB0 },
- { 0x1FB9, UPPER_CASE, 0x1FB1 },
- { 0x1FBA, UPPER_CASE, 0x1F70 },
- { 0x1FBB, UPPER_CASE, 0x1F71 },
- { 0x1FBC, UPPER_CASE, 0x1FB3 },
- { 0x1FBE, LOWER_CASE, 0x399 },
- { 0x1FC3, LOWER_CASE, 0x1FCC },
- { 0x1FC8, UPPER_CASE, 0x1F72 },
- { 0x1FC9, UPPER_CASE, 0x1F73 },
- { 0x1FCA, UPPER_CASE, 0x1F74 },
- { 0x1FCB, UPPER_CASE, 0x1F75 },
- { 0x1FCC, UPPER_CASE, 0x1FC3 },
- { 0x1FD0, LOWER_CASE, 0x1FD8 },
- { 0x1FD1, LOWER_CASE, 0x1FD9 },
- { 0x1FD8, UPPER_CASE, 0x1FD0 },
- { 0x1FD9, UPPER_CASE, 0x1FD1 },
- { 0x1FDA, UPPER_CASE, 0x1F76 },
- { 0x1FDB, UPPER_CASE, 0x1F77 },
- { 0x1FE0, LOWER_CASE, 0x1FE8 },
- { 0x1FE1, LOWER_CASE, 0x1FE9 },
- { 0x1FE5, LOWER_CASE, 0x1FEC },
- { 0x1FE8, UPPER_CASE, 0x1FE0 },
- { 0x1FE9, UPPER_CASE, 0x1FE1 },
- { 0x1FEA, UPPER_CASE, 0x1F7A },
- { 0x1FEB, UPPER_CASE, 0x1F7B },
- { 0x1FEC, UPPER_CASE, 0x1FE5 },
- { 0x1FF3, LOWER_CASE, 0x1FFC },
- { 0x1FF8, UPPER_CASE, 0x1F78 },
- { 0x1FF9, UPPER_CASE, 0x1F79 },
- { 0x1FFA, UPPER_CASE, 0x1F7C },
- { 0x1FFB, UPPER_CASE, 0x1F7D },
- { 0x1FFC, UPPER_CASE, 0x1FF3 },
- { 0x2126, UPPER_CASE, 0x3C9 },
- { 0x212A, UPPER_CASE, 0x6B },
- { 0x212B, UPPER_CASE, 0xE5 },
- { 0x2132, UPPER_CASE, 0x214E },
- { 0x214E, LOWER_CASE, 0x2132 },
- { 0x2160, UPPER_CASE, 0x2170 },
- { 0x2161, UPPER_CASE, 0x2171 },
- { 0x2162, UPPER_CASE, 0x2172 },
- { 0x2163, UPPER_CASE, 0x2173 },
- { 0x2164, UPPER_CASE, 0x2174 },
- { 0x2165, UPPER_CASE, 0x2175 },
- { 0x2166, UPPER_CASE, 0x2176 },
- { 0x2167, UPPER_CASE, 0x2177 },
- { 0x2168, UPPER_CASE, 0x2178 },
- { 0x2169, UPPER_CASE, 0x2179 },
- { 0x216A, UPPER_CASE, 0x217A },
- { 0x216B, UPPER_CASE, 0x217B },
- { 0x216C, UPPER_CASE, 0x217C },
- { 0x216D, UPPER_CASE, 0x217D },
- { 0x216E, UPPER_CASE, 0x217E },
- { 0x216F, UPPER_CASE, 0x217F },
- { 0x2170, LOWER_CASE, 0x2160 },
- { 0x2171, LOWER_CASE, 0x2161 },
- { 0x2172, LOWER_CASE, 0x2162 },
- { 0x2173, LOWER_CASE, 0x2163 },
- { 0x2174, LOWER_CASE, 0x2164 },
- { 0x2175, LOWER_CASE, 0x2165 },
- { 0x2176, LOWER_CASE, 0x2166 },
- { 0x2177, LOWER_CASE, 0x2167 },
- { 0x2178, LOWER_CASE, 0x2168 },
- { 0x2179, LOWER_CASE, 0x2169 },
- { 0x217A, LOWER_CASE, 0x216A },
- { 0x217B, LOWER_CASE, 0x216B },
- { 0x217C, LOWER_CASE, 0x216C },
- { 0x217D, LOWER_CASE, 0x216D },
- { 0x217E, LOWER_CASE, 0x216E },
- { 0x217F, LOWER_CASE, 0x216F },
- { 0x2183, UPPER_CASE, 0x2184 },
- { 0x2184, LOWER_CASE, 0x2183 },
- { 0x24B6, UPPER_CASE, 0x24D0 },
- { 0x24B7, UPPER_CASE, 0x24D1 },
- { 0x24B8, UPPER_CASE, 0x24D2 },
- { 0x24B9, UPPER_CASE, 0x24D3 },
- { 0x24BA, UPPER_CASE, 0x24D4 },
- { 0x24BB, UPPER_CASE, 0x24D5 },
- { 0x24BC, UPPER_CASE, 0x24D6 },
- { 0x24BD, UPPER_CASE, 0x24D7 },
- { 0x24BE, UPPER_CASE, 0x24D8 },
- { 0x24BF, UPPER_CASE, 0x24D9 },
- { 0x24C0, UPPER_CASE, 0x24DA },
- { 0x24C1, UPPER_CASE, 0x24DB },
- { 0x24C2, UPPER_CASE, 0x24DC },
- { 0x24C3, UPPER_CASE, 0x24DD },
- { 0x24C4, UPPER_CASE, 0x24DE },
- { 0x24C5, UPPER_CASE, 0x24DF },
- { 0x24C6, UPPER_CASE, 0x24E0 },
- { 0x24C7, UPPER_CASE, 0x24E1 },
- { 0x24C8, UPPER_CASE, 0x24E2 },
- { 0x24C9, UPPER_CASE, 0x24E3 },
- { 0x24CA, UPPER_CASE, 0x24E4 },
- { 0x24CB, UPPER_CASE, 0x24E5 },
- { 0x24CC, UPPER_CASE, 0x24E6 },
- { 0x24CD, UPPER_CASE, 0x24E7 },
- { 0x24CE, UPPER_CASE, 0x24E8 },
- { 0x24CF, UPPER_CASE, 0x24E9 },
- { 0x24D0, LOWER_CASE, 0x24B6 },
- { 0x24D1, LOWER_CASE, 0x24B7 },
- { 0x24D2, LOWER_CASE, 0x24B8 },
- { 0x24D3, LOWER_CASE, 0x24B9 },
- { 0x24D4, LOWER_CASE, 0x24BA },
- { 0x24D5, LOWER_CASE, 0x24BB },
- { 0x24D6, LOWER_CASE, 0x24BC },
- { 0x24D7, LOWER_CASE, 0x24BD },
- { 0x24D8, LOWER_CASE, 0x24BE },
- { 0x24D9, LOWER_CASE, 0x24BF },
- { 0x24DA, LOWER_CASE, 0x24C0 },
- { 0x24DB, LOWER_CASE, 0x24C1 },
- { 0x24DC, LOWER_CASE, 0x24C2 },
- { 0x24DD, LOWER_CASE, 0x24C3 },
- { 0x24DE, LOWER_CASE, 0x24C4 },
- { 0x24DF, LOWER_CASE, 0x24C5 },
- { 0x24E0, LOWER_CASE, 0x24C6 },
- { 0x24E1, LOWER_CASE, 0x24C7 },
- { 0x24E2, LOWER_CASE, 0x24C8 },
- { 0x24E3, LOWER_CASE, 0x24C9 },
- { 0x24E4, LOWER_CASE, 0x24CA },
- { 0x24E5, LOWER_CASE, 0x24CB },
- { 0x24E6, LOWER_CASE, 0x24CC },
- { 0x24E7, LOWER_CASE, 0x24CD },
- { 0x24E8, LOWER_CASE, 0x24CE },
- { 0x24E9, LOWER_CASE, 0x24CF },
- { 0x2C00, UPPER_CASE, 0x2C30 },
- { 0x2C01, UPPER_CASE, 0x2C31 },
- { 0x2C02, UPPER_CASE, 0x2C32 },
- { 0x2C03, UPPER_CASE, 0x2C33 },
- { 0x2C04, UPPER_CASE, 0x2C34 },
- { 0x2C05, UPPER_CASE, 0x2C35 },
- { 0x2C06, UPPER_CASE, 0x2C36 },
- { 0x2C07, UPPER_CASE, 0x2C37 },
- { 0x2C08, UPPER_CASE, 0x2C38 },
- { 0x2C09, UPPER_CASE, 0x2C39 },
- { 0x2C0A, UPPER_CASE, 0x2C3A },
- { 0x2C0B, UPPER_CASE, 0x2C3B },
- { 0x2C0C, UPPER_CASE, 0x2C3C },
- { 0x2C0D, UPPER_CASE, 0x2C3D },
- { 0x2C0E, UPPER_CASE, 0x2C3E },
- { 0x2C0F, UPPER_CASE, 0x2C3F },
- { 0x2C10, UPPER_CASE, 0x2C40 },
- { 0x2C11, UPPER_CASE, 0x2C41 },
- { 0x2C12, UPPER_CASE, 0x2C42 },
- { 0x2C13, UPPER_CASE, 0x2C43 },
- { 0x2C14, UPPER_CASE, 0x2C44 },
- { 0x2C15, UPPER_CASE, 0x2C45 },
- { 0x2C16, UPPER_CASE, 0x2C46 },
- { 0x2C17, UPPER_CASE, 0x2C47 },
- { 0x2C18, UPPER_CASE, 0x2C48 },
- { 0x2C19, UPPER_CASE, 0x2C49 },
- { 0x2C1A, UPPER_CASE, 0x2C4A },
- { 0x2C1B, UPPER_CASE, 0x2C4B },
- { 0x2C1C, UPPER_CASE, 0x2C4C },
- { 0x2C1D, UPPER_CASE, 0x2C4D },
- { 0x2C1E, UPPER_CASE, 0x2C4E },
- { 0x2C1F, UPPER_CASE, 0x2C4F },
- { 0x2C20, UPPER_CASE, 0x2C50 },
- { 0x2C21, UPPER_CASE, 0x2C51 },
- { 0x2C22, UPPER_CASE, 0x2C52 },
- { 0x2C23, UPPER_CASE, 0x2C53 },
- { 0x2C24, UPPER_CASE, 0x2C54 },
- { 0x2C25, UPPER_CASE, 0x2C55 },
- { 0x2C26, UPPER_CASE, 0x2C56 },
- { 0x2C27, UPPER_CASE, 0x2C57 },
- { 0x2C28, UPPER_CASE, 0x2C58 },
- { 0x2C29, UPPER_CASE, 0x2C59 },
- { 0x2C2A, UPPER_CASE, 0x2C5A },
- { 0x2C2B, UPPER_CASE, 0x2C5B },
- { 0x2C2C, UPPER_CASE, 0x2C5C },
- { 0x2C2D, UPPER_CASE, 0x2C5D },
- { 0x2C2E, UPPER_CASE, 0x2C5E },
- { 0x2C30, LOWER_CASE, 0x2C00 },
- { 0x2C31, LOWER_CASE, 0x2C01 },
- { 0x2C32, LOWER_CASE, 0x2C02 },
- { 0x2C33, LOWER_CASE, 0x2C03 },
- { 0x2C34, LOWER_CASE, 0x2C04 },
- { 0x2C35, LOWER_CASE, 0x2C05 },
- { 0x2C36, LOWER_CASE, 0x2C06 },
- { 0x2C37, LOWER_CASE, 0x2C07 },
- { 0x2C38, LOWER_CASE, 0x2C08 },
- { 0x2C39, LOWER_CASE, 0x2C09 },
- { 0x2C3A, LOWER_CASE, 0x2C0A },
- { 0x2C3B, LOWER_CASE, 0x2C0B },
- { 0x2C3C, LOWER_CASE, 0x2C0C },
- { 0x2C3D, LOWER_CASE, 0x2C0D },
- { 0x2C3E, LOWER_CASE, 0x2C0E },
- { 0x2C3F, LOWER_CASE, 0x2C0F },
- { 0x2C40, LOWER_CASE, 0x2C10 },
- { 0x2C41, LOWER_CASE, 0x2C11 },
- { 0x2C42, LOWER_CASE, 0x2C12 },
- { 0x2C43, LOWER_CASE, 0x2C13 },
- { 0x2C44, LOWER_CASE, 0x2C14 },
- { 0x2C45, LOWER_CASE, 0x2C15 },
- { 0x2C46, LOWER_CASE, 0x2C16 },
- { 0x2C47, LOWER_CASE, 0x2C17 },
- { 0x2C48, LOWER_CASE, 0x2C18 },
- { 0x2C49, LOWER_CASE, 0x2C19 },
- { 0x2C4A, LOWER_CASE, 0x2C1A },
- { 0x2C4B, LOWER_CASE, 0x2C1B },
- { 0x2C4C, LOWER_CASE, 0x2C1C },
- { 0x2C4D, LOWER_CASE, 0x2C1D },
- { 0x2C4E, LOWER_CASE, 0x2C1E },
- { 0x2C4F, LOWER_CASE, 0x2C1F },
- { 0x2C50, LOWER_CASE, 0x2C20 },
- { 0x2C51, LOWER_CASE, 0x2C21 },
- { 0x2C52, LOWER_CASE, 0x2C22 },
- { 0x2C53, LOWER_CASE, 0x2C23 },
- { 0x2C54, LOWER_CASE, 0x2C24 },
- { 0x2C55, LOWER_CASE, 0x2C25 },
- { 0x2C56, LOWER_CASE, 0x2C26 },
- { 0x2C57, LOWER_CASE, 0x2C27 },
- { 0x2C58, LOWER_CASE, 0x2C28 },
- { 0x2C59, LOWER_CASE, 0x2C29 },
- { 0x2C5A, LOWER_CASE, 0x2C2A },
- { 0x2C5B, LOWER_CASE, 0x2C2B },
- { 0x2C5C, LOWER_CASE, 0x2C2C },
- { 0x2C5D, LOWER_CASE, 0x2C2D },
- { 0x2C5E, LOWER_CASE, 0x2C2E },
- { 0x2C60, UPPER_CASE, 0x2C61 },
- { 0x2C61, LOWER_CASE, 0x2C60 },
- { 0x2C62, UPPER_CASE, 0x26B },
- { 0x2C63, UPPER_CASE, 0x1D7D },
- { 0x2C64, UPPER_CASE, 0x27D },
- { 0x2C65, LOWER_CASE, 0x23A },
- { 0x2C66, LOWER_CASE, 0x23E },
- { 0x2C67, UPPER_CASE, 0x2C68 },
- { 0x2C68, LOWER_CASE, 0x2C67 },
- { 0x2C69, UPPER_CASE, 0x2C6A },
- { 0x2C6A, LOWER_CASE, 0x2C69 },
- { 0x2C6B, UPPER_CASE, 0x2C6C },
- { 0x2C6C, LOWER_CASE, 0x2C6B },
- { 0x2C6D, UPPER_CASE, 0x251 },
- { 0x2C6E, UPPER_CASE, 0x271 },
- { 0x2C6F, UPPER_CASE, 0x250 },
- { 0x2C70, UPPER_CASE, 0x252 },
- { 0x2C72, UPPER_CASE, 0x2C73 },
- { 0x2C73, LOWER_CASE, 0x2C72 },
- { 0x2C75, UPPER_CASE, 0x2C76 },
- { 0x2C76, LOWER_CASE, 0x2C75 },
- { 0x2C7E, UPPER_CASE, 0x23F },
- { 0x2C7F, UPPER_CASE, 0x240 },
- { 0x2C80, UPPER_CASE, 0x2C81 },
- { 0x2C81, LOWER_CASE, 0x2C80 },
- { 0x2C82, UPPER_CASE, 0x2C83 },
- { 0x2C83, LOWER_CASE, 0x2C82 },
- { 0x2C84, UPPER_CASE, 0x2C85 },
- { 0x2C85, LOWER_CASE, 0x2C84 },
- { 0x2C86, UPPER_CASE, 0x2C87 },
- { 0x2C87, LOWER_CASE, 0x2C86 },
- { 0x2C88, UPPER_CASE, 0x2C89 },
- { 0x2C89, LOWER_CASE, 0x2C88 },
- { 0x2C8A, UPPER_CASE, 0x2C8B },
- { 0x2C8B, LOWER_CASE, 0x2C8A },
- { 0x2C8C, UPPER_CASE, 0x2C8D },
- { 0x2C8D, LOWER_CASE, 0x2C8C },
- { 0x2C8E, UPPER_CASE, 0x2C8F },
- { 0x2C8F, LOWER_CASE, 0x2C8E },
- { 0x2C90, UPPER_CASE, 0x2C91 },
- { 0x2C91, LOWER_CASE, 0x2C90 },
- { 0x2C92, UPPER_CASE, 0x2C93 },
- { 0x2C93, LOWER_CASE, 0x2C92 },
- { 0x2C94, UPPER_CASE, 0x2C95 },
- { 0x2C95, LOWER_CASE, 0x2C94 },
- { 0x2C96, UPPER_CASE, 0x2C97 },
- { 0x2C97, LOWER_CASE, 0x2C96 },
- { 0x2C98, UPPER_CASE, 0x2C99 },
- { 0x2C99, LOWER_CASE, 0x2C98 },
- { 0x2C9A, UPPER_CASE, 0x2C9B },
- { 0x2C9B, LOWER_CASE, 0x2C9A },
- { 0x2C9C, UPPER_CASE, 0x2C9D },
- { 0x2C9D, LOWER_CASE, 0x2C9C },
- { 0x2C9E, UPPER_CASE, 0x2C9F },
- { 0x2C9F, LOWER_CASE, 0x2C9E },
- { 0x2CA0, UPPER_CASE, 0x2CA1 },
- { 0x2CA1, LOWER_CASE, 0x2CA0 },
- { 0x2CA2, UPPER_CASE, 0x2CA3 },
- { 0x2CA3, LOWER_CASE, 0x2CA2 },
- { 0x2CA4, UPPER_CASE, 0x2CA5 },
- { 0x2CA5, LOWER_CASE, 0x2CA4 },
- { 0x2CA6, UPPER_CASE, 0x2CA7 },
- { 0x2CA7, LOWER_CASE, 0x2CA6 },
- { 0x2CA8, UPPER_CASE, 0x2CA9 },
- { 0x2CA9, LOWER_CASE, 0x2CA8 },
- { 0x2CAA, UPPER_CASE, 0x2CAB },
- { 0x2CAB, LOWER_CASE, 0x2CAA },
- { 0x2CAC, UPPER_CASE, 0x2CAD },
- { 0x2CAD, LOWER_CASE, 0x2CAC },
- { 0x2CAE, UPPER_CASE, 0x2CAF },
- { 0x2CAF, LOWER_CASE, 0x2CAE },
- { 0x2CB0, UPPER_CASE, 0x2CB1 },
- { 0x2CB1, LOWER_CASE, 0x2CB0 },
- { 0x2CB2, UPPER_CASE, 0x2CB3 },
- { 0x2CB3, LOWER_CASE, 0x2CB2 },
- { 0x2CB4, UPPER_CASE, 0x2CB5 },
- { 0x2CB5, LOWER_CASE, 0x2CB4 },
- { 0x2CB6, UPPER_CASE, 0x2CB7 },
- { 0x2CB7, LOWER_CASE, 0x2CB6 },
- { 0x2CB8, UPPER_CASE, 0x2CB9 },
- { 0x2CB9, LOWER_CASE, 0x2CB8 },
- { 0x2CBA, UPPER_CASE, 0x2CBB },
- { 0x2CBB, LOWER_CASE, 0x2CBA },
- { 0x2CBC, UPPER_CASE, 0x2CBD },
- { 0x2CBD, LOWER_CASE, 0x2CBC },
- { 0x2CBE, UPPER_CASE, 0x2CBF },
- { 0x2CBF, LOWER_CASE, 0x2CBE },
- { 0x2CC0, UPPER_CASE, 0x2CC1 },
- { 0x2CC1, LOWER_CASE, 0x2CC0 },
- { 0x2CC2, UPPER_CASE, 0x2CC3 },
- { 0x2CC3, LOWER_CASE, 0x2CC2 },
- { 0x2CC4, UPPER_CASE, 0x2CC5 },
- { 0x2CC5, LOWER_CASE, 0x2CC4 },
- { 0x2CC6, UPPER_CASE, 0x2CC7 },
- { 0x2CC7, LOWER_CASE, 0x2CC6 },
- { 0x2CC8, UPPER_CASE, 0x2CC9 },
- { 0x2CC9, LOWER_CASE, 0x2CC8 },
- { 0x2CCA, UPPER_CASE, 0x2CCB },
- { 0x2CCB, LOWER_CASE, 0x2CCA },
- { 0x2CCC, UPPER_CASE, 0x2CCD },
- { 0x2CCD, LOWER_CASE, 0x2CCC },
- { 0x2CCE, UPPER_CASE, 0x2CCF },
- { 0x2CCF, LOWER_CASE, 0x2CCE },
- { 0x2CD0, UPPER_CASE, 0x2CD1 },
- { 0x2CD1, LOWER_CASE, 0x2CD0 },
- { 0x2CD2, UPPER_CASE, 0x2CD3 },
- { 0x2CD3, LOWER_CASE, 0x2CD2 },
- { 0x2CD4, UPPER_CASE, 0x2CD5 },
- { 0x2CD5, LOWER_CASE, 0x2CD4 },
- { 0x2CD6, UPPER_CASE, 0x2CD7 },
- { 0x2CD7, LOWER_CASE, 0x2CD6 },
- { 0x2CD8, UPPER_CASE, 0x2CD9 },
- { 0x2CD9, LOWER_CASE, 0x2CD8 },
- { 0x2CDA, UPPER_CASE, 0x2CDB },
- { 0x2CDB, LOWER_CASE, 0x2CDA },
- { 0x2CDC, UPPER_CASE, 0x2CDD },
- { 0x2CDD, LOWER_CASE, 0x2CDC },
- { 0x2CDE, UPPER_CASE, 0x2CDF },
- { 0x2CDF, LOWER_CASE, 0x2CDE },
- { 0x2CE0, UPPER_CASE, 0x2CE1 },
- { 0x2CE1, LOWER_CASE, 0x2CE0 },
- { 0x2CE2, UPPER_CASE, 0x2CE3 },
- { 0x2CE3, LOWER_CASE, 0x2CE2 },
- { 0x2CEB, UPPER_CASE, 0x2CEC },
- { 0x2CEC, LOWER_CASE, 0x2CEB },
- { 0x2CED, UPPER_CASE, 0x2CEE },
- { 0x2CEE, LOWER_CASE, 0x2CED },
- { 0x2CF2, UPPER_CASE, 0x2CF3 },
- { 0x2CF3, LOWER_CASE, 0x2CF2 },
- { 0x2D00, LOWER_CASE, 0x10A0 },
- { 0x2D01, LOWER_CASE, 0x10A1 },
- { 0x2D02, LOWER_CASE, 0x10A2 },
- { 0x2D03, LOWER_CASE, 0x10A3 },
- { 0x2D04, LOWER_CASE, 0x10A4 },
- { 0x2D05, LOWER_CASE, 0x10A5 },
- { 0x2D06, LOWER_CASE, 0x10A6 },
- { 0x2D07, LOWER_CASE, 0x10A7 },
- { 0x2D08, LOWER_CASE, 0x10A8 },
- { 0x2D09, LOWER_CASE, 0x10A9 },
- { 0x2D0A, LOWER_CASE, 0x10AA },
- { 0x2D0B, LOWER_CASE, 0x10AB },
- { 0x2D0C, LOWER_CASE, 0x10AC },
- { 0x2D0D, LOWER_CASE, 0x10AD },
- { 0x2D0E, LOWER_CASE, 0x10AE },
- { 0x2D0F, LOWER_CASE, 0x10AF },
- { 0x2D10, LOWER_CASE, 0x10B0 },
- { 0x2D11, LOWER_CASE, 0x10B1 },
- { 0x2D12, LOWER_CASE, 0x10B2 },
- { 0x2D13, LOWER_CASE, 0x10B3 },
- { 0x2D14, LOWER_CASE, 0x10B4 },
- { 0x2D15, LOWER_CASE, 0x10B5 },
- { 0x2D16, LOWER_CASE, 0x10B6 },
- { 0x2D17, LOWER_CASE, 0x10B7 },
- { 0x2D18, LOWER_CASE, 0x10B8 },
- { 0x2D19, LOWER_CASE, 0x10B9 },
- { 0x2D1A, LOWER_CASE, 0x10BA },
- { 0x2D1B, LOWER_CASE, 0x10BB },
- { 0x2D1C, LOWER_CASE, 0x10BC },
- { 0x2D1D, LOWER_CASE, 0x10BD },
- { 0x2D1E, LOWER_CASE, 0x10BE },
- { 0x2D1F, LOWER_CASE, 0x10BF },
- { 0x2D20, LOWER_CASE, 0x10C0 },
- { 0x2D21, LOWER_CASE, 0x10C1 },
- { 0x2D22, LOWER_CASE, 0x10C2 },
- { 0x2D23, LOWER_CASE, 0x10C3 },
- { 0x2D24, LOWER_CASE, 0x10C4 },
- { 0x2D25, LOWER_CASE, 0x10C5 },
- { 0x2D27, LOWER_CASE, 0x10C7 },
- { 0x2D2D, LOWER_CASE, 0x10CD },
- { 0xA640, UPPER_CASE, 0xA641 },
- { 0xA641, LOWER_CASE, 0xA640 },
- { 0xA642, UPPER_CASE, 0xA643 },
- { 0xA643, LOWER_CASE, 0xA642 },
- { 0xA644, UPPER_CASE, 0xA645 },
- { 0xA645, LOWER_CASE, 0xA644 },
- { 0xA646, UPPER_CASE, 0xA647 },
- { 0xA647, LOWER_CASE, 0xA646 },
- { 0xA648, UPPER_CASE, 0xA649 },
- { 0xA649, LOWER_CASE, 0xA648 },
- { 0xA64A, UPPER_CASE, 0xA64B },
- { 0xA64B, LOWER_CASE, 0xA64A },
- { 0xA64C, UPPER_CASE, 0xA64D },
- { 0xA64D, LOWER_CASE, 0xA64C },
- { 0xA64E, UPPER_CASE, 0xA64F },
- { 0xA64F, LOWER_CASE, 0xA64E },
- { 0xA650, UPPER_CASE, 0xA651 },
- { 0xA651, LOWER_CASE, 0xA650 },
- { 0xA652, UPPER_CASE, 0xA653 },
- { 0xA653, LOWER_CASE, 0xA652 },
- { 0xA654, UPPER_CASE, 0xA655 },
- { 0xA655, LOWER_CASE, 0xA654 },
- { 0xA656, UPPER_CASE, 0xA657 },
- { 0xA657, LOWER_CASE, 0xA656 },
- { 0xA658, UPPER_CASE, 0xA659 },
- { 0xA659, LOWER_CASE, 0xA658 },
- { 0xA65A, UPPER_CASE, 0xA65B },
- { 0xA65B, LOWER_CASE, 0xA65A },
- { 0xA65C, UPPER_CASE, 0xA65D },
- { 0xA65D, LOWER_CASE, 0xA65C },
- { 0xA65E, UPPER_CASE, 0xA65F },
- { 0xA65F, LOWER_CASE, 0xA65E },
- { 0xA660, UPPER_CASE, 0xA661 },
- { 0xA661, LOWER_CASE, 0xA660 },
- { 0xA662, UPPER_CASE, 0xA663 },
- { 0xA663, LOWER_CASE, 0xA662 },
- { 0xA664, UPPER_CASE, 0xA665 },
- { 0xA665, LOWER_CASE, 0xA664 },
- { 0xA666, UPPER_CASE, 0xA667 },
- { 0xA667, LOWER_CASE, 0xA666 },
- { 0xA668, UPPER_CASE, 0xA669 },
- { 0xA669, LOWER_CASE, 0xA668 },
- { 0xA66A, UPPER_CASE, 0xA66B },
- { 0xA66B, LOWER_CASE, 0xA66A },
- { 0xA66C, UPPER_CASE, 0xA66D },
- { 0xA66D, LOWER_CASE, 0xA66C },
- { 0xA680, UPPER_CASE, 0xA681 },
- { 0xA681, LOWER_CASE, 0xA680 },
- { 0xA682, UPPER_CASE, 0xA683 },
- { 0xA683, LOWER_CASE, 0xA682 },
- { 0xA684, UPPER_CASE, 0xA685 },
- { 0xA685, LOWER_CASE, 0xA684 },
- { 0xA686, UPPER_CASE, 0xA687 },
- { 0xA687, LOWER_CASE, 0xA686 },
- { 0xA688, UPPER_CASE, 0xA689 },
- { 0xA689, LOWER_CASE, 0xA688 },
- { 0xA68A, UPPER_CASE, 0xA68B },
- { 0xA68B, LOWER_CASE, 0xA68A },
- { 0xA68C, UPPER_CASE, 0xA68D },
- { 0xA68D, LOWER_CASE, 0xA68C },
- { 0xA68E, UPPER_CASE, 0xA68F },
- { 0xA68F, LOWER_CASE, 0xA68E },
- { 0xA690, UPPER_CASE, 0xA691 },
- { 0xA691, LOWER_CASE, 0xA690 },
- { 0xA692, UPPER_CASE, 0xA693 },
- { 0xA693, LOWER_CASE, 0xA692 },
- { 0xA694, UPPER_CASE, 0xA695 },
- { 0xA695, LOWER_CASE, 0xA694 },
- { 0xA696, UPPER_CASE, 0xA697 },
- { 0xA697, LOWER_CASE, 0xA696 },
- { 0xA698, UPPER_CASE, 0xA699 },
- { 0xA699, LOWER_CASE, 0xA698 },
- { 0xA69A, UPPER_CASE, 0xA69B },
- { 0xA69B, LOWER_CASE, 0xA69A },
- { 0xA722, UPPER_CASE, 0xA723 },
- { 0xA723, LOWER_CASE, 0xA722 },
- { 0xA724, UPPER_CASE, 0xA725 },
- { 0xA725, LOWER_CASE, 0xA724 },
- { 0xA726, UPPER_CASE, 0xA727 },
- { 0xA727, LOWER_CASE, 0xA726 },
- { 0xA728, UPPER_CASE, 0xA729 },
- { 0xA729, LOWER_CASE, 0xA728 },
- { 0xA72A, UPPER_CASE, 0xA72B },
- { 0xA72B, LOWER_CASE, 0xA72A },
- { 0xA72C, UPPER_CASE, 0xA72D },
- { 0xA72D, LOWER_CASE, 0xA72C },
- { 0xA72E, UPPER_CASE, 0xA72F },
- { 0xA72F, LOWER_CASE, 0xA72E },
- { 0xA732, UPPER_CASE, 0xA733 },
- { 0xA733, LOWER_CASE, 0xA732 },
- { 0xA734, UPPER_CASE, 0xA735 },
- { 0xA735, LOWER_CASE, 0xA734 },
- { 0xA736, UPPER_CASE, 0xA737 },
- { 0xA737, LOWER_CASE, 0xA736 },
- { 0xA738, UPPER_CASE, 0xA739 },
- { 0xA739, LOWER_CASE, 0xA738 },
- { 0xA73A, UPPER_CASE, 0xA73B },
- { 0xA73B, LOWER_CASE, 0xA73A },
- { 0xA73C, UPPER_CASE, 0xA73D },
- { 0xA73D, LOWER_CASE, 0xA73C },
- { 0xA73E, UPPER_CASE, 0xA73F },
- { 0xA73F, LOWER_CASE, 0xA73E },
- { 0xA740, UPPER_CASE, 0xA741 },
- { 0xA741, LOWER_CASE, 0xA740 },
- { 0xA742, UPPER_CASE, 0xA743 },
- { 0xA743, LOWER_CASE, 0xA742 },
- { 0xA744, UPPER_CASE, 0xA745 },
- { 0xA745, LOWER_CASE, 0xA744 },
- { 0xA746, UPPER_CASE, 0xA747 },
- { 0xA747, LOWER_CASE, 0xA746 },
- { 0xA748, UPPER_CASE, 0xA749 },
- { 0xA749, LOWER_CASE, 0xA748 },
- { 0xA74A, UPPER_CASE, 0xA74B },
- { 0xA74B, LOWER_CASE, 0xA74A },
- { 0xA74C, UPPER_CASE, 0xA74D },
- { 0xA74D, LOWER_CASE, 0xA74C },
- { 0xA74E, UPPER_CASE, 0xA74F },
- { 0xA74F, LOWER_CASE, 0xA74E },
- { 0xA750, UPPER_CASE, 0xA751 },
- { 0xA751, LOWER_CASE, 0xA750 },
- { 0xA752, UPPER_CASE, 0xA753 },
- { 0xA753, LOWER_CASE, 0xA752 },
- { 0xA754, UPPER_CASE, 0xA755 },
- { 0xA755, LOWER_CASE, 0xA754 },
- { 0xA756, UPPER_CASE, 0xA757 },
- { 0xA757, LOWER_CASE, 0xA756 },
- { 0xA758, UPPER_CASE, 0xA759 },
- { 0xA759, LOWER_CASE, 0xA758 },
- { 0xA75A, UPPER_CASE, 0xA75B },
- { 0xA75B, LOWER_CASE, 0xA75A },
- { 0xA75C, UPPER_CASE, 0xA75D },
- { 0xA75D, LOWER_CASE, 0xA75C },
- { 0xA75E, UPPER_CASE, 0xA75F },
- { 0xA75F, LOWER_CASE, 0xA75E },
- { 0xA760, UPPER_CASE, 0xA761 },
- { 0xA761, LOWER_CASE, 0xA760 },
- { 0xA762, UPPER_CASE, 0xA763 },
- { 0xA763, LOWER_CASE, 0xA762 },
- { 0xA764, UPPER_CASE, 0xA765 },
- { 0xA765, LOWER_CASE, 0xA764 },
- { 0xA766, UPPER_CASE, 0xA767 },
- { 0xA767, LOWER_CASE, 0xA766 },
- { 0xA768, UPPER_CASE, 0xA769 },
- { 0xA769, LOWER_CASE, 0xA768 },
- { 0xA76A, UPPER_CASE, 0xA76B },
- { 0xA76B, LOWER_CASE, 0xA76A },
- { 0xA76C, UPPER_CASE, 0xA76D },
- { 0xA76D, LOWER_CASE, 0xA76C },
- { 0xA76E, UPPER_CASE, 0xA76F },
- { 0xA76F, LOWER_CASE, 0xA76E },
- { 0xA779, UPPER_CASE, 0xA77A },
- { 0xA77A, LOWER_CASE, 0xA779 },
- { 0xA77B, UPPER_CASE, 0xA77C },
- { 0xA77C, LOWER_CASE, 0xA77B },
- { 0xA77D, UPPER_CASE, 0x1D79 },
- { 0xA77E, UPPER_CASE, 0xA77F },
- { 0xA77F, LOWER_CASE, 0xA77E },
- { 0xA780, UPPER_CASE, 0xA781 },
- { 0xA781, LOWER_CASE, 0xA780 },
- { 0xA782, UPPER_CASE, 0xA783 },
- { 0xA783, LOWER_CASE, 0xA782 },
- { 0xA784, UPPER_CASE, 0xA785 },
- { 0xA785, LOWER_CASE, 0xA784 },
- { 0xA786, UPPER_CASE, 0xA787 },
- { 0xA787, LOWER_CASE, 0xA786 },
- { 0xA78B, UPPER_CASE, 0xA78C },
- { 0xA78C, LOWER_CASE, 0xA78B },
- { 0xA78D, UPPER_CASE, 0x265 },
- { 0xA790, UPPER_CASE, 0xA791 },
- { 0xA791, LOWER_CASE, 0xA790 },
- { 0xA792, UPPER_CASE, 0xA793 },
- { 0xA793, LOWER_CASE, 0xA792 },
- { 0xA794, LOWER_CASE, 0xA7C4 },
- { 0xA796, UPPER_CASE, 0xA797 },
- { 0xA797, LOWER_CASE, 0xA796 },
- { 0xA798, UPPER_CASE, 0xA799 },
- { 0xA799, LOWER_CASE, 0xA798 },
- { 0xA79A, UPPER_CASE, 0xA79B },
- { 0xA79B, LOWER_CASE, 0xA79A },
- { 0xA79C, UPPER_CASE, 0xA79D },
- { 0xA79D, LOWER_CASE, 0xA79C },
- { 0xA79E, UPPER_CASE, 0xA79F },
- { 0xA79F, LOWER_CASE, 0xA79E },
- { 0xA7A0, UPPER_CASE, 0xA7A1 },
- { 0xA7A1, LOWER_CASE, 0xA7A0 },
- { 0xA7A2, UPPER_CASE, 0xA7A3 },
- { 0xA7A3, LOWER_CASE, 0xA7A2 },
- { 0xA7A4, UPPER_CASE, 0xA7A5 },
- { 0xA7A5, LOWER_CASE, 0xA7A4 },
- { 0xA7A6, UPPER_CASE, 0xA7A7 },
- { 0xA7A7, LOWER_CASE, 0xA7A6 },
- { 0xA7A8, UPPER_CASE, 0xA7A9 },
- { 0xA7A9, LOWER_CASE, 0xA7A8 },
- { 0xA7AA, UPPER_CASE, 0x266 },
- { 0xA7AB, UPPER_CASE, 0x25C },
- { 0xA7AC, UPPER_CASE, 0x261 },
- { 0xA7AD, UPPER_CASE, 0x26C },
- { 0xA7AE, UPPER_CASE, 0x26A },
- { 0xA7B0, UPPER_CASE, 0x29E },
- { 0xA7B1, UPPER_CASE, 0x287 },
- { 0xA7B2, UPPER_CASE, 0x29D },
- { 0xA7B3, UPPER_CASE, 0xAB53 },
- { 0xA7B4, UPPER_CASE, 0xA7B5 },
- { 0xA7B5, LOWER_CASE, 0xA7B4 },
- { 0xA7B6, UPPER_CASE, 0xA7B7 },
- { 0xA7B7, LOWER_CASE, 0xA7B6 },
- { 0xA7B8, UPPER_CASE, 0xA7B9 },
- { 0xA7B9, LOWER_CASE, 0xA7B8 },
- { 0xA7BA, UPPER_CASE, 0xA7BB },
- { 0xA7BB, LOWER_CASE, 0xA7BA },
- { 0xA7BC, UPPER_CASE, 0xA7BD },
- { 0xA7BD, LOWER_CASE, 0xA7BC },
- { 0xA7BE, UPPER_CASE, 0xA7BF },
- { 0xA7BF, LOWER_CASE, 0xA7BE },
- { 0xA7C2, UPPER_CASE, 0xA7C3 },
- { 0xA7C3, LOWER_CASE, 0xA7C2 },
- { 0xA7C4, UPPER_CASE, 0xA794 },
- { 0xA7C5, UPPER_CASE, 0x282 },
- { 0xA7C6, UPPER_CASE, 0x1D8E },
- { 0xA7C7, UPPER_CASE, 0xA7C8 },
- { 0xA7C8, LOWER_CASE, 0xA7C7 },
- { 0xA7C9, UPPER_CASE, 0xA7CA },
- { 0xA7CA, LOWER_CASE, 0xA7C9 },
- { 0xA7F5, UPPER_CASE, 0xA7F6 },
- { 0xA7F6, LOWER_CASE, 0xA7F5 },
- { 0xAB53, LOWER_CASE, 0xA7B3 },
- { 0xAB70, LOWER_CASE, 0x13A0 },
- { 0xAB71, LOWER_CASE, 0x13A1 },
- { 0xAB72, LOWER_CASE, 0x13A2 },
- { 0xAB73, LOWER_CASE, 0x13A3 },
- { 0xAB74, LOWER_CASE, 0x13A4 },
- { 0xAB75, LOWER_CASE, 0x13A5 },
- { 0xAB76, LOWER_CASE, 0x13A6 },
- { 0xAB77, LOWER_CASE, 0x13A7 },
- { 0xAB78, LOWER_CASE, 0x13A8 },
- { 0xAB79, LOWER_CASE, 0x13A9 },
- { 0xAB7A, LOWER_CASE, 0x13AA },
- { 0xAB7B, LOWER_CASE, 0x13AB },
- { 0xAB7C, LOWER_CASE, 0x13AC },
- { 0xAB7D, LOWER_CASE, 0x13AD },
- { 0xAB7E, LOWER_CASE, 0x13AE },
- { 0xAB7F, LOWER_CASE, 0x13AF },
- { 0xAB80, LOWER_CASE, 0x13B0 },
- { 0xAB81, LOWER_CASE, 0x13B1 },
- { 0xAB82, LOWER_CASE, 0x13B2 },
- { 0xAB83, LOWER_CASE, 0x13B3 },
- { 0xAB84, LOWER_CASE, 0x13B4 },
- { 0xAB85, LOWER_CASE, 0x13B5 },
- { 0xAB86, LOWER_CASE, 0x13B6 },
- { 0xAB87, LOWER_CASE, 0x13B7 },
- { 0xAB88, LOWER_CASE, 0x13B8 },
- { 0xAB89, LOWER_CASE, 0x13B9 },
- { 0xAB8A, LOWER_CASE, 0x13BA },
- { 0xAB8B, LOWER_CASE, 0x13BB },
- { 0xAB8C, LOWER_CASE, 0x13BC },
- { 0xAB8D, LOWER_CASE, 0x13BD },
- { 0xAB8E, LOWER_CASE, 0x13BE },
- { 0xAB8F, LOWER_CASE, 0x13BF },
- { 0xAB90, LOWER_CASE, 0x13C0 },
- { 0xAB91, LOWER_CASE, 0x13C1 },
- { 0xAB92, LOWER_CASE, 0x13C2 },
- { 0xAB93, LOWER_CASE, 0x13C3 },
- { 0xAB94, LOWER_CASE, 0x13C4 },
- { 0xAB95, LOWER_CASE, 0x13C5 },
- { 0xAB96, LOWER_CASE, 0x13C6 },
- { 0xAB97, LOWER_CASE, 0x13C7 },
- { 0xAB98, LOWER_CASE, 0x13C8 },
- { 0xAB99, LOWER_CASE, 0x13C9 },
- { 0xAB9A, LOWER_CASE, 0x13CA },
- { 0xAB9B, LOWER_CASE, 0x13CB },
- { 0xAB9C, LOWER_CASE, 0x13CC },
- { 0xAB9D, LOWER_CASE, 0x13CD },
- { 0xAB9E, LOWER_CASE, 0x13CE },
- { 0xAB9F, LOWER_CASE, 0x13CF },
- { 0xABA0, LOWER_CASE, 0x13D0 },
- { 0xABA1, LOWER_CASE, 0x13D1 },
- { 0xABA2, LOWER_CASE, 0x13D2 },
- { 0xABA3, LOWER_CASE, 0x13D3 },
- { 0xABA4, LOWER_CASE, 0x13D4 },
- { 0xABA5, LOWER_CASE, 0x13D5 },
- { 0xABA6, LOWER_CASE, 0x13D6 },
- { 0xABA7, LOWER_CASE, 0x13D7 },
- { 0xABA8, LOWER_CASE, 0x13D8 },
- { 0xABA9, LOWER_CASE, 0x13D9 },
- { 0xABAA, LOWER_CASE, 0x13DA },
- { 0xABAB, LOWER_CASE, 0x13DB },
- { 0xABAC, LOWER_CASE, 0x13DC },
- { 0xABAD, LOWER_CASE, 0x13DD },
- { 0xABAE, LOWER_CASE, 0x13DE },
- { 0xABAF, LOWER_CASE, 0x13DF },
- { 0xABB0, LOWER_CASE, 0x13E0 },
- { 0xABB1, LOWER_CASE, 0x13E1 },
- { 0xABB2, LOWER_CASE, 0x13E2 },
- { 0xABB3, LOWER_CASE, 0x13E3 },
- { 0xABB4, LOWER_CASE, 0x13E4 },
- { 0xABB5, LOWER_CASE, 0x13E5 },
- { 0xABB6, LOWER_CASE, 0x13E6 },
- { 0xABB7, LOWER_CASE, 0x13E7 },
- { 0xABB8, LOWER_CASE, 0x13E8 },
- { 0xABB9, LOWER_CASE, 0x13E9 },
- { 0xABBA, LOWER_CASE, 0x13EA },
- { 0xABBB, LOWER_CASE, 0x13EB },
- { 0xABBC, LOWER_CASE, 0x13EC },
- { 0xABBD, LOWER_CASE, 0x13ED },
- { 0xABBE, LOWER_CASE, 0x13EE },
- { 0xABBF, LOWER_CASE, 0x13EF },
- { 0xFF21, UPPER_CASE, 0xFF41 },
- { 0xFF22, UPPER_CASE, 0xFF42 },
- { 0xFF23, UPPER_CASE, 0xFF43 },
- { 0xFF24, UPPER_CASE, 0xFF44 },
- { 0xFF25, UPPER_CASE, 0xFF45 },
- { 0xFF26, UPPER_CASE, 0xFF46 },
- { 0xFF27, UPPER_CASE, 0xFF47 },
- { 0xFF28, UPPER_CASE, 0xFF48 },
- { 0xFF29, UPPER_CASE, 0xFF49 },
- { 0xFF2A, UPPER_CASE, 0xFF4A },
- { 0xFF2B, UPPER_CASE, 0xFF4B },
- { 0xFF2C, UPPER_CASE, 0xFF4C },
- { 0xFF2D, UPPER_CASE, 0xFF4D },
- { 0xFF2E, UPPER_CASE, 0xFF4E },
- { 0xFF2F, UPPER_CASE, 0xFF4F },
- { 0xFF30, UPPER_CASE, 0xFF50 },
- { 0xFF31, UPPER_CASE, 0xFF51 },
- { 0xFF32, UPPER_CASE, 0xFF52 },
- { 0xFF33, UPPER_CASE, 0xFF53 },
- { 0xFF34, UPPER_CASE, 0xFF54 },
- { 0xFF35, UPPER_CASE, 0xFF55 },
- { 0xFF36, UPPER_CASE, 0xFF56 },
- { 0xFF37, UPPER_CASE, 0xFF57 },
- { 0xFF38, UPPER_CASE, 0xFF58 },
- { 0xFF39, UPPER_CASE, 0xFF59 },
- { 0xFF3A, UPPER_CASE, 0xFF5A },
- { 0xFF41, LOWER_CASE, 0xFF21 },
- { 0xFF42, LOWER_CASE, 0xFF22 },
- { 0xFF43, LOWER_CASE, 0xFF23 },
- { 0xFF44, LOWER_CASE, 0xFF24 },
- { 0xFF45, LOWER_CASE, 0xFF25 },
- { 0xFF46, LOWER_CASE, 0xFF26 },
- { 0xFF47, LOWER_CASE, 0xFF27 },
- { 0xFF48, LOWER_CASE, 0xFF28 },
- { 0xFF49, LOWER_CASE, 0xFF29 },
- { 0xFF4A, LOWER_CASE, 0xFF2A },
- { 0xFF4B, LOWER_CASE, 0xFF2B },
- { 0xFF4C, LOWER_CASE, 0xFF2C },
- { 0xFF4D, LOWER_CASE, 0xFF2D },
- { 0xFF4E, LOWER_CASE, 0xFF2E },
- { 0xFF4F, LOWER_CASE, 0xFF2F },
- { 0xFF50, LOWER_CASE, 0xFF30 },
- { 0xFF51, LOWER_CASE, 0xFF31 },
- { 0xFF52, LOWER_CASE, 0xFF32 },
- { 0xFF53, LOWER_CASE, 0xFF33 },
- { 0xFF54, LOWER_CASE, 0xFF34 },
- { 0xFF55, LOWER_CASE, 0xFF35 },
- { 0xFF56, LOWER_CASE, 0xFF36 },
- { 0xFF57, LOWER_CASE, 0xFF37 },
- { 0xFF58, LOWER_CASE, 0xFF38 },
- { 0xFF59, LOWER_CASE, 0xFF39 },
- { 0xFF5A, LOWER_CASE, 0xFF3A },
-};
-CONST UINT UNICODE_DATA_SIZE = sizeof(UnicodeData)/sizeof(UnicodeDataRec);
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Globalization;
-using System.IO;
-
-class Program
-{
- static void Main(string[] args)
- {
- Console.WriteLine("// Licensed to the .NET Foundation under one or more agreements.");
- Console.WriteLine("// The .NET Foundation licenses this file to you under the MIT license.");
- Console.WriteLine();
-
- Console.WriteLine("#include \"pal/unicodedata.h\"");
-
- Console.WriteLine();
- Console.WriteLine("//");
- Console.WriteLine("// THIS FILE IS GENERATED. DO NOT HAND EDIT.");
- Console.WriteLine("//");
- Console.WriteLine();
-
- Console.WriteLine("CONST UnicodeDataRec UnicodeData[] = {");
-
- string sourceFileName = args[0];
-
- using (StreamReader sourceFile = File.OpenText(sourceFileName))
- while (sourceFile.ReadLine() is string line)
- {
- var fields = line.Split(';');
-
- var code = int.Parse(fields[0], NumberStyles.HexNumber);
-
- bool hasUpperCaseMapping = fields[12].Length != 0;
- bool hasLowerCaseMapping = fields[13].Length != 0;
-
- if (!hasLowerCaseMapping && !hasUpperCaseMapping)
- continue;
-
-
- int opposingCase = hasUpperCaseMapping ?
- int.Parse(fields[12], NumberStyles.HexNumber) :
- int.Parse(fields[13], NumberStyles.HexNumber);
-
- // These won't fit in 16 bits - no point carrying them
- if (code > 0xFFFF)
- continue;
-
- Debug.Assert(opposingCase <= 0xFFFF);
-
- string specifier = hasUpperCaseMapping ? "LOWER_CASE" : "UPPER_CASE";
-
- Console.WriteLine($" {{ 0x{code:X}, {specifier}, 0x{opposingCase:X} }},");
- }
-
- Console.WriteLine("};");
-
- Console.WriteLine("CONST UINT UNICODE_DATA_SIZE = sizeof(UnicodeData)/sizeof(UnicodeDataRec);");
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/*++
-
-Module Name:
-
- unicode/utf8.c
-
-Abstract:
- Functions to encode and decode UTF-8 strings. This is a port of the C# version from Utf8Encoding.cs.
-
-Revision History:
-
---*/
-
-#include "pal/utf8.h"
-#include "pal/malloc.hpp"
-
-using namespace CorUnix;
-
-#define FASTLOOP
-
-struct CharUnicodeInfo
-{
- static const WCHAR HIGH_SURROGATE_START = 0xd800;
- static const WCHAR HIGH_SURROGATE_END = 0xdbff;
- static const WCHAR LOW_SURROGATE_START = 0xdc00;
- static const WCHAR LOW_SURROGATE_END = 0xdfff;
-};
-
-struct Char
-{
- // Test if the wide character is a high surrogate
- static bool IsHighSurrogate(const WCHAR c)
- {
- return (c & 0xFC00) == CharUnicodeInfo::HIGH_SURROGATE_START;
- }
-
- // Test if the wide character is a low surrogate
- static bool IsLowSurrogate(const WCHAR c)
- {
- return (c & 0xFC00) == CharUnicodeInfo::LOW_SURROGATE_START;
- }
-
- // Test if the wide character is a surrogate half
- static bool IsSurrogate(const WCHAR c)
- {
- return (c & 0xF800) == CharUnicodeInfo::HIGH_SURROGATE_START;
- }
-
- // Test if the wide character is a high surrogate
- static bool IsHighSurrogate(const WCHAR* s, int index)
- {
- return IsHighSurrogate(s[index]);
- }
-
- // Test if the wide character is a low surrogate
- static bool IsLowSurrogate(const WCHAR* s, int index)
- {
- return IsLowSurrogate(s[index]);
- }
-
- // Test if the wide character is a surrogate half
- static bool IsSurrogate(const WCHAR* s, int index)
- {
- return IsSurrogate(s[index]);
- }
-};
-
-class ArgumentException
-{
-
-public:
- ArgumentException(LPCSTR message)
- {
- }
-
- ArgumentException(LPCSTR message, LPCSTR argName)
- {
- }
-};
-
-class ArgumentNullException : public ArgumentException
-{
-public:
- ArgumentNullException(LPCSTR argName)
- : ArgumentException("Argument is NULL", argName)
- {
-
- }
-};
-
-class ArgumentOutOfRangeException : public ArgumentException
-{
-public:
- ArgumentOutOfRangeException(LPCSTR argName, LPCSTR message)
- : ArgumentException(message, argName)
- {
-
- }
-};
-
-class InsufficientBufferException : public ArgumentException
-{
-public:
- InsufficientBufferException(LPCSTR message, LPCSTR argName)
- : ArgumentException(message, argName)
- {
-
- }
-};
-
-class Contract
-{
-public:
- static void Assert(bool cond, LPCSTR str)
- {
- if (!cond)
- {
- throw ArgumentException(str);
- }
- }
-
- static void EndContractBlock()
- {
- }
-};
-
-class DecoderFallbackException : public ArgumentException
-{
- BYTE *bytesUnknown;
- int index;
-
-public:
- DecoderFallbackException(
- LPCSTR message, BYTE bytesUnknown[], int index) : ArgumentException(message)
- {
- this->bytesUnknown = bytesUnknown;
- this->index = index;
- }
-
- BYTE *BytesUnknown()
- {
- return (bytesUnknown);
- }
-
- int GetIndex()
- {
- return index;
- }
-};
-
-class DecoderFallbackBuffer;
-
-class DecoderFallback
-{
-public:
-
- // Fallback
- //
- // Return the appropriate unicode string alternative to the character that need to fall back.
-
- virtual DecoderFallbackBuffer* CreateFallbackBuffer() = 0;
-
- // Maximum number of characters that this instance of this fallback could return
-
- virtual int GetMaxCharCount() = 0;
-};
-
-class DecoderReplacementFallback : public DecoderFallback
-{
- // Our variables
- WCHAR strDefault[2];
- int strDefaultLength;
-
-public:
- // Construction. Default replacement fallback uses no best fit and ? replacement string
- DecoderReplacementFallback() : DecoderReplacementFallback(W("?"))
- {
- }
-
- DecoderReplacementFallback(const WCHAR* replacement)
- {
- // Must not be null
- if (replacement == nullptr)
- throw ArgumentNullException("replacement");
- Contract::EndContractBlock();
-
- // Make sure it doesn't have bad surrogate pairs
- bool bFoundHigh = false;
- int replacementLength = PAL_wcslen((const WCHAR *)replacement);
- for (int i = 0; i < replacementLength; i++)
- {
- // Found a surrogate?
- if (Char::IsSurrogate(replacement, i))
- {
- // High or Low?
- if (Char::IsHighSurrogate(replacement, i))
- {
- // if already had a high one, stop
- if (bFoundHigh)
- break; // break & throw at the bFoundHIgh below
- bFoundHigh = true;
- }
- else
- {
- // Low, did we have a high?
- if (!bFoundHigh)
- {
- // Didn't have one, make if fail when we stop
- bFoundHigh = true;
- break;
- }
-
- // Clear flag
- bFoundHigh = false;
- }
- }
- // If last was high we're in trouble (not surrogate so not low surrogate, so break)
- else if (bFoundHigh)
- break;
- }
- if (bFoundHigh)
- throw ArgumentException("String 'replacement' contains invalid Unicode code points.", "replacement");
-
- wcscpy_s(strDefault, ARRAY_SIZE(strDefault), replacement);
- strDefaultLength = replacementLength;
- }
-
- WCHAR* GetDefaultString()
- {
- return strDefault;
- }
-
- virtual DecoderFallbackBuffer* CreateFallbackBuffer();
-
- // Maximum number of characters that this instance of this fallback could return
- virtual int GetMaxCharCount()
- {
- return strDefaultLength;
- }
-};
-
-class DecoderFallbackBuffer
-{
- friend class UTF8Encoding;
- // Most implimentations will probably need an implimenation-specific constructor
-
- // internal methods that cannot be overriden that let us do our fallback thing
- // These wrap the internal methods so that we can check for people doing stuff that's incorrect
-
-public:
- virtual ~DecoderFallbackBuffer() = default;
-
- virtual bool Fallback(BYTE bytesUnknown[], int index, int size) = 0;
-
- // Get next character
- virtual WCHAR GetNextChar() = 0;
-
- //Back up a character
- virtual bool MovePrevious() = 0;
-
- // How many chars left in this fallback?
- virtual int GetRemaining() = 0;
-
- // Clear the buffer
- virtual void Reset()
- {
- while (GetNextChar() != (WCHAR)0);
- }
-
- // Internal items to help us figure out what we're doing as far as error messages, etc.
- // These help us with our performance and messages internally
-protected:
- BYTE* byteStart;
- WCHAR* charEnd;
-
- // Internal reset
- void InternalReset()
- {
- byteStart = nullptr;
- Reset();
- }
-
- // Set the above values
- // This can't be part of the constructor because EncoderFallbacks would have to know how to impliment these.
- void InternalInitialize(BYTE* byteStart, WCHAR* charEnd)
- {
- this->byteStart = byteStart;
- this->charEnd = charEnd;
- }
-
- // Fallback the current byte by sticking it into the remaining char buffer.
- // This can only be called by our encodings (other have to use the public fallback methods), so
- // we can use our DecoderNLS here too (except we don't).
- // Returns true if we are successful, false if we can't fallback the character (no buffer space)
- // So caller needs to throw buffer space if return false.
- // Right now this has both bytes and bytes[], since we might have extra bytes, hence the
- // array, and we might need the index, hence the byte*
- // Don't touch ref chars unless we succeed
- virtual bool InternalFallback(BYTE bytes[], BYTE* pBytes, WCHAR** chars, int size)
- {
-
- Contract::Assert(byteStart != nullptr, "[DecoderFallback.InternalFallback]Used InternalFallback without calling InternalInitialize");
-
- // See if there's a fallback character and we have an output buffer then copy our string.
- if (this->Fallback(bytes, (int)(pBytes - byteStart - size), size))
- {
- // Copy the chars to our output
- WCHAR ch;
- WCHAR* charTemp = *chars;
- bool bHighSurrogate = false;
- while ((ch = GetNextChar()) != 0)
- {
- // Make sure no mixed up surrogates
- if (Char::IsSurrogate(ch))
- {
- if (Char::IsHighSurrogate(ch))
- {
- // High Surrogate
- if (bHighSurrogate)
- throw ArgumentException("String 'chars' contains invalid Unicode code points.");
- bHighSurrogate = true;
- }
- else
- {
- // Low surrogate
- if (!bHighSurrogate)
- throw ArgumentException("String 'chars' contains invalid Unicode code points.");
- bHighSurrogate = false;
- }
- }
-
- if (charTemp >= charEnd)
- {
- // No buffer space
- return false;
- }
-
- *(charTemp++) = ch;
- }
-
- // Need to make sure that bHighSurrogate isn't true
- if (bHighSurrogate)
- throw ArgumentException("String 'chars' contains invalid Unicode code points.");
-
- // Now we aren't going to be false, so its OK to update chars
- *chars = charTemp;
- }
-
- return true;
- }
-
- // This version just counts the fallback and doesn't actually copy anything.
- virtual int InternalFallback(BYTE bytes[], BYTE* pBytes, int size)
- // Right now this has both bytes[] and BYTE* bytes, since we might have extra bytes, hence the
- // array, and we might need the index, hence the byte*
- {
-
- Contract::Assert(byteStart != nullptr, "[DecoderFallback.InternalFallback]Used InternalFallback without calling InternalInitialize");
-
- // See if there's a fallback character and we have an output buffer then copy our string.
- if (this->Fallback(bytes, (int)(pBytes - byteStart - size), size))
- {
- int count = 0;
-
- WCHAR ch;
- bool bHighSurrogate = false;
- while ((ch = GetNextChar()) != 0)
- {
- // Make sure no mixed up surrogates
- if (Char::IsSurrogate(ch))
- {
- if (Char::IsHighSurrogate(ch))
- {
- // High Surrogate
- if (bHighSurrogate)
- throw ArgumentException("String 'chars' contains invalid Unicode code points.");
- bHighSurrogate = true;
- }
- else
- {
- // Low surrogate
- if (!bHighSurrogate)
- throw ArgumentException("String 'chars' contains invalid Unicode code points.");
- bHighSurrogate = false;
- }
- }
-
- count++;
- }
-
- // Need to make sure that bHighSurrogate isn't true
- if (bHighSurrogate)
- throw ArgumentException("String 'chars' contains invalid Unicode code points.");
-
- return count;
- }
-
- // If no fallback return 0
- return 0;
- }
-
- // private helper methods
- void ThrowLastBytesRecursive(BYTE bytesUnknown[])
- {
- throw ArgumentException("Recursive fallback not allowed");
- }
-};
-
-class DecoderReplacementFallbackBuffer : public DecoderFallbackBuffer
-{
- // Store our default string
- WCHAR strDefault[2];
- int strDefaultLength;
- int fallbackCount = -1;
- int fallbackIndex = -1;
-
-public:
- // Construction
- DecoderReplacementFallbackBuffer(DecoderReplacementFallback* fallback)
- {
- wcscpy_s(strDefault, ARRAY_SIZE(strDefault), fallback->GetDefaultString());
- strDefaultLength = PAL_wcslen((const WCHAR *)fallback->GetDefaultString());
- }
-
- // Fallback Methods
- virtual bool Fallback(BYTE bytesUnknown[], int index, int size)
- {
- // We expect no previous fallback in our buffer
- // We can't call recursively but others might (note, we don't test on last char!!!)
- if (fallbackCount >= 1)
- {
- ThrowLastBytesRecursive(bytesUnknown);
- }
-
- // Go ahead and get our fallback
- if (strDefaultLength == 0)
- return false;
-
- fallbackCount = strDefaultLength;
- fallbackIndex = -1;
-
- return true;
- }
-
- virtual WCHAR GetNextChar()
- {
- // We want it to get < 0 because == 0 means that the current/last character is a fallback
- // and we need to detect recursion. We could have a flag but we already have this counter.
- fallbackCount--;
- fallbackIndex++;
-
- // Do we have anything left? 0 is now last fallback char, negative is nothing left
- if (fallbackCount < 0)
- return '\0';
-
- // Need to get it out of the buffer.
- // Make sure it didn't wrap from the fast count-- path
- if (fallbackCount == INT_MAX)
- {
- fallbackCount = -1;
- return '\0';
- }
-
- // Now make sure its in the expected range
- Contract::Assert(fallbackIndex < strDefaultLength && fallbackIndex >= 0,
- "Index exceeds buffer range");
-
- return strDefault[fallbackIndex];
- }
-
- virtual bool MovePrevious()
- {
- // Back up one, only if we just processed the last character (or earlier)
- if (fallbackCount >= -1 && fallbackIndex >= 0)
- {
- fallbackIndex--;
- fallbackCount++;
- return true;
- }
-
- // Return false 'cause we couldn't do it.
- return false;
- }
-
- // How many characters left to output?
- virtual int GetRemaining()
- {
- // Our count is 0 for 1 character left.
- return (fallbackCount < 0) ? 0 : fallbackCount;
- }
-
- // Clear the buffer
- virtual void Reset()
- {
- fallbackCount = -1;
- fallbackIndex = -1;
- byteStart = nullptr;
- }
-
- // This version just counts the fallback and doesn't actually copy anything.
- virtual int InternalFallback(BYTE bytes[], BYTE* pBytes, int size)
- // Right now this has both bytes and bytes[], since we might have extra bytes, hence the
- // array, and we might need the index, hence the byte*
- {
- // return our replacement string Length
- return strDefaultLength;
- }
-};
-
-class DecoderExceptionFallbackBuffer : public DecoderFallbackBuffer
-{
-public:
- DecoderExceptionFallbackBuffer()
- {
- }
-
- virtual bool Fallback(BYTE bytesUnknown[], int index, int size)
- {
- throw DecoderFallbackException(
- "Unable to translate UTF-8 character to Unicode", bytesUnknown, index);
- }
-
- virtual WCHAR GetNextChar()
- {
- return 0;
- }
-
- virtual bool MovePrevious()
- {
- // Exception fallback doesn't have anywhere to back up to.
- return false;
- }
-
- // Exceptions are always empty
- virtual int GetRemaining()
- {
- return 0;
- }
-
-};
-
-class DecoderExceptionFallback : public DecoderFallback
-{
- // Construction
-public:
- DecoderExceptionFallback()
- {
- }
-
- virtual DecoderFallbackBuffer* CreateFallbackBuffer()
- {
- return InternalNew<DecoderExceptionFallbackBuffer>();
- }
-
- // Maximum number of characters that this instance of this fallback could return
- virtual int GetMaxCharCount()
- {
- return 0;
- }
-};
-
-DecoderFallbackBuffer* DecoderReplacementFallback::CreateFallbackBuffer()
-{
- return InternalNew<DecoderReplacementFallbackBuffer>(this);
-}
-
-class EncoderFallbackException : public ArgumentException
-{
- WCHAR charUnknown;
- WCHAR charUnknownHigh;
- WCHAR charUnknownLow;
- int index;
-
-public:
- EncoderFallbackException(
- LPCSTR message, WCHAR charUnknown, int index) : ArgumentException(message)
- {
- this->charUnknown = charUnknown;
- this->index = index;
- }
-
- EncoderFallbackException(
- LPCSTR message, WCHAR charUnknownHigh, WCHAR charUnknownLow, int index) : ArgumentException(message)
- {
- if (!Char::IsHighSurrogate(charUnknownHigh))
- {
- throw ArgumentOutOfRangeException("charUnknownHigh",
- "Argument out of range 0xD800..0xDBFF");
- }
- if (!Char::IsLowSurrogate(charUnknownLow))
- {
- throw ArgumentOutOfRangeException("charUnknownLow",
- "Argument out of range 0xDC00..0xDFFF");
- }
- Contract::EndContractBlock();
-
- this->charUnknownHigh = charUnknownHigh;
- this->charUnknownLow = charUnknownLow;
- this->index = index;
- }
-
- WCHAR GetCharUnknown()
- {
- return (charUnknown);
- }
-
- WCHAR GetCharUnknownHigh()
- {
- return (charUnknownHigh);
- }
-
- WCHAR GetCharUnknownLow()
- {
- return (charUnknownLow);
- }
-
- int GetIndex()
- {
- return index;
- }
-
- // Return true if the unknown character is a surrogate pair.
- bool IsUnknownSurrogate()
- {
- return (charUnknownHigh != '\0');
- }
-};
-
-class EncoderFallbackBuffer;
-
-class EncoderFallback
-{
-public:
-
- // Fallback
- //
- // Return the appropriate unicode string alternative to the character that need to fall back.
-
- virtual EncoderFallbackBuffer* CreateFallbackBuffer() = 0;
-
- // Maximum number of characters that this instance of this fallback could return
- virtual int GetMaxCharCount() = 0;
-};
-
-class EncoderReplacementFallback : public EncoderFallback
-{
- // Our variables
- WCHAR strDefault[2];
- int strDefaultLength;
-
-public:
- // Construction. Default replacement fallback uses no best fit and ? replacement string
- EncoderReplacementFallback() : EncoderReplacementFallback(W("?"))
- {
- }
-
- EncoderReplacementFallback(const WCHAR* replacement)
- {
- // Must not be null
- if (replacement == nullptr)
- throw ArgumentNullException("replacement");
- Contract::EndContractBlock();
-
- // Make sure it doesn't have bad surrogate pairs
- bool bFoundHigh = false;
- int replacementLength = PAL_wcslen((const WCHAR *)replacement);
- for (int i = 0; i < replacementLength; i++)
- {
- // Found a surrogate?
- if (Char::IsSurrogate(replacement, i))
- {
- // High or Low?
- if (Char::IsHighSurrogate(replacement, i))
- {
- // if already had a high one, stop
- if (bFoundHigh)
- break; // break & throw at the bFoundHIgh below
- bFoundHigh = true;
- }
- else
- {
- // Low, did we have a high?
- if (!bFoundHigh)
- {
- // Didn't have one, make if fail when we stop
- bFoundHigh = true;
- break;
- }
-
- // Clear flag
- bFoundHigh = false;
- }
- }
- // If last was high we're in trouble (not surrogate so not low surrogate, so break)
- else if (bFoundHigh)
- break;
- }
- if (bFoundHigh)
- throw ArgumentException("String 'replacement' contains invalid Unicode code points.", "replacement");
-
- wcscpy_s(strDefault, ARRAY_SIZE(strDefault), replacement);
- strDefaultLength = replacementLength;
- }
-
- WCHAR* GetDefaultString()
- {
- return strDefault;
- }
-
- virtual EncoderFallbackBuffer* CreateFallbackBuffer();
-
- // Maximum number of characters that this instance of this fallback could return
- virtual int GetMaxCharCount()
- {
- return strDefaultLength;
- }
-};
-
-class EncoderFallbackBuffer
-{
- friend class UTF8Encoding;
- // Most implementations will probably need an implemenation-specific constructor
-
- // Public methods that cannot be overriden that let us do our fallback thing
- // These wrap the internal methods so that we can check for people doing stuff that is incorrect
-
-public:
- virtual ~EncoderFallbackBuffer() = default;
-
- virtual bool Fallback(WCHAR charUnknown, int index) = 0;
-
- virtual bool Fallback(WCHAR charUnknownHigh, WCHAR charUnknownLow, int index) = 0;
-
- // Get next character
- virtual WCHAR GetNextChar() = 0;
-
- // Back up a character
- virtual bool MovePrevious() = 0;
-
- // How many chars left in this fallback?
- virtual int GetRemaining() = 0;
-
- // Not sure if this should be public or not.
- // Clear the buffer
- virtual void Reset()
- {
- while (GetNextChar() != (WCHAR)0);
- }
-
- // Internal items to help us figure out what we're doing as far as error messages, etc.
- // These help us with our performance and messages internally
-protected:
- WCHAR* charStart;
- WCHAR* charEnd;
- bool setEncoder;
- bool bUsedEncoder;
- bool bFallingBack = false;
- int iRecursionCount = 0;
- static const int iMaxRecursion = 250;
-
- // Internal Reset
- // For example, what if someone fails a conversion and wants to reset one of our fallback buffers?
- void InternalReset()
- {
- charStart = nullptr;
- bFallingBack = false;
- iRecursionCount = 0;
- Reset();
- }
-
- // Set the above values
- // This can't be part of the constructor because EncoderFallbacks would have to know how to impliment these.
- void InternalInitialize(WCHAR* charStart, WCHAR* charEnd, bool setEncoder)
- {
- this->charStart = charStart;
- this->charEnd = charEnd;
- this->setEncoder = setEncoder;
- this->bUsedEncoder = false;
- this->bFallingBack = false;
- this->iRecursionCount = 0;
- }
-
- WCHAR InternalGetNextChar()
- {
- WCHAR ch = GetNextChar();
- bFallingBack = (ch != 0);
- if (ch == 0) iRecursionCount = 0;
- return ch;
- }
-
- // Fallback the current character using the remaining buffer and encoder if necessary
- // This can only be called by our encodings (other have to use the public fallback methods), so
- // we can use our EncoderNLS here too.
- // setEncoder is true if we're calling from a GetBytes method, false if we're calling from a GetByteCount
- //
- // Note that this could also change the contents of this->encoder, which is the same
- // object that the caller is using, so the caller could mess up the encoder for us
- // if they aren't careful.
- virtual bool InternalFallback(WCHAR ch, WCHAR** chars)
- {
- // Shouldn't have null charStart
- Contract::Assert(charStart != nullptr,
- "[EncoderFallback.InternalFallbackBuffer]Fallback buffer is not initialized");
-
- // Get our index, remember chars was preincremented to point at next char, so have to -1
- int index = (int)(*chars - charStart) - 1;
-
- // See if it was a high surrogate
- if (Char::IsHighSurrogate(ch))
- {
- // See if there's a low surrogate to go with it
- if (*chars >= this->charEnd)
- {
- // Nothing left in input buffer
- // No input, return 0
- }
- else
- {
- // Might have a low surrogate
- WCHAR cNext = **chars;
- if (Char::IsLowSurrogate(cNext))
- {
- // If already falling back then fail
- if (bFallingBack && iRecursionCount++ > iMaxRecursion)
- ThrowLastCharRecursive(ch, cNext);
-
- // Next is a surrogate, add it as surrogate pair, and increment chars
- (*chars)++;
- bFallingBack = Fallback(ch, cNext, index);
- return bFallingBack;
- }
-
- // Next isn't a low surrogate, just fallback the high surrogate
- }
- }
-
- // If already falling back then fail
- if (bFallingBack && iRecursionCount++ > iMaxRecursion)
- ThrowLastCharRecursive((int)ch);
-
- // Fall back our char
- bFallingBack = Fallback(ch, index);
-
- return bFallingBack;
- }
-
- // private helper methods
- void ThrowLastCharRecursive(WCHAR highSurrogate, WCHAR lowSurrogate)
- {
- // Throw it, using our complete character
- throw ArgumentException("Recursive fallback not allowed", "chars");
- }
-
- void ThrowLastCharRecursive(int utf32Char)
- {
- throw ArgumentException("Recursive fallback not allowed", "chars");
- }
-
-};
-
-class EncoderReplacementFallbackBuffer : public EncoderFallbackBuffer
-{
- // Store our default string
- WCHAR strDefault[4];
- int strDefaultLength;
- int fallbackCount = -1;
- int fallbackIndex = -1;
-public:
- // Construction
- EncoderReplacementFallbackBuffer(EncoderReplacementFallback* fallback)
- {
- // 2X in case we're a surrogate pair
- wcscpy_s(strDefault, ARRAY_SIZE(strDefault), fallback->GetDefaultString());
- wcscat_s(strDefault, ARRAY_SIZE(strDefault), fallback->GetDefaultString());
- strDefaultLength = 2 * PAL_wcslen((const WCHAR *)fallback->GetDefaultString());
-
- }
-
- // Fallback Methods
- virtual bool Fallback(WCHAR charUnknown, int index)
- {
- // If we had a buffer already we're being recursive, throw, it's probably at the suspect
- // character in our array.
- if (fallbackCount >= 1)
- {
- // If we're recursive we may still have something in our buffer that makes this a surrogate
- if (Char::IsHighSurrogate(charUnknown) && fallbackCount >= 0 &&
- Char::IsLowSurrogate(strDefault[fallbackIndex + 1]))
- ThrowLastCharRecursive(charUnknown, strDefault[fallbackIndex + 1]);
-
- // Nope, just one character
- ThrowLastCharRecursive((int)charUnknown);
- }
-
- // Go ahead and get our fallback
- // Divide by 2 because we aren't a surrogate pair
- fallbackCount = strDefaultLength / 2;
- fallbackIndex = -1;
-
- return fallbackCount != 0;
- }
-
- virtual bool Fallback(WCHAR charUnknownHigh, WCHAR charUnknownLow, int index)
- {
- // Double check input surrogate pair
- if (!Char::IsHighSurrogate(charUnknownHigh))
- throw ArgumentOutOfRangeException("charUnknownHigh",
- "Argument out of range 0xD800..0xDBFF");
-
- if (!Char::IsLowSurrogate(charUnknownLow))
- throw ArgumentOutOfRangeException("charUnknownLow",
- "Argument out of range 0xDC00..0xDFFF");
- Contract::EndContractBlock();
-
- // If we had a buffer already we're being recursive, throw, it's probably at the suspect
- // character in our array.
- if (fallbackCount >= 1)
- ThrowLastCharRecursive(charUnknownHigh, charUnknownLow);
-
- // Go ahead and get our fallback
- fallbackCount = strDefaultLength;
- fallbackIndex = -1;
-
- return fallbackCount != 0;
- }
-
- virtual WCHAR GetNextChar()
- {
- // We want it to get < 0 because == 0 means that the current/last character is a fallback
- // and we need to detect recursion. We could have a flag but we already have this counter.
- fallbackCount--;
- fallbackIndex++;
-
- // Do we have anything left? 0 is now last fallback char, negative is nothing left
- if (fallbackCount < 0)
- return '\0';
-
- // Need to get it out of the buffer.
- // Make sure it didn't wrap from the fast count-- path
- if (fallbackCount == INT_MAX)
- {
- fallbackCount = -1;
- return '\0';
- }
-
- // Now make sure its in the expected range
- Contract::Assert(fallbackIndex < strDefaultLength && fallbackIndex >= 0,
- "Index exceeds buffer range");
-
- return strDefault[fallbackIndex];
- }
-
- virtual bool MovePrevious()
- {
- // Back up one, only if we just processed the last character (or earlier)
- if (fallbackCount >= -1 && fallbackIndex >= 0)
- {
- fallbackIndex--;
- fallbackCount++;
- return true;
- }
-
- // Return false 'cause we couldn't do it.
- return false;
- }
-
- // How many characters left to output?
- virtual int GetRemaining()
- {
- // Our count is 0 for 1 character left.
- return (fallbackCount < 0) ? 0 : fallbackCount;
- }
-
- // Clear the buffer
- virtual void Reset()
- {
- fallbackCount = -1;
- fallbackIndex = 0;
- charStart = nullptr;
- bFallingBack = false;
- }
-};
-
-class EncoderExceptionFallbackBuffer : public EncoderFallbackBuffer
-{
-public:
- EncoderExceptionFallbackBuffer()
- {
- }
-
- virtual bool Fallback(WCHAR charUnknown, int index)
- {
- // Fall back our char
- throw EncoderFallbackException("Unable to translate Unicode character to UTF-8", charUnknown, index);
- }
-
- virtual bool Fallback(WCHAR charUnknownHigh, WCHAR charUnknownLow, int index)
- {
- if (!Char::IsHighSurrogate(charUnknownHigh))
- {
- throw ArgumentOutOfRangeException("charUnknownHigh",
- "Argument out of range 0xD800..0xDBFF");
- }
- if (!Char::IsLowSurrogate(charUnknownLow))
- {
- throw ArgumentOutOfRangeException("charUnknownLow",
- "Argument out of range 0xDC00..0xDFFF");
- }
- Contract::EndContractBlock();
-
- //int iTemp = Char::ConvertToUtf32(charUnknownHigh, charUnknownLow);
-
- // Fall back our char
- throw EncoderFallbackException(
- "Unable to translate Unicode character to UTF-8", charUnknownHigh, charUnknownLow, index);
- }
-
- virtual WCHAR GetNextChar()
- {
- return 0;
- }
-
- virtual bool MovePrevious()
- {
- // Exception fallback doesn't have anywhere to back up to.
- return false;
- }
-
- // Exceptions are always empty
- virtual int GetRemaining()
- {
- return 0;
- }
-};
-
-class EncoderExceptionFallback : public EncoderFallback
-{
- // Construction
-public:
- EncoderExceptionFallback()
- {
- }
-
- virtual EncoderFallbackBuffer* CreateFallbackBuffer()
- {
- return InternalNew<EncoderExceptionFallbackBuffer>();
- }
-
- // Maximum number of characters that this instance of this fallback could return
- virtual int GetMaxCharCount()
- {
- return 0;
- }
-};
-
-EncoderFallbackBuffer* EncoderReplacementFallback::CreateFallbackBuffer()
-{
- return InternalNew<EncoderReplacementFallbackBuffer>(this);
-}
-
-class UTF8Encoding
-{
- EncoderFallback* encoderFallback;
- // Instances of the two possible fallbacks. The constructor parameter
- // determines which one to use.
- EncoderReplacementFallback encoderReplacementFallback;
- EncoderExceptionFallback encoderExceptionFallback;
-
- DecoderFallback* decoderFallback;
- // Instances of the two possible fallbacks. The constructor parameter
- // determines which one to use.
- DecoderReplacementFallback decoderReplacementFallback;
- DecoderExceptionFallback decoderExceptionFallback;
-
- bool InRange(WCHAR c, WCHAR begin, WCHAR end)
- {
- return begin <= c && c <= end;
- }
-
- size_t PtrDiff(WCHAR* ptr1, WCHAR* ptr2)
- {
- return ptr1 - ptr2;
- }
-
- size_t PtrDiff(BYTE* ptr1, BYTE* ptr2)
- {
- return ptr1 - ptr2;
- }
-
- void ThrowBytesOverflow()
- {
- // Special message to include fallback type in case fallback's GetMaxCharCount is broken
- // This happens if user has implimented an encoder fallback with a broken GetMaxCharCount
- throw InsufficientBufferException("The output byte buffer is too small to contain the encoded data", "bytes");
- }
-
- void ThrowBytesOverflow(bool nothingEncoded)
- {
- // Special message to include fallback type in case fallback's GetMaxCharCount is broken
- // This happens if user has implimented an encoder fallback with a broken GetMaxCharCount
- if (nothingEncoded){
- ThrowBytesOverflow();
- }
- }
-
- void ThrowCharsOverflow()
- {
- // Special message to include fallback type in case fallback's GetMaxCharCount is broken
- // This happens if user has implimented a decoder fallback with a broken GetMaxCharCount
- throw InsufficientBufferException("The output char buffer is too small to contain the encoded data", "chars");
- }
-
- void ThrowCharsOverflow(bool nothingEncoded)
- {
- // Special message to include fallback type in case fallback's GetMaxCharCount is broken
- // This happens if user has implimented an decoder fallback with a broken GetMaxCharCount
- if (nothingEncoded){
- ThrowCharsOverflow();
- }
- }
-
- // During GetChars we had an invalid byte sequence
- // pSrc is backed up to the start of the bad sequence if we didn't have room to
- // fall it back. Otherwise pSrc remains where it is.
- bool FallbackInvalidByteSequence(BYTE** pSrc, int ch, DecoderFallbackBuffer* fallback, WCHAR** pTarget)
- {
- // Get our byte[]
- BYTE* pStart = *pSrc;
- BYTE bytesUnknown[3];
- int size = GetBytesUnknown(pStart, ch, bytesUnknown);
-
- // Do the actual fallback
- if (!fallback->InternalFallback(bytesUnknown, *pSrc, pTarget, size))
- {
- // Oops, it failed, back up to pStart
- *pSrc = pStart;
- return false;
- }
-
- // It worked
- return true;
- }
-
- int FallbackInvalidByteSequence(BYTE* pSrc, int ch, DecoderFallbackBuffer *fallback)
- {
- // Get our byte[]
- BYTE bytesUnknown[3];
- int size = GetBytesUnknown(pSrc, ch, bytesUnknown);
-
- // Do the actual fallback
- int count = fallback->InternalFallback(bytesUnknown, pSrc, size);
-
- // # of fallback chars expected.
- // Note that we only get here for "long" sequences, and have already unreserved
- // the count that we prereserved for the input bytes
- return count;
- }
-
- int GetBytesUnknown(BYTE* pSrc, int ch, BYTE* bytesUnknown)
- {
- int size;
-
- // See if it was a plain char
- // (have to check >= 0 because we have all sorts of wierd bit flags)
- if (ch < 0x100 && ch >= 0)
- {
- pSrc--;
- bytesUnknown[0] = (BYTE)ch;
- size = 1;
- }
- // See if its an unfinished 2 byte sequence
- else if ((ch & (SupplimentarySeq | ThreeByteSeq)) == 0)
- {
- pSrc--;
- bytesUnknown[0] = (BYTE)((ch & 0x1F) | 0xc0);
- size = 1;
- }
- // So now we're either 2nd byte of 3 or 4 byte sequence or
- // we hit a non-trail byte or we ran out of space for 3rd byte of 4 byte sequence
- // 1st check if its a 4 byte sequence
- else if ((ch & SupplimentarySeq) != 0)
- {
- // 3rd byte of 4 byte sequence?
- if ((ch & (FinalByte >> 6)) != 0)
- {
- // 3rd byte of 4 byte sequence
- pSrc -= 3;
- bytesUnknown[0] = (BYTE)(((ch >> 12) & 0x07) | 0xF0);
- bytesUnknown[1] = (BYTE)(((ch >> 6) & 0x3F) | 0x80);
- bytesUnknown[2] = (BYTE)(((ch)& 0x3F) | 0x80);
- size = 3;
- }
- else if ((ch & (FinalByte >> 12)) != 0)
- {
- // 2nd byte of a 4 byte sequence
- pSrc -= 2;
- bytesUnknown[0] = (BYTE)(((ch >> 6) & 0x07) | 0xF0);
- bytesUnknown[1] = (BYTE)(((ch)& 0x3F) | 0x80);
- size = 2;
- }
- else
- {
- // 4th byte of a 4 byte sequence
- pSrc--;
- bytesUnknown[0] = (BYTE)(((ch)& 0x07) | 0xF0);
- size = 1;
- }
- }
- else
- {
- // 2nd byte of 3 byte sequence?
- if ((ch & (FinalByte >> 6)) != 0)
- {
- // So its 2nd byte of a 3 byte sequence
- pSrc -= 2;
- bytesUnknown[0] = (BYTE)(((ch >> 6) & 0x0F) | 0xE0);
- bytesUnknown[1] = (BYTE)(((ch)& 0x3F) | 0x80);
- size = 2;
- }
- else
- {
- // 1st byte of a 3 byte sequence
- pSrc--;
- bytesUnknown[0] = (BYTE)(((ch)& 0x0F) | 0xE0);
- size = 1;
- }
- }
-
- return size;
- }
-
-public:
-
- UTF8Encoding(bool isThrowException)
- : encoderReplacementFallback(W("\xFFFD")), decoderReplacementFallback(W("\xFFFD"))
- {
- if (isThrowException)
- {
- encoderFallback = &encoderExceptionFallback;
- decoderFallback = &decoderExceptionFallback;
- }
- else
- {
- encoderFallback = &encoderReplacementFallback;
- decoderFallback = &decoderReplacementFallback;
- }
- }
-
- // These are bitmasks used to maintain the state in the decoder. They occupy the higher bits
- // while the actual character is being built in the lower bits. They are shifted together
- // with the actual bits of the character.
-
- // bits 30 & 31 are used for pending bits fixup
- const int FinalByte = 1 << 29;
- const int SupplimentarySeq = 1 << 28;
- const int ThreeByteSeq = 1 << 27;
-
- int GetCharCount(BYTE* bytes, int count)
- {
- Contract::Assert(bytes != nullptr, "[UTF8Encoding.GetCharCount]bytes!=nullptr");
- Contract::Assert(count >= 0, "[UTF8Encoding.GetCharCount]count >=0");
-
- // Initialize stuff
- BYTE *pSrc = bytes;
- BYTE *pEnd = pSrc + count;
-
- // Start by assuming we have as many as count, charCount always includes the adjustment
- // for the character being decoded
- int charCount = count;
- int ch = 0;
- DecoderFallbackBuffer *fallback = nullptr;
-
- while (true)
- {
- // SLOWLOOP: does all range checks, handles all special cases, but it is slow
- if (pSrc >= pEnd) {
- break;
- }
-
- // read next byte. The JIT optimization seems to be getting confused when
- // compiling "ch = *pSrc++;", so rather use "ch = *pSrc; pSrc++;" instead
- int cha = *pSrc;
-
- if (ch == 0) {
- // no pending bits
- goto ReadChar;
- }
-
- pSrc++;
-
- // we are expecting to see trailing bytes like 10vvvvvv
- if ((cha & 0xC0) != 0x80) {
- // This can be a valid starting byte for another UTF8 byte sequence, so let's put
- // the current byte back, and try to see if this is a valid byte for another UTF8 byte sequence
- pSrc--;
- charCount += (ch >> 30);
- goto InvalidByteSequence;
- }
-
- // fold in the new byte
- ch = (ch << 6) | (cha & 0x3F);
-
- if ((ch & FinalByte) == 0) {
- Contract::Assert((ch & (SupplimentarySeq | ThreeByteSeq)) != 0,
- "[UTF8Encoding.GetChars]Invariant volation");
-
- if ((ch & SupplimentarySeq) != 0) {
- if ((ch & (FinalByte >> 6)) != 0) {
- // this is 3rd byte (of 4 byte supplimentary) - nothing to do
- continue;
- }
-
- // 2nd byte, check for non-shortest form of supplimentary char and the valid
- // supplimentary characters in range 0x010000 - 0x10FFFF at the same time
- if (!InRange(ch & 0x1F0, 0x10, 0x100)) {
- goto InvalidByteSequence;
- }
- }
- else {
- // Must be 2nd byte of a 3-byte sequence
- // check for non-shortest form of 3 byte seq
- if ((ch & (0x1F << 5)) == 0 || // non-shortest form
- (ch & (0xF800 >> 6)) == (0xD800 >> 6)) // illegal individually encoded surrogate
- {
- goto InvalidByteSequence;
- }
- }
- continue;
- }
-
- // ready to punch
-
- // adjust for surrogates in non-shortest form
- if ((ch & (SupplimentarySeq | 0x1F0000)) == SupplimentarySeq) {
- charCount--;
- }
- goto EncodeChar;
-
- InvalidByteSequence:
- // this code fragment should be close to the gotos referencing it
- // Have to do fallback for invalid bytes
- if (fallback == nullptr)
- {
- fallback = decoderFallback->CreateFallbackBuffer();
- fallback->InternalInitialize(bytes, nullptr);
- }
- charCount += FallbackInvalidByteSequence(pSrc, ch, fallback);
-
- ch = 0;
- continue;
-
- ReadChar:
- ch = *pSrc;
- pSrc++;
-
- ProcessChar:
- if (ch > 0x7F) {
- // If its > 0x7F, its start of a new multi-byte sequence
-
- // Long sequence, so unreserve our char.
- charCount--;
-
- // bit 6 has to be non-zero for start of multibyte chars.
- if ((ch & 0x40) == 0) {
- // Unexpected trail byte
- goto InvalidByteSequence;
- }
-
- // start a new long code
- if ((ch & 0x20) != 0) {
- if ((ch & 0x10) != 0) {
- // 4 byte encoding - supplimentary character (2 surrogates)
-
- ch &= 0x0F;
-
- // check that bit 4 is zero and the valid supplimentary character
- // range 0x000000 - 0x10FFFF at the same time
- if (ch > 0x04) {
- ch |= 0xf0;
- goto InvalidByteSequence;
- }
-
- // Add bit flags so that when we check new characters & rotate we'll be flagged correctly.
- // Final byte flag, count fix if we don't make final byte & supplimentary sequence flag.
- ch |= (FinalByte >> 3 * 6) | // Final byte is 3 more bytes from now
- (1 << 30) | // If it dies on next byte we'll need an extra char
- (3 << (30 - 2 * 6)) | // If it dies on last byte we'll need to subtract a char
- (SupplimentarySeq) | (SupplimentarySeq >> 6) |
- (SupplimentarySeq >> 2 * 6) | (SupplimentarySeq >> 3 * 6);
-
- // Our character count will be 2 characters for these 4 bytes, so subtract another char
- charCount--;
- }
- else {
- // 3 byte encoding
- // Add bit flags so that when we check new characters & rotate we'll be flagged correctly.
- ch = (ch & 0x0F) | ((FinalByte >> 2 * 6) | (1 << 30) |
- (ThreeByteSeq) | (ThreeByteSeq >> 6) | (ThreeByteSeq >> 2 * 6));
-
- // We'll expect 1 character for these 3 bytes, so subtract another char.
- charCount--;
- }
- }
- else {
- // 2 byte encoding
-
- ch &= 0x1F;
-
- // check for non-shortest form
- if (ch <= 1) {
- ch |= 0xc0;
- goto InvalidByteSequence;
- }
-
- // Add bit flags so we'll be flagged correctly
- ch |= (FinalByte >> 6);
- }
- continue;
- }
-
- EncodeChar:
-
-#ifdef FASTLOOP
- int availableBytes = PtrDiff(pEnd, pSrc);
-
- // don't fall into the fast decoding loop if we don't have enough bytes
- if (availableBytes <= 13) {
- // try to get over the remainder of the ascii characters fast though
- BYTE* pLocalEnd = pEnd; // hint to get pLocalEnd enregistered
- while (pSrc < pLocalEnd) {
- ch = *pSrc;
- pSrc++;
-
- if (ch > 0x7F)
- goto ProcessChar;
- }
- // we are done
- ch = 0;
- break;
- }
-
- // To compute the upper bound, assume that all characters are ASCII characters at this point,
- // the boundary will be decreased for every non-ASCII character we encounter
- // Also, we need 7 chars reserve for the unrolled ansi decoding loop and for decoding of multibyte sequences
- BYTE *pStop = pSrc + availableBytes - 7;
-
- while (pSrc < pStop) {
- ch = *pSrc;
- pSrc++;
-
- if (ch > 0x7F) {
- goto LongCode;
- }
-
- // get pSrc 2-byte aligned
- if (((size_t)pSrc & 0x1) != 0) {
- ch = *pSrc;
- pSrc++;
- if (ch > 0x7F) {
- goto LongCode;
- }
- }
-
- // get pSrc 4-byte aligned
- if (((size_t)pSrc & 0x2) != 0) {
- ch = *(USHORT*)pSrc;
- if ((ch & 0x8080) != 0) {
- goto LongCodeWithMask16;
- }
- pSrc += 2;
- }
-
-
- // Run 8 + 8 characters at a time!
- while (pSrc < pStop) {
- ch = *(int*)pSrc;
- int chb = *(int*)(pSrc + 4);
- if (((ch | chb) & (int)0x80808080) != 0) {
- goto LongCodeWithMask32;
- }
- pSrc += 8;
-
- // This is a really small loop - unroll it
- if (pSrc >= pStop)
- break;
-
- ch = *(int*)pSrc;
- chb = *(int*)(pSrc + 4);
- if (((ch | chb) & (int)0x80808080) != 0) {
- goto LongCodeWithMask32;
- }
- pSrc += 8;
- }
- break;
-
-#if BIGENDIAN
- LongCodeWithMask32 :
- // be careful about the sign extension
- ch = (int)(((uint)ch) >> 16);
- LongCodeWithMask16:
- ch = (int)(((uint)ch) >> 8);
-#else // BIGENDIAN
- LongCodeWithMask32:
- LongCodeWithMask16:
- ch &= 0xFF;
-#endif // BIGENDIAN
- pSrc++;
- if (ch <= 0x7F) {
- continue;
- }
-
- LongCode:
- int chc = *pSrc;
- pSrc++;
-
- if (
- // bit 6 has to be zero
- (ch & 0x40) == 0 ||
- // we are expecting to see trailing bytes like 10vvvvvv
- (chc & 0xC0) != 0x80)
- {
- goto BadLongCode;
- }
-
- chc &= 0x3F;
-
- // start a new long code
- if ((ch & 0x20) != 0) {
-
- // fold the first two bytes together
- chc |= (ch & 0x0F) << 6;
-
- if ((ch & 0x10) != 0) {
- // 4 byte encoding - surrogate
- ch = *pSrc;
- if (
- // check that bit 4 is zero, the non-shortest form of surrogate
- // and the valid surrogate range 0x000000 - 0x10FFFF at the same time
- !InRange(chc >> 4, 0x01, 0x10) ||
- // we are expecting to see trailing bytes like 10vvvvvv
- (ch & 0xC0) != 0x80)
- {
- goto BadLongCode;
- }
-
- chc = (chc << 6) | (ch & 0x3F);
-
- ch = *(pSrc + 1);
- // we are expecting to see trailing bytes like 10vvvvvv
- if ((ch & 0xC0) != 0x80) {
- goto BadLongCode;
- }
- pSrc += 2;
-
- // extra byte
- charCount--;
- }
- else {
- // 3 byte encoding
- ch = *pSrc;
- if (
- // check for non-shortest form of 3 byte seq
- (chc & (0x1F << 5)) == 0 ||
- // Can't have surrogates here.
- (chc & (0xF800 >> 6)) == (0xD800 >> 6) ||
- // we are expecting to see trailing bytes like 10vvvvvv
- (ch & 0xC0) != 0x80)
- {
- goto BadLongCode;
- }
- pSrc++;
-
- // extra byte
- charCount--;
- }
- }
- else {
- // 2 byte encoding
-
- // check for non-shortest form
- if ((ch & 0x1E) == 0) {
- goto BadLongCode;
- }
- }
-
- // extra byte
- charCount--;
- }
-#endif // FASTLOOP
-
- // no pending bits at this point
- ch = 0;
- continue;
-
- BadLongCode:
- pSrc -= 2;
- ch = 0;
- continue;
- }
-
- // May have a problem if we have to flush
- if (ch != 0)
- {
- // We were already adjusting for these, so need to unadjust
- charCount += (ch >> 30);
- // Have to do fallback for invalid bytes
- if (fallback == nullptr)
- {
- fallback = decoderFallback->CreateFallbackBuffer();
- fallback->InternalInitialize(bytes, nullptr);
- }
- charCount += FallbackInvalidByteSequence(pSrc, ch, fallback);
- }
-
- // Shouldn't have anything in fallback buffer for GetCharCount
- // (don't have to check m_throwOnOverflow for count)
- Contract::Assert(fallback == nullptr || fallback->GetRemaining() == 0,
- "[UTF8Encoding.GetCharCount]Expected empty fallback buffer at end");
-
- InternalDelete(fallback);
-
- return charCount;
-
- }
-
- int GetChars(BYTE* bytes, int byteCount, WCHAR* chars, int charCount)
- {
- Contract::Assert(chars != nullptr, "[UTF8Encoding.GetChars]chars!=nullptr");
- Contract::Assert(byteCount >= 0, "[UTF8Encoding.GetChars]byteCount >=0");
- Contract::Assert(charCount >= 0, "[UTF8Encoding.GetChars]charCount >=0");
- Contract::Assert(bytes != nullptr, "[UTF8Encoding.GetChars]bytes!=nullptr");
-
- BYTE *pSrc = bytes;
- WCHAR *pTarget = chars;
-
- BYTE *pEnd = pSrc + byteCount;
- WCHAR *pAllocatedBufferEnd = pTarget + charCount;
-
- int ch = 0;
-
- DecoderFallbackBuffer *fallback = nullptr;
-
- while (true)
- {
- // SLOWLOOP: does all range checks, handles all special cases, but it is slow
-
- if (pSrc >= pEnd) {
- break;
- }
-
- // read next byte. The JIT optimization seems to be getting confused when
- // compiling "ch = *pSrc++;", so rather use "ch = *pSrc; pSrc++;" instead
- int cha = *pSrc;
-
- if (ch == 0) {
- // no pending bits
- goto ReadChar;
- }
-
- pSrc++;
-
- // we are expecting to see trailing bytes like 10vvvvvv
- if ((cha & 0xC0) != 0x80) {
- // This can be a valid starting byte for another UTF8 byte sequence, so let's put
- // the current byte back, and try to see if this is a valid byte for another UTF8 byte sequence
- pSrc--;
- goto InvalidByteSequence;
- }
-
- // fold in the new byte
- ch = (ch << 6) | (cha & 0x3F);
-
- if ((ch & FinalByte) == 0) {
- // Not at last byte yet
- Contract::Assert((ch & (SupplimentarySeq | ThreeByteSeq)) != 0,
- "[UTF8Encoding.GetChars]Invariant volation");
-
- if ((ch & SupplimentarySeq) != 0) {
- // Its a 4-byte supplimentary sequence
- if ((ch & (FinalByte >> 6)) != 0) {
- // this is 3rd byte of 4 byte sequence - nothing to do
- continue;
- }
-
- // 2nd byte of 4 bytes
- // check for non-shortest form of surrogate and the valid surrogate
- // range 0x000000 - 0x10FFFF at the same time
- if (!InRange(ch & 0x1F0, 0x10, 0x100)) {
- goto InvalidByteSequence;
- }
- }
- else {
- // Must be 2nd byte of a 3-byte sequence
- // check for non-shortest form of 3 byte seq
- if ((ch & (0x1F << 5)) == 0 || // non-shortest form
- (ch & (0xF800 >> 6)) == (0xD800 >> 6)) // illegal individually encoded surrogate
- {
- goto InvalidByteSequence;
- }
- }
- continue;
- }
-
- // ready to punch
-
- // surrogate in shortest form?
- // Might be possible to get rid of this? Already did non-shortest check for 4-byte sequence when reading 2nd byte?
- if ((ch & (SupplimentarySeq | 0x1F0000)) > SupplimentarySeq) {
- // let the range check for the second char throw the exception
- if (pTarget < pAllocatedBufferEnd) {
- *pTarget = (WCHAR)(((ch >> 10) & 0x7FF) +
- (SHORT)((CharUnicodeInfo::HIGH_SURROGATE_START - (0x10000 >> 10))));
- pTarget++;
-
- ch = (ch & 0x3FF) +
- (int)(CharUnicodeInfo::LOW_SURROGATE_START);
- }
- }
-
- goto EncodeChar;
-
- InvalidByteSequence:
- // this code fragment should be close to the gotos referencing it
- // Have to do fallback for invalid bytes
- if (fallback == nullptr)
- {
- fallback = decoderFallback->CreateFallbackBuffer();
- fallback->InternalInitialize(bytes, pAllocatedBufferEnd);
- }
-
- // That'll back us up the appropriate # of bytes if we didn't get anywhere
- if (!FallbackInvalidByteSequence(&pSrc, ch, fallback, &pTarget))
- {
- // Ran out of buffer space
- // Need to throw an exception?
- Contract::Assert(pSrc >= bytes || pTarget == chars,
- "[UTF8Encoding.GetChars]Expected to throw or remain in byte buffer after fallback");
- fallback->InternalReset();
- ThrowCharsOverflow(pTarget == chars);
- ch = 0;
- break;
- }
- Contract::Assert(pSrc >= bytes,
- "[UTF8Encoding.GetChars]Expected invalid byte sequence to have remained within the byte array");
- ch = 0;
- continue;
-
- ReadChar:
- ch = *pSrc;
- pSrc++;
-
- ProcessChar:
- if (ch > 0x7F) {
- // If its > 0x7F, its start of a new multi-byte sequence
-
- // bit 6 has to be non-zero
- if ((ch & 0x40) == 0) {
- goto InvalidByteSequence;
- }
-
- // start a new long code
- if ((ch & 0x20) != 0) {
- if ((ch & 0x10) != 0) {
- // 4 byte encoding - supplimentary character (2 surrogates)
-
- ch &= 0x0F;
-
- // check that bit 4 is zero and the valid supplimentary character
- // range 0x000000 - 0x10FFFF at the same time
- if (ch > 0x04) {
- ch |= 0xf0;
- goto InvalidByteSequence;
- }
-
- ch |= (FinalByte >> 3 * 6) | (1 << 30) | (3 << (30 - 2 * 6)) |
- (SupplimentarySeq) | (SupplimentarySeq >> 6) |
- (SupplimentarySeq >> 2 * 6) | (SupplimentarySeq >> 3 * 6);
- }
- else {
- // 3 byte encoding
- ch = (ch & 0x0F) | ((FinalByte >> 2 * 6) | (1 << 30) |
- (ThreeByteSeq) | (ThreeByteSeq >> 6) | (ThreeByteSeq >> 2 * 6));
- }
- }
- else {
- // 2 byte encoding
-
- ch &= 0x1F;
-
- // check for non-shortest form
- if (ch <= 1) {
- ch |= 0xc0;
- goto InvalidByteSequence;
- }
-
- ch |= (FinalByte >> 6);
- }
- continue;
- }
-
- EncodeChar:
- // write the pending character
- if (pTarget >= pAllocatedBufferEnd)
- {
- // Fix chars so we make sure to throw if we didn't output anything
- ch &= 0x1fffff;
- if (ch > 0x7f)
- {
- if (ch > 0x7ff)
- {
- if (ch >= CharUnicodeInfo::LOW_SURROGATE_START &&
- ch <= CharUnicodeInfo::LOW_SURROGATE_END)
- {
- pSrc--; // It was 4 bytes
- pTarget--; // 1 was stored already, but we can't remember 1/2, so back up
- }
- else if (ch > 0xffff)
- {
- pSrc--; // It was 4 bytes, nothing was stored
- }
- pSrc--; // It was at least 3 bytes
- }
- pSrc--; // It was at least 2 bytes
- }
- pSrc--;
-
- // Throw that we don't have enough room (pSrc could be < chars if we had started to process
- // a 4 byte sequence already)
- Contract::Assert(pSrc >= bytes || pTarget == chars,
- "[UTF8Encoding.GetChars]Expected pSrc to be within input buffer or throw due to no output]");
- ThrowCharsOverflow(pTarget == chars);
-
- // Don't store ch in decoder, we already backed up to its start
- ch = 0;
-
- // Didn't throw, just use this buffer size.
- break;
- }
- *pTarget = (WCHAR)ch;
- pTarget++;
-
-#ifdef FASTLOOP
- int availableChars = PtrDiff(pAllocatedBufferEnd, pTarget);
- int availableBytes = PtrDiff(pEnd, pSrc);
-
- // don't fall into the fast decoding loop if we don't have enough bytes
- // Test for availableChars is done because pStop would be <= pTarget.
- if (availableBytes <= 13) {
- // we may need as many as 1 character per byte
- if (availableChars < availableBytes) {
- // not enough output room. no pending bits at this point
- ch = 0;
- continue;
- }
-
- // try to get over the remainder of the ascii characters fast though
- BYTE* pLocalEnd = pEnd; // hint to get pLocalEnd enregistered
- while (pSrc < pLocalEnd) {
- ch = *pSrc;
- pSrc++;
-
- if (ch > 0x7F)
- goto ProcessChar;
-
- *pTarget = (WCHAR)ch;
- pTarget++;
- }
- // we are done
- ch = 0;
- break;
- }
-
- // we may need as many as 1 character per byte, so reduce the byte count if necessary.
- // If availableChars is too small, pStop will be before pTarget and we won't do fast loop.
- if (availableChars < availableBytes) {
- availableBytes = availableChars;
- }
-
- // To compute the upper bound, assume that all characters are ASCII characters at this point,
- // the boundary will be decreased for every non-ASCII character we encounter
- // Also, we need 7 chars reserve for the unrolled ansi decoding loop and for decoding of multibyte sequences
- WCHAR *pStop = pTarget + availableBytes - 7;
-
- while (pTarget < pStop) {
- ch = *pSrc;
- pSrc++;
-
- if (ch > 0x7F) {
- goto LongCode;
- }
- *pTarget = (WCHAR)ch;
- pTarget++;
-
- // get pSrc to be 2-byte aligned
- if ((((size_t)pSrc) & 0x1) != 0) {
- ch = *pSrc;
- pSrc++;
- if (ch > 0x7F) {
- goto LongCode;
- }
- *pTarget = (WCHAR)ch;
- pTarget++;
- }
-
- // get pSrc to be 4-byte aligned
- if ((((size_t)pSrc) & 0x2) != 0) {
- ch = *(USHORT*)pSrc;
- if ((ch & 0x8080) != 0) {
- goto LongCodeWithMask16;
- }
-
- // Unfortunately, this is endianess sensitive
-#if BIGENDIAN
- *pTarget = (WCHAR)((ch >> 8) & 0x7F);
- pSrc += 2;
- *(pTarget + 1) = (WCHAR)(ch & 0x7F);
- pTarget += 2;
-#else // BIGENDIAN
- *pTarget = (WCHAR)(ch & 0x7F);
- pSrc += 2;
- *(pTarget + 1) = (WCHAR)((ch >> 8) & 0x7F);
- pTarget += 2;
-#endif // BIGENDIAN
- }
-
- // Run 8 characters at a time!
- while (pTarget < pStop) {
- ch = *(int*)pSrc;
- int chb = *(int*)(pSrc + 4);
- if (((ch | chb) & (int)0x80808080) != 0) {
- goto LongCodeWithMask32;
- }
-
- // Unfortunately, this is endianess sensitive
-#if BIGENDIAN
- *pTarget = (WCHAR)((ch >> 24) & 0x7F);
- *(pTarget + 1) = (WCHAR)((ch >> 16) & 0x7F);
- *(pTarget + 2) = (WCHAR)((ch >> 8) & 0x7F);
- *(pTarget + 3) = (WCHAR)(ch & 0x7F);
- pSrc += 8;
- *(pTarget + 4) = (WCHAR)((chb >> 24) & 0x7F);
- *(pTarget + 5) = (WCHAR)((chb >> 16) & 0x7F);
- *(pTarget + 6) = (WCHAR)((chb >> 8) & 0x7F);
- *(pTarget + 7) = (WCHAR)(chb & 0x7F);
- pTarget += 8;
-#else // BIGENDIAN
- *pTarget = (WCHAR)(ch & 0x7F);
- *(pTarget + 1) = (WCHAR)((ch >> 8) & 0x7F);
- *(pTarget + 2) = (WCHAR)((ch >> 16) & 0x7F);
- *(pTarget + 3) = (WCHAR)((ch >> 24) & 0x7F);
- pSrc += 8;
- *(pTarget + 4) = (WCHAR)(chb & 0x7F);
- *(pTarget + 5) = (WCHAR)((chb >> 8) & 0x7F);
- *(pTarget + 6) = (WCHAR)((chb >> 16) & 0x7F);
- *(pTarget + 7) = (WCHAR)((chb >> 24) & 0x7F);
- pTarget += 8;
-#endif // BIGENDIAN
- }
- break;
-
-#if BIGENDIAN
- LongCodeWithMask32 :
- // be careful about the sign extension
- ch = (int)(((uint)ch) >> 16);
- LongCodeWithMask16:
- ch = (int)(((uint)ch) >> 8);
-#else // BIGENDIAN
- LongCodeWithMask32:
- LongCodeWithMask16:
- ch &= 0xFF;
-#endif // BIGENDIAN
- pSrc++;
- if (ch <= 0x7F) {
- *pTarget = (WCHAR)ch;
- pTarget++;
- continue;
- }
-
- LongCode:
- int chc = *pSrc;
- pSrc++;
-
- if (
- // bit 6 has to be zero
- (ch & 0x40) == 0 ||
- // we are expecting to see trailing bytes like 10vvvvvv
- (chc & 0xC0) != 0x80)
- {
- goto BadLongCode;
- }
-
- chc &= 0x3F;
-
- // start a new long code
- if ((ch & 0x20) != 0) {
-
- // fold the first two bytes together
- chc |= (ch & 0x0F) << 6;
-
- if ((ch & 0x10) != 0) {
- // 4 byte encoding - surrogate
- ch = *pSrc;
- if (
- // check that bit 4 is zero, the non-shortest form of surrogate
- // and the valid surrogate range 0x000000 - 0x10FFFF at the same time
- !InRange(chc >> 4, 0x01, 0x10) ||
- // we are expecting to see trailing bytes like 10vvvvvv
- (ch & 0xC0) != 0x80)
- {
- goto BadLongCode;
- }
-
- chc = (chc << 6) | (ch & 0x3F);
-
- ch = *(pSrc + 1);
- // we are expecting to see trailing bytes like 10vvvvvv
- if ((ch & 0xC0) != 0x80) {
- goto BadLongCode;
- }
- pSrc += 2;
-
- ch = (chc << 6) | (ch & 0x3F);
-
- *pTarget = (WCHAR)(((ch >> 10) & 0x7FF) +
- (SHORT)(CharUnicodeInfo::HIGH_SURROGATE_START - (0x10000 >> 10)));
- pTarget++;
-
- ch = (ch & 0x3FF) +
- (SHORT)(CharUnicodeInfo::LOW_SURROGATE_START);
-
- // extra byte, we're already planning 2 chars for 2 of these bytes,
- // but the big loop is testing the target against pStop, so we need
- // to subtract 2 more or we risk overrunning the input. Subtract
- // one here and one below.
- pStop--;
- }
- else {
- // 3 byte encoding
- ch = *pSrc;
- if (
- // check for non-shortest form of 3 byte seq
- (chc & (0x1F << 5)) == 0 ||
- // Can't have surrogates here.
- (chc & (0xF800 >> 6)) == (0xD800 >> 6) ||
- // we are expecting to see trailing bytes like 10vvvvvv
- (ch & 0xC0) != 0x80)
- {
- goto BadLongCode;
- }
- pSrc++;
-
- ch = (chc << 6) | (ch & 0x3F);
-
- // extra byte, we're only expecting 1 char for each of these 3 bytes,
- // but the loop is testing the target (not source) against pStop, so
- // we need to subtract 2 more or we risk overrunning the input.
- // Subtract 1 here and one more below
- pStop--;
- }
- }
- else {
- // 2 byte encoding
-
- ch &= 0x1F;
-
- // check for non-shortest form
- if (ch <= 1) {
- goto BadLongCode;
- }
- ch = (ch << 6) | chc;
- }
-
- *pTarget = (WCHAR)ch;
- pTarget++;
-
- // extra byte, we're only expecting 1 char for each of these 2 bytes,
- // but the loop is testing the target (not source) against pStop.
- // subtract an extra count from pStop so that we don't overrun the input.
- pStop--;
- }
-#endif // FASTLOOP
-
- Contract::Assert(pTarget <= pAllocatedBufferEnd, "[UTF8Encoding.GetChars]pTarget <= pAllocatedBufferEnd");
-
- // no pending bits at this point
- ch = 0;
- continue;
-
- BadLongCode:
- pSrc -= 2;
- ch = 0;
- continue;
- }
-
- if (ch != 0)
- {
- // Have to do fallback for invalid bytes
- if (fallback == nullptr)
- {
- fallback = decoderFallback->CreateFallbackBuffer();
- fallback->InternalInitialize(bytes, pAllocatedBufferEnd);
- }
-
- // This'll back us up the appropriate # of bytes if we didn't get anywhere
- if (!FallbackInvalidByteSequence(pSrc, ch, fallback))
- {
- Contract::Assert(pSrc >= bytes || pTarget == chars,
- "[UTF8Encoding.GetChars]Expected to throw or remain in byte buffer while flushing");
-
- // Ran out of buffer space
- // Need to throw an exception?
- fallback->InternalReset();
- ThrowCharsOverflow(pTarget == chars);
- }
- Contract::Assert(pSrc >= bytes,
- "[UTF8Encoding.GetChars]Expected flushing invalid byte sequence to have remained within the byte array");
- ch = 0;
- }
-
- // Shouldn't have anything in fallback buffer for GetChars
- // (don't have to check m_throwOnOverflow for chars)
- Contract::Assert(fallback == nullptr || fallback->GetRemaining() == 0,
- "[UTF8Encoding.GetChars]Expected empty fallback buffer at end");
-
- InternalDelete(fallback);
-
- return PtrDiff(pTarget, chars);
- }
-
- int GetBytes(WCHAR* chars, int charCount, BYTE* bytes, int byteCount)
- {
- Contract::Assert(chars != nullptr, "[UTF8Encoding.GetBytes]chars!=nullptr");
- Contract::Assert(byteCount >= 0, "[UTF8Encoding.GetBytes]byteCount >=0");
- Contract::Assert(charCount >= 0, "[UTF8Encoding.GetBytes]charCount >=0");
- Contract::Assert(bytes != nullptr, "[UTF8Encoding.GetBytes]bytes!=nullptr");
-
- // For fallback we may need a fallback buffer.
- // We wait to initialize it though in case we don't have any broken input unicode
- EncoderFallbackBuffer* fallbackBuffer = nullptr;
- WCHAR *pSrc = chars;
- BYTE *pTarget = bytes;
-
- WCHAR *pEnd = pSrc + charCount;
- BYTE *pAllocatedBufferEnd = pTarget + byteCount;
-
- int ch = 0;
-
- // assume that JIT will enregister pSrc, pTarget and ch
-
- while (true) {
- // SLOWLOOP: does all range checks, handles all special cases, but it is slow
-
- if (pSrc >= pEnd) {
-
- if (ch == 0) {
- // Check if there's anything left to get out of the fallback buffer
- ch = fallbackBuffer != nullptr ? fallbackBuffer->InternalGetNextChar() : 0;
- if (ch > 0) {
- goto ProcessChar;
- }
- }
- else {
- // Case of leftover surrogates in the fallback buffer
- if (fallbackBuffer != nullptr && fallbackBuffer->bFallingBack) {
- Contract::Assert(ch >= 0xD800 && ch <= 0xDBFF,
- "[UTF8Encoding.GetBytes]expected high surrogate"); //, not 0x" + ((int)ch).ToString("X4", CultureInfo.InvariantCulture));
-
- int cha = ch;
-
- ch = fallbackBuffer->InternalGetNextChar();
-
- if (InRange(ch, CharUnicodeInfo::LOW_SURROGATE_START, CharUnicodeInfo::LOW_SURROGATE_END)) {
- ch = ch + (cha << 10) + (0x10000 - CharUnicodeInfo::LOW_SURROGATE_START - (CharUnicodeInfo::HIGH_SURROGATE_START << 10));
- goto EncodeChar;
- }
- else if (ch > 0){
- goto ProcessChar;
- }
- else {
- break;
- }
- }
- }
-
- // attempt to encode the partial surrogate (will fail or ignore)
- if (ch > 0)
- goto EncodeChar;
-
- // We're done
- break;
- }
-
- if (ch > 0) {
- // We have a high surrogate left over from a previous loop.
- Contract::Assert(ch >= 0xD800 && ch <= 0xDBFF,
- "[UTF8Encoding.GetBytes]expected high surrogate");//, not 0x" + ((int)ch).ToString("X4", CultureInfo.InvariantCulture));
-
- // use separate helper variables for local contexts so that the jit optimizations
- // won't get confused about the variable lifetimes
- int cha = *pSrc;
-
- // In previous byte, we encountered a high surrogate, so we are expecting a low surrogate here.
- // if (IsLowSurrogate(cha)) {
- if (InRange(cha, CharUnicodeInfo::LOW_SURROGATE_START, CharUnicodeInfo::LOW_SURROGATE_END)) {
- ch = cha + (ch << 10) +
- (0x10000
- - CharUnicodeInfo::LOW_SURROGATE_START
- - (CharUnicodeInfo::HIGH_SURROGATE_START << 10));
-
- pSrc++;
- }
- // else ch is still high surrogate and encoding will fail
-
- // attempt to encode the surrogate or partial surrogate
- goto EncodeChar;
- }
-
- // If we've used a fallback, then we have to check for it
- if (fallbackBuffer != nullptr)
- {
- ch = fallbackBuffer->InternalGetNextChar();
- if (ch > 0) goto ProcessChar;
- }
-
- // read next char. The JIT optimization seems to be getting confused when
- // compiling "ch = *pSrc++;", so rather use "ch = *pSrc; pSrc++;" instead
- ch = *pSrc;
- pSrc++;
-
- ProcessChar:
- if (InRange(ch, CharUnicodeInfo::HIGH_SURROGATE_START, CharUnicodeInfo::HIGH_SURROGATE_END)) {
- continue;
- }
- // either good char or partial surrogate
-
- EncodeChar:
- // throw exception on partial surrogate if necessary
- if (InRange(ch, CharUnicodeInfo::HIGH_SURROGATE_START, CharUnicodeInfo::LOW_SURROGATE_END))
- {
- // Lone surrogates aren't allowed, we have to do fallback for them
- // Have to make a fallback buffer if we don't have one
- if (fallbackBuffer == nullptr)
- {
- // wait on fallbacks if we can
- // For fallback we may need a fallback buffer
- fallbackBuffer = encoderFallback->CreateFallbackBuffer();
-
- // Set our internal fallback interesting things.
- fallbackBuffer->InternalInitialize(chars, pEnd, true);
- }
-
- // Do our fallback. Actually we already know its a mixed up surrogate,
- // so the ref pSrc isn't gonna do anything.
- fallbackBuffer->InternalFallback((WCHAR)ch, &pSrc);
-
- // Ignore it if we don't throw
- ch = 0;
- continue;
- }
-
- // Count bytes needed
- int bytesNeeded = 1;
- if (ch > 0x7F) {
- if (ch > 0x7FF) {
- if (ch > 0xFFFF) {
- bytesNeeded++; // 4 bytes (surrogate pair)
- }
- bytesNeeded++; // 3 bytes (800-FFFF)
- }
- bytesNeeded++; // 2 bytes (80-7FF)
- }
-
- if (pTarget > pAllocatedBufferEnd - bytesNeeded) {
- // Left over surrogate from last time will cause pSrc == chars, so we'll throw
- if (fallbackBuffer != nullptr && fallbackBuffer->bFallingBack)
- {
- fallbackBuffer->MovePrevious(); // Didn't use this fallback char
- if (ch > 0xFFFF)
- fallbackBuffer->MovePrevious(); // Was surrogate, didn't use 2nd part either
- }
- else
- {
- pSrc--; // Didn't use this char
- if (ch > 0xFFFF)
- pSrc--; // Was surrogate, didn't use 2nd part either
- }
- Contract::Assert(pSrc >= chars || pTarget == bytes,
- "[UTF8Encoding.GetBytes]Expected pSrc to be within buffer or to throw with insufficient room.");
- ThrowBytesOverflow(pTarget == bytes); // Throw if we must
- ch = 0; // Nothing left over (we backed up to start of pair if supplimentary)
- break;
- }
-
- if (ch <= 0x7F) {
- *pTarget = (BYTE)ch;
- }
- else {
- // use separate helper variables for local contexts so that the jit optimizations
- // won't get confused about the variable lifetimes
- int chb;
- if (ch <= 0x7FF) {
- // 2 BYTE encoding
- chb = (BYTE)(0xC0 | (ch >> 6));
- }
- else
- {
- if (ch <= 0xFFFF) {
- chb = (BYTE)(0xE0 | (ch >> 12));
- }
- else
- {
- *pTarget = (BYTE)(0xF0 | (ch >> 18));
- pTarget++;
-
- chb = 0x80 | ((ch >> 12) & 0x3F);
- }
- *pTarget = (BYTE)chb;
- pTarget++;
-
- chb = 0x80 | ((ch >> 6) & 0x3F);
- }
- *pTarget = (BYTE)chb;
- pTarget++;
-
- *pTarget = (BYTE)0x80 | (ch & 0x3F);
- }
- pTarget++;
-
-
-#ifdef FASTLOOP
- // If still have fallback don't do fast loop
- if (fallbackBuffer != nullptr && (ch = fallbackBuffer->InternalGetNextChar()) != 0)
- goto ProcessChar;
-
- int availableChars = PtrDiff(pEnd, pSrc);
- int availableBytes = PtrDiff(pAllocatedBufferEnd, pTarget);
-
- // don't fall into the fast decoding loop if we don't have enough characters
- // Note that if we don't have enough bytes, pStop will prevent us from entering the fast loop.
- if (availableChars <= 13) {
- // we are hoping for 1 BYTE per char
- if (availableBytes < availableChars) {
- // not enough output room. no pending bits at this point
- ch = 0;
- continue;
- }
-
- // try to get over the remainder of the ascii characters fast though
- WCHAR* pLocalEnd = pEnd; // hint to get pLocalEnd enregistered
- while (pSrc < pLocalEnd) {
- ch = *pSrc;
- pSrc++;
-
- // Not ASCII, need more than 1 BYTE per char
- if (ch > 0x7F)
- goto ProcessChar;
-
- *pTarget = (BYTE)ch;
- pTarget++;
- }
- // we are done, let ch be 0 to clear encoder
- ch = 0;
- break;
- }
-
- // we need at least 1 BYTE per character, but Convert might allow us to convert
- // only part of the input, so try as much as we can. Reduce charCount if necessary
- if (availableBytes < availableChars)
- {
- availableChars = availableBytes;
- }
-
- // FASTLOOP:
- // - optimistic range checks
- // - fallbacks to the slow loop for all special cases, exception throwing, etc.
-
- // To compute the upper bound, assume that all characters are ASCII characters at this point,
- // the boundary will be decreased for every non-ASCII character we encounter
- // Also, we need 5 chars reserve for the unrolled ansi decoding loop and for decoding of surrogates
- // If there aren't enough bytes for the output, then pStop will be <= pSrc and will bypass the loop.
- WCHAR *pStop = pSrc + availableChars - 5;
-
- while (pSrc < pStop) {
- ch = *pSrc;
- pSrc++;
-
- if (ch > 0x7F) {
- goto LongCode;
- }
- *pTarget = (BYTE)ch;
- pTarget++;
-
- // get pSrc aligned
- if (((size_t)pSrc & 0x2) != 0) {
- ch = *pSrc;
- pSrc++;
- if (ch > 0x7F) {
- goto LongCode;
- }
- *pTarget = (BYTE)ch;
- pTarget++;
- }
-
- // Run 4 characters at a time!
- while (pSrc < pStop) {
- ch = *(int*)pSrc;
- int chc = *(int*)(pSrc + 2);
- if (((ch | chc) & (int)0xFF80FF80) != 0) {
- goto LongCodeWithMask;
- }
-
- // Unfortunately, this is endianess sensitive
-#if BIGENDIAN
- *pTarget = (BYTE)(ch >> 16);
- *(pTarget + 1) = (BYTE)ch;
- pSrc += 4;
- *(pTarget + 2) = (BYTE)(chc >> 16);
- *(pTarget + 3) = (BYTE)chc;
- pTarget += 4;
-#else // BIGENDIAN
- *pTarget = (BYTE)ch;
- *(pTarget + 1) = (BYTE)(ch >> 16);
- pSrc += 4;
- *(pTarget + 2) = (BYTE)chc;
- *(pTarget + 3) = (BYTE)(chc >> 16);
- pTarget += 4;
-#endif // BIGENDIAN
- }
- continue;
-
- LongCodeWithMask:
-#if BIGENDIAN
- // be careful about the sign extension
- ch = (int)(((uint)ch) >> 16);
-#else // BIGENDIAN
- ch = (WCHAR)ch;
-#endif // BIGENDIAN
- pSrc++;
-
- if (ch > 0x7F) {
- goto LongCode;
- }
- *pTarget = (BYTE)ch;
- pTarget++;
- continue;
-
- LongCode:
- // use separate helper variables for slow and fast loop so that the jit optimizations
- // won't get confused about the variable lifetimes
- int chd;
- if (ch <= 0x7FF) {
- // 2 BYTE encoding
- chd = 0xC0 | (ch >> 6);
- }
- else {
- if (!InRange(ch, CharUnicodeInfo::HIGH_SURROGATE_START, CharUnicodeInfo::LOW_SURROGATE_END)) {
- // 3 BYTE encoding
- chd = 0xE0 | (ch >> 12);
- }
- else
- {
- // 4 BYTE encoding - high surrogate + low surrogate
- if (ch > CharUnicodeInfo::HIGH_SURROGATE_END) {
- // low without high -> bad, try again in slow loop
- pSrc -= 1;
- break;
- }
-
- chd = *pSrc;
- pSrc++;
-
- // if (!IsLowSurrogate(chd)) {
- if (!InRange(chd, CharUnicodeInfo::LOW_SURROGATE_START, CharUnicodeInfo::LOW_SURROGATE_END)) {
- // high not followed by low -> bad, try again in slow loop
- pSrc -= 2;
- break;
- }
-
- ch = chd + (ch << 10) +
- (0x10000
- - CharUnicodeInfo::LOW_SURROGATE_START
- - (CharUnicodeInfo::HIGH_SURROGATE_START << 10));
-
- *pTarget = (BYTE)(0xF0 | (ch >> 18));
- // pStop - this BYTE is compensated by the second surrogate character
- // 2 input chars require 4 output bytes. 2 have been anticipated already
- // and 2 more will be accounted for by the 2 pStop-- calls below.
- pTarget++;
-
- chd = 0x80 | ((ch >> 12) & 0x3F);
- }
- *pTarget = (BYTE)chd;
- pStop--; // 3 BYTE sequence for 1 char, so need pStop-- and the one below too.
- pTarget++;
-
- chd = 0x80 | ((ch >> 6) & 0x3F);
- }
- *pTarget = (BYTE)chd;
- pStop--; // 2 BYTE sequence for 1 char so need pStop--.
- pTarget++;
-
- *pTarget = (BYTE)(0x80 | (ch & 0x3F));
- // pStop - this BYTE is already included
- pTarget++;
- }
-
- Contract::Assert(pTarget <= pAllocatedBufferEnd, "[UTF8Encoding.GetBytes]pTarget <= pAllocatedBufferEnd");
-
-#endif // FASTLOOP
-
- // no pending char at this point
- ch = 0;
- }
-
- InternalDelete(fallbackBuffer);
-
- return (int)(pTarget - bytes);
- }
-
- int GetByteCount(WCHAR *chars, int count)
- {
- // For fallback we may need a fallback buffer.
- // We wait to initialize it though in case we don't have any broken input unicode
- EncoderFallbackBuffer* fallbackBuffer = nullptr;
- WCHAR *pSrc = chars;
- WCHAR *pEnd = pSrc + count;
-
- // Start by assuming we have as many as count
- int byteCount = count;
-
- int ch = 0;
-
- while (true) {
- // SLOWLOOP: does all range checks, handles all special cases, but it is slow
- if (pSrc >= pEnd) {
-
- if (ch == 0) {
- // Unroll any fallback that happens at the end
- ch = fallbackBuffer != nullptr ? fallbackBuffer->InternalGetNextChar() : 0;
- if (ch > 0) {
- byteCount++;
- goto ProcessChar;
- }
- }
- else {
- // Case of surrogates in the fallback.
- if (fallbackBuffer != nullptr && fallbackBuffer->bFallingBack) {
- Contract::Assert(ch >= 0xD800 && ch <= 0xDBFF,
- "[UTF8Encoding.GetBytes]expected high surrogate");// , not 0x" + ((int)ch).ToString("X4", CultureInfo.InvariantCulture));
-
- ch = fallbackBuffer->InternalGetNextChar();
- byteCount++;
-
- if (InRange(ch, CharUnicodeInfo::LOW_SURROGATE_START, CharUnicodeInfo::LOW_SURROGATE_END)) {
- ch = 0xfffd;
- byteCount++;
- goto EncodeChar;
- }
- else if (ch > 0){
- goto ProcessChar;
- }
- else {
- byteCount--; // ignore last one.
- break;
- }
- }
- }
-
- if (ch <= 0) {
- break;
- }
-
- // attempt to encode the partial surrogate (will fallback or ignore it), it'll also subtract 1.
- byteCount++;
- goto EncodeChar;
- }
-
- if (ch > 0) {
- Contract::Assert(ch >= 0xD800 && ch <= 0xDBFF,
- "[UTF8Encoding.GetBytes]expected high surrogate"); // , not 0x" + ((int)ch).ToString("X4", CultureInfo.InvariantCulture));
-
- // use separate helper variables for local contexts so that the jit optimizations
- // won't get confused about the variable lifetimes
- int cha = *pSrc;
-
- // count the pending surrogate
- byteCount++;
-
- // In previous byte, we encountered a high surrogate, so we are expecting a low surrogate here.
- // if (IsLowSurrogate(cha)) {
- if (InRange(cha, CharUnicodeInfo::LOW_SURROGATE_START, CharUnicodeInfo::LOW_SURROGATE_END)) {
- // Don't need a real # because we're just counting, anything > 0x7ff ('cept surrogate) will do.
- ch = 0xfffd;
- // ch = cha + (ch << 10) +
- // (0x10000
- // - CharUnicodeInfo::LOW_SURROGATE_START
- // - (CharUnicodeInfo::HIGH_SURROGATE_START << 10) );
-
- // Use this next char
- pSrc++;
- }
- // else ch is still high surrogate and encoding will fail (so don't add count)
-
- // attempt to encode the surrogate or partial surrogate
- goto EncodeChar;
- }
-
- // If we've used a fallback, then we have to check for it
- if (fallbackBuffer != nullptr)
- {
- ch = fallbackBuffer->InternalGetNextChar();
- if (ch > 0)
- {
- // We have an extra byte we weren't expecting.
- byteCount++;
- goto ProcessChar;
- }
- }
-
- // read next char. The JIT optimization seems to be getting confused when
- // compiling "ch = *pSrc++;", so rather use "ch = *pSrc; pSrc++;" instead
- ch = *pSrc;
- pSrc++;
-
- ProcessChar:
- if (InRange(ch, CharUnicodeInfo::HIGH_SURROGATE_START, CharUnicodeInfo::HIGH_SURROGATE_END)) {
- // we will count this surrogate next time around
- byteCount--;
- continue;
- }
- // either good char or partial surrogate
-
- EncodeChar:
- // throw exception on partial surrogate if necessary
- if (InRange(ch, CharUnicodeInfo::HIGH_SURROGATE_START, CharUnicodeInfo::LOW_SURROGATE_END))
- {
- // Lone surrogates aren't allowed
- // Have to make a fallback buffer if we don't have one
- if (fallbackBuffer == nullptr)
- {
- // wait on fallbacks if we can
- // For fallback we may need a fallback buffer
- fallbackBuffer = encoderFallback->CreateFallbackBuffer();
-
- // Set our internal fallback interesting things.
- fallbackBuffer->InternalInitialize(chars, chars + count, false);
- }
-
- // Do our fallback. Actually we already know its a mixed up surrogate,
- // so the ref pSrc isn't gonna do anything.
- fallbackBuffer->InternalFallback((WCHAR)ch, &pSrc);
-
- // Ignore it if we don't throw (we had preallocated this ch)
- byteCount--;
- ch = 0;
- continue;
- }
-
- // Count them
- if (ch > 0x7F) {
- if (ch > 0x7FF) {
- // the extra surrogate byte was compensated by the second surrogate character
- // (2 surrogates make 4 bytes. We've already counted 2 bytes, 1 per char)
- byteCount++;
- }
- byteCount++;
- }
-
-#if WIN64
- // check for overflow
- if (byteCount < 0) {
- break;
- }
-#endif
-
-#ifdef FASTLOOP
- // If still have fallback don't do fast loop
- if (fallbackBuffer != nullptr && (ch = fallbackBuffer->InternalGetNextChar()) != 0)
- {
- // We're reserving 1 byte for each char by default
- byteCount++;
- goto ProcessChar;
- }
-
- int availableChars = PtrDiff(pEnd, pSrc);
-
- // don't fall into the fast decoding loop if we don't have enough characters
- if (availableChars <= 13) {
- // try to get over the remainder of the ascii characters fast though
- WCHAR* pLocalEnd = pEnd; // hint to get pLocalEnd enregistered
- while (pSrc < pLocalEnd) {
- ch = *pSrc;
- pSrc++;
- if (ch > 0x7F)
- goto ProcessChar;
- }
-
- // we are done
- break;
- }
-
-#if WIN64
- // make sure that we won't get a silent overflow inside the fast loop
- // (Fall out to slow loop if we have this many characters)
- availableChars &= 0x0FFFFFFF;
-#endif
-
- // To compute the upper bound, assume that all characters are ASCII characters at this point,
- // the boundary will be decreased for every non-ASCII character we encounter
- // Also, we need 3 + 4 chars reserve for the unrolled ansi decoding loop and for decoding of surrogates
- WCHAR *pStop = pSrc + availableChars - (3 + 4);
-
- while (pSrc < pStop) {
- ch = *pSrc;
- pSrc++;
-
- if (ch > 0x7F) // Not ASCII
- {
- if (ch > 0x7FF) // Not 2 Byte
- {
- if ((ch & 0xF800) == 0xD800) // See if its a Surrogate
- goto LongCode;
- byteCount++;
- }
- byteCount++;
- }
-
- // get pSrc aligned
- if (((size_t)pSrc & 0x2) != 0) {
- ch = *pSrc;
- pSrc++;
- if (ch > 0x7F) // Not ASCII
- {
- if (ch > 0x7FF) // Not 2 Byte
- {
- if ((ch & 0xF800) == 0xD800) // See if its a Surrogate
- goto LongCode;
- byteCount++;
- }
- byteCount++;
- }
- }
-
- // Run 2 * 4 characters at a time!
- while (pSrc < pStop) {
- ch = *(int*)pSrc;
- int chc = *(int*)(pSrc + 2);
- if (((ch | chc) & (int)0xFF80FF80) != 0) // See if not ASCII
- {
- if (((ch | chc) & (int)0xF800F800) != 0) // See if not 2 Byte
- {
- goto LongCodeWithMask;
- }
-
-
- if ((ch & (int)0xFF800000) != 0) // Actually 0x07800780 is all we care about (4 bits)
- byteCount++;
- if ((ch & (int)0xFF80) != 0)
- byteCount++;
- if ((chc & (int)0xFF800000) != 0)
- byteCount++;
- if ((chc & (int)0xFF80) != 0)
- byteCount++;
- }
- pSrc += 4;
-
- ch = *(int*)pSrc;
- chc = *(int*)(pSrc + 2);
- if (((ch | chc) & (int)0xFF80FF80) != 0) // See if not ASCII
- {
- if (((ch | chc) & (int)0xF800F800) != 0) // See if not 2 Byte
- {
- goto LongCodeWithMask;
- }
-
- if ((ch & (int)0xFF800000) != 0)
- byteCount++;
- if ((ch & (int)0xFF80) != 0)
- byteCount++;
- if ((chc & (int)0xFF800000) != 0)
- byteCount++;
- if ((chc & (int)0xFF80) != 0)
- byteCount++;
- }
- pSrc += 4;
- }
- break;
-
- LongCodeWithMask:
-#if BIGENDIAN
- // be careful about the sign extension
- ch = (int)(((uint)ch) >> 16);
-#else // BIGENDIAN
- ch = (WCHAR)ch;
-#endif // BIGENDIAN
- pSrc++;
-
- if (ch <= 0x7F) {
- continue;
- }
-
- LongCode:
- // use separate helper variables for slow and fast loop so that the jit optimizations
- // won't get confused about the variable lifetimes
- if (ch > 0x7FF) {
- if (InRange(ch, CharUnicodeInfo::HIGH_SURROGATE_START, CharUnicodeInfo::LOW_SURROGATE_END)) {
- // 4 byte encoding - high surrogate + low surrogate
-
- int chd = *pSrc;
- if (
- ch > CharUnicodeInfo::HIGH_SURROGATE_END ||
- !InRange(chd, CharUnicodeInfo::LOW_SURROGATE_START, CharUnicodeInfo::LOW_SURROGATE_END))
- {
- // Back up and drop out to slow loop to figure out error
- pSrc--;
- break;
- }
- pSrc++;
-
- // byteCount - this byte is compensated by the second surrogate character
- }
- byteCount++;
- }
- byteCount++;
-
- // byteCount - the last byte is already included
- }
-#endif // FASTLOOP
-
- // no pending char at this point
- ch = 0;
- }
-
-#if WIN64
- // check for overflow
- if (byteCount < 0) {
- throw ArgumentException("Conversion buffer overflow.");
- }
-#endif
-
- Contract::Assert(fallbackBuffer == nullptr || fallbackBuffer->GetRemaining() == 0,
- "[UTF8Encoding.GetByteCount]Expected Empty fallback buffer");
-
- InternalDelete(fallbackBuffer);
-
- return byteCount;
- }
-
-};
-
-
-////////////////////////////////////////////////////////////////////////////
-//
-// UTF8ToUnicode
-//
-// Maps a UTF-8 character string to its wide character string counterpart.
-//
-////////////////////////////////////////////////////////////////////////////
-
-int UTF8ToUnicode(
- LPCSTR lpSrcStr,
- int cchSrc,
- LPWSTR lpDestStr,
- int cchDest,
- DWORD dwFlags
- )
-{
- int ret;
- UTF8Encoding enc(dwFlags & MB_ERR_INVALID_CHARS);
- try {
- ret = enc.GetCharCount((BYTE*)lpSrcStr, cchSrc);
- if (cchDest){
- if (ret > cchDest){
- SetLastError(ERROR_INSUFFICIENT_BUFFER);
- ret = 0;
- }
- enc.GetChars((BYTE*)lpSrcStr, cchSrc, (WCHAR*)lpDestStr, ret);
- }
- }
- catch (const InsufficientBufferException& e){
- SetLastError(ERROR_INSUFFICIENT_BUFFER);
- return 0;
- }
- catch (const DecoderFallbackException& e){
- SetLastError(ERROR_NO_UNICODE_TRANSLATION);
- return 0;
- }
- catch (const ArgumentException& e){
- SetLastError(ERROR_INVALID_PARAMETER);
- return 0;
- }
- return ret;
-}
-
-////////////////////////////////////////////////////////////////////////////
-//
-// UnicodeToUTF8
-//
-// Maps a Unicode character string to its UTF-8 string counterpart.
-//
-////////////////////////////////////////////////////////////////////////////
-
-int UnicodeToUTF8(
- LPCWSTR lpSrcStr,
- int cchSrc,
- LPSTR lpDestStr,
- int cchDest)
-{
- int ret;
- UTF8Encoding enc(false);
- try{
- ret = enc.GetByteCount((WCHAR*)lpSrcStr, cchSrc);
- if (cchDest){
- if (ret > cchDest){
- SetLastError(ERROR_INSUFFICIENT_BUFFER);
- ret = 0;
- }
- enc.GetBytes((WCHAR*)lpSrcStr, cchSrc, (BYTE*)lpDestStr, ret);
- }
- }
- catch (const InsufficientBufferException& e){
- SetLastError(ERROR_INSUFFICIENT_BUFFER);
- return 0;
- }
- catch (const EncoderFallbackException& e){
- SetLastError(ERROR_NO_UNICODE_TRANSLATION);
- return 0;
- }
- catch (const ArgumentException& e){
- SetLastError(ERROR_INVALID_PARAMETER);
- return 0;
- }
- return ret;
-}
#include <sys/types.h>
#include <sys/mman.h>
#include <unistd.h>
+#include <fcntl.h>
#include <errno.h>
#include "rt/ntimage.h"
palError = ERROR_INVALID_PARAMETER;
goto ExitInternalCreateFileMapping;
}
-
+
maximumSize = ((off_t)dwMaximumSizeHigh << 32) | (off_t)dwMaximumSizeLow;
palError = g_pObjectManager->AllocateObject(
return palError;
}
-/*++
-Function:
- OpenFileMappingW
-
-See MSDN doc.
---*/
-HANDLE
-PALAPI
-OpenFileMappingW(
- IN DWORD dwDesiredAccess,
- IN BOOL bInheritHandle,
- IN LPCWSTR lpName)
-{
- HANDLE hFileMapping = NULL;
- PAL_ERROR palError = NO_ERROR;
- CPalThread *pThread = NULL;
-
- PERF_ENTRY(OpenFileMappingW);
- ENTRY("OpenFileMappingW(dwDesiredAccess=%#x, bInheritHandle=%d, lpName=%p (%S)\n",
- dwDesiredAccess, bInheritHandle, lpName?lpName:W16_NULLSTRING, lpName?lpName:W16_NULLSTRING);
-
- pThread = InternalGetCurrentThread();
-
- /* validate parameters */
- if (lpName == nullptr)
- {
- ERROR("name is NULL\n");
- palError = ERROR_INVALID_PARAMETER;
- }
- else
- {
- ASSERT("lpName: Cross-process named objects are not supported in PAL");
- palError = ERROR_NOT_SUPPORTED;
- }
-
- if (NO_ERROR != palError)
- {
- pThread->SetLastError(palError);
- }
- LOGEXIT("OpenFileMappingW returning %p.\n", hFileMapping);
- PERF_EXIT(OpenFileMappingW);
- return hFileMapping;
-}
-
/*++
Function:
MapViewOfFile
// the global list.
//
- PMAPPED_VIEW_LIST pNewView = (PMAPPED_VIEW_LIST)InternalMalloc(sizeof(*pNewView));
+ PMAPPED_VIEW_LIST pNewView = (PMAPPED_VIEW_LIST)malloc(sizeof(*pNewView));
if (NULL != pNewView)
{
pNewView->lpAddress = pvBaseAddress;
/* ftruncate is a standard function, but the behavior of enlarging files is
non-standard. So I will try to enlarge a file, and if that fails try the
- less efficent way.*/
+ less efficient way.*/
TruncateRetVal = ftruncate( UnixFD, NewSize );
fstat( UnixFD, &FileInfo );
- if ( TruncateRetVal != 0 || FileInfo.st_size != (int) NewSize )
+ if ( TruncateRetVal != 0 || FileInfo.st_size != NewSize )
{
INT OrigSize;
CONST UINT BUFFER_SIZE = 128;
UINT x = 0;
UINT CurrentPosition = 0;
- TRACE( "Trying the less efficent way.\n" );
+ TRACE( "Trying the less efficient way.\n" );
CurrentPosition = lseek( UnixFD, 0, SEEK_CUR );
OrigSize = lseek( UnixFD, 0, SEEK_END );
}
memset( buf, 0, BUFFER_SIZE );
-
- for ( x = 0; x < NewSize - OrigSize - BUFFER_SIZE; x += BUFFER_SIZE )
+ if (NewSize - OrigSize - BUFFER_SIZE >= 0 && BUFFER_SIZE > 0)
{
- if ( write( UnixFD, (LPVOID)buf, BUFFER_SIZE ) == -1 )
+ for ( x = 0; x < NewSize - OrigSize - BUFFER_SIZE; x += BUFFER_SIZE )
{
- ERROR( "Unable to grow the file. Reason=%s\n", strerror( errno ) );
- if((errno == ENOSPC) || (errno == EDQUOT))
+ if ( write( UnixFD, (LPVOID)buf, BUFFER_SIZE ) == -1 )
{
- palError = ERROR_DISK_FULL;
- }
- else
- {
- palError = ERROR_INTERNAL_ERROR;
+ ERROR( "Unable to grow the file. Reason=%s\n", strerror( errno ) );
+ if((errno == ENOSPC) || (errno == EDQUOT))
+ {
+ palError = ERROR_DISK_FULL;
+ }
+ else
+ {
+ palError = ERROR_INTERNAL_ERROR;
+ }
+ goto done;
}
- goto done;
}
}
+ else
+ {
+ //This will be an infinite loop because it did not pass the check.
+ palError = ERROR_INTERNAL_ERROR;
+ goto done;
+ }
/* Catch any left overs. */
if ( x != NewSize )
{
/* The new desired mapping is fully contained in the
one just found: we can reuse this one */
- pNewView = (PMAPPED_VIEW_LIST)InternalMalloc(sizeof(MAPPED_VIEW_LIST));
+ pNewView = (PMAPPED_VIEW_LIST)malloc(sizeof(MAPPED_VIEW_LIST));
if (pNewView)
{
memcpy(pNewView, pView, sizeof(*pNewView));
}
pThisMapHolder =
- (NativeMapHolder *)InternalMalloc(sizeof(NativeMapHolder));
+ (NativeMapHolder *)malloc(sizeof(NativeMapHolder));
if (pThisMapHolder)
{
#include "pal/cs.hpp"
#include "pal/malloc.hpp"
#include "pal/file.hpp"
+//#include "pal/seh.hpp"
#include "pal/virtual.h"
#include "pal/map.h"
#include "pal/init.h"
#include "pal/utils.h"
#include "common.h"
+#include <clrconfignocache.h>
+#include <sys/resource.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <errno.h>
Commit = 0x30,
Decommit = 0x40,
Release = 0x50,
- Reset = 0x60,
ReserveFromExecutableMemoryAllocatorWithinRange = 0x70
};
{
WARN( "The memory at %d was not freed through a call to VirtualFree.\n",
pEntry->startBoundary );
- free(pEntry->pAllocState);
- free(pEntry->pProtectionState );
pTempEntry = pEntry;
pEntry = pEntry->pNext;
free(pTempEntry );
}
-/****
- *
- * VIRTUALIsPageCommitted
- *
- * SIZE_T nBitToRetrieve - Which page to check.
- *
- * Returns TRUE if committed, FALSE otherwise.
- *
- */
-static BOOL VIRTUALIsPageCommitted( SIZE_T nBitToRetrieve, CONST PCMI pInformation )
-{
- SIZE_T nByteOffset = 0;
- UINT nBitOffset = 0;
- UINT byteMask = 0;
-
- if ( !pInformation )
- {
- ERROR( "pInformation was NULL!\n" );
- return FALSE;
- }
-
- nByteOffset = nBitToRetrieve / CHAR_BIT;
- nBitOffset = nBitToRetrieve % CHAR_BIT;
-
- byteMask = 1 << nBitOffset;
-
- if ( pInformation->pAllocState[ nByteOffset ] & byteMask )
- {
- return TRUE;
- }
- else
- {
- return FALSE;
- }
-}
-
-/*********
- *
- * VIRTUALGetAllocationType
- *
- * IN SIZE_T Index - The page within the range to retrieve
- * the state for.
- *
- * IN pInformation - The virtual memory object.
- *
- */
-static INT VIRTUALGetAllocationType( SIZE_T Index, CONST PCMI pInformation )
-{
- if ( VIRTUALIsPageCommitted( Index, pInformation ) )
- {
- return MEM_COMMIT;
- }
- else
- {
- return MEM_RESERVE;
- }
-}
-
-/****
- *
- * VIRTUALSetPageBits
- *
- * IN UINT nStatus - Bit set / reset [0: reset, any other value: set].
- * IN SIZE_T nStartingBit - The bit to set.
- *
- * IN SIZE_T nNumberOfBits - The range of bits to set.
- * IN BYTE* pBitArray - A pointer the array to be manipulated.
- *
- * Returns TRUE on success, FALSE otherwise.
- * Turn on/off memory status bits.
- *
- */
-static BOOL VIRTUALSetPageBits ( UINT nStatus, SIZE_T nStartingBit,
- SIZE_T nNumberOfBits, BYTE * pBitArray )
-{
- /* byte masks for optimized modification of partial bytes (changing less
- than 8 bits in a single byte). note that bits are treated in little
- endian order : value 1 is bit 0; value 128 is bit 7. in the binary
- representations below, bit 0 is on the right */
-
- /* start masks : for modifying bits >= n while preserving bits < n.
- example : if nStartignBit%8 is 3, then bits 0, 1, 2 remain unchanged
- while bits 3..7 are changed; startmasks[3] can be used for this. */
- static const BYTE startmasks[8] = {
- 0xff, /* start at 0 : 1111 1111 */
- 0xfe, /* start at 1 : 1111 1110 */
- 0xfc, /* start at 2 : 1111 1100 */
- 0xf8, /* start at 3 : 1111 1000 */
- 0xf0, /* start at 4 : 1111 0000 */
- 0xe0, /* start at 5 : 1110 0000 */
- 0xc0, /* start at 6 : 1100 0000 */
- 0x80 /* start at 7 : 1000 0000 */
- };
-
- /* end masks : for modifying bits <= n while preserving bits > n.
- example : if the last bit to change is 5, then bits 6 & 7 stay unchanged
- while bits 1..5 are changed; endmasks[5] can be used for this. */
- static const BYTE endmasks[8] = {
- 0x01, /* end at 0 : 0000 0001 */
- 0x03, /* end at 1 : 0000 0011 */
- 0x07, /* end at 2 : 0000 0111 */
- 0x0f, /* end at 3 : 0000 1111 */
- 0x1f, /* end at 4 : 0001 1111 */
- 0x3f, /* end at 5 : 0011 1111 */
- 0x7f, /* end at 6 : 0111 1111 */
- 0xff /* end at 7 : 1111 1111 */
- };
- /* last example : if only the middle of a byte must be changed, both start
- and end masks can be combined (bitwise AND) to obtain the correct mask.
- if we want to change bits 2 to 4 :
- startmasks[2] : 0xfc 1111 1100 (change 2,3,4,5,6,7)
- endmasks[4]: 0x1f 0001 1111 (change 0,1,2,3,4)
- bitwise AND : 0x1c 0001 1100 (change 2,3,4)
- */
-
- BYTE byte_mask;
- SIZE_T nLastBit;
- SIZE_T nFirstByte;
- SIZE_T nLastByte;
- SIZE_T nFullBytes;
-
- TRACE( "VIRTUALSetPageBits( nStatus = %d, nStartingBit = %d, "
- "nNumberOfBits = %d, pBitArray = 0x%p )\n",
- nStatus, nStartingBit, nNumberOfBits, pBitArray );
-
- if ( 0 == nNumberOfBits )
- {
- ERROR( "nNumberOfBits was 0!\n" );
- return FALSE;
- }
-
- nLastBit = nStartingBit+nNumberOfBits-1;
- nFirstByte = nStartingBit / 8;
- nLastByte = nLastBit / 8;
-
- /* handle partial first byte (if any) */
- if(0 != (nStartingBit % 8))
- {
- byte_mask = startmasks[nStartingBit % 8];
-
- /* if 1st byte is the only changing byte, combine endmask to preserve
- trailing bits (see 3rd example above) */
- if( nLastByte == nFirstByte)
- {
- byte_mask &= endmasks[nLastBit % 8];
- }
-
- /* byte_mask contains 1 for bits to change, 0 for bits to leave alone */
- if(0 == nStatus)
- {
- /* bits to change must be set to 0 : invert byte_mask (giving 0 for
- bits to change), use bitwise AND */
- pBitArray[nFirstByte] &= ~byte_mask;
- }
- else
- {
- /* bits to change must be set to 1 : use bitwise OR */
- pBitArray[nFirstByte] |= byte_mask;
- }
-
- /* stop right away if only 1 byte is being modified */
- if(nLastByte == nFirstByte)
- {
- return TRUE;
- }
-
- /* we're done with the 1st byte; skip over it */
- nFirstByte++;
- }
-
- /* number of bytes to change, excluding the last byte (handled separately)*/
- nFullBytes = nLastByte - nFirstByte;
-
- if(0 != nFullBytes)
- {
- // Turn off/on dirty bits
- memset( &(pBitArray[nFirstByte]), (0 == nStatus) ? 0 : 0xFF, nFullBytes );
- }
-
- /* handle last (possibly partial) byte */
- byte_mask = endmasks[nLastBit % 8];
-
- /* byte_mask contains 1 for bits to change, 0 for bits to leave alone */
- if(0 == nStatus)
- {
- /* bits to change must be set to 0 : invert byte_mask (giving 0 for
- bits to change), use bitwise AND */
- pBitArray[nLastByte] &= ~byte_mask;
- }
- else
- {
- /* bits to change must be set to 1 : use bitwise OR */
- pBitArray[nLastByte] |= byte_mask;
- }
-
- return TRUE;
-}
-
-/****
- *
- * VIRTUALSetAllocState
- *
- * IN UINT nAction - Which action to perform.
- * IN SIZE_T nStartingBit - The bit to set.
- *
- * IN SIZE_T nNumberOfBits - The range of bits to set.
- * IN PCMI pStateArray - A pointer the array to be manipulated.
- *
- * Returns TRUE on success, FALSE otherwise.
- * Turn bit on to indicate committed, turn bit off to indicate reserved.
- *
- */
-static BOOL VIRTUALSetAllocState( UINT nAction, SIZE_T nStartingBit,
- SIZE_T nNumberOfBits, CONST PCMI pInformation )
-{
- TRACE( "VIRTUALSetAllocState( nAction = %d, nStartingBit = %d, "
- "nNumberOfBits = %d, pStateArray = 0x%p )\n",
- nAction, nStartingBit, nNumberOfBits, pInformation );
-
- if ( !pInformation )
- {
- ERROR( "pInformation was invalid!\n" );
- return FALSE;
- }
-
- return VIRTUALSetPageBits((MEM_COMMIT == nAction) ? 1 : 0, nStartingBit,
- nNumberOfBits, pInformation->pAllocState);
-}
-
/****
*
* VIRTUALFindRegionInformation( )
}
}
- free( pMemoryToBeReleased->pAllocState );
- pMemoryToBeReleased->pAllocState = NULL;
-
- free( pMemoryToBeReleased->pProtectionState );
- pMemoryToBeReleased->pProtectionState = NULL;
-
free( pMemoryToBeReleased );
pMemoryToBeReleased = NULL;
return bRetVal;
}
-/****
- * VIRTUALConvertWinFlags() -
- * Converts win32 protection flags to
- * internal VIRTUAL flags.
- *
- */
-static BYTE VIRTUALConvertWinFlags( IN DWORD flProtect )
-{
- BYTE MemAccessControl = 0;
-
- switch ( flProtect & 0xff )
- {
- case PAGE_NOACCESS :
- MemAccessControl = VIRTUAL_NOACCESS;
- break;
- case PAGE_READONLY :
- MemAccessControl = VIRTUAL_READONLY;
- break;
- case PAGE_READWRITE :
- MemAccessControl = VIRTUAL_READWRITE;
- break;
- case PAGE_EXECUTE :
- MemAccessControl = VIRTUAL_EXECUTE;
- break;
- case PAGE_EXECUTE_READ :
- MemAccessControl = VIRTUAL_EXECUTE_READ;
- break;
- case PAGE_EXECUTE_READWRITE:
- MemAccessControl = VIRTUAL_EXECUTE_READWRITE;
- break;
-
- default :
- MemAccessControl = 0;
- ERROR( "Incorrect or no protection flags specified.\n" );
- break;
- }
- return MemAccessControl;
-}
-
-/****
- * VIRTUALConvertVirtualFlags() -
- * Converts internal virtual protection
- * flags to their win32 counterparts.
- */
-static DWORD VIRTUALConvertVirtualFlags( IN BYTE VirtualProtect )
-{
- DWORD MemAccessControl = 0;
-
- if ( VirtualProtect == VIRTUAL_READONLY )
- {
- MemAccessControl = PAGE_READONLY;
- }
- else if ( VirtualProtect == VIRTUAL_READWRITE )
- {
- MemAccessControl = PAGE_READWRITE;
- }
- else if ( VirtualProtect == VIRTUAL_EXECUTE_READWRITE )
- {
- MemAccessControl = PAGE_EXECUTE_READWRITE;
- }
- else if ( VirtualProtect == VIRTUAL_EXECUTE_READ )
- {
- MemAccessControl = PAGE_EXECUTE_READ;
- }
- else if ( VirtualProtect == VIRTUAL_EXECUTE )
- {
- MemAccessControl = PAGE_EXECUTE;
- }
- else if ( VirtualProtect == VIRTUAL_NOACCESS )
- {
- MemAccessControl = PAGE_NOACCESS;
- }
-
- else
- {
- MemAccessControl = 0;
- ERROR( "Incorrect or no protection flags specified.\n" );
- }
- return MemAccessControl;
-}
-
/***
* Displays the linked list.
*
DBGOUT( "\t startBoundary %#x \n", p->startBoundary );
DBGOUT( "\t memSize %d \n", p->memSize );
- DBGOUT( "\t pAllocState " );
- for ( index = 0; index < p->memSize / GetVirtualPageSize(); index++)
- {
- DBGOUT( "[%d] ", VIRTUALGetAllocationType( index, p ) );
- }
- DBGOUT( "\t pProtectionState " );
- for ( index = 0; index < p->memSize / GetVirtualPageSize(); index++ )
- {
- DBGOUT( "[%d] ", (UINT)p->pProtectionState[ index ] );
- }
- DBGOUT( "\n" );
DBGOUT( "\t accessProtection %d \n", p->accessProtection );
DBGOUT( "\t allocationType %d \n", p->allocationType );
DBGOUT( "\t pNext %p \n", p->pNext );
return FALSE;
}
- if (!(pNewEntry = (PCMI)InternalMalloc(sizeof(*pNewEntry))))
+ if (!(pNewEntry = (PCMI)malloc(sizeof(*pNewEntry))))
{
ERROR( "Unable to allocate memory for the structure.\n");
return FALSE;
pNewEntry->allocationType = flAllocationType;
pNewEntry->accessProtection = flProtection;
- nBufferSize = memSize / GetVirtualPageSize() / CHAR_BIT;
- if ((memSize / GetVirtualPageSize()) % CHAR_BIT != 0)
- {
- nBufferSize++;
- }
-
- pNewEntry->pAllocState = (BYTE*)InternalMalloc(nBufferSize);
- pNewEntry->pProtectionState = (BYTE*)InternalMalloc((memSize / GetVirtualPageSize()));
-
- if (pNewEntry->pAllocState && pNewEntry->pProtectionState)
- {
- /* Set the intial allocation state, and initial allocation protection. */
- VIRTUALSetAllocState(MEM_RESERVE, 0, nBufferSize * CHAR_BIT, pNewEntry);
- memset(pNewEntry->pProtectionState,
- VIRTUALConvertWinFlags(flProtection),
- memSize / GetVirtualPageSize());
- }
- else
- {
- ERROR( "Unable to allocate memory for the structure.\n");
-
- if (pNewEntry->pProtectionState) free(pNewEntry->pProtectionState);
- pNewEntry->pProtectionState = nullptr;
-
- if (pNewEntry->pAllocState) free(pNewEntry->pAllocState);
- pNewEntry->pAllocState = nullptr;
-
- free(pNewEntry);
- pNewEntry = nullptr;
-
- return FALSE;
- }
-
pMemInfo = pVirtualMemory;
if (pMemInfo && pMemInfo->startBoundary < startBoundary)
return TRUE;
}
-/******
- *
- * VIRTUALResetMemory() - Helper function that resets the memory
- *
- *
- */
-static LPVOID VIRTUALResetMemory(
- IN CPalThread *pthrCurrent, /* Currently executing thread */
- IN LPVOID lpAddress, /* Region to reserve or commit */
- IN SIZE_T dwSize) /* Size of Region */
-{
- LPVOID pRetVal = NULL;
- UINT_PTR StartBoundary;
- SIZE_T MemSize;
-
- TRACE( "Resetting the memory now..\n");
-
- StartBoundary = (UINT_PTR) ALIGN_DOWN(lpAddress, GetVirtualPageSize());
- MemSize = ALIGN_UP((UINT_PTR)lpAddress + dwSize, GetVirtualPageSize()) - StartBoundary;
-
- int st;
-#if HAVE_MADV_FREE
- // Try to use MADV_FREE if supported. It tells the kernel that the application doesn't
- // need the pages in the range. Freeing the pages can be delayed until a memory pressure
- // occurs.
- st = madvise((LPVOID)StartBoundary, MemSize, MADV_FREE);
- if (st != 0)
-#endif
- {
- // In case the MADV_FREE is not supported, use MADV_DONTNEED
- st = posix_madvise((LPVOID)StartBoundary, MemSize, POSIX_MADV_DONTNEED);
- }
-
- if (st == 0)
- {
- pRetVal = lpAddress;
-
-#ifdef MADV_DONTDUMP
- // Do not include reset memory in coredump.
- madvise((LPVOID)StartBoundary, MemSize, MADV_DONTDUMP);
-#endif
- }
-
- LogVaOperation(
- VirtualMemoryLogging::VirtualOperation::Reset,
- lpAddress,
- dwSize,
- 0,
- 0,
- pRetVal,
- pRetVal != NULL);
-
- return pRetVal;
-}
-
/******
*
* VIRTUALReserveMemory() - Helper function that actually reserves the memory.
IN LPVOID lpAddress, /* Region to reserve or commit */
IN SIZE_T dwSize, /* Size of Region */
IN DWORD flAllocationType, /* Type of allocation */
- IN DWORD flProtect) /* Type of access protection */
+ IN DWORD flProtect, /* Type of access protection */
+ OUT BOOL *newMemory = NULL) /* Set if new virtual memory is allocated */
{
LPVOID pRetVal = NULL;
UINT_PTR StartBoundary;
TRACE( "Reserving the memory now..\n");
+ if (newMemory != NULL)
+ {
+ *newMemory = false;
+ }
+
// First, figure out where we're trying to reserve the memory and
// how much we need. On most systems, requests to mmap must be
// page-aligned and at multiples of the page size. Unlike on Windows, on
flAllocationType |= MEM_RESERVE_EXECUTABLE;
}
pRetVal = ReserveVirtualMemory(pthrCurrent, (LPVOID)StartBoundary, MemSize, flAllocationType);
+
+ if (newMemory != NULL && pRetVal != NULL)
+ {
+ *newMemory = true;
+ }
}
if (pRetVal != NULL)
#endif // MMAP_ANON_IGNORES_PROTECTION
#ifdef MADV_DONTDUMP
- // Do not include reserved memory in coredump.
- madvise(pRetVal, MemSize, MADV_DONTDUMP);
+ // Do not include reserved uncommitted memory in coredump.
+ if (!(fAllocationType & MEM_COMMIT))
+ {
+ madvise(pRetVal, MemSize, MADV_DONTDUMP);
+ }
#endif
return pRetVal;
PCMI pInformation = 0;
LPVOID pRetVal = NULL;
BOOL IsLocallyReserved = FALSE;
- SIZE_T totalPages;
- INT allocationType, curAllocationType;
- INT protectionState, curProtectionState;
- SIZE_T initialRunStart;
- SIZE_T runStart;
- SIZE_T runLength;
- SIZE_T index;
+ BOOL IsNewMemory = FALSE;
INT nProtect;
- INT vProtect;
if ( lpAddress )
{
*/
LPVOID pReservedMemory =
VIRTUALReserveMemory( pthrCurrent, lpAddress, dwSize,
- flAllocationType, flProtect );
+ flAllocationType, flProtect, &IsNewMemory );
TRACE( "Reserve and commit the memory!\n " );
TRACE( "Committing the memory now..\n");
- // Pages that aren't already committed need to be committed. Pages that
- // are committed don't need to be committed, but they might need to have
- // their permissions changed.
- // To get this right, we find runs of pages with similar states and
- // permissions. If a run is not committed, we commit it and then set
- // its permissions. If a run is committed but has different permissions
- // from what we're trying to set, we set its permissions. Finally,
- // if a run is already committed and has the right permissions,
- // we don't need to do anything to it.
-
- totalPages = MemSize / GetVirtualPageSize();
- runStart = (StartBoundary - pInformation->startBoundary) /
- GetVirtualPageSize(); // Page index
- initialRunStart = runStart;
- allocationType = VIRTUALGetAllocationType(runStart, pInformation);
- protectionState = pInformation->pProtectionState[runStart];
- curAllocationType = allocationType;
- curProtectionState = protectionState;
- runLength = 1;
nProtect = W32toUnixAccessControl(flProtect);
- vProtect = VIRTUALConvertWinFlags(flProtect);
- if (totalPages > pInformation->memSize / GetVirtualPageSize() - runStart)
+ // Commit the pages
+ if (mprotect((void *) StartBoundary, MemSize, nProtect) != 0)
{
- ERROR("Trying to commit beyond the end of the region!\n");
+ ERROR("mprotect() failed! Error(%d)=%s\n", errno, strerror(errno));
goto error;
}
- while(runStart < initialRunStart + totalPages)
- {
- // Find the next run of pages
- for(index = runStart + 1; index < initialRunStart + totalPages;
- index++)
- {
- curAllocationType = VIRTUALGetAllocationType(index, pInformation);
- curProtectionState = pInformation->pProtectionState[index];
- if (curAllocationType != allocationType ||
- curProtectionState != protectionState)
- {
- break;
- }
- runLength++;
- }
-
- StartBoundary = pInformation->startBoundary + runStart * GetVirtualPageSize();
- pRetVal = (void *)StartBoundary;
- MemSize = runLength * GetVirtualPageSize();
-
- if (allocationType != MEM_COMMIT)
- {
- // Commit the pages
- if (mprotect((void *) StartBoundary, MemSize, PROT_WRITE | PROT_READ) != 0)
- {
- ERROR("mprotect() failed! Error(%d)=%s\n", errno, strerror(errno));
- goto error;
- }
-
#ifdef MADV_DODUMP
- // Include committed memory in coredump.
- madvise((void *) StartBoundary, MemSize, MADV_DODUMP);
-#endif
-
- VIRTUALSetAllocState(MEM_COMMIT, runStart, runLength, pInformation);
-
- if (nProtect == (PROT_WRITE | PROT_READ))
- {
- // Handle this case specially so we don't bother
- // mprotect'ing the region.
- memset(pInformation->pProtectionState + runStart,
- vProtect, runLength);
- }
-
- protectionState = VIRTUAL_READWRITE;
- }
-
- if (protectionState != vProtect)
- {
- // Change permissions.
- if (mprotect((void *) StartBoundary, MemSize, nProtect) != -1)
- {
- memset(pInformation->pProtectionState + runStart,
- vProtect, runLength);
- }
- else
- {
- ERROR("mprotect() failed! Error(%d)=%s\n",
- errno, strerror(errno));
- goto error;
- }
- }
-
- runStart = index;
- runLength = 1;
- allocationType = curAllocationType;
- protectionState = curProtectionState;
+ // Include committed memory in coredump. Any newly allocated memory included by default.
+ if (!IsNewMemory)
+ {
+ madvise((void *) StartBoundary, MemSize, MADV_DODUMP);
}
+#endif
- pRetVal = (void *) (pInformation->startBoundary + initialRunStart * GetVirtualPageSize());
+ pRetVal = (void *) StartBoundary;
goto done;
error:
lpBeginAddress - Inclusive beginning of range
lpEndAddress - Exclusive end of range
dwSize - Number of bytes to allocate
+ fStoreAllocationInfo - TRUE to indicate that the allocation should be registered in the PAL allocation list
--*/
LPVOID
PALAPI
PAL_VirtualReserveFromExecutableMemoryAllocatorWithinRange(
IN LPCVOID lpBeginAddress,
IN LPCVOID lpEndAddress,
- IN SIZE_T dwSize)
+ IN SIZE_T dwSize,
+ IN BOOL fStoreAllocationInfo)
{
#ifdef HOST_64BIT
PERF_ENTRY(PAL_VirtualReserveFromExecutableMemoryAllocatorWithinRange);
ENTRY(
- "PAL_VirtualReserveFromExecutableMemoryAllocatorWithinRange(lpBeginAddress = %p, lpEndAddress = %p, dwSize = %Iu)\n",
+ "PAL_VirtualReserveFromExecutableMemoryAllocatorWithinRange(lpBeginAddress = %p, lpEndAddress = %p, dwSize = %zu, fStoreAllocationInfo = %d)\n",
lpBeginAddress,
lpEndAddress,
- dwSize);
+ dwSize,
+ fStoreAllocationInfo);
_ASSERTE(lpBeginAddress <= lpEndAddress);
if (address != nullptr)
{
_ASSERTE(IS_ALIGNED(address, GetVirtualPageSize()));
- if (!VIRTUALStoreAllocationInfo((UINT_PTR)address, reservationSize, MEM_RESERVE | MEM_RESERVE_EXECUTABLE, PAGE_NOACCESS))
+ if (fStoreAllocationInfo && !VIRTUALStoreAllocationInfo((UINT_PTR)address, reservationSize, MEM_RESERVE | MEM_RESERVE_EXECUTABLE, PAGE_NOACCESS))
{
ASSERT("Unable to store the structure in the list.\n");
munmap(address, reservationSize);
#endif // HOST_64BIT
}
+/*++
+Function:
+ PAL_GetExecutableMemoryAllocatorPreferredRange
+
+ This function gets the preferred range used by the executable memory allocator.
+ This is the range that the memory allocator will prefer to allocate memory in,
+ including (if nearby) the libcoreclr memory range.
+
+ lpBeginAddress - Inclusive beginning of range
+ lpEndAddress - Exclusive end of range
+ dwSize - Number of bytes to allocate
+--*/
+void
+PALAPI
+PAL_GetExecutableMemoryAllocatorPreferredRange(
+ OUT LPVOID *start,
+ OUT LPVOID *end)
+{
+ g_executableMemoryAllocator.GetPreferredRange(start, end);
+}
+
/*++
Function:
VirtualAlloc
}
/* Test for un-supported flags. */
- if ( ( flAllocationType & ~( MEM_COMMIT | MEM_RESERVE | MEM_RESET | MEM_TOP_DOWN | MEM_RESERVE_EXECUTABLE | MEM_LARGE_PAGES ) ) != 0 )
+ if ( ( flAllocationType & ~( MEM_COMMIT | MEM_RESERVE | MEM_TOP_DOWN | MEM_RESERVE_EXECUTABLE | MEM_LARGE_PAGES ) ) != 0 )
{
ASSERT( "flAllocationType can be one, or any combination of MEM_COMMIT, \
MEM_RESERVE, MEM_TOP_DOWN, MEM_RESERVE_EXECUTABLE, or MEM_LARGE_PAGES.\n" );
NULL,
TRUE);
- if ( flAllocationType & MEM_RESET )
- {
- if ( flAllocationType != MEM_RESET )
- {
- ASSERT( "MEM_RESET cannot be used with any other allocation flags in flAllocationType.\n" );
- pthrCurrent->SetLastError( ERROR_INVALID_PARAMETER );
- goto done;
- }
-
- InternalEnterCriticalSection(pthrCurrent, &virtual_critsec);
- pRetVal = VIRTUALResetMemory( pthrCurrent, lpAddress, dwSize );
- InternalLeaveCriticalSection(pthrCurrent, &virtual_critsec);
-
- if ( !pRetVal )
- {
- /* Error messages are already displayed, just leave. */
- goto done;
- }
- }
-
if ( flAllocationType & MEM_RESERVE )
{
InternalEnterCriticalSection(pthrCurrent, &virtual_critsec);
// Do not include freed memory in coredump.
madvise((LPVOID) StartBoundary, MemSize, MADV_DONTDUMP);
#endif
-
- SIZE_T index = 0;
- SIZE_T nNumOfPagesToChange = 0;
-
- /* We can now commit this memory by calling VirtualAlloc().*/
- index = (StartBoundary - pUnCommittedMem->startBoundary) / GetVirtualPageSize();
-
- nNumOfPagesToChange = MemSize / GetVirtualPageSize();
- VIRTUALSetAllocState( MEM_RESERVE, index,
- nNumOfPagesToChange, pUnCommittedMem );
-
goto VirtualFreeExit;
}
else
}
pEntry = VIRTUALFindRegionInformation( StartBoundary );
- if ( NULL != pEntry )
- {
- /* See if the pages are committed. */
- Index = OffSet = StartBoundary - pEntry->startBoundary == 0 ?
- 0 : ( StartBoundary - pEntry->startBoundary ) / GetVirtualPageSize();
- NumberOfPagesToChange = MemSize / GetVirtualPageSize();
-
- TRACE( "Number of pages to check %d, starting page %d \n", NumberOfPagesToChange, Index );
-
- for ( ; Index < NumberOfPagesToChange; Index++ )
- {
- if ( !VIRTUALIsPageCommitted( Index, pEntry ) )
- {
- ERROR( "You can only change the protection attributes"
- " on committed memory.\n" )
- SetLastError( ERROR_INVALID_ADDRESS );
- goto ExitVirtualProtect;
- }
- }
- }
-
if ( 0 == mprotect( (LPVOID)StartBoundary, MemSize,
W32toUnixAccessControl( flNewProtect ) ) )
{
* if there were several regions with each with different flags only the
* first region's protection flag will be returned.
*/
- if ( pEntry )
- {
- *lpflOldProtect =
- VIRTUALConvertVirtualFlags( pEntry->pProtectionState[ OffSet ] );
-
- memset( pEntry->pProtectionState + OffSet,
- VIRTUALConvertWinFlags( flNewProtect ),
- NumberOfPagesToChange );
- }
- else
- {
- *lpflOldProtect = PAGE_EXECUTE_READWRITE;
- }
+ *lpflOldProtect = PAGE_EXECUTE_READWRITE;
#ifdef MADV_DONTDUMP
// Include or exclude memory from coredump based on the protection.
return bRetVal;
}
+#if defined(HOST_OSX) && defined(HOST_ARM64)
+PALAPI VOID PAL_JitWriteProtect(bool writeEnable)
+{
+ thread_local int enabledCount = 0;
+ if (writeEnable)
+ {
+ if (enabledCount++ == 0)
+ {
+ pthread_jit_write_protect_np(0);
+ }
+ }
+ else
+ {
+ if (--enabledCount == 0)
+ {
+ pthread_jit_write_protect_np(1);
+ }
+ _ASSERTE(enabledCount >= 0);
+ }
+}
+#endif // HOST_OSX && HOST_ARM64
+
#if HAVE_VM_ALLOCATE
//---------------------------------------------------------------------------------------
//
}
else
{
- /* Starting page. */
- SIZE_T Index = ( StartBoundary - pEntry->startBoundary ) / GetVirtualPageSize();
-
- /* Attributes to check for. */
- BYTE AccessProtection = pEntry->pProtectionState[ Index ];
- INT AllocationType = VIRTUALGetAllocationType( Index, pEntry );
- SIZE_T RegionSize = 0;
-
- TRACE( "Index = %d, Number of Pages = %d. \n",
- Index, pEntry->memSize / GetVirtualPageSize() );
-
- while ( Index < pEntry->memSize / GetVirtualPageSize() &&
- VIRTUALGetAllocationType( Index, pEntry ) == AllocationType &&
- pEntry->pProtectionState[ Index ] == AccessProtection )
- {
- RegionSize += GetVirtualPageSize();
- Index++;
- }
-
- TRACE( "RegionSize = %d.\n", RegionSize );
-
/* Fill the structure.*/
lpBuffer->AllocationProtect = pEntry->accessProtection;
lpBuffer->BaseAddress = (LPVOID)StartBoundary;
- lpBuffer->Protect = AllocationType == MEM_COMMIT ?
- VIRTUALConvertVirtualFlags( AccessProtection ) : 0;
-
- lpBuffer->RegionSize = RegionSize;
- lpBuffer->State =
- ( AllocationType == MEM_COMMIT ? MEM_COMMIT : MEM_RESERVE );
+ lpBuffer->Protect = pEntry->allocationType == MEM_COMMIT ?
+ pEntry->accessProtection : 0;
+ lpBuffer->RegionSize = pEntry->memSize;
+ lpBuffer->State = pEntry->allocationType == MEM_COMMIT ?
+ MEM_COMMIT : MEM_RESERVE;
WARN( "Ignoring lpBuffer->Type. \n" );
}
Function :
ReserveMemoryFromExecutableAllocator
- This function is used to reserve a region of virual memory (not commited)
+ This function is used to reserve a region of virual memory (not committed)
that is located close to the coreclr library. The memory comes from the virtual
address range that is managed by ExecutableMemoryAllocator.
--*/
void ExecutableMemoryAllocator::TryReserveInitialMemory()
{
CPalThread* pthrCurrent = InternalGetCurrentThread();
- int32_t sizeOfAllocation = MaxExecutableMemorySizeNearCoreClr;
int32_t preferredStartAddressIncrement;
UINT_PTR preferredStartAddress;
UINT_PTR coreclrLoadAddress;
- const int32_t MemoryProbingIncrement = 128 * 1024 * 1024;
+
+ int32_t sizeOfAllocation = MaxExecutableMemorySizeNearCoreClr;
+ int32_t initialReserveLimit = -1;
+ rlimit addressSpaceLimit;
+ if ((getrlimit(RLIMIT_AS, &addressSpaceLimit) == 0) && (addressSpaceLimit.rlim_cur != RLIM_INFINITY))
+ {
+ // By default reserve max 20% of the available virtual address space
+ rlim_t initialExecMemoryPerc = 20;
+ CLRConfigNoCache defInitialExecMemoryPerc = CLRConfigNoCache::Get("InitialExecMemoryPercent", /*noprefix*/ false, &getenv);
+ if (defInitialExecMemoryPerc.IsSet())
+ {
+ DWORD perc;
+ if (defInitialExecMemoryPerc.TryAsInteger(16, perc))
+ {
+ initialExecMemoryPerc = perc;
+ }
+ }
+
+ initialReserveLimit = addressSpaceLimit.rlim_cur * initialExecMemoryPerc / 100;
+ if (initialReserveLimit < sizeOfAllocation)
+ {
+ sizeOfAllocation = initialReserveLimit;
+ }
+ }
+#if defined(TARGET_ARM) || defined(TARGET_ARM64)
+ // Smaller steps on ARM because we try hard finding a spare memory in a 128Mb
+ // distance from coreclr so e.g. all calls from corelib to coreclr could use relocs
+ const int32_t AddressProbingIncrement = 8 * 1024 * 1024;
+#else
+ const int32_t AddressProbingIncrement = 128 * 1024 * 1024;
+#endif
+ const int32_t SizeProbingDecrement = 128 * 1024 * 1024;
// Try to find and reserve an available region of virtual memory that is located
// within 2GB range (defined by the MaxExecutableMemorySizeNearCoreClr constant) from the
{
// Try to allocate above the location of libcoreclr
preferredStartAddress = coreclrLoadAddress + CoreClrLibrarySize;
- preferredStartAddressIncrement = MemoryProbingIncrement;
+ preferredStartAddressIncrement = AddressProbingIncrement;
}
else
{
// Try to allocate below the location of libcoreclr
- preferredStartAddress = coreclrLoadAddress - MaxExecutableMemorySizeNearCoreClr;
+#if defined(TARGET_ARM) || defined(TARGET_ARM64)
+ // For arm for the "high address" case it only makes sense to try to reserve 128Mb
+ // and if it doesn't work - we'll reserve a full-sized region in a random location
+ sizeOfAllocation = SizeProbingDecrement;
+#endif
+
+ preferredStartAddress = coreclrLoadAddress - sizeOfAllocation;
preferredStartAddressIncrement = 0;
}
}
// Try to allocate a smaller region
- sizeOfAllocation -= MemoryProbingIncrement;
+ sizeOfAllocation -= SizeProbingDecrement;
preferredStartAddress += preferredStartAddressIncrement;
- } while (sizeOfAllocation >= MemoryProbingIncrement);
+ } while (sizeOfAllocation >= SizeProbingDecrement);
if (m_startAddress == nullptr)
{
// does not exceed approximately 2 GB.
// - The code heap allocator for the JIT can allocate from this address space. Beyond this reservation, one can use
// the DOTNET_CodeHeapReserveForJumpStubs environment variable to reserve space for jump stubs.
- sizeOfAllocation = MaxExecutableMemorySize;
+ sizeOfAllocation = (initialReserveLimit != -1) ? initialReserveLimit : MaxExecutableMemorySize;
m_startAddress = ReserveVirtualMemory(pthrCurrent, nullptr, sizeOfAllocation, MEM_RESERVE_EXECUTABLE);
if (m_startAddress == nullptr)
{
{
return 0;
}
- old_level = PtrToInt(pthread_getspecific(entry_level_key));
+ old_level = (int)(intptr_t)pthread_getspecific(entry_level_key);
if(-1 != new_level)
{
- if ((ret = pthread_setspecific(entry_level_key,(LPVOID)(IntToPtr(new_level)))) != 0)
+ if ((ret = pthread_setspecific(entry_level_key,(LPVOID)(intptr_t)new_level)) != 0)
{
fprintf(stderr, "ERROR : pthread_setspecific() failed "
"error:%d (%s)\n", ret, strerror(ret));
goto done;
}
- inBuff = (CHAR *)PAL_malloc(inBuffSize);
+ inBuff = (CHAR *)malloc(inBuffSize);
if (inBuff == nullptr)
{
ERROR("malloc failed\n");
if (nSize)
{
- outBuff = (CHAR *)PAL_malloc(nSize*2);
+ outBuff = (CHAR *)malloc(nSize*2);
if (outBuff == nullptr)
{
ERROR("malloc failed\n");
}
done:
- PAL_free(outBuff);
- PAL_free(inBuff);
+ free(outBuff);
+ free(inBuff);
LOGEXIT("GetEnvironmentVariableW returns DWORD 0x%x\n", size);
PERF_EXIT(GetEnvironmentVariableW);
goto done;
}
- name = (PCHAR)PAL_malloc(sizeof(CHAR)* nameSize);
+ name = (PCHAR)malloc(sizeof(CHAR)* nameSize);
if (name == nullptr)
{
ERROR("malloc failed\n");
goto done;
}
- value = (PCHAR)PAL_malloc(sizeof(CHAR)*valueSize);
+ value = (PCHAR)malloc(sizeof(CHAR)*valueSize);
if (value == nullptr)
{
bRet = SetEnvironmentVariableA(name, value);
done:
- PAL_free(value);
- PAL_free(name);
+ free(value);
+ free(name);
LOGEXIT("SetEnvironmentVariableW returning BOOL %d\n", bRet);
PERF_EXIT(SetEnvironmentVariableW);
envNum += len;
}
- wenviron = (WCHAR *)PAL_malloc(sizeof(WCHAR)* (envNum + 1));
+ wenviron = (WCHAR *)malloc(sizeof(WCHAR)* (envNum + 1));
if (wenviron == nullptr)
{
ERROR("malloc failed\n");
if (lpValue != nullptr)
{
- PAL_free(lpValue);
+ free(lpValue);
}
LOGEXIT("FreeEnvironmentStringW returning BOOL TRUE\n");
{
// All the conditions are met. Set the variable.
int iLen = strlen(lpName) + strlen(lpValue) + 2;
- LPSTR string = (LPSTR) PAL_malloc(iLen);
+ LPSTR string = (LPSTR) malloc(iLen);
if (string == nullptr)
{
bRet = FALSE;
sprintf_s(string, iLen, "%s=%s", lpName, lpValue);
nResult = EnvironPutenv(string, FALSE) ? 0 : -1;
- PAL_free(string);
+ free(string);
string = nullptr;
// If EnvironPutenv returns FALSE, it almost certainly failed to allocate memory.
SET_DEFAULT_DEBUG_CHANNEL(MISC);
-/*++
-Function:
- SetErrorMode
-
-The SetErrorMode function controls whether the system will handle the
-specified types of serious errors, or whether the process will handle
-them.
-
-Parameters
-
-uMode
- [in] Specifies the process error mode. This parameter can be one or more of the following values.
-
- Value Action
- 0 Use the system default, which is to display all error dialog boxes.
- SEM_FAILCRITICALERRORS The system does not display the critical-error-handler message box. Instead,
- the system sends the error to the calling process.
- SEM_NOOPENFILEERRORBOX The system does not display a message box when it fails to find a file. Instead,
- the error is returned to the calling process.
-
-Return Values
-
-The return value is the previous state of the error-mode bit flags.
-
---*/
-UINT
-PALAPI
-SetErrorMode(
- IN UINT uMode)
-{
- PERF_ENTRY(SetErrorMode);
- ENTRY("SetErrorMode (uMode=%#x)\n", uMode);
-
- LOGEXIT("SetErrorMode returns UINT 0\n");
- PERF_EXIT(SetErrorMode);
- return 0;
-}
-
-
/*++
Function:
GetLastError
ErrorString *stringEntry = (ErrorString *)bsearch(
&searchEntry,
palErrorStrings,
- ARRAY_SIZE(palErrorStrings),
+ sizeof(palErrorStrings) / sizeof(palErrorStrings[0]),
sizeof(ErrorString),
CompareErrorStrings);
#include "pal/module.h"
#include "pal/misc.h"
-#include "pal/printfcpp.hpp"
-
#include "errorstrings.h"
#include <stdarg.h>
allocChars = MAX_ERROR_STRING_LENGTH + 1;
}
- LPWSTR lpRetVal = (LPWSTR)PAL_malloc(allocChars * sizeof(WCHAR));
+ LPWSTR lpRetVal = (LPWSTR)malloc(allocChars * sizeof(WCHAR));
if (lpRetVal)
{
}
else
{
- swprintf_s(lpRetVal, MAX_ERROR_STRING_LENGTH, W("Error %u"), dwErrCode);
+ char errorString[sizeof("Error 4294967295")];
+ int cnt = sprintf_s(errorString, sizeof(errorString), "Error %u", dwErrCode);
+ cnt++; // +1 for null terminator
+
+ // Widening characters is okay here because they are the
+ // same in both char and WCHAR.
+ for (int i = 0; i < cnt; ++i)
+ lpRetVal[i] = (WCHAR)errorString[i];
}
}
else
FMTMSG__watoi
Converts a wide string repersentation of an integer number
- into a interger number.
+ into a integer number.
Returns a integer number, or 0 on failure. 0 is not a valid number
for FormatMessage inserts.
UINT NumOfBytes = 0; \
nSize *= 2; \
NumOfBytes = nSize * sizeof( WCHAR ); \
- lpTemp = static_cast<WCHAR *>( PAL_malloc( NumOfBytes ) ); \
+ lpTemp = static_cast<WCHAR *>( malloc( NumOfBytes ) ); \
TRACE( "Growing the buffer.\n" );\
\
if ( !lpTemp ) \
_ADD_TO_STRING( c );\
}
-
-/*++
-Function :
-
- FMTMSG_ProcessPrintf
-
- Processes the printf formatters based on the format.
-
- Returns the LPWSTR string, or NULL on failure.
-*/
-
-static LPWSTR FMTMSG_ProcessPrintf( WCHAR c ,
- LPWSTR lpPrintfString,
- LPWSTR lpInsertString)
-{
- LPWSTR lpBuffer = NULL;
- LPWSTR lpBuffer2 = NULL;
- LPWSTR lpFormat = NULL;
-#if _DEBUG
- // small size for _DEBUG to exercise buffer reallocation logic
- int tmpSize = 4;
-#else
- int tmpSize = 64;
-#endif
- UINT nFormatLength = 0;
- int nBufferLength = 0;
-
- TRACE( "FMTMSG_ProcessPrintf( %C, %S, %p )\n", c,
- lpPrintfString, lpInsertString );
-
- switch ( c )
- {
- case 'e' :
- /* Fall through */
- case 'E' :
- /* Fall through */
- case 'f' :
- /* Fall through */
- case 'g' :
- /* Fall through */
- case 'G' :
- ERROR( "%%%c is not supported by FormatMessage.\n", c );
- SetLastError( ERROR_INVALID_PARAMETER );
- return NULL;
- }
-
- nFormatLength = PAL_wcslen( lpPrintfString ) + 2; /* Need to count % AND NULL */
- lpFormat = (LPWSTR)PAL_malloc( nFormatLength * sizeof( WCHAR ) );
- if ( !lpFormat )
- {
- ERROR( "Unable to allocate memory.\n" );
- SetLastError( ERROR_NOT_ENOUGH_MEMORY );
- return NULL;
- }
- /* Create the format string. */
- memset( lpFormat, 0, nFormatLength * sizeof(WCHAR) );
- *lpFormat = '%';
-
- PAL_wcscat( lpFormat, lpPrintfString );
-
- lpBuffer = (LPWSTR) PAL_malloc(tmpSize*sizeof(WCHAR));
-
- /* try until the buffer is big enough */
- while (TRUE)
- {
- if (!lpBuffer)
- {
- ERROR("Unable to allocate memory\n");
- SetLastError( ERROR_NOT_ENOUGH_MEMORY );
- PAL_free(lpFormat);
- return NULL;
- }
- nBufferLength = _snwprintf_s( lpBuffer, tmpSize, tmpSize,
- lpFormat, lpInsertString);
-
- if ((nBufferLength >= 0) && (nBufferLength != tmpSize))
- {
- break; /* succeeded */
- }
- else
- {
- tmpSize *= 2;
- lpBuffer2 = static_cast<WCHAR *>(
- PAL_realloc(lpBuffer, tmpSize*sizeof(WCHAR)));
- if (lpBuffer2 == NULL)
- PAL_free(lpBuffer);
- lpBuffer = lpBuffer2;
- }
- }
-
- PAL_free( lpFormat );
- lpFormat = NULL;
-
- return lpBuffer;
-}
-
/*++
Function:
FormatMessageW
if ( !( dwFlags & FORMAT_MESSAGE_FROM_STRING ) &&
( dwLanguageId != 0) )
{
- ERROR( "Invalid language indentifier.\n" );
+ ERROR( "Invalid language identifier.\n" );
SetLastError( ERROR_RESOURCE_LANG_NOT_FOUND );
goto exit;
}
}
if ( !lpWorkingString )
{
- ERROR( "Invalid error indentifier.\n" );
+ ERROR( "Invalid error identifier.\n" );
SetLastError( ERROR_INVALID_ADDRESS );
}
goto exit;
}
lpWorkingString = static_cast<WCHAR *>(
- PAL_malloc( nSize * sizeof( WCHAR ) ) );
+ malloc( nSize * sizeof( WCHAR ) ) );
if ( !lpWorkingString )
{
ERROR( "Unable to allocate memory for the working string.\n" );
lpSourceString++;
if ( iswdigit( *lpSourceString ) )
{
- ERROR( "Invalid insert indentifier.\n" );
+ ERROR( "Invalid insert identifier.\n" );
SetLastError( ERROR_INVALID_PARAMETER );
lpWorkingString = NULL;
nCount = 0;
Index = FMTMSG__watoi( Number );
if ( Index == 0 )
{
- ERROR( "Invalid insert indentifier.\n" );
+ ERROR( "Invalid insert identifier.\n" );
SetLastError( ERROR_INVALID_PARAMETER );
lpWorkingString = NULL;
nCount = 0;
}
if ( *lpSourceString == '!' )
{
- LPWSTR lpInsertString = NULL;
- LPWSTR lpPrintfString = NULL;
- LPWSTR lpStartOfFormattedString = NULL;
- UINT nPrintfLength = 0;
- LPWSTR lpFormattedString = NULL;
- UINT nFormattedLength = 0;
-
- if ( !bIsVaList )
- {
- lpInsertString = ((LPWSTR*)Arguments)[ Index - 1 ];
- }
- else
- {
- va_list TheArgs;
-
- va_copy(TheArgs, *Arguments);
- UINT i = 0;
- for ( ; i < Index; i++ )
- {
- lpInsertString = va_arg( TheArgs, LPWSTR );
- }
- }
-
- /* Calculate the length, and extract the printf string.*/
- lpSourceString++;
- {
- LPWSTR p = PAL_wcschr( lpSourceString, '!' );
-
- if ( NULL == p )
- {
- nPrintfLength = 0;
- }
- else
- {
- nPrintfLength = p - lpSourceString;
- }
- }
-
- lpPrintfString =
- (LPWSTR)PAL_malloc( ( nPrintfLength + 1 ) * sizeof( WCHAR ) );
-
- if ( !lpPrintfString )
- {
- ERROR( "Unable to allocate memory.\n" );
- SetLastError( ERROR_NOT_ENOUGH_MEMORY );
- lpWorkingString = NULL;
- nCount = 0;
- goto exit;
- }
-
- PAL_wcsncpy( lpPrintfString, lpSourceString, nPrintfLength );
- *( lpPrintfString + nPrintfLength ) = '\0';
-
- lpStartOfFormattedString = lpFormattedString =
- FMTMSG_ProcessPrintf( *lpPrintfString,
- lpPrintfString,
- lpInsertString);
-
- if ( !lpFormattedString )
- {
- ERROR( "Unable to process the format string.\n" );
- /* Function will set the error code. */
- PAL_free( lpPrintfString );
- lpWorkingString = NULL;
- goto exit;
- }
-
-
- nFormattedLength = PAL_wcslen( lpFormattedString );
-
- /* Append the processed printf string into the working string */
- while ( *lpFormattedString )
- {
- _CHECKED_ADD_TO_STRING( *lpFormattedString );
- lpFormattedString++;
- }
+ ERROR( "Embedded printf formatting ('!<printf format>!') is unsupported\n" );
+ SetLastError( ERROR_INVALID_PARAMETER );
+ lpWorkingString = NULL;
+ nCount = 0;
+ goto exit;
+ }
- lpSourceString += nPrintfLength + 1;
- PAL_free( lpPrintfString );
- PAL_free( lpStartOfFormattedString );
- lpPrintfString = lpFormattedString = NULL;
+ LPWSTR lpInsert = NULL;
+ if ( !bIsVaList )
+ {
+ lpInsert = ((LPWSTR*)Arguments)[Index - 1];
}
else
{
- /* The printf format string defaults to 's'.*/
- LPWSTR lpInsert = NULL;
-
- if ( !bIsVaList )
- {
- lpInsert = ((LPWSTR*)Arguments)[Index - 1];
- }
- else
+ va_list TheArgs;
+ va_copy(TheArgs, *Arguments);
+ UINT i = 0;
+ for ( ; i < Index; i++ )
{
- va_list TheArgs;
- va_copy(TheArgs, *Arguments);
- UINT i = 0;
- for ( ; i < Index; i++ )
- {
- lpInsert = va_arg( TheArgs, LPWSTR );
- }
+ lpInsert = va_arg( TheArgs, LPWSTR );
}
+ }
- while ( *lpInsert )
- {
- _CHECKED_ADD_TO_STRING( *lpInsert );
- lpInsert++;
- }
+ while ( *lpInsert )
+ {
+ _CHECKED_ADD_TO_STRING( *lpInsert );
+ lpInsert++;
}
}
/* Format specifiers. */
#include <errno.h>
#include <unistd.h>
+#include <fcntl.h>
#include <time.h>
#include <pthread.h>
#include <dlfcn.h>
static const char URANDOM_DEVICE_NAME[]="/dev/urandom";
-/*++
-
-Function :
-
- PAL_GetPALDirectoryW
-
- Returns the fully qualified path name
- where the PALL DLL was loaded from.
-
- On failure it returns FALSE and sets the
- proper LastError code.
-
---*/
-BOOL
-PAL_GetPALDirectoryW(
- PathWCharString& lpDirectoryName)
-{
- LPCWSTR lpFullPathAndName = NULL;
- LPCWSTR lpEndPoint = NULL;
- BOOL bRet = FALSE;
-
- PERF_ENTRY(PAL_GetPALDirectoryW);
-
- MODSTRUCT *module = LOADGetPalLibrary();
- if (!module)
- {
- SetLastError(ERROR_INTERNAL_ERROR);
- goto EXIT;
- }
- lpFullPathAndName = module->lib_name;
- if (lpFullPathAndName == NULL)
- {
- SetLastError(ERROR_INTERNAL_ERROR);
- goto EXIT;
- }
- lpEndPoint = PAL_wcsrchr( lpFullPathAndName, '/' );
- if ( lpEndPoint )
- {
- /* The path that we return is required to have
- the trailing slash on the end.*/
- lpEndPoint++;
-
-
- if(!lpDirectoryName.Set(lpFullPathAndName,lpEndPoint - lpFullPathAndName))
- {
- ASSERT( "The buffer was not large enough.\n" );
- SetLastError( ERROR_INSUFFICIENT_BUFFER );
- goto EXIT;
- }
-
- bRet = TRUE;
- }
- else
- {
- ASSERT( "Unable to determine the path.\n" );
- /* Error path, should not be executed. */
- SetLastError( ERROR_INTERNAL_ERROR );
- }
-
-EXIT:
- PERF_EXIT(PAL_GetPALDirectoryW);
- return bRet;
-}
-
-BOOL
-PAL_GetPALDirectoryA(
- PathCharString& lpDirectoryName)
-{
- BOOL bRet;
- PathWCharString directory;
-
- PERF_ENTRY(PAL_GetPALDirectoryA);
-
- bRet = PAL_GetPALDirectoryW(directory);
-
- if (bRet)
- {
-
- int length = WideCharToMultiByte(CP_ACP, 0, directory.GetString(), -1, NULL, 0, NULL, 0);
- LPSTR DirectoryName = lpDirectoryName.OpenStringBuffer(length);
- if (NULL == DirectoryName)
- {
- SetLastError( ERROR_INSUFFICIENT_BUFFER );
- bRet = FALSE;
- }
-
- length = WideCharToMultiByte(CP_ACP, 0, directory.GetString(), -1, DirectoryName, length, NULL, 0);
-
- if (0 == length)
- {
- bRet = FALSE;
- length++;
- }
-
- lpDirectoryName.CloseBuffer(length - 1);
- }
-
- PERF_EXIT(PAL_GetPALDirectoryA);
- return bRet;
-}
-
-/*++
-
-Function :
-
- PAL_GetPALDirectoryW
-
- Returns the fully qualified path name
- where the PALL DLL was loaded from.
-
- On failure it returns FALSE and sets the
- proper LastError code.
-
-See rotor_pal.doc for more details.
-
---*/
-PALIMPORT
-BOOL
-PALAPI
-PAL_GetPALDirectoryW(
- OUT LPWSTR lpDirectoryName,
- IN OUT UINT* cchDirectoryName)
-{
- PathWCharString directory;
- BOOL bRet;
- PERF_ENTRY(PAL_GetPALDirectoryW);
- ENTRY( "PAL_GetPALDirectoryW( %p, %d )\n", lpDirectoryName, *cchDirectoryName );
-
- bRet = PAL_GetPALDirectoryW(directory);
-
- if (bRet) {
-
- if (directory.GetCount() > *cchDirectoryName)
- {
- SetLastError( ERROR_INSUFFICIENT_BUFFER );
- bRet = FALSE;
- }
- else
- {
- PAL_wcscpy(lpDirectoryName, directory.GetString());
- }
-
- *cchDirectoryName = directory.GetCount();
- }
-
- LOGEXIT( "PAL_GetPALDirectoryW returns BOOL %d.\n", bRet);
- PERF_EXIT(PAL_GetPALDirectoryW);
- return bRet;
-
-}
-
-PALIMPORT
-BOOL
-PALAPI
-PAL_GetPALDirectoryA(
- OUT LPSTR lpDirectoryName,
- IN OUT UINT* cchDirectoryName)
-{
- BOOL bRet;
- PathCharString directory;
-
- PERF_ENTRY(PAL_GetPALDirectoryA);
- ENTRY( "PAL_GetPALDirectoryA( %p, %d )\n", lpDirectoryName, *cchDirectoryName );
-
- bRet = PAL_GetPALDirectoryA(directory);
-
- if (bRet)
- {
- if (directory.GetCount() > *cchDirectoryName)
- {
- SetLastError( ERROR_INSUFFICIENT_BUFFER );
- bRet = FALSE;
- }
- else if (strcpy_s(lpDirectoryName, *cchDirectoryName, directory.GetString()) != SAFECRT_SUCCESS)
- {
- bRet = FALSE;
- }
-
- *cchDirectoryName = directory.GetCount();
- }
-
- LOGEXIT( "PAL_GetPALDirectoryA returns BOOL %d.\n", bRet);
- PERF_EXIT(PAL_GetPALDirectoryA);
- return bRet;
-}
-
VOID
PALAPI
PAL_Random(
_ASSERTE(psSource->GetMaxLength() > psSource->GetStringLength());
WCHAR *pwsz = reinterpret_cast<WCHAR*>(
- InternalMalloc(psSource->GetMaxLength() * sizeof(WCHAR))
+ malloc(psSource->GetMaxLength() * sizeof(WCHAR))
);
if (NULL != pwsz)
#include <sys/sysctl.h>
#endif
-#if HAVE_SYSINFO
-#include <sys/sysinfo.h>
-#endif
-
#include <sys/param.h>
#if HAVE_SYS_VMPARAM_H
#include <sys/vmparam.h>
#endif // HAVE_SYS_VMPARAM_H
-#if HAVE_XSWDEV
-#include <vm/vm_param.h>
-#endif // HAVE_XSWDEV
-
#if HAVE_MACH_VM_TYPES_H
#include <mach/vm_types.h>
#endif // HAVE_MACH_VM_TYPES_H
#include <algorithm>
-#if HAVE_SWAPCTL
-#include <sys/swap.h>
-#endif
-
SET_DEFAULT_DEBUG_CHANNEL(MISC);
#ifndef __APPLE__
LOGEXIT("GetSystemInfo returns VOID\n");
PERF_EXIT(GetSystemInfo);
}
-
-// Get memory size multiplier based on the passed in units (k = kilo, m = mega, g = giga)
-static uint64_t GetMemorySizeMultiplier(char units)
-{
- switch(units)
- {
- case 'g':
- case 'G': return 1024 * 1024 * 1024;
- case 'm':
- case 'M': return 1024 * 1024;
- case 'k':
- case 'K': return 1024;
- }
-
- // No units multiplier
- return 1;
-}
-
-#ifndef __APPLE__
-// Try to read the MemAvailable entry from /proc/meminfo.
-// Return true if the /proc/meminfo existed, the entry was present and we were able to parse it.
-static bool ReadMemAvailable(uint64_t* memAvailable)
-{
- bool foundMemAvailable = false;
- FILE* memInfoFile = fopen("/proc/meminfo", "r");
- if (memInfoFile != NULL)
- {
- char *line = nullptr;
- size_t lineLen = 0;
-
- while (getline(&line, &lineLen, memInfoFile) != -1)
- {
- char units = '\0';
- uint64_t available;
- int fieldsParsed = sscanf(line, "MemAvailable: %" SCNu64 " %cB", &available, &units);
-
- if (fieldsParsed >= 1)
- {
- uint64_t multiplier = GetMemorySizeMultiplier(units);
- *memAvailable = available * multiplier;
- foundMemAvailable = true;
- break;
- }
- }
-
- free(line);
- fclose(memInfoFile);
- }
-
- return foundMemAvailable;
-}
-#endif // __APPLE__
-
-/*++
-Function:
- GlobalMemoryStatusEx
-
-GlobalMemoryStatusEx
-
-Retrieves information about the system's current usage of both physical and virtual memory.
-
-Return Values
-
-This function returns a BOOL to indicate its success status.
-
---*/
-BOOL
-PALAPI
-GlobalMemoryStatusEx(
- IN OUT LPMEMORYSTATUSEX lpBuffer)
-{
-
- PERF_ENTRY(GlobalMemoryStatusEx);
- ENTRY("GlobalMemoryStatusEx (lpBuffer=%p)\n", lpBuffer);
-
- lpBuffer->dwMemoryLoad = 0;
- lpBuffer->ullTotalPhys = 0;
- lpBuffer->ullAvailPhys = 0;
- lpBuffer->ullTotalPageFile = 0;
- lpBuffer->ullAvailPageFile = 0;
- lpBuffer->ullTotalVirtual = 0;
- lpBuffer->ullAvailVirtual = 0;
- lpBuffer->ullAvailExtendedVirtual = 0;
-
- BOOL fRetVal = FALSE;
- int rc;
-
- // Get the physical memory size
-#if HAVE_SYSCONF && HAVE__SC_PHYS_PAGES
- int64_t physical_memory;
-
- // Get the Physical memory size
- physical_memory = sysconf( _SC_PHYS_PAGES ) * sysconf( _SC_PAGE_SIZE );
- lpBuffer->ullTotalPhys = (DWORDLONG)physical_memory;
- fRetVal = TRUE;
-#elif HAVE_SYSCTL
- int64_t physical_memory;
- size_t length;
- // Get the Physical memory size
- int mib[] = { CTL_HW, HW_MEMSIZE };
- length = sizeof(INT64);
- rc = sysctl(mib, 2, &physical_memory, &length, NULL, 0);
- if (rc != 0)
- {
- ASSERT("sysctl failed for HW_MEMSIZE (%d)\n", errno);
- }
- else
- {
- lpBuffer->ullTotalPhys = (DWORDLONG)physical_memory;
- fRetVal = TRUE;
- }
-
-#endif // HAVE_SYSCTL
-
- // Get swap file size, consider the ability to get the values optional
- // (don't return FALSE from the GlobalMemoryStatusEx)
-#if HAVE_XSW_USAGE
- // This is available on OSX
- struct xsw_usage xsu;
- int mib[] = { CTL_HW, VM_SWAPUSAGE };
- size_t length = sizeof(xsu);
- rc = sysctl(mib, 2, &xsu, &length, NULL, 0);
- if (rc == 0)
- {
- lpBuffer->ullTotalPageFile = xsu.xsu_total;
- lpBuffer->ullAvailPageFile = xsu.xsu_avail;
- }
-#elif HAVE_XSWDEV
- // E.g. FreeBSD
- struct xswdev xsw;
- int mib[3];
- size_t length = 2;
- rc = sysctlnametomib("vm.swap_info", mib, &length);
- if (rc == 0)
- {
- int pagesize = getpagesize();
- // Aggregate the information for all swap files on the system
- for (mib[2] = 0; ; mib[2]++)
- {
- length = sizeof(xsw);
- rc = sysctl(mib, 3, &xsw, &length, NULL, 0);
- if ((rc < 0) || (xsw.xsw_version != XSWDEV_VERSION))
- {
- // All the swap files were processed or coreclr was built against
- // a version of headers not compatible with the current XSWDEV_VERSION.
- break;
- }
-
- DWORDLONG avail = xsw.xsw_nblks - xsw.xsw_used;
- lpBuffer->ullTotalPageFile += (DWORDLONG)xsw.xsw_nblks * pagesize;
- lpBuffer->ullAvailPageFile += (DWORDLONG)avail * pagesize;
- }
- }
-#elif HAVE_SWAPCTL
- struct anoninfo ai;
- if (swapctl(SC_AINFO, &ai) != -1)
- {
- int pagesize = getpagesize();
- lpBuffer->ullTotalPageFile = ai.ani_max * pagesize;
- lpBuffer->ullAvailPageFile = ai.ani_free * pagesize;
- }
-#elif HAVE_SYSINFO
- // Linux
- struct sysinfo info;
- rc = sysinfo(&info);
- if (rc == 0)
- {
- lpBuffer->ullTotalPageFile = info.totalswap;
- lpBuffer->ullAvailPageFile = info.freeswap;
-#if HAVE_SYSINFO_WITH_MEM_UNIT
- // A newer version of the sysinfo structure represents all the sizes
- // in mem_unit instead of bytes
- lpBuffer->ullTotalPageFile *= info.mem_unit;
- lpBuffer->ullAvailPageFile *= info.mem_unit;
-#endif // HAVE_SYSINFO_WITH_MEM_UNIT
- }
-#endif // HAVE_SYSINFO
-
- // Get the physical memory in use - from it, we can get the physical memory available.
- // We do this only when we have the total physical memory available.
- if (lpBuffer->ullTotalPhys > 0)
- {
-#ifndef __APPLE__
- static volatile bool tryReadMemInfo = true;
-
- if (tryReadMemInfo)
- {
- // Ensure that we don't try to read the /proc/meminfo in successive calls to the GlobalMemoryStatusEx
- // if we have failed to access the file or the file didn't contain the MemAvailable value.
- tryReadMemInfo = ReadMemAvailable(&lpBuffer->ullAvailPhys);
- }
-
- if (!tryReadMemInfo)
- {
- // The /proc/meminfo doesn't exist or it doesn't contain the MemAvailable row or the format of the row is invalid
- // Fall back to getting the available pages using sysconf.
- lpBuffer->ullAvailPhys = sysconf(SYSCONF_PAGES) * sysconf(_SC_PAGE_SIZE);
- }
-
- INT64 used_memory = lpBuffer->ullTotalPhys - lpBuffer->ullAvailPhys;
- lpBuffer->dwMemoryLoad = (DWORD)((used_memory * 100) / lpBuffer->ullTotalPhys);
-#else
- vm_size_t page_size;
- mach_port_t mach_port;
- mach_msg_type_number_t count;
- vm_statistics_data_t vm_stats;
- mach_port = mach_host_self();
- count = sizeof(vm_stats) / sizeof(natural_t);
- if (KERN_SUCCESS == host_page_size(mach_port, &page_size))
- {
- if (KERN_SUCCESS == host_statistics(mach_port, HOST_VM_INFO, (host_info_t)&vm_stats, &count))
- {
- lpBuffer->ullAvailPhys = (int64_t)vm_stats.free_count * (int64_t)page_size;
- INT64 used_memory = ((INT64)vm_stats.active_count + (INT64)vm_stats.inactive_count + (INT64)vm_stats.wire_count) * (INT64)page_size;
- lpBuffer->dwMemoryLoad = (DWORD)((used_memory * 100) / lpBuffer->ullTotalPhys);
- }
- }
- mach_port_deallocate(mach_task_self(), mach_port);
-#endif // __APPLE__
- }
-
-#ifndef TARGET_RISCV64
- // There is no API to get the total virtual address space size on
- // Unix, so we use a constant value representing 128TB, which is
- // the approximate size of total user virtual address space on
- // the currently supported Unix systems.
- static const UINT64 VMSize = (1ull << 47);
-#else // TARGET_RISCV64
- // For RISC-V Linux Kernel SV39 virtual memory limit is 256gb.
- static const UINT64 VMSize = (1ull << 38);
-#endif // TARGET_RISCV64
- lpBuffer->ullTotalVirtual = VMSize;
- lpBuffer->ullAvailVirtual = lpBuffer->ullAvailPhys;
-
- LOGEXIT("GlobalMemoryStatusEx returns %d\n", fRetVal);
- PERF_EXIT(GlobalMemoryStatusEx);
-
- return fRetVal;
-}
-
-PALIMPORT
-DWORD
-PALAPI
-GetCurrentProcessorNumber()
-{
-#if HAVE_SCHED_GETCPU
- return sched_getcpu();
-#else //HAVE_SCHED_GETCPU
- return -1;
-#endif //HAVE_SCHED_GETCPU
-}
-
-BOOL
-PALAPI
-PAL_HasGetCurrentProcessorNumber()
-{
- return HAVE_SCHED_GETCPU;
-}
-
-bool
-ReadMemoryValueFromFile(const char* filename, uint64_t* val)
-{
- bool result = false;
- char *line = nullptr;
- size_t lineLen = 0;
- char* endptr = nullptr;
- uint64_t num = 0, multiplier;
-
- if (val == nullptr)
- return false;
-
- FILE* file = fopen(filename, "r");
- if (file == nullptr)
- goto done;
-
- if (getline(&line, &lineLen, file) == -1)
- goto done;
-
- errno = 0;
- num = strtoull(line, &endptr, 0);
- if (errno != 0)
- goto done;
-
- multiplier = GetMemorySizeMultiplier(*endptr);
- *val = num * multiplier;
- result = true;
- if (*val/multiplier != num)
- result = false;
-done:
- if (file)
- fclose(file);
- free(line);
- return result;
-}
-
-size_t
-PALAPI
-PAL_GetLogicalProcessorCacheSizeFromOS()
-{
- size_t cacheSize = 0;
-
-#ifdef _SC_LEVEL1_DCACHE_SIZE
- cacheSize = std::max(cacheSize, (size_t)sysconf(_SC_LEVEL1_DCACHE_SIZE));
-#endif
-#ifdef _SC_LEVEL2_CACHE_SIZE
- cacheSize = std::max(cacheSize, (size_t)sysconf(_SC_LEVEL2_CACHE_SIZE));
-#endif
-#ifdef _SC_LEVEL3_CACHE_SIZE
- cacheSize = std::max(cacheSize, (size_t)sysconf(_SC_LEVEL3_CACHE_SIZE));
-#endif
-#ifdef _SC_LEVEL4_CACHE_SIZE
- cacheSize = std::max(cacheSize, (size_t)sysconf(_SC_LEVEL4_CACHE_SIZE));
-#endif
-
-#if defined(TARGET_LINUX) && !defined(HOST_ARM) && !defined(HOST_X86)
- if (cacheSize == 0)
- {
- //
- // Fallback to retrieve cachesize via /sys/.. if sysconf was not available
- // for the platform. Currently musl and arm64 should be only cases to use
- // this method to determine cache size.
- //
- size_t size;
-
- if(ReadMemoryValueFromFile("/sys/devices/system/cpu/cpu0/cache/index0/size", &size))
- cacheSize = std::max(cacheSize, size);
- if(ReadMemoryValueFromFile("/sys/devices/system/cpu/cpu0/cache/index1/size", &size))
- cacheSize = std::max(cacheSize, size);
- if(ReadMemoryValueFromFile("/sys/devices/system/cpu/cpu0/cache/index2/size", &size))
- cacheSize = std::max(cacheSize, size);
- if(ReadMemoryValueFromFile("/sys/devices/system/cpu/cpu0/cache/index3/size", &size))
- cacheSize = std::max(cacheSize, size);
- if(ReadMemoryValueFromFile("/sys/devices/system/cpu/cpu0/cache/index4/size", &size))
- cacheSize = std::max(cacheSize, size);
- }
-#endif
-
-#if defined(HOST_ARM64) && !defined(TARGET_OSX)
- if (cacheSize == 0)
- {
- // It is currently expected to be missing cache size info
- //
- // _SC_LEVEL*_*CACHE_SIZE is not yet present. Work is in progress to enable this for arm64
- //
- // /sys/devices/system/cpu/cpu*/cache/index*/ is also not yet present in most systems.
- // Arm64 patch is in Linux kernel tip.
- //
- // midr_el1 is available in "/sys/devices/system/cpu/cpu0/regs/identification/midr_el1",
- // but without an exhaustive list of ARM64 processors any decode of midr_el1
- // Would likely be incomplete
-
- // Published information on ARM64 architectures is limited.
- // If we use recent high core count chips as a guide for state of the art, we find
- // total L3 cache to be 1-2MB/core. As always, there are exceptions.
-
- // Estimate cache size based on CPU count
- // Assume lower core count are lighter weight parts which are likely to have smaller caches
- // Assume L3$/CPU grows linearly from 256K to 1.5M/CPU as logicalCPUs grows from 2 to 12 CPUs
- DWORD logicalCPUs = PAL_GetLogicalCpuCountFromOS();
-
- cacheSize = logicalCPUs*std::min(1536, std::max(256, (int)logicalCPUs*128))*1024;
- }
-#endif
-
-#if HAVE_SYSCTLBYNAME
- if (cacheSize == 0)
- {
- int64_t cacheSizeFromSysctl = 0;
- size_t sz = sizeof(cacheSizeFromSysctl);
- const bool success = false
- // macOS-arm64: Since macOS 12.0, Apple added ".perflevelX." to determinate cache sizes for efficiency
- // and performance cores separetely. "perflevel0" stands for "performance"
- || sysctlbyname("hw.perflevel0.l2cachesize", &cacheSizeFromSysctl, &sz, nullptr, 0) == 0
- // macOS-arm64: these report cache sizes for efficiency cores only:
- || sysctlbyname("hw.l3cachesize", &cacheSizeFromSysctl, &sz, nullptr, 0) == 0
- || sysctlbyname("hw.l2cachesize", &cacheSizeFromSysctl, &sz, nullptr, 0) == 0
- || sysctlbyname("hw.l1dcachesize", &cacheSizeFromSysctl, &sz, nullptr, 0) == 0;
-
- if (success)
- {
- _ASSERTE(cacheSizeFromSysctl > 0);
- cacheSize = (size_t) cacheSizeFromSysctl;
- }
- }
-#endif
-
- return cacheSize;
-}
goto EXIT;
}
- lpSystemTime->wYear = 1900 + utPtr->tm_year;
- lpSystemTime->wMonth = utPtr->tm_mon + 1;
- lpSystemTime->wDayOfWeek = utPtr->tm_wday;
- lpSystemTime->wDay = utPtr->tm_mday;
- lpSystemTime->wHour = utPtr->tm_hour;
- lpSystemTime->wMinute = utPtr->tm_min;
- lpSystemTime->wSecond = utPtr->tm_sec;
+ lpSystemTime->wYear = (WORD)(1900 + utPtr->tm_year);
+ lpSystemTime->wMonth = (WORD)(utPtr->tm_mon + 1);
+ lpSystemTime->wDayOfWeek = (WORD)utPtr->tm_wday;
+ lpSystemTime->wDay = (WORD)utPtr->tm_mday;
+ lpSystemTime->wHour = (WORD)utPtr->tm_hour;
+ lpSystemTime->wMinute = (WORD)utPtr->tm_min;
+ lpSystemTime->wSecond = (WORD)utPtr->tm_sec;
if(-1 == timeofday_retval)
{
int old_seconds;
int new_seconds;
- lpSystemTime->wMilliseconds = timeval.tv_usec/tccMillieSecondsToMicroSeconds;
+ lpSystemTime->wMilliseconds = (WORD)(timeval.tv_usec/tccMillieSecondsToMicroSeconds);
old_seconds = utPtr->tm_sec;
new_seconds = timeval.tv_sec%60;
}
/* allocate required buffer */
- lpMultiByteStr = (LPSTR)PAL_malloc(length);
+ lpMultiByteStr = (LPSTR)malloc(length);
if(NULL == lpMultiByteStr)
{
ERROR("malloc() failed! errno is %d (%s)\n", errno,strerror(errno));
if(0 == length)
{
ASSERT("WCToMB error; GetLastError returns %#x\n", GetLastError());
- PAL_free(lpMultiByteStr);
+ free(lpMultiByteStr);
return NULL;
}
return lpMultiByteStr;
return NULL;
}
- lpWideCharStr = (LPWSTR)PAL_malloc(fullsize);
+ lpWideCharStr = (LPWSTR)malloc(fullsize);
if(NULL == lpWideCharStr)
{
ERROR("malloc() failed! errno is %d (%s)\n", errno,strerror(errno));
if(0 >= length)
{
ASSERT("MCToMB error; GetLastError returns %#x\n", GetLastError());
- PAL_free(lpWideCharStr);
+ free(lpWideCharStr);
return NULL;
}
return lpWideCharStr;
}
#endif // __APPLE__
+
+const char *GetFriendlyErrorCodeString(int errorCode)
+{
+#if HAVE_STRERRORNAME_NP
+ const char *error = strerrorname_np(errorCode);
+ if (error != nullptr)
+ {
+ return error;
+ }
+#else // !HAVE_STRERRORNAME_NP
+ switch (errorCode)
+ {
+ case EACCES: return "EACCES";
+ #if EAGAIN == EWOULDBLOCK
+ case EAGAIN: return "EAGAIN/EWOULDBLOCK";
+ #else
+ case EAGAIN: return "EAGAIN";
+ case EWOULDBLOCK: return "EWOULDBLOCK";
+ #endif
+ case EBADF: return "EBADF";
+ case EBUSY: return "EBUSY";
+ case EDQUOT: return "EDQUOT";
+ case EEXIST: return "EEXIST";
+ case EFAULT: return "EFAULT";
+ case EFBIG: return "EFBIG";
+ case EINVAL: return "EINVAL";
+ case EINTR: return "EINTR";
+ case EIO: return "EIO";
+ case EISDIR: return "EISDIR";
+ case ELOOP: return "ELOOP";
+ case EMFILE: return "EMFILE";
+ case EMLINK: return "EMLINK";
+ case ENAMETOOLONG: return "ENAMETOOLONG";
+ case ENFILE: return "ENFILE";
+ case ENODEV: return "ENODEV";
+ case ENOENT: return "ENOENT";
+ case ENOLCK: return "ENOLCK";
+ case ENOMEM: return "ENOMEM";
+ case ENOSPC: return "ENOSPC";
+ #if ENOTSUP == EOPNOTSUPP
+ case ENOTSUP: return "ENOTSUP/EOPNOTSUPP";
+ #else
+ case ENOTSUP: return "ENOTSUP";
+ case EOPNOTSUPP: return "EOPNOTSUPP";
+ #endif
+ case ENOTDIR: return "ENOTDIR";
+ case ENOTEMPTY: return "ENOTEMPTY";
+ case ENXIO: return "ENXIO";
+ case EOVERFLOW: return "EOVERFLOW";
+ case EPERM: return "EPERM";
+ case EROFS: return "EROFS";
+ case ETXTBSY: return "ETXTBSY";
+ case EXDEV: return "EXDEV";
+ }
+#endif // HAVE_STRERRORNAME_NP
+
+ return strerror(errorCode);
+}
if (0 != m_pot->GetImmutableDataSize())
{
- m_pvImmutableData = InternalMalloc(m_pot->GetImmutableDataSize());
+ m_pvImmutableData = malloc(m_pot->GetImmutableDataSize());
if (NULL != m_pvImmutableData)
{
ZeroMemory(m_pvImmutableData, m_pot->GetImmutableDataSize());
{
ERROR("Unable to allocate immutable data\n");
palError = ERROR_OUTOFMEMORY;
- goto IntializeExit;
+ goto InitializeExit;
}
}
if (NO_ERROR != palError)
{
ERROR("Unable to initialize local data lock!\n");
- goto IntializeExit;
+ goto InitializeExit;
}
- m_pvLocalData = InternalMalloc(m_pot->GetProcessLocalDataSize());
+ m_pvLocalData = malloc(m_pot->GetProcessLocalDataSize());
if (NULL != m_pvLocalData)
{
ZeroMemory(m_pvLocalData, m_pot->GetProcessLocalDataSize());
{
ERROR("Unable to allocate local data\n");
palError = ERROR_OUTOFMEMORY;
- goto IntializeExit;
+ goto InitializeExit;
}
}
palError = m_oa.sObjectName.CopyString(&poa->sObjectName);
}
-IntializeExit:
+InitializeExit:
LOGEXIT("CPalObjectBase::Initialize returns %d\n", palError);
// Allocate local memory to hold the shared data
//
- m_pvSharedData = InternalMalloc(m_pot->GetSharedDataSize());
+ m_pvSharedData = malloc(m_pot->GetSharedDataSize());
if (NULL == m_pvSharedData)
{
ERROR("Failure allocating m_pvSharedData (local copy)\n");
InitializeExit:
- LOGEXIT("CSharedMemoryObject::Initalize returns %d\n", palError);
+ LOGEXIT("CSharedMemoryObject::Initialize returns %d\n", palError);
return palError;
}
InitializeFromExistingSharedDataExit:
- LOGEXIT("CSharedMemoryObject::InitalizeFromExistingSharedData returns %d\n", palError);
+ LOGEXIT("CSharedMemoryObject::InitializeFromExistingSharedData returns %d\n", palError);
return palError;
}
LOGEXIT("CSharedMemoryObject::~CSharedMemoryObject\n");
}
-//
-// C++ standard, 18.1.5 - offsetof requires a POD (plain old data) struct or
-// union. Since offsetof is a macro, gcc doesn't actually check for improper
-// use of offsetof, it keys off of the -> from NULL (which is also invalid for
-// non-POD types by 18.1.5)
-//
-// As we have numerous examples of this behavior in our codebase,
-// making an offsetof which doesn't use 0.
-//
-// PAL_safe_offsetof is a version of offsetof that protects against an
-// overridden operator&
-//
-
-#define PAL_safe_offsetof(s,m) ((size_t)((ptrdiff_t)&(char&)(((s *)64)->m))-64)
-
/*++
Function:
CSharedMemoryObject::GetObjectFromListLink
//
pshmo = reinterpret_cast<CSharedMemoryObject*>(
- reinterpret_cast<size_t>(ple) - PAL_safe_offsetof(CSharedMemoryObject, m_le)
+ reinterpret_cast<size_t>(ple) - offsetof(CSharedMemoryObject, m_le)
);
_ASSERTE(ple == &pshmo->m_le);
#endif /* defined (_SYSCRT) && defined (HOST_64BIT) */
#if !defined (UNALIGNED)
-#if defined (_M_AMD64)
+#if defined (TARGET_AMD64)
#define UNALIGNED __unaligned
-#else /* defined (_M_AMD64) */
+#else /* defined (TARGET_AMD64) */
#define UNALIGNED
-#endif /* defined (_M_AMD64) */
+#endif /* defined (TARGET_AMD64) */
#endif /* !defined (UNALIGNED) */
-#ifdef _M_IX86
+#ifdef TARGET_X86
/*
* 386/486
*/
#define REG8
#define REG9
-#elif defined (_M_AMD64)
+#elif defined (TARGET_AMD64)
/*
* AMD64
*/
#define REG8 register
#define REG9 register
-#else /* defined (_M_AMD64) */
+#else /* defined (TARGET_AMD64) */
#pragma message ("Machine register set not defined")
#define REG8
#define REG9
-#endif /* defined (_M_AMD64) */
+#endif /* defined (TARGET_AMD64) */
/*
* Are the macro definitions below still needed in this file?
#define _INTEGRAL_MAX_BITS 64
#endif /* _INTEGRAL_MAX_BITS */
-// typedef __int64_t __int64;
-
#ifndef FALSE
#define FALSE 0
#endif
#define UNALIGNED
-#define _BEGIN_SECURE_CRT_DEPRECATION_DISABLE
-#define _END_SECURE_CRT_DEPRECATION_DISABLE
-
#define _CVTBUFSIZE (309+40) /* # of digits in max. dp value + slop */
#define _MBTOWC(x,y,z) _minimal_chartowchar( x, y )
#define _istspace(x) isspace((unsigned char)x)
-#define _malloc_crt PAL_malloc
-#define _realloc_crt PAL_realloc
-#define _free_crt PAL_free
+#define _malloc_crt malloc
+#define _realloc_crt realloc
+#define _free_crt free
#define _FASSIGN(flag, argument, number, dec_point, locale) _safecrt_fassign((flag), (argument), (number))
#define _WFASSIGN(flag, argument, number, dec_point, locale) _safecrt_wfassign((flag), (argument), (number))
#endif /* _UNICODE */
{
_TCHAR floatstring[_CVTBUFSIZE + 1];
- _TCHAR *pFloatStr = floatstring;
- size_t nFloatStrUsed = 0;
- size_t nFloatStrSz = ARRAY_SIZE(floatstring);
- int malloc_FloatStrFlag = 0;
+ _TCHAR *pFloatStr=floatstring;
+ size_t nFloatStrUsed=0;
+ size_t nFloatStrSz=sizeof(floatstring)/sizeof(floatstring[0]);
+ int malloc_FloatStrFlag=0;
unsigned long number; /* temp hold-value */
#if ALLOC_TABLE
break;
#if _INTEGRAL_MAX_BITS >= 64
+ case _T('z'):
case _T('I'):
if ( (*(format + 1) == _T('6')) &&
(*(format + 2) == _T('4')) )
(*(format + 1) == _T('x')) ||
(*(format + 1) == _T('X')) )
{
- if (sizeof(void*) == sizeof(__int64))
+ if (sizeof(void*) == sizeof(int64_t))
{
++integer64;
num64 = 0;
}
break;
}
- if (sizeof(void*) == sizeof(__int64))
+ if (sizeof(void*) == sizeof(int64_t))
{
++integer64;
num64 = 0;
} else
#else /* _UNICODE */
if (fl_wchar_arg) {
- *(char16_t UNALIGNED *)pointer = ch;
+ *(char16_t UNALIGNED *)pointer = (char16_t)ch;
pointer = (char16_t *)pointer + 1;
#ifdef _SECURE_SCANF
--array_width;
/* convert wide to multibyte */
if (array_width >= ((size_t)MB_CUR_MAX))
{
-_BEGIN_SECURE_CRT_DEPRECATION_DISABLE
temp = wctomb((char *)pointer, ch);
-_END_SECURE_CRT_DEPRECATION_DISABLE
}
else
{
char tmpbuf[MB_LEN_MAX];
-_BEGIN_SECURE_CRT_DEPRECATION_DISABLE
temp = wctomb(tmpbuf, ch);
-_END_SECURE_CRT_DEPRECATION_DISABLE
if (temp > 0 && ((size_t)temp) > array_width)
{
/* We have exhausted the user's buffer */
}
else
{
- // supress set, do nothing
+ // suppress set, do nothing
}
}
else
if (_ISXDIGIT(ch)) {
num64 <<= 4;
- ch = _hextodec(ch);
+ ch = _hextodec((_TCHAR)ch);
}
else
++done_flag;
} /* end of WHILE loop */
if (negative)
- num64 = (uint64_t )(-(__int64)num64);
+ num64 = (uint64_t )(-(int64_t)num64);
}
else {
#endif /* _INTEGRAL_MAX_BITS >= 64 */
if (_ISXDIGIT(ch)) {
number = (number << 4);
- ch = _hextodec(ch);
+ ch = _hextodec((_TCHAR)ch);
}
else
++done_flag;
assign_num:
#if _INTEGRAL_MAX_BITS >= 64
if ( integer64 )
- *(__int64 UNALIGNED *)pointer = ( uint64_t )num64;
+ *(int64_t UNALIGNED *)pointer = ( uint64_t )num64;
else
#endif /* _INTEGRAL_MAX_BITS >= 64 */
if (longone)
static void __cdecl _un_inc(int chr, miniFILE* fileptr)
{
if (_TEOF != chr) {
- _ungettc_nolock(chr,fileptr);
+ _ungettc_nolock((char)chr,fileptr);
}
}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/***
-*internal.h - contains declarations of internal routines and variables
-*
-
-*
-*Purpose:
-* Declares routines and variables used internally by the C run-time.
-*
-* [Internal]
-*
-****/
-
-#if _MSC_VER > 1000
-#pragma once
-#endif /* _MSC_VER > 1000 */
-
-#ifndef _INC_INTERNAL
-#define _INC_INTERNAL
-
-#include <crtdefs.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <cruntime.h>
-#include <limits.h>
-
-/*
- * Conditionally include windows.h to pick up the definition of
- * CRITICAL_SECTION.
- */
-#include <windows.h>
-
-#ifdef _MSC_VER
-#pragma pack(push,_CRT_PACKING)
-#endif /* _MSC_VER */
-
-/* Define function types used in several startup sources */
-
-typedef void (__cdecl *_PVFV)(void);
-typedef int (__cdecl *_PIFV)(void);
-typedef void (__cdecl *_PVFI)(int);
-
-#if _MSC_VER >= 1400 && defined(_M_CEE)
-typedef const void* (__clrcall *_PVFVM)(void);
-typedef int (__clrcall *_PIFVM)(void);
-typedef void (__clrcall *_CPVFV)(void);
-#endif /* _MSC_VER >= 1400 && defined(_M_CEE) */
-
-#if defined (_M_CEE_PURE) || (defined (_DLL) && defined (_M_IX86))
-/* Retained for compatibility with VC++ 5.0 and earlier versions */
-_CRTIMP int * __cdecl __p__commode(void);
-#endif /* defined (_M_CEE_PURE) || (defined (_DLL) && defined (_M_IX86)) */
-#if defined (SPECIAL_CRTEXE) && defined (_DLL)
- extern int _commode;
-#else /* defined (SPECIAL_CRTEXE) && defined (_DLL) */
-#ifndef _M_CEE_PURE
-_CRTIMP extern int _commode;
-#else /* _M_CEE_PURE */
-#define _commode (*__p___commode())
-#endif /* _M_CEE_PURE */
-#endif /* defined (SPECIAL_CRTEXE) && defined (_DLL) */
-
-#define __IOINFO_TM_ANSI 0 /* Regular Text */
-#define __IOINFO_TM_UTF8 1 /* UTF8 Encoded */
-#define __IOINFO_TM_UTF16LE 2 /* UTF16 Little Endian Encoded */
-
-/*
- * Control structure for lowio file handles
- */
-typedef struct {
- intptr_t osfhnd; /* underlying OS file HANDLE */
- char osfile; /* attributes of file (e.g., open in text mode?) */
- char pipech; /* one char buffer for handles opened on pipes */
- int lockinitflag;
- CRITICAL_SECTION lock;
-#ifndef _SAFECRT_IMPL
- /* Not used in the safecrt downlevel. We do not define them, so we cannot use them accidentally */
- char textmode : 7; /* __IOINFO_TM_ANSI or __IOINFO_TM_UTF8 or __IOINFO_TM_UTF16LE */
- char unicode : 1; /* Was the file opened as unicode? */
- char pipech2[2]; /* 2 more peak ahead chars for UNICODE mode */
-#endif /* _SAFECRT_IMPL */
- } ioinfo;
-
-/*
- * Definition of IOINFO_L2E, the log base 2 of the number of elements in each
- * array of ioinfo structs.
- */
-#define IOINFO_L2E 5
-
-/*
- * Definition of IOINFO_ARRAY_ELTS, the number of elements in ioinfo array
- */
-#define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E)
-
-/*
- * Definition of IOINFO_ARRAYS, maximum number of supported ioinfo arrays.
- */
-#define IOINFO_ARRAYS 64
-
-#define _NHANDLE_ (IOINFO_ARRAYS * IOINFO_ARRAY_ELTS)
-
-#define _TZ_STRINGS_SIZE 64
-
-/*
- * Access macros for getting at an ioinfo struct and its fields from a
- * file handle
- */
-#define _pioinfo(i) ( __pioinfo[(i) >> IOINFO_L2E] + ((i) & (IOINFO_ARRAY_ELTS - \
- 1)) )
-#define _osfhnd(i) ( _pioinfo(i)->osfhnd )
-
-#define _osfile(i) ( _pioinfo(i)->osfile )
-
-#define _pipech(i) ( _pioinfo(i)->pipech )
-
-#define _pipech2(i) ( _pioinfo(i)->pipech2 )
-
-#define _textmode(i) ( _pioinfo(i)->textmode )
-
-#define _tm_unicode(i) ( _pioinfo(i)->unicode )
-
-/*
- * Safer versions of the above macros. Currently, only _osfile_safe is
- * used.
- */
-#define _pioinfo_safe(i) ( (((i) != -1) && ((i) != -2)) ? _pioinfo(i) : &__badioinfo )
-
-#define _osfhnd_safe(i) ( _pioinfo_safe(i)->osfhnd )
-
-#define _osfile_safe(i) ( _pioinfo_safe(i)->osfile )
-
-#define _pipech_safe(i) ( _pioinfo_safe(i)->pipech )
-
-#define _pipech2_safe(i) ( _pioinfo_safe(i)->pipech2 )
-
-#ifdef _SAFECRT_IMPL
-/* safecrt does not have support for textmode, so we always return __IOINFO_TM_ANSI */
-#define _textmode_safe(i) __IOINFO_TM_ANSI
-#define _tm_unicode_safe(i) 0
-#else /* _SAFECRT_IMPL */
-#define _textmode_safe(i) ( _pioinfo_safe(i)->textmode )
-#define _tm_unicode_safe(i) ( _pioinfo_safe(i)->unicode )
-#endif /* _SAFECRT_IMPL */
-
-#ifndef _M_CEE_PURE
-#ifdef _SAFECRT_IMPL
-/* We need to get this from the downlevel DLL, even when we build safecrt.lib */
-extern __declspec(dllimport) ioinfo __badioinfo;
-extern __declspec(dllimport) ioinfo * __pioinfo[];
-#else /* _SAFECRT_IMPL */
-/*
- * Special, static ioinfo structure used only for more graceful handling
- * of a C file handle value of -1 (results from common errors at the stdio
- * level).
- */
-extern _CRTIMP ioinfo __badioinfo;
-
-/*
- * Array of arrays of control structures for lowio files.
- */
-extern _CRTIMP ioinfo * __pioinfo[];
-#endif /* _SAFECRT_IMPL */
-#endif /* _M_CEE_PURE */
-
-/*
- * Current number of allocated ioinfo structures (_NHANDLE_ is the upper
- * limit).
- */
-extern int _nhandle;
-
-int __cdecl _alloc_osfhnd(void);
-int __cdecl _free_osfhnd(int);
-int __cdecl _set_osfhnd(int, intptr_t);
-
-/*
- fileno for stdout, stdin & stderr when there is no console
-*/
-#define _NO_CONSOLE_FILENO (intptr_t)-2
-
-
-extern const char __dnames[];
-extern const char __mnames[];
-
-extern int _days[];
-extern int _lpdays[];
-
-extern __time32_t __cdecl __loctotime32_t(int, int, int, int, int, int, int);
-extern __time64_t __cdecl __loctotime64_t(int, int, int, int, int, int, int);
-
-extern void __cdecl __tzset(void);
-
-extern int __cdecl _validdrive(unsigned);
-
-/*
- * If we are only interested in years between 1901 and 2099, we could use this:
- *
- * #define IS_LEAP_YEAR(y) (y % 4 == 0)
- */
-
-#define IS_LEAP_YEAR(y) (((y) % 4 == 0 && (y) % 100 != 0) || (y) % 400 == 0)
-
-/*
- * This variable is in the C start-up; the length must be kept synchronized
- * It is used by the *cenvarg.c modules
- */
-
-extern char _acfinfo[]; /* "_C_FILE_INFO=" */
-
-#define CFI_LENGTH 12 /* "_C_FILE_INFO" is 12 bytes long */
-
-
-/*
- * stdio internals
- */
-#ifndef _FILE_DEFINED
-struct _iobuf {
- char *_ptr;
- int _cnt;
- char *_base;
- int _flag;
- int _file;
- int _charbuf;
- int _bufsiz;
- char *_tmpfname;
- };
-typedef struct _iobuf FILE;
-#define _FILE_DEFINED
-#endif /* _FILE_DEFINED */
-
-#if !defined (_FILEX_DEFINED) && defined (_WINDOWS_)
-
-/*
- * Variation of FILE type used for the dynamically allocated portion of
- * __piob[]. For single thread, _FILEX is the same as FILE. For multithread
- * models, _FILEX has two fields: the FILE struct and the CRITICAL_SECTION
- * struct used to serialize access to the FILE.
- */
-
-typedef struct {
- FILE f;
- CRITICAL_SECTION lock;
- } _FILEX;
-
-
-#define _FILEX_DEFINED
-#endif /* !defined (_FILEX_DEFINED) && defined (_WINDOWS_) */
-
-/*
- * Number of entries supported in the array pointed to by __piob[]. That is,
- * the number of stdio-level files which may be open simultaneously. This
- * is normally set to _NSTREAM_ by the stdio initialization code.
- */
-extern int _nstream;
-
-/*
- * Pointer to the array of pointers to FILE/_FILEX structures that are used
- * to manage stdio-level files.
- */
-extern void **__piob;
-
-FILE * __cdecl _getstream(void);
-FILE * __cdecl _openfile(_In_z_ const char * _Filename, _In_z_ const char * _Mode, _In_ int _ShFlag, _Out_ FILE * _File);
-FILE * __cdecl _wopenfile(_In_z_ const char16_t * _Filename, _In_z_ const char16_t * _Mode, _In_ int _ShFlag, _Out_ FILE * _File);
-void __cdecl _getbuf(_Out_ FILE * _File);
-int __cdecl _filwbuf (__inout FILE * _File);
-int __cdecl _flswbuf(_In_ int _Ch, __inout FILE * _File);
-void __cdecl _freebuf(__inout FILE * _File);
-int __cdecl _stbuf(__inout FILE * _File);
-void __cdecl _ftbuf(int _Flag, __inout FILE * _File);
-
-#ifdef _SAFECRT_IMPL
-
-int __cdecl _output(__inout FILE * _File, _In_z_ __format_string const char *_Format, va_list _ArgList);
-int __cdecl _woutput(__inout FILE * _File, _In_z_ __format_string const char16_t *_Format, va_list _ArgList);
-int __cdecl _output_s(__inout FILE * _File, _In_z_ __format_string const char *_Format, va_list _ArgList);
-int __cdecl _output_p(__inout FILE * _File, _In_z_ __format_string const char *_Format, va_list _ArgList);
-int __cdecl _woutput_s(__inout FILE * _File, _In_z_ __format_string const char16_t *_Format, va_list _ArgList);
-int __cdecl _woutput_p(__inout FILE * _File, _In_z_ __format_string const char16_t *_Format, va_list _ArgList);
-typedef int (*OUTPUTFN)(FILE *, const char *, va_list);
-typedef int (*WOUTPUTFN)(FILE *, const char16_t *, va_list);
-
-#else /* _SAFECRT_IMPL */
-
-int __cdecl _output_l(__inout FILE * _File, _In_z_ __format_string const char *_Format, _In_opt_ _locale_t _Locale, va_list _ArgList);
-int __cdecl _woutput_l(__inout FILE * _File, _In_z_ __format_string const char16_t *_Format, _In_opt_ _locale_t _Locale, va_list _ArgList);
-int __cdecl _output_s_l(__inout FILE * _File, _In_z_ __format_string const char *_Format, _In_opt_ _locale_t _Locale, va_list _ArgList);
-int __cdecl _output_p_l(__inout FILE * _File, _In_z_ __format_string const char *_Format, _In_opt_ _locale_t _Locale, va_list _ArgList);
-int __cdecl _woutput_s_l(__inout FILE * _File, _In_z_ __format_string const char16_t *_Format, _In_opt_ _locale_t _Locale, va_list _ArgList);
-int __cdecl _woutput_p_l(__inout FILE * _File, _In_z_ __format_string const char16_t *_Format, _In_opt_ _locale_t _Locale, va_list _ArgList);
-typedef int (*OUTPUTFN)(__inout FILE * _File, const char *, _locale_t, va_list);
-typedef int (*WOUTPUTFN)(__inout FILE * _File, const char16_t *, _locale_t, va_list);
-
-#endif /* _SAFECRT_IMPL */
-
-#ifdef _SAFECRT_IMPL
-
-int __cdecl _input(_In_ FILE * _File, _In_z_ __format_string const unsigned char * _Format, va_list _ArgList);
-int __cdecl _winput(_In_ FILE * _File, _In_z_ __format_string const char16_t * _Format, va_list _ArgList);
-int __cdecl _input_s(_In_ FILE * _File, _In_z_ __format_string const unsigned char * _Format, va_list _ArgList);
-int __cdecl _winput_s(_In_ FILE * _File, _In_z_ __format_string const char16_t * _Format, va_list _ArgList);
-typedef int (*INPUTFN)(FILE *, const unsigned char *, va_list);
-typedef int (*WINPUTFN)(FILE *, const char16_t *, va_list);
-
-#else /* _SAFECRT_IMPL */
-
-int __cdecl _input_l(__inout FILE * _File, _In_z_ __format_string const unsigned char *, _In_opt_ _locale_t _Locale, va_list _ArgList);
-int __cdecl _winput_l(__inout FILE * _File, _In_z_ __format_string const char16_t *, _In_opt_ _locale_t _Locale, va_list _ArgList);
-int __cdecl _input_s_l(__inout FILE * _File, _In_z_ __format_string const unsigned char *, _In_opt_ _locale_t _Locale, va_list _ArgList);
-int __cdecl _winput_s_l(__inout FILE * _File, _In_z_ __format_string const char16_t *, _In_opt_ _locale_t _Locale, va_list _ArgList);
-typedef int (*INPUTFN)(FILE *, const unsigned char *, _locale_t, va_list);
-typedef int (*WINPUTFN)(FILE *, const char16_t *, _locale_t, va_list);
-
-#ifdef _UNICODE
-#define TINPUTFN WINPUTFN
-#else /* _UNICODE */
-#define TINPUTFN INPUTFN
-#endif /* _UNICODE */
-
-#endif /* _SAFECRT_IMPL */
-
-int __cdecl _flush(__inout FILE * _File);
-void __cdecl _endstdio(void);
-
-errno_t __cdecl _sopen_helper(_In_z_ const char * _Filename,
- _In_ int _OFlag, _In_ int _ShFlag, _In_ int _PMode,
- _Out_ int * _PFileHandle, int _BSecure);
-errno_t __cdecl _wsopen_helper(_In_z_ const char16_t * _Filename,
- _In_ int _OFlag, _In_ int _ShFlag, _In_ int _PMode,
- _Out_ int * _PFileHandle, int _BSecure);
-
-#ifndef CRTDLL
-extern int _cflush;
-#endif /* CRTDLL */
-
-extern unsigned int _tempoff;
-
-extern unsigned int _old_pfxlen;
-
-extern int _umaskval; /* the umask value */
-
-extern char _pipech[]; /* pipe lookahead */
-
-extern char _exitflag; /* callable termination flag */
-
-extern int _C_Termination_Done; /* termination done flag */
-
-char * __cdecl _getpath(_In_z_ const char * _Src, _Out_writes_z_(_SizeInChars) char * _Dst, _In_ size_t _SizeInChars);
-char16_t * __cdecl _wgetpath(_In_z_ const char16_t * _Src, _Out_writes_z_(_SizeInWords) char16_t * _Dst, _In_ size_t _SizeInWords);
-
-extern int _dowildcard; /* flag to enable argv[] wildcard expansion */
-
-#ifndef _PNH_DEFINED
-typedef int (__cdecl * _PNH)( size_t );
-#define _PNH_DEFINED
-#endif /* _PNH_DEFINED */
-
-#if _MSC_VER >= 1400 && defined(_M_CEE)
-#ifndef __MPNH_DEFINED
-typedef int (__clrcall * __MPNH)( size_t );
-#define __MPNH_DEFINED
-#endif /* __MPNH_DEFINED */
-#endif /* _MSC_VER >= 1400 && defined(_M_CEE) */
-
-
-/* calls the currently installed new handler */
-int __cdecl _callnewh(_In_ size_t _Size);
-
-extern int _newmode; /* malloc new() handler mode */
-
-/* pointer to initial environment block that is passed to [w]main */
-#ifndef _M_CEE_PURE
-extern _CRTIMP char16_t **__winitenv;
-extern _CRTIMP char **__initenv;
-#endif /* _M_CEE_PURE */
-
-/* _calloca helper */
-#define _calloca(count, size) ((count<=0 || size<=0 || ((((size_t)_HEAP_MAXREQ) / ((size_t)count)) < ((size_t)size)))? NULL : _malloca(count * size))
-
-/* startup set values */
-extern char *_aenvptr; /* environment ptr */
-extern char16_t *_wenvptr; /* wide environment ptr */
-
-/* command line */
-
-#if defined (_DLL)
-_CRTIMP char ** __cdecl __p__acmdln(void);
-_CRTIMP char16_t ** __cdecl __p__wcmdln(void);
-#endif /* defined (_DLL) */
-#ifndef _M_CEE_PURE
-_CRTIMP extern char *_acmdln;
-_CRTIMP extern char16_t *_wcmdln;
-#else /* _M_CEE_PURE */
-#define _acmdln (*__p__acmdln())
-#define _wcmdln (*__p__wcmdln())
-#endif /* _M_CEE_PURE */
-
-/*
- * prototypes for internal startup functions
- */
-int __cdecl _cwild(void); /* wild.c */
-int __cdecl _wcwild(void); /* wwild.c */
-int __cdecl _mtinit(void); /* tidtable.c */
-void __cdecl _mtterm(void); /* tidtable.c */
-int __cdecl _mtinitlocks(void); /* mlock.c */
-void __cdecl _mtdeletelocks(void); /* mlock.c */
-int __cdecl _mtinitlocknum(int); /* mlock.c */
-
-/* Wrapper for InitializeCriticalSection API, with default spin count */
-int __cdecl __crtInitCritSecAndSpinCount(PCRITICAL_SECTION, DWORD);
-#define _CRT_SPINCOUNT 4000
-
-/*
- * C source build only!!!!
- *
- * more prototypes for internal startup functions
- */
-void __cdecl _amsg_exit(int); /* crt0.c */
-void __cdecl __crtExitProcess(int); /* crt0dat.c */
-void __cdecl __crtCorExitProcess(int); /* crt0dat.c */
-void __cdecl __crtdll_callstaticterminators(void); /* crt0dat.c */
-
-/*
-_cinit now allows the caller to suppress floating point precision init
-This allows the DLLs that use the CRT to not initialise FP precision,
-allowing the EXE's setting to persist even when a DLL is loaded
-*/
-int __cdecl _cinit(int /* initFloatingPrecision */); /* crt0dat.c */
-void __cdecl __doinits(void); /* astart.asm */
-void __cdecl __doterms(void); /* astart.asm */
-void __cdecl __dopreterms(void); /* astart.asm */
-void __cdecl _FF_MSGBANNER(void);
-void __cdecl _fpmath(int /*initPrecision*/);
-void __cdecl _fpclear(void);
-void __cdecl _fptrap(void); /* crt0fp.c */
-int __cdecl _heap_init(int);
-void __cdecl _heap_term(void);
-void __cdecl _heap_abort(void);
-void __cdecl __initconin(void); /* initcon.c */
-void __cdecl __initconout(void); /* initcon.c */
-int __cdecl _ioinit(void); /* crt0.c, crtlib.c */
-void __cdecl _ioterm(void); /* crt0.c, crtlib.c */
-char * __cdecl _GET_RTERRMSG(int);
-void __cdecl _NMSG_WRITE(int);
-int __CRTDECL _setargv(void); /* setargv.c, stdargv.c */
-int __CRTDECL __setargv(void); /* stdargv.c */
-int __CRTDECL _wsetargv(void); /* wsetargv.c, wstdargv.c */
-int __CRTDECL __wsetargv(void); /* wstdargv.c */
-int __cdecl _setenvp(void); /* stdenvp.c */
-int __cdecl _wsetenvp(void); /* wstdenvp.c */
-void __cdecl __setmbctable(unsigned int); /* mbctype.c */
-
-#ifdef MRTDLL
-_MRTIMP int __cdecl _onexit_process(_CPVFV);
-_MRTIMP int __cdecl _onexit_app_domain(_CPVFV);
-#endif /* MRTDLL */
-
-#ifndef _MANAGED_MAIN
-int __CRTDECL main(_In_ int _Argc, _In_reads_z_(_Argc) char ** _Argv, _In_z_ char ** _Env);
-int __CRTDECL wmain(_In_ int _Argc, _In_reads_z_(_Argc) char16_t ** _Argv, _In_z_ char16_t ** _Env);
-#endif /* _MANAGED_MAIN */
-
-/* helper functions for wide/multibyte environment conversion */
-int __cdecl __mbtow_environ (void);
-int __cdecl __wtomb_environ (void);
-
-/* These two functions take a char ** for the environment option
- At some point during their execution, they take ownership of the
- memory block passed in using option. At this point, they
- NULL out the incoming char * / char16_t * to ensure there is no
- double-free
-*/
-int __cdecl __crtsetenv(_Outptr_opt_ char ** _POption, _In_ const int _Primary);
-int __cdecl __crtwsetenv(_Outptr_opt_ char16_t ** _POption, _In_ const int _Primary);
-
-#ifndef _M_CEE_PURE
-_CRTIMP extern void (__cdecl * _aexit_rtn)(int);
-#endif /* _M_CEE_PURE */
-
-#if defined (_DLL) || defined (CRTDLL)
-
-#ifndef _STARTUP_INFO_DEFINED
-typedef struct
-{
- int newmode;
-} _startupinfo;
-#define _STARTUP_INFO_DEFINED
-#endif /* _STARTUP_INFO_DEFINED */
-
-_CRTIMP int __cdecl __getmainargs(_Out_ int * _Argc, _Outptr_result_buffer_(*_Argc) char *** _Argv,
- _Outptr_opt_ char *** _Env, _In_ int _DoWildCard,
- _In_ _startupinfo * _StartInfo);
-
-_CRTIMP int __cdecl __wgetmainargs(_Out_ int * _Argc, _Outptr_result_buffer_(*_Argc)char16_t *** _Argv,
- _Outptr_opt_ char16_t *** _Env, _In_ int _DoWildCard,
- _In_ _startupinfo * _StartInfo);
-
-#endif /* defined (_DLL) || defined (CRTDLL) */
-
-/*
- * Prototype, variables and constants which determine how error messages are
- * written out.
- */
-#define _UNKNOWN_APP 0
-#define _CONSOLE_APP 1
-#define _GUI_APP 2
-
-extern int __app_type;
-
-#if !defined (_M_CEE_PURE)
-
-extern Volatile<void*> __native_startup_lock;
-
-#define __NO_REASON UINT_MAX
-extern Volatile<unsigned int> __native_dllmain_reason;
-extern Volatile<unsigned int> __native_vcclrit_reason;
-
-#if defined (__cplusplus)
-
-#pragma warning(push)
-#pragma warning(disable: 4483)
-#if _MSC_FULL_VER >= 140050415
-#define _NATIVE_STARTUP_NAMESPACE __identifier("<CrtImplementationDetails>")
-#else /* _MSC_FULL_VER >= 140050415 */
-#define _NATIVE_STARTUP_NAMESPACE __CrtImplementationDetails
-#endif /* _MSC_FULL_VER >= 140050415 */
-
-namespace _NATIVE_STARTUP_NAMESPACE
-{
- class NativeDll
- {
- private:
- static const unsigned int ProcessDetach = 0;
- static const unsigned int ProcessAttach = 1;
- static const unsigned int ThreadAttach = 2;
- static const unsigned int ThreadDetach = 3;
- static const unsigned int ProcessVerifier = 4;
-
- public:
-
- inline static bool IsInDllMain()
- {
- return (__native_dllmain_reason != __NO_REASON);
- }
-
- inline static bool IsInProcessAttach()
- {
- return (__native_dllmain_reason == ProcessAttach);
- }
-
- inline static bool IsInProcessDetach()
- {
- return (__native_dllmain_reason == ProcessDetach);
- }
-
- inline static bool IsInVcclrit()
- {
- return (__native_vcclrit_reason != __NO_REASON);
- }
-
- inline static bool IsSafeForManagedCode()
- {
- if (!IsInDllMain())
- {
- return true;
- }
-
- if (IsInVcclrit())
- {
- return true;
- }
-
- return !IsInProcessAttach() && !IsInProcessDetach();
- }
- };
-}
-#pragma warning(pop)
-
-#endif /* defined (__cplusplus) */
-
-#endif /* !defined (_M_CEE_PURE) */
-
-extern int __error_mode;
-
-_CRTIMP void __cdecl __set_app_type(int);
-#if defined (CRTDLL) && !defined (_SYSCRT)
-/*
- * All these function pointer are used for creating global state of CRT
- * functions. Either all of them will be set or all of them will be NULL
- */
-typedef void (__cdecl *_set_app_type_function)(int);
-typedef int (__cdecl *_get_app_type_function)();
-extern _set_app_type_function __set_app_type_server;
-extern _get_app_type_function __get_app_type_server;
-#endif /* defined (CRTDLL) && !defined (_SYSCRT) */
-
-/*
- * C source build only!!!!
- *
- * map Win32 errors into Xenix errno values -- for modules written in C
- */
-_CRTIMP void __cdecl _dosmaperr(unsigned long);
-extern int __cdecl _get_errno_from_oserr(unsigned long);
-
-/*
- * internal routines used by the exec/spawn functions
- */
-
-extern intptr_t __cdecl _dospawn(_In_ int _Mode, _In_opt_z_ const char * _Name, __inout_z char * _Cmd, _In_opt_z_ char * _Env);
-extern intptr_t __cdecl _wdospawn(_In_ int _Mode, _In_opt_z_ const char16_t * _Name, __inout_z char16_t * _Cmd, _In_opt_z_ char16_t * _Env);
-extern int __cdecl _cenvarg(_In_z_ const char * const * _Argv, _In_opt_z_ const char * const * _Env,
- _Outptr_opt_ char ** _ArgBlk, _Outptr_opt_ char ** _EnvBlk, _In_z_ const char *_Name);
-extern int __cdecl _wcenvarg(_In_z_ const char16_t * const * _Argv, _In_opt_z_ const char16_t * const * _Env,
- _Outptr_opt_ char16_t ** _ArgBlk, _Outptr_opt_ char16_t ** _EnvBlk, _In_z_ const char16_t * _Name);
-#ifndef _M_IX86
-extern char ** _capture_argv(_In_ va_list *, _In_z_ const char * _FirstArg, _Out_writes_z_(_MaxCount) char ** _Static_argv, _In_ size_t _MaxCount);
-extern char16_t ** _wcapture_argv(_In_ va_list *, _In_z_ const char16_t * _FirstArg, _Out_writes_z_(_MaxCount) char16_t ** _Static_argv, _In_ size_t _MaxCount);
-#endif /* _M_IX86 */
-
-/*
- * internal routine used by the abort
- */
-
-extern _PHNDLR __cdecl __get_sigabrt(void);
-
-/*
- * Type from ntdef.h
- */
-
-typedef LONG NTSTATUS;
-
-/*
- * Exception code used in _invalid_parameter
- */
-
-#ifndef STATUS_INVALID_PARAMETER
-#define STATUS_INVALID_PARAMETER ((NTSTATUS)0xC000000DL)
-#endif /* STATUS_INVALID_PARAMETER */
-
-/*
- * Exception code used for abort and _CALL_REPORTFAULT
- */
-
-#ifndef STATUS_FATAL_APP_EXIT
-#define STATUS_FATAL_APP_EXIT ((NTSTATUS)0x40000015L)
-#endif /* STATUS_FATAL_APP_EXIT */
-
-/*
- * Validate functions
- */
-#include <crtdbg.h> /* _ASSERTE */
-#include <errno.h>
-
-#define __STR2WSTR(str) L##str
-
-#define _STR2WSTR(str) __STR2WSTR(str)
-
-#define __FILEW__ _STR2WSTR(__FILE__)
-#define __FUNCTIONW__ _STR2WSTR(__FUNCTION__)
-
-/* We completely fill the buffer only in debug (see _SECURECRT__FILL_STRING
- * and _SECURECRT__FILL_BYTE macros).
- */
-#if !defined (_SECURECRT_FILL_BUFFER)
-#ifdef _DEBUG
-#define _SECURECRT_FILL_BUFFER 1
-#else /* _DEBUG */
-#define _SECURECRT_FILL_BUFFER 0
-#endif /* _DEBUG */
-#endif /* !defined (_SECURECRT_FILL_BUFFER) */
-
-#ifndef _SAFECRT_IMPL
-/* _invalid_parameter is already defined in safecrt.h and safecrt.lib */
-#if !defined (_NATIVE_char16_t_DEFINED) && defined (_M_CEE_PURE)
-extern "C++"
-#endif /* !defined (_NATIVE_char16_t_DEFINED) && defined (_M_CEE_PURE) */
-_CRTIMP
-#endif /* _SAFECRT_IMPL */
-void __cdecl _invalid_parameter(_In_opt_z_ const char16_t *, _In_opt_z_ const char16_t *, _In_opt_z_ const char16_t *, unsigned int, uintptr_t);
-
-#if !defined (_NATIVE_char16_t_DEFINED) && defined (_M_CEE_PURE)
-extern "C++"
-#endif /* !defined (_NATIVE_char16_t_DEFINED) && defined (_M_CEE_PURE) */
-_CRTIMP
-void __cdecl _invoke_watson(_In_opt_z_ const char16_t *, _In_opt_z_ const char16_t *, _In_opt_z_ const char16_t *, unsigned int, uintptr_t);
-
-#ifndef _DEBUG
-#if !defined (_NATIVE_char16_t_DEFINED) && defined (_M_CEE_PURE)
-extern "C++"
-#endif /* !defined (_NATIVE_char16_t_DEFINED) && defined (_M_CEE_PURE) */
-_CRTIMP
-void __cdecl _invalid_parameter_noinfo(void);
-#endif /* _DEBUG */
-
-/* Invoke Watson if _ExpressionError is not 0; otherwise simply return _EspressionError */
-__forceinline
-void _invoke_watson_if_error(
- errno_t _ExpressionError,
- const char16_t *_Expression,
- const char16_t *_Function,
- const char16_t *_File,
- unsigned int _Line,
- uintptr_t _Reserved
- )
-{
- if (_ExpressionError == 0)
- {
- return;
- }
- _invoke_watson(_Expression, _Function, _File, _Line, _Reserved);
-}
-
-/* Invoke Watson if _ExpressionError is not 0 and equal to _ErrorValue1 or _ErrorValue2; otherwise simply return _EspressionError */
-__forceinline
-errno_t _invoke_watson_if_oneof(
- errno_t _ExpressionError,
- errno_t _ErrorValue1,
- errno_t _ErrorValue2,
- const char16_t *_Expression,
- const char16_t *_Function,
- const char16_t *_File,
- unsigned int _Line,
- uintptr_t _Reserved
- )
-{
- if (_ExpressionError == 0 || (_ExpressionError != _ErrorValue1 && _ExpressionError != _ErrorValue2))
- {
- return _ExpressionError;
- }
- _invoke_watson(_Expression, _Function, _File, _Line, _Reserved);
- return _ExpressionError;
-}
-
-/*
- * Assert in debug builds.
- * set errno and return
- *
- */
-#ifdef _DEBUG
-#define _CALL_INVALID_PARAMETER_FUNC(funcname, expr) funcname(expr, __FUNCTIONW__, __FILEW__, __LINE__, 0)
-#define _INVOKE_WATSON_IF_ERROR(expr) _invoke_watson_if_error((expr), __STR2WSTR(#expr), __FUNCTIONW__, __FILEW__, __LINE__, 0)
-#define _INVOKE_WATSON_IF_ONEOF(expr, errvalue1, errvalue2) _invoke_watson_if_oneof(expr, (errvalue1), (errvalue2), __STR2WSTR(#expr), __FUNCTIONW__, __FILEW__, __LINE__, 0)
-#else /* _DEBUG */
-#define _CALL_INVALID_PARAMETER_FUNC(funcname, expr) funcname(NULL, NULL, NULL, 0, 0)
-#define _INVOKE_WATSON_IF_ERROR(expr) _invoke_watson_if_error(expr, NULL, NULL, NULL, 0, 0)
-#define _INVOKE_WATSON_IF_ONEOF(expr, errvalue1, errvalue2) _invoke_watson_if_oneof((expr), (errvalue1), (errvalue2), NULL, NULL, NULL, 0, 0)
-#endif /* _DEBUG */
-
-#define _INVALID_PARAMETER(expr) _CALL_INVALID_PARAMETER_FUNC(_invalid_parameter, expr)
-
-#define _VALIDATE_RETURN_VOID( expr, errorcode ) \
- { \
- int _Expr_val=!!(expr); \
- _ASSERT_EXPR( ( _Expr_val ), _CRT_WIDE(#expr) ); \
- if ( !( _Expr_val ) ) \
- { \
- errno = errorcode; \
- _INVALID_PARAMETER(_CRT_WIDE(#expr)); \
- return; \
- } \
- }
-
-/*
- * Assert in debug builds.
- * set errno and return value
- */
-
-#ifndef _VALIDATE_RETURN
-#define _VALIDATE_RETURN( expr, errorcode, retexpr ) \
- { \
- int _Expr_val=!!(expr); \
- _ASSERT_EXPR( ( _Expr_val ), _CRT_WIDE(#expr) ); \
- if ( !( _Expr_val ) ) \
- { \
- errno = errorcode; \
- _INVALID_PARAMETER(_CRT_WIDE(#expr) ); \
- return ( retexpr ); \
- } \
- }
-#endif /* _VALIDATE_RETURN */
-
-#ifndef _VALIDATE_RETURN_NOEXC
-#define _VALIDATE_RETURN_NOEXC( expr, errorcode, retexpr ) \
- { \
- if ( !(expr) ) \
- { \
- errno = errorcode; \
- return ( retexpr ); \
- } \
- }
-#endif /* _VALIDATE_RETURN_NOEXC */
-
-/*
- * Assert in debug builds.
- * set errno and set retval for later usage
- */
-
-#define _VALIDATE_SETRET( expr, errorcode, retval, retexpr ) \
- { \
- int _Expr_val=!!(expr); \
- _ASSERT_EXPR( ( _Expr_val ), _CRT_WIDE(#expr) ); \
- if ( !( _Expr_val ) ) \
- { \
- errno = errorcode; \
- _INVALID_PARAMETER(_CRT_WIDE(#expr)); \
- retval=( retexpr ); \
- } \
- }
-
-#define _CHECK_FH_RETURN( handle, errorcode, retexpr ) \
- { \
- if(handle == _NO_CONSOLE_FILENO) \
- { \
- errno = errorcode; \
- return ( retexpr ); \
- } \
- }
-
-/*
- We use _VALIDATE_STREAM_ANSI_RETURN to ensure that ANSI file operations(
- fprintf etc) aren't called on files opened as UNICODE. We do this check
- only if it's an actual FILE pointer & not a string
-*/
-
-#define _VALIDATE_STREAM_ANSI_RETURN( stream, errorcode, retexpr ) \
- { \
- FILE *_Stream=stream; \
- _VALIDATE_RETURN(( (_Stream->_flag & _IOSTRG) || \
- ( (_textmode_safe(_fileno(_Stream)) == __IOINFO_TM_ANSI) && \
- !_tm_unicode_safe(_fileno(_Stream)))), \
- errorcode, retexpr) \
- }
-
-/*
- We use _VALIDATE_STREAM_ANSI_SETRET to ensure that ANSI file operations(
- fprintf etc) aren't called on files opened as UNICODE. We do this check
- only if it's an actual FILE pointer & not a string. It doesn't actually return
- immediately
-*/
-
-#define _VALIDATE_STREAM_ANSI_SETRET( stream, errorcode, retval, retexpr) \
- { \
- FILE *_Stream=stream; \
- _VALIDATE_SETRET(( (_Stream->_flag & _IOSTRG) || \
- ( (_textmode_safe(_fileno(_Stream)) == __IOINFO_TM_ANSI) && \
- !_tm_unicode_safe(_fileno(_Stream)))), \
- errorcode, retval, retexpr) \
- }
-
-/*
- * Assert in debug builds.
- * Return value (do not set errno)
- */
-
-#define _VALIDATE_RETURN_NOERRNO( expr, retexpr ) \
- { \
- int _Expr_val=!!(expr); \
- _ASSERT_EXPR( ( _Expr_val ), _CRT_WIDE(#expr) ); \
- if ( !( _Expr_val ) ) \
- { \
- _INVALID_PARAMETER(_CRT_WIDE(#expr)); \
- return ( retexpr ); \
- } \
- }
-
-/*
- * Assert in debug builds.
- * set errno and return errorcode
- */
-
-#define _VALIDATE_RETURN_ERRCODE( expr, errorcode ) \
- { \
- int _Expr_val=!!(expr); \
- _ASSERT_EXPR( ( _Expr_val ), _CRT_WIDE(#expr) ); \
- if ( !( _Expr_val ) ) \
- { \
- errno = errorcode; \
- _INVALID_PARAMETER(_CRT_WIDE(#expr)); \
- return ( errorcode ); \
- } \
- }
-
-#define _VALIDATE_RETURN_ERRCODE_NOEXC( expr, errorcode ) \
- { \
- if (!(expr)) \
- { \
- errno = errorcode; \
- return ( errorcode ); \
- } \
- }
-
-#define _VALIDATE_CLEAR_OSSERR_RETURN( expr, errorcode, retexpr ) \
- { \
- int _Expr_val=!!(expr); \
- _ASSERT_EXPR( ( _Expr_val ), _CRT_WIDE(#expr) ); \
- if ( !( _Expr_val ) ) \
- { \
- _doserrno = 0L; \
- errno = errorcode; \
- _INVALID_PARAMETER(_CRT_WIDE(#expr) ); \
- return ( retexpr ); \
- } \
- }
-
-#define _CHECK_FH_CLEAR_OSSERR_RETURN( handle, errorcode, retexpr ) \
- { \
- if(handle == _NO_CONSOLE_FILENO) \
- { \
- _doserrno = 0L; \
- errno = errorcode; \
- return ( retexpr ); \
- } \
- }
-
-#define _VALIDATE_CLEAR_OSSERR_RETURN_ERRCODE( expr, errorcode ) \
- { \
- int _Expr_val=!!(expr); \
- _ASSERT_EXPR( ( _Expr_val ), _CRT_WIDE(#expr) ); \
- if ( !( _Expr_val ) ) \
- { \
- _doserrno = 0L; \
- errno = errorcode; \
- _INVALID_PARAMETER(_CRT_WIDE(#expr)); \
- return ( errorcode ); \
- } \
- }
-
-#define _CHECK_FH_CLEAR_OSSERR_RETURN_ERRCODE( handle, retexpr ) \
- { \
- if(handle == _NO_CONSOLE_FILENO) \
- { \
- _doserrno = 0L; \
- return ( retexpr ); \
- } \
- }
-
-#ifdef _DEBUG
-extern size_t __crtDebugFillThreshold;
-#endif /* _DEBUG */
-
-#if !defined (_SECURECRT_FILL_BUFFER_THRESHOLD)
-#ifdef _DEBUG
-#define _SECURECRT_FILL_BUFFER_THRESHOLD __crtDebugFillThreshold
-#else /* _DEBUG */
-#define _SECURECRT_FILL_BUFFER_THRESHOLD ((size_t)0)
-#endif /* _DEBUG */
-#endif /* !defined (_SECURECRT_FILL_BUFFER_THRESHOLD) */
-
-#if _SECURECRT_FILL_BUFFER
-#define _SECURECRT__FILL_STRING(_String, _Size, _Offset) \
- if ((_Size) != ((size_t)-1) && (_Size) != INT_MAX && \
- ((size_t)(_Offset)) < (_Size)) \
- { \
- memset((_String) + (_Offset), \
- _SECURECRT_FILL_BUFFER_PATTERN, \
- (_SECURECRT_FILL_BUFFER_THRESHOLD < ((size_t)((_Size) - (_Offset))) ? \
- _SECURECRT_FILL_BUFFER_THRESHOLD : \
- ((_Size) - (_Offset))) * sizeof(*(_String))); \
- }
-#else /* _SECURECRT_FILL_BUFFER */
-#define _SECURECRT__FILL_STRING(_String, _Size, _Offset)
-#endif /* _SECURECRT_FILL_BUFFER */
-
-#if _SECURECRT_FILL_BUFFER
-#define _SECURECRT__FILL_BYTE(_Position) \
- if (_SECURECRT_FILL_BUFFER_THRESHOLD > 0) \
- { \
- (_Position) = _SECURECRT_FILL_BUFFER_PATTERN; \
- }
-#else /* _SECURECRT_FILL_BUFFER */
-#define _SECURECRT__FILL_BYTE(_Position)
-#endif /* _SECURECRT_FILL_BUFFER */
-
-#ifdef __cplusplus
-#define _REDIRECT_TO_L_VERSION_FUNC_PROLOGUE extern "C"
-#else /* __cplusplus */
-#define _REDIRECT_TO_L_VERSION_FUNC_PROLOGUE
-#endif /* __cplusplus */
-
-/* helper macros to redirect an mbs function to the corresponding _l version */
-#define _REDIRECT_TO_L_VERSION_1(_ReturnType, _FunctionName, _Type1) \
- _REDIRECT_TO_L_VERSION_FUNC_PROLOGUE \
- _ReturnType __cdecl _FunctionName(_Type1 _Arg1) \
- { \
- return _FunctionName##_l(_Arg1, NULL); \
- }
-
-#define _REDIRECT_TO_L_VERSION_2(_ReturnType, _FunctionName, _Type1, _Type2) \
- _REDIRECT_TO_L_VERSION_FUNC_PROLOGUE \
- _ReturnType __cdecl _FunctionName(_Type1 _Arg1, _Type2 _Arg2) \
- { \
- return _FunctionName##_l(_Arg1, _Arg2, NULL); \
- }
-
-#define _REDIRECT_TO_L_VERSION_3(_ReturnType, _FunctionName, _Type1, _Type2, _Type3) \
- _REDIRECT_TO_L_VERSION_FUNC_PROLOGUE \
- _ReturnType __cdecl _FunctionName(_Type1 _Arg1, _Type2 _Arg2, _Type3 _Arg3) \
- { \
- return _FunctionName##_l(_Arg1, _Arg2, _Arg3, NULL); \
- }
-
-#define _REDIRECT_TO_L_VERSION_4(_ReturnType, _FunctionName, _Type1, _Type2, _Type3, _Type4) \
- _REDIRECT_TO_L_VERSION_FUNC_PROLOGUE \
- _ReturnType __cdecl _FunctionName(_Type1 _Arg1, _Type2 _Arg2, _Type3 _Arg3, _Type4 _Arg4) \
- { \
- return _FunctionName##_l(_Arg1, _Arg2, _Arg3, _Arg4, NULL); \
- }
-
-#define _REDIRECT_TO_L_VERSION_5(_ReturnType, _FunctionName, _Type1, _Type2, _Type3, _Type4, _Type5) \
- _REDIRECT_TO_L_VERSION_FUNC_PROLOGUE \
- _ReturnType __cdecl _FunctionName(_Type1 _Arg1, _Type2 _Arg2, _Type3 _Arg3, _Type4 _Arg4, _Type5 _Arg5) \
- { \
- return _FunctionName##_l(_Arg1, _Arg2, _Arg3, _Arg4, _Arg5, NULL); \
- }
-
-#define _REDIRECT_TO_L_VERSION_6(_ReturnType, _FunctionName, _Type1, _Type2, _Type3, _Type4, _Type5, _Type6) \
- _REDIRECT_TO_L_VERSION_FUNC_PROLOGUE \
- _ReturnType __cdecl _FunctionName(_Type1 _Arg1, _Type2 _Arg2, _Type3 _Arg3, _Type4 _Arg4, _Type5 _Arg5, _Type6 _Arg6) \
- { \
- return _FunctionName##_l(_Arg1, _Arg2, _Arg3, _Arg4, _Arg5, _Arg6, NULL); \
- }
-
-/* internal helper functions for encoding and decoding pointers */
-void __cdecl _init_pointers();
-_CRTIMP void * __cdecl _encode_pointer(void *);
-_CRTIMP void * __cdecl _encoded_null();
-_CRTIMP void * __cdecl _decode_pointer(void *);
-
-/* internal helper function for communicating with the debugger */
-BOOL DebuggerKnownHandle();
-
-/* Macros to simplify the use of Secure CRT in the CRT itself.
- * We should use [_BEGIN/_END]_SECURE_CRT_DEPRECATION_DISABLE sparingly.
- */
-#define _BEGIN_SECURE_CRT_DEPRECATION_DISABLE \
- __pragma(warning(push)) \
- __pragma(warning(disable:4996))
-
-#define _END_SECURE_CRT_DEPRECATION_DISABLE \
- __pragma(warning(pop))
-
-#define _ERRCHECK(e) \
- _INVOKE_WATSON_IF_ERROR(e)
-
-#define _ERRCHECK_EINVAL(e) \
- _INVOKE_WATSON_IF_ONEOF(e, EINVAL, EINVAL)
-
-#define _ERRCHECK_EINVAL_ERANGE(e) \
- _INVOKE_WATSON_IF_ONEOF(e, EINVAL, ERANGE)
-
-#define _ERRCHECK_SPRINTF(_PrintfCall) \
- { \
- errno_t _SaveErrno = errno; \
- errno = 0; \
- if ( ( _PrintfCall ) < 0) \
- { \
- _ERRCHECK_EINVAL_ERANGE(errno); \
- } \
- errno = _SaveErrno; \
- }
-
-/* internal helper function to access environment variable in read-only mode */
-const char16_t * __cdecl _wgetenv_helper_nolock(const char16_t *);
-const char * __cdecl _getenv_helper_nolock(const char *);
-
-/* internal helper routines used to query a PE image header. */
-BOOL __cdecl _ValidateImageBase(PBYTE pImageBase);
-PIMAGE_SECTION_HEADER __cdecl _FindPESection(PBYTE pImageBase, DWORD_PTR rva);
-BOOL __cdecl _IsNonwritableInCurrentImage(PBYTE pTarget);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#ifdef _MSC_VER
-#pragma pack(pop)
-#endif /* _MSC_VER */
-
-#endif /* _INC_INTERNAL */
#define _Out_writes_opt_z_(size)
/*
- * The original SafeCRT implemention allows runtime control over buffer checking.
+ * The original SafeCRT implementation allows runtime control over buffer checking.
* For now we'll key this off the debug flag.
*/
#ifdef _DEBUG
// The .NET Foundation licenses this file to you under the MIT license.
/***
-* mbusafecrt.c - implementaion of support functions and data for MBUSafeCRT
+* mbusafecrt.c - implementation of support functions and data for MBUSafeCRT
*
*
size_t sizeInBytes,
const void * src,
size_t count
-) THROW_DECL
+)
{
if (count == 0)
{
*
*******************************************************************************/
-
-//typedef __int64_t __int64;
-
-
#define FORMAT_VALIDATIONS
typedef double _CRT_DOUBLE;
-//typedef int* intptr_t;
-
/*
Buffer size required to be passed to _gcvt, fcvt and other fp conversion routines
*/
#define get_int_arg(list) va_arg(*list, int)
#define get_long_arg(list) va_arg(*list, long)
#define get_long_long_arg(list) va_arg(*list, long long)
-#define get_int64_arg(list) va_arg(*list, __int64)
+#define get_int64_arg(list) va_arg(*list, int64_t)
#define get_crtdouble_arg(list) va_arg(*list, _CRT_DOUBLE)
#define get_ptr_arg(list) va_arg(*list, void *)
#if _INTEGRAL_MAX_BITS >= 64
uint64_t number; /* number to convert */
int digit; /* ascii value of digit */
- __int64 l; /* temp long value */
+ int64_t l; /* temp long value */
#else /* _INTEGRAL_MAX_BITS >= 64 */
unsigned long number; /* number to convert */
int digit; /* ascii value of digit */
#define get_int_arg(list) va_arg(*list, int)
#define get_long_arg(list) va_arg(*list, long)
#define get_long_long_arg(list) va_arg(*list, long long)
-#define get_int64_arg(list) va_arg(*list, __int64)
+#define get_int64_arg(list) va_arg(*list, int64_t)
#define get_crtdouble_arg(list) va_arg(*list, _CRT_DOUBLE)
#define get_ptr_arg(list) va_arg(*list, void *)
// unsigned __int64 number; /* number to convert */
uint64_t number; /* number to convert */
int digit; /* ascii value of digit */
- __int64 l; /* temp long value */
+ int64_t l; /* temp long value */
#else /* _INTEGRAL_MAX_BITS >= 64 */
unsigned long number; /* number to convert */
int digit; /* ascii value of digit */
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/***
-*strlen_s.c - contains strnlen() routine
-*
-
-*
-*Purpose:
-* strnlen returns the length of a null-terminated string,
-* not including the null byte itself, up to the specified max size
-*
-*******************************************************************************/
-
-
-#include <string.h>
-#include <errno.h>
-#include <limits.h>
-#include "internal_securecrt.h"
-
-#include "mbusafecrt_internal.h"
-
-/***
-*strnlen - return the length of a null-terminated string
-*
-*Purpose:
-* Finds the length in bytes of the given string, not including
-* the final null character. Only the first maxsize characters
-* are inspected: if the null character is not found, maxsize is
-* returned.
-*
-*Entry:
-* const char * str - string whose length is to be computed
-* size_t maxsize
-*
-*Exit:
-* Length of the string "str", exclusive of the final null byte, or
-* maxsize if the null character is not found.
-*
-*Exceptions:
-*
-*******************************************************************************/
-
-size_t __cdecl PAL_strnlen(const char *str, size_t maxsize)
-{
- size_t n;
-
- /* Note that we do not check if str == NULL, because we do not
- * return errno_t...
- */
-
- for (n = 0; n < maxsize && *str; n++, str++)
- ;
-
- return n;
-}
-
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/***
-*strtok_s.c - tokenize a string with given delimiters
-*
-
-*
-*Purpose:
-* defines strtok_s() - breaks string into series of token
-* via repeated calls.
-*
-*******************************************************************************/
-
-#include <string.h>
-#include <errno.h>
-#include <limits.h>
-#include "internal_securecrt.h"
-
-#include "mbusafecrt_internal.h"
-
-#define _FUNC_PROLOGUE
-#define _FUNC_NAME strtok_s
-#define _CHAR char
-
-#include "tcstok_s.inl"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/***
-*tcstok_s.inl - general implementation of _tcstok_s
-*
-
-*
-*Purpose:
-* This file contains the general algorithm for strtok_s and its variants.
-*
-****/
-
-_FUNC_PROLOGUE
-_CHAR * __cdecl _FUNC_NAME(_CHAR *_String, const _CHAR *_Control, _CHAR **_Context)
-{
- _CHAR *token;
- const _CHAR *ctl;
-
- /* validation section */
- _VALIDATE_POINTER_ERROR_RETURN(_Context, EINVAL, NULL);
- _VALIDATE_POINTER_ERROR_RETURN(_Control, EINVAL, NULL);
- _VALIDATE_CONDITION_ERROR_RETURN(_String != NULL || *_Context != NULL, EINVAL, NULL);
-
- /* If string==NULL, continue with previous string */
- if (!_String)
- {
- _String = *_Context;
- }
-
- /* Find beginning of token (skip over leading delimiters). Note that
- * there is no token iff this loop sets string to point to the terminal null. */
- for ( ; *_String != 0 ; _String++)
- {
- for (ctl = _Control; *ctl != 0 && *ctl != *_String; ctl++)
- ;
- if (*ctl == 0)
- {
- break;
- }
- }
-
- token = _String;
-
- /* Find the end of the token. If it is not the end of the string,
- * put a null there. */
- for ( ; *_String != 0 ; _String++)
- {
- for (ctl = _Control; *ctl != 0 && *ctl != *_String; ctl++)
- ;
- if (*ctl != 0)
- {
- *_String++ = 0;
- break;
- }
- }
-
- /* Update the context */
- *_Context = _String;
-
- /* Determine if a token has been found. */
- if (token == _String)
- {
- return NULL;
- }
- else
- {
- return token;
- }
-}
} while (*p != 0);
p--;
- if (*p != _T('/') && *p != _T('\\'))
+ if (*p != '/')
{
if(++written >= _SIZE)
{
goto error_return;
}
- *d++ = _T('\\');
+ *d++ = '/';
}
}
tmp = _Path;
for (; *tmp != 0; ++tmp)
{
- if (*tmp == _T('/') || *tmp == _T('\\'))
+ if (*tmp == '/')
{
/* point to one beyond for later copy */
last_slash = tmp + 1;
goto error_erange;
}
_TCSNCPY_S(_Dir, _DirSize, _Path, length);
-
- // Normalize the path seperator
- size_t iIndex;
- for(iIndex = 0; iIndex < length; iIndex++)
- {
- if (_Dir[iIndex] == _T('\\'))
- {
- _Dir[iIndex] = _T('/');
- }
- }
}
_Path = last_slash;
}
#include <errno.h>
#include <limits.h>
#include "internal_securecrt.h"
-
#include "mbusafecrt_internal.h"
typedef int (*WOUTPUTFN)(miniFILE *, const char16_t *, va_list);
-static int _vswprintf_helper( WOUTPUTFN outfn, char16_t *string, size_t count, const char16_t *format, va_list ap );
+static int _vswprintf_helper(WOUTPUTFN outfn, char16_t *string, size_t count, const char16_t *format, va_list ap);
/***
*int vswprintf_s(string, sizeInWords, format, ap) - print formatted data to string from arg ptr
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+/***
+*wcslwr_s.cpp - contains _wcslwr_s() routine
+*
+*
+*Purpose:
+* _wcslwr_s converts, in place, any upper case letters in input string to
+* lowercase.
+*
+*******************************************************************************/
+
+#include <string.h>
+#include <errno.h>
+#include <limits.h>
+#include <minipal/strings.h>
+#include "internal_securecrt.h"
+
+#include "mbusafecrt_internal.h"
+
+DLLEXPORT errno_t __cdecl _wcslwr_s(char16_t *string, size_t sz)
+{
+ _VALIDATE_RETURN_ERRCODE(string != NULL, EINVAL);
+ size_t length = PAL_wcsnlen(string, sz);
+ if (length >= sz)
+ {
+ _RETURN_DEST_NOT_NULL_TERMINATED(string, sz);
+ }
+
+ for (int i = 0; string[i] != 0; i++)
+ {
+ string[i] = (char16_t)minipal_tolower_invariant(string[i]);
+ }
+
+ _FILL_STRING(string, sz, length + 1);
+
+ return 0;
+}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/***
-*wcstok_s.c - tokenize a wide-character string with given delimiters
-*
-
-*
-*Purpose:
-* defines wcstok_s() - breaks wide-character string into series of token
-* via repeated calls.
-*
-*******************************************************************************/
-
-#include <string.h>
-#include <errno.h>
-#include <limits.h>
-#include "internal_securecrt.h"
-
-#include "mbusafecrt_internal.h"
-
-#define _FUNC_PROLOGUE
-#define _FUNC_NAME wcstok_s
-#define _CHAR char16_t
-
-#include "tcstok_s.inl"
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-/***
-*wsplitpath_s.c - break down path name into components
-*
-
-*
-*Purpose:
-* To provide support for accessing the individual components of an
-* arbitrary path name
-*
-*******************************************************************************/
-
-#include <string.h>
-#include <errno.h>
-#include <limits.h>
-#include "internal_securecrt.h"
-
-#include "mbusafecrt_internal.h"
-
-#define _FUNC_PROLOGUE
-#define _FUNC_NAME _wsplitpath_s
-#define _CHAR char16_t
-#define _TCSNCPY_S wcsncpy_s
-#define _T(_Character) L##_Character
-
-#include "tsplitpath_s.inl"
#ifdef _SECURE_ITOA
static errno_t __fastcall x64tox_s
(/* stdcall is faster and smaller... Might as well use it for the helper. */
- unsigned __int64 val,
+ uint64_t val,
TCHAR *buf,
size_t sizeInTChars,
unsigned radix,
#else /* _SECURE_ITOA */
static void __fastcall x64tox
(/* stdcall is faster and smaller... Might as well use it for the helper. */
- unsigned __int64 val,
+ uint64_t val,
TCHAR *buf,
unsigned radix,
int is_neg
#ifdef _SECURE_ITOA
length++;
#endif /* _SECURE_ITOA */
- val = (unsigned __int64)(-(__int64)val);
+ val = (uint64_t)(-(int64_t)val);
}
firstdig = p; /* save pointer to first digit */
int radix
)
{
- return x64tox_s((unsigned __int64)val, buf, sizeInTChars, radix, (radix == 10 && val < 0));
+ return x64tox_s((uint64_t)val, buf, sizeInTChars, radix, (radix == 10 && val < 0));
}
errno_t __cdecl _ui64tox_s (
and return pointer to buffer. */
TCHAR * __cdecl _ui64tox (
- unsigned __int64 val,
+ uint64_t val,
TCHAR *buf,
int radix
)
PERF_EXIT(InitializeCriticalSection);
}
-/*++
-Function:
- InitializeCriticalSectionEx - Flags is ignored.
-
-See MSDN doc.
---*/
-BOOL InitializeCriticalSectionEx(LPCRITICAL_SECTION lpCriticalSection, DWORD dwSpinCount, DWORD Flags)
-{
- PERF_ENTRY(InitializeCriticalSection);
- ENTRY("InitializeCriticalSectionEx(lpCriticalSection=%p, dwSpinCount=%d, Flags=%d)\n",
- lpCriticalSection, dwSpinCount, Flags);
-
- InternalInitializeCriticalSectionAndSpinCount(lpCriticalSection, dwSpinCount, false);
-
- LOGEXIT("InitializeCriticalSectionEx returns TRUE\n");
- PERF_EXIT(InitializeCriticalSection);
- return true;
-}
-
/*++
Function:
InitializeCriticalSectionAndSpinCount
PERF_EXIT(EnterCriticalSection);
}
-/*++
-Function:
- TryEnterCriticalSection
-
-See MSDN doc.
---*/
-BOOL TryEnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection)
-{
- PERF_ENTRY(TryEnterCriticalSection);
- ENTRY("TryEnterCriticalSection(lpCriticalSection=%p)\n", lpCriticalSection);
-
- CPalThread * pThread = InternalGetCurrentThread();
-
- bool fRet = InternalTryEnterCriticalSection(pThread,
- lpCriticalSection);
-
- LOGEXIT("TryEnterCriticalSection returns bool %d\n", (int)fRet);
- PERF_EXIT(TryEnterCriticalSection);
-
- return (BOOL)fRet;
-}
-
/*++
Function:
LeaveCriticalSection
#ifdef _DEBUG
enum CSSubSysInitState
{
- CSSubSysNotInitialzed,
+ CSSubSysNotInitialized,
CSSubSysInitializing,
CSSubSysInitialized
};
- static Volatile<CSSubSysInitState> csssInitState = CSSubSysNotInitialzed;
+ static Volatile<CSSubSysInitState> csssInitState = CSSubSysNotInitialized;
#ifdef PAL_TRACK_CRITICAL_SECTIONS_DATA
static Volatile<LONG> g_lPALCSInitializeCount = 0;
#ifdef _DEBUG
LONG lRet = InterlockedCompareExchange((LONG *)&csssInitState,
(LONG)CSSubSysInitializing,
- (LONG)CSSubSysNotInitialzed);
- if ((LONG)CSSubSysNotInitialzed == lRet)
+ (LONG)CSSubSysNotInitialized);
+ if ((LONG)CSSubSysNotInitialized == lRet)
{
InitializeListHead(&g_PALCSList);
return;
}
- /*++
- Function:
- CorUnix::InternalTryEnterCriticalSection
-
- Tries to acquire a CS. It returns true on success, false if the CS is
- locked by another thread
- --*/
- bool InternalTryEnterCriticalSection(
- CPalThread * pThread,
- PCRITICAL_SECTION pCriticalSection)
- {
- PAL_CRITICAL_SECTION * pPalCriticalSection =
- reinterpret_cast<PAL_CRITICAL_SECTION*>(pCriticalSection);
-
- LONG lNewVal;
- SIZE_T threadId;
- bool fRet = true;
-
- _ASSERTE(PalCsNotInitialized != pPalCriticalSection->cisInitState);
-
- threadId = ObtainCurrentThreadId(pThread);
-
- lNewVal = InterlockedCompareExchange (&pPalCriticalSection->LockCount,
- (LONG)PALCS_LOCK_BIT,
- (LONG)PALCS_LOCK_INIT);
- if (lNewVal == PALCS_LOCK_INIT)
- {
- // CS successfully acquired: setting ownership data
- pPalCriticalSection->OwningThread = threadId;
- pPalCriticalSection->RecursionCount = 1;
-#ifdef _DEBUG
- if (NULL != pPalCriticalSection->DebugInfo)
- {
- pPalCriticalSection->DebugInfo->lAcquireCount += 1;
- pPalCriticalSection->DebugInfo->lEnterCount += 1;
- }
-#endif // _DEBUG
-
- goto ITECS_exit;
- }
-
- // check if the current thread already owns the criticalSection
- if ((lNewVal & PALCS_LOCK_BIT) &&
- (pPalCriticalSection->OwningThread == threadId))
- {
- pPalCriticalSection->RecursionCount += 1;
-#ifdef _DEBUG
- if (NULL != pPalCriticalSection->DebugInfo)
- {
- pPalCriticalSection->DebugInfo->lEnterCount += 1;
- }
-#endif // _DEBUG
-
- goto ITECS_exit;
- }
-
- // Failed to acquire the CS
- fRet = false;
-
- ITECS_exit:
- return fRet;
- }
#endif // MUTEX_BASED_CSS
/*++
Function:
CorUnix::PALCS_FullyInitialize
- Fully initializes a CS previously initialied true InitializeCriticalSection.
+ Fully initializes a CS which was previously initialized in InitializeCriticalSection.
This method is called at the first contention on the target CS
--*/
bool PALCS_FullyInitialize(PAL_CRITICAL_SECTION * pPalCriticalSection)
_ASSERTE(0 == iRet);
}
- /*++
- Function:
- CorUnix::InternalTryEnterCriticalSection
-
- Tries to acquire a CS. It returns true on success, false if the CS is
- locked by another thread
- --*/
-#ifdef MUTEX_BASED_CSS
- bool InternalTryEnterCriticalSection(
- CPalThread * pThread,
- PCRITICAL_SECTION pCriticalSection)
-#else // MUTEX_BASED_CSS
- bool MTX_InternalTryEnterCriticalSection(
- CPalThread * pThread,
- PCRITICAL_SECTION pCriticalSection)
-#endif // MUTEX_BASED_CSS
- {
- PAL_CRITICAL_SECTION * pPalCriticalSection =
- reinterpret_cast<PAL_CRITICAL_SECTION*>(pCriticalSection);
- bool fRet;
- SIZE_T threadId;
-
- _ASSERTE(PalCsNotInitialized != pPalCriticalSection->cisInitState);
-
- threadId = ObtainCurrentThreadId(pThread);
-
- /* check if the current thread already owns the criticalSection */
- if (pPalCriticalSection->OwningThread == threadId)
- {
- pPalCriticalSection->RecursionCount += 1;
- fRet = true;
- goto ITECS_exit;
- }
-
- fRet = (0 == pthread_mutex_trylock(&pPalCriticalSection->csndNativeData.mutex));
-
- if (fRet)
- {
- pPalCriticalSection->OwningThread = threadId;
- pPalCriticalSection->RecursionCount = 1;
- }
-
- ITECS_exit:
- return fRet;
- }
#endif // MUTEX_BASED_CSS || _DEBUG
}
"OwnershipCount [%d]\n",
GetOwnershipCount(), GetSignalCount());
+ _ASSERT_MSG(otiMutex != m_otiObjectTypeId || m_lSignalCount <= 1,
+ "Mutex with invalid singal count\n");
+
return;
}
palErr = CPalSynchronizationManager::WakeUpLocalThread(
pthrCurrent,
ptwiWaitInfo->pthrOwner,
- fAbandoned ? MutexAbondoned : WaitSucceeded,
+ fAbandoned ? MutexAbandoned : WaitSucceeded,
dwObjIdx);
if (NO_ERROR != palErr)
palErr = CPalSynchronizationManager::WakeUpLocalThread(
pthrCurrent,
ptwiWaitInfo->pthrOwner,
- fAbandoned ? MutexAbondoned : WaitSucceeded,
+ fAbandoned ? MutexAbandoned : WaitSucceeded,
dwObjIdx);
if (NO_ERROR != palErr)
- WaitIsSatisfied if the wait-all is fully satisfied.
- WaitMayBeSatisfied if the target thread lives in a different process and
therefore the wait may involve objects local to the remote process, and
- as result is generally not possible to say whther or not the wait-all is
+ as result is generally not possible to say whether or not the wait-all is
fully satisfied from the current process.
Note: this method must be called while holding the synchronization locks
#include <sys/stat.h>
#include <sys/wait.h>
#include <unistd.h>
+#include <fcntl.h>
#include <limits.h>
#include <sched.h>
#include <signal.h>
break;
}
case WaitSucceeded:
- case MutexAbondoned:
+ case MutexAbandoned:
*pdwSignaledObject = dwSigObjIdx;
break;
default:
if ((NULL == pSynchManager) || ((LONG)SynchMgrStatusRunning != s_lInitStatus))
{
- ERROR("Trying to to create worker thread in invalid state\n");
+ ERROR("Trying to create worker thread in invalid state\n");
return ERROR_INTERNAL_ERROR;
}
// resetting the data by acquiring the object ownership
if (psdSynchData->IsAbandoned())
{
- twrWakeUpReason = MutexAbondoned;
+ twrWakeUpReason = MutexAbandoned;
}
// Acquire ownership
}
else if (0 > iRet)
{
- ERROR("Unable to read %d bytes from the the process pipe "
+ ERROR("Unable to read %d bytes from the process pipe "
"[pipe=%d ret=%d errno=%d (%s)]\n", iBytes - iBytesRead,
m_iProcessPipeRead, iRet, errno, strerror(errno));
goto RBFPP_exit;
Method:
CPalSynchronizationManager::MarkWaitForDelegatedObjectSignalingInProgress
- Marks all the thread waiting list nodes involved in the the current wait-all
+ Marks all the thread waiting list nodes involved in the current wait-all
for "delegated object signaling in progress", so that this wait cannot be
involved in another delegated object signaling that may happen while the
current object singaling is being tranfered to the target process (while
friend class CPalSynchronizationManager;
// NB: For perforformance purposes this class is supposed
- // to have no virtual methods, contructor and
+ // to have no virtual methods, constructor and
// destructor
public:
enum ControllerType { WaitController, StateController };
class CPalSynchronizationManager : public IPalSynchronizationManager
{
friend class CPalSynchMgrController;
- template <class T> friend T *CorUnix::InternalNew();
+ template <class T, class... Ts> friend T *CorUnix::InternalNew(Ts... args);
public:
// types
case WaitSucceeded:
dwRet = WAIT_OBJECT_0; // offset added later
break;
- case MutexAbondoned:
+ case MutexAbandoned:
dwRet = WAIT_ABANDONED_0; // offset added later
break;
case WaitTimeout:
#endif // HAVE_POLL
#include <unistd.h>
+#include <fcntl.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
# define __NR_membarrier 389
# elif defined(__aarch64__)
# define __NR_membarrier 283
+# elif defined(__loongarch64)
+# define __NR_membarrier 283
# else
# error Unknown architecture
# endif
#ifdef __APPLE__
#include <libproc.h>
+#include <pwd.h>
#include <sys/sysctl.h>
#include <sys/posix_sem.h>
#include <mach/task.h>
#include <mach/vm_map.h>
extern "C"
{
- #include <mach/thread_state.h>
+# include <mach/thread_state.h>
}
#endif // __APPLE__
}
}
EnvironmentEntries++;
- EnvironmentArray = (char **)InternalMalloc(EnvironmentEntries * sizeof(char *));
+ EnvironmentArray = (char **)malloc(EnvironmentEntries * sizeof(char *));
EnvironmentEntries = 0;
// Convert the environment block to array of strings
if (NO_ERROR != palError)
{
- ERROR("Unable to allocate object for new proccess\n");
+ ERROR("Unable to allocate object for new process\n");
goto InternalCreateProcessExit;
}
pobjFileErr = NULL;
}
- /* fill PROCESS_INFORMATION strucutre */
+ /* fill PROCESS_INFORMATION structure */
lpProcessInformation->hProcess = hProcess;
lpProcessInformation->hThread = hDummyThread;
lpProcessInformation->dwProcessId = processId;
--*/
VOID
PALAPI
+DECLSPEC_NORETURN
RaiseFailFastException(
IN PEXCEPTION_RECORD pExceptionRecord,
IN PCONTEXT pContextRecord,
ENTRY("RaiseFailFastException");
TerminateCurrentProcessNoExit(TRUE);
- PROCAbort();
+ for (;;) PROCAbort();
LOGEXIT("RaiseFailFastException");
PERF_EXIT(RaiseFailFastException);
TRACE("GetProcessIdDisambiguationKey: getline() FAILED");
SetLastError(ERROR_INVALID_HANDLE);
free(line);
+ fclose(statFile);
return FALSE;
}
"%*c %*d %*d %*d %*d %*d %*u %*u %*u %*u %*u %*u %*u %*d %*d %*d %*d %*d %*d %llu \n",
&starttime);
+ free(line);
+ fclose(statFile);
+
if (sscanfRet != 1)
{
_ASSERTE(!"Failed to parse stat file contents with sscanf_s.");
return FALSE;
}
- free(line);
- fclose(statFile);
-
*disambiguationKey = starttime;
return TRUE;
if (!dup)
{
int cbModuleName = strlen(moduleName) + 1;
- ProcessModules *entry = (ProcessModules *)InternalMalloc(sizeof(ProcessModules) + cbModuleName);
+ ProcessModules *entry = (ProcessModules *)malloc(sizeof(ProcessModules) + cbModuleName);
if (entry == NULL)
{
DestroyProcessModules(listHead);
if (!dup)
{
int cbModuleName = strlen(moduleName) + 1;
- ProcessModules *entry = (ProcessModules *)InternalMalloc(sizeof(ProcessModules) + cbModuleName);
+ ProcessModules *entry = (ProcessModules *)malloc(sizeof(ProcessModules) + cbModuleName);
if (entry == NULL)
{
DestroyProcessModules(listHead);
Does not return
--*/
+#if !defined(HOST_ARM)
PAL_NORETURN
+#endif
VOID
-PROCAbort()
+PROCAbort(int signal, siginfo_t* siginfo)
{
// Abort the process after waiting for the core dump to complete
abort();
NULL, 0, NULL, NULL);
/* if only a file name is specified, prefix it with "./" */
- if ((*lpApplicationName != '.') && (*lpApplicationName != '/') &&
- (*lpApplicationName != '\\'))
+ if ((*lpApplicationName != '.') && (*lpApplicationName != '/'))
{
length += 2;
lpTemp = lpPathFileName.OpenStringBuffer(length);
lpPathFileName.CloseBuffer(length -1);
- /* Replace '\' by '/' */
- FILEDosToUnixPathA(lpTemp);
-
return TRUE;
}
else
/* restore last character */
*lpEnd = wcEnd;
- /* Replace '\' by '/' */
- FILEDosToUnixPathA(lpFileName);
if (!getPath(lpFileNamePS, lpPathFileName))
{
/* file is not in the path */
Parameters:
IN lpCommandLine: second parameter from CreateProcessW (an unicode string)
- IN lpAppPath: cannonical name of the application to launched
+ IN lpAppPath: canonical name of the application to launched
OUT lppArgv: array of arguments to be passed to the new process
Return:
pThread = InternalGetCurrentThread();
/* make sure to allocate enough space, up for the worst case scenario */
int iLength = (iWlen + lpAppPath.GetCount() + 2);
- lpAsciiCmdLine = (char *) InternalMalloc(iLength);
+ lpAsciiCmdLine = (char *) malloc(iLength);
if (lpAsciiCmdLine == NULL)
{
pChar = lpAsciiCmdLine;
- /* put the cannonical name of the application as the first parameter */
+ /* put the canonical name of the application as the first parameter */
if ((strcpy_s(lpAsciiCmdLine, iLength, "\"") != SAFECRT_SUCCESS) ||
(strcat_s(lpAsciiCmdLine, iLength, lpAppPath) != SAFECRT_SUCCESS) ||
(strcat_s(lpAsciiCmdLine, iLength, "\"") != SAFECRT_SUCCESS) ||
/* allocate lppargv according to the number of arguments
in the command line */
- lppArgv = (char **) InternalMalloc((((*pnArg)+1) * sizeof(char *)));
+ lppArgv = (char **) malloc((((*pnArg)+1) * sizeof(char *)));
if (lppArgv == NULL)
{
TRACE("File %s not found in $PATH\n", lpFileName);
return FALSE;
}
-
-/*++
-Function:
- ~CProcProcessLocalData
-
-Process data destructor
---*/
-CorUnix::CProcProcessLocalData::~CProcProcessLocalData()
-{
- if (pProcessModules != NULL)
- {
- DestroyProcessModules(pProcessModules);
- }
-}
-
#include <sys/param.h>
#include <sys/sysctl.h>
#include <kvm.h>
-#elif defined(__sun)
-#ifndef _KERNEL
-#define _KERNEL
-#define UNDEF_KERNEL
-#endif
-#include <sys/procfs.h>
-#ifdef UNDEF_KERNEL
-#undef _KERNEL
#endif
+
+#if defined(__sun)
+#include <procfs.h>
+#include <fcntl.h>
#endif
#include <signal.h>
#include <errno.h>
#include <stddef.h>
#include <sys/stat.h>
+#include <sys/mman.h>
#if HAVE_MACH_THREADS
#include <mach/mach.h>
#endif // HAVE_MACH_THREADS
#include "pal/fakepoll.h"
#endif // HAVE_POLL
#include <limits.h>
+#include <algorithm>
#if HAVE_SYS_LWP_H
#include <sys/lwp.h>
#if HAVE_LWP_H
#include <lwp.h>
#endif
-// If we don't have sys/lwp.h but do expect to use _lwp_self, declare it to silence compiler warnings
-#if HAVE__LWP_SELF && !HAVE_SYS_LWP_H && !HAVE_LWP_H
-extern "C" int _lwp_self ();
+
+#if HAVE_CPUSET_T
+typedef cpuset_t cpu_set_t;
#endif
using namespace CorUnix;
+#ifdef __APPLE__
+#define MAX_THREAD_NAME_SIZE 63
+#elif defined(__FreeBSD__)
+#define MAX_THREAD_NAME_SIZE MAXCOMLEN
+#else
+#define MAX_THREAD_NAME_SIZE 15
+#endif
+
+/* ------------------- Definitions ------------------------------*/
+
+
void
ThreadCleanupRoutine(
CPalThread *pThread,
// When coming here from the public API surface, the incoming value is originally a nonnegative signed int32, so
// this shouldn't happen
ASSERT(
- "Couldn't align the requested stack size (%Iu) to the page size because the stack size was too large\n",
+ "Couldn't align the requested stack size (%zu) to the page size because the stack size was too large\n",
alignedStackSize);
palError = ERROR_INVALID_PARAMETER;
goto EXIT;
alignedStackSize = MinStackSize;
}
- TRACE("setting thread stack size to %Iu\n", alignedStackSize);
+ TRACE("setting thread stack size to %zu\n", alignedStackSize);
if (0 != pthread_attr_setstacksize(&pthreadAttr, alignedStackSize))
{
- ERROR("couldn't set pthread stack size to %Iu\n", alignedStackSize);
+ ERROR("couldn't set pthread stack size to %zu\n", alignedStackSize);
palError = ERROR_INTERNAL_ERROR;
goto EXIT;
}
#include <pthread.h>
#include <unistd.h>
+#include <fcntl.h>
#include <errno.h>
#include <stddef.h>
#include <sys/stat.h>
set(PALRT_SOURCES
bstr.cpp
- coguid.cpp
comem.cpp
guid.cpp
memorystream.cpp
- path.cpp
variant.cpp
)
#include "common.h"
#include "intsafe.h"
+#include <dn-u16.h>
#define CCH_BSTRMAX 0x7FFFFFFF // 4 + (0x7ffffffb + 1 ) * 2 ==> 0xFFFFFFFC
#define CB_BSTRMAX 0xFFFFFFFa // 4 + (0xfffffff6 + 2) ==> 0xFFFFFFFC
if (FAILED(CbSysStringSize(len, FALSE, &cbTotal)))
return NULL;
- bstr = (OLECHAR *)PAL_malloc(cbTotal);
+ bstr = (OLECHAR *)malloc(cbTotal);
if(bstr != NULL){
if(psz == NULL)
return NULL;
- return SysAllocStringLen(psz, (DWORD)wcslen(psz));
+ return SysAllocStringLen(psz, (DWORD)u16_strlen(psz));
}
STDAPI_(BSTR)
if (FAILED(CbSysStringSize(len, TRUE, &cbTotal)))
return FALSE;
- bstr = (OLECHAR *)PAL_malloc(cbTotal);
+ bstr = (OLECHAR *)malloc(cbTotal);
if (bstr != NULL) {
#if defined(HOST_64BIT)
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: coguid.cpp
-//
-// misc guid functions for PALRT
-// ===========================================================================
-
-#include "common.h"
-
-STDAPI_(int) StringFromGUID2(REFGUID rguid, LPOLESTR lptsz, int cchMax)
-{
- if (cchMax < 39)
- return 0;
-
- return swprintf_s(lptsz, cchMax, W("{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}"),
- rguid.Data1, rguid.Data2, rguid.Data3,
- rguid.Data4[0], rguid.Data4[1],
- rguid.Data4[2], rguid.Data4[3],
- rguid.Data4[4], rguid.Data4[5],
- rguid.Data4[6], rguid.Data4[7]) + 1;
-}
-
-static BOOL wUUIDFromString(LPCWSTR lpsz, GUID * pguid);
-static BOOL wGUIDFromString(LPCWSTR lpsz, GUID * pguid);
-
-static BOOL HexStringToDword(LPCWSTR FAR& lpsz, DWORD FAR& Value,
- int cDigits, WCHAR chDelim);
-
-//+-------------------------------------------------------------------------
-//
-// Function: IIDFromString
-//
-// Synopsis: converts string {...} form int guid
-//
-// Arguments: [lpsz] - ptr to buffer for results
-// [lpclsid] - the guid to convert
-//
-// Returns: NOERROR
-// CO_E_CLASSSTRING
-//
-//--------------------------------------------------------------------------
-STDAPI IIDFromString(LPWSTR lpsz, CLSID * lpclsid)
-{
- if (lpsz == NULL)
- {
- *lpclsid = CLSID_NULL;
- return NOERROR;
- }
-
- if (*lpsz == 0)
- {
- return(CO_E_CLASSSTRING);
- }
-
- return wGUIDFromString(lpsz,lpclsid)
- ? NOERROR : CO_E_CLASSSTRING;
-}
-
-//+-------------------------------------------------------------------------
-//
-// Function: wGUIDFromString (internal)
-//
-// Synopsis: Parse GUID such as {00000000-0000-0000-0000-000000000000}
-//
-// Arguments: [lpsz] - the guid string to convert
-// [pguid] - guid to return
-//
-// Returns: TRUE if successful
-//
-//--------------------------------------------------------------------------
-static BOOL wGUIDFromString(LPCWSTR lpsz, GUID * pguid)
-{
- if (*lpsz++ != '{' )
- return FALSE;
-
- if (wUUIDFromString(lpsz, pguid) != TRUE)
- return FALSE;
-
- lpsz +=36;
-
- if (*lpsz++ != '}' )
- return FALSE;
-
- if (*lpsz != '\0')
- return FALSE;
-
- return TRUE;
-}
-
-//+-------------------------------------------------------------------------
-//
-// Function: wUUIDFromString (internal)
-//
-// Synopsis: Parse UUID such as 00000000-0000-0000-0000-000000000000
-//
-// Arguments: [lpsz] - Supplies the UUID string to convert
-// [pguid] - Returns the GUID.
-//
-// Returns: TRUE if successful
-//
-//--------------------------------------------------------------------------
-static BOOL wUUIDFromString(LPCWSTR lpsz, GUID * pguid)
-{
- DWORD dw;
-
- if (!HexStringToDword(lpsz, pguid->Data1, sizeof(DWORD)*2, '-'))
- return FALSE;
-
- if (!HexStringToDword(lpsz, dw, sizeof(WORD)*2, '-'))
- return FALSE;
- pguid->Data2 = (WORD)dw;
-
- if (!HexStringToDword(lpsz, dw, sizeof(WORD)*2, '-'))
- return FALSE;
- pguid->Data3 = (WORD)dw;
-
- if (!HexStringToDword(lpsz, dw, sizeof(BYTE)*2, 0))
- return FALSE;
- pguid->Data4[0] = (BYTE)dw;
-
- if (!HexStringToDword(lpsz, dw, sizeof(BYTE)*2, '-'))
- return FALSE;
- pguid->Data4[1] = (BYTE)dw;
-
- if (!HexStringToDword(lpsz, dw, sizeof(BYTE)*2, 0))
- return FALSE;
- pguid->Data4[2] = (BYTE)dw;
-
- if (!HexStringToDword(lpsz, dw, sizeof(BYTE)*2, 0))
- return FALSE;
- pguid->Data4[3] = (BYTE)dw;
-
- if (!HexStringToDword(lpsz, dw, sizeof(BYTE)*2, 0))
- return FALSE;
- pguid->Data4[4] = (BYTE)dw;
-
- if (!HexStringToDword(lpsz, dw, sizeof(BYTE)*2, 0))
- return FALSE;
- pguid->Data4[5] = (BYTE)dw;
-
- if (!HexStringToDword(lpsz, dw, sizeof(BYTE)*2, 0))
- return FALSE;
- pguid->Data4[6] = (BYTE)dw;
-
- if (!HexStringToDword(lpsz, dw, sizeof(BYTE)*2, 0))
- return FALSE;
- pguid->Data4[7] = (BYTE)dw;
-
- return TRUE;
-}
-
-//+-------------------------------------------------------------------------
-//
-// Function: HexStringToDword (private)
-//
-// Synopsis: scan lpsz for a number of hex digits (at most 8); update lpsz
-// return value in Value; check for chDelim;
-//
-// Arguments: [lpsz] - the hex string to convert
-// [Value] - the returned value
-// [cDigits] - count of digits
-//
-// Returns: TRUE for success
-//
-//--------------------------------------------------------------------------
-static BOOL HexStringToDword(LPCWSTR FAR& lpsz, DWORD FAR& Value,
- int cDigits, WCHAR chDelim)
-{
- int Count;
-
- Value = 0;
- for (Count = 0; Count < cDigits; Count++, lpsz++)
- {
- if (*lpsz >= '0' && *lpsz <= '9')
- Value = (Value << 4) + *lpsz - '0';
- else if (*lpsz >= 'A' && *lpsz <= 'F')
- Value = (Value << 4) + *lpsz - 'A' + 10;
- else if (*lpsz >= 'a' && *lpsz <= 'f')
- Value = (Value << 4) + *lpsz - 'a' + 10;
- else
- return(FALSE);
- }
-
- if (chDelim != 0)
- return *lpsz++ == chDelim;
- else
- return TRUE;
-}
#include <switches.h>
#include <winwrap.h>
-#include "shlwapip.h"
#include <minipal/utils.h>
#endif // _COMMON_H_
#include "common.h"
#include "objidl.h"
+#include <algorithm>
+
+using std::min;
+using std::max;
class MemoryStream : public IStream
{
n = min(2 * n, n + n / 4 + 0x100000);
// don't allocate tiny chunks
- n = max(n, 0x100);
+ n = max(n, (ULONG)0x100);
// compare with the hard limit
nNewData = max(n, nNewData);
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: path.cpp
-//
-// Path APIs ported from shlwapi (especially for Fusion)
-// ===========================================================================
-
-#include "common.h"
-#include "strsafe.h"
-
-
-#define CH_SLASH W('/')
-#define CH_WHACK W('\\')
-
-//
-// Inline function to check for a double-backslash at the
-// beginning of a string
-//
-
-static __inline BOOL DBL_BSLASH(LPCWSTR psz)
-{
- return (psz[0] == W('\\') && psz[1] == W('\\'));
-}
-
-//
-// Inline function to check for a path separator character.
-//
-
-static __inline BOOL IsPathSeparator(WCHAR ch)
-{
- return (ch == CH_SLASH || ch == CH_WHACK);
-}
-
-__inline BOOL ChrCmpW_inline(WCHAR w1, WCHAR wMatch)
-{
- return(!(w1 == wMatch));
-}
-
-STDAPI_(LPWSTR) StrRChrW(LPCWSTR lpStart, LPCWSTR lpEnd, WCHAR wMatch)
-{
- LPCWSTR lpFound = NULL;
-
- RIPMSG(lpStart && IS_VALID_STRING_PTRW(lpStart, -1), "StrRChrW: caller passed bad lpStart");
- RIPMSG(!lpEnd || lpEnd <= lpStart + wcslen(lpStart), "StrRChrW: caller passed bad lpEnd");
- // don't need to check for NULL lpStart
-
- if (!lpEnd)
- lpEnd = lpStart + wcslen(lpStart);
-
- for ( ; lpStart < lpEnd; lpStart++)
- {
- if (!ChrCmpW_inline(*lpStart, wMatch))
- lpFound = lpStart;
- }
- return ((LPWSTR)lpFound);
-}
-
-
-// check if a path is a root
-//
-// returns:
-// TRUE
-// "\" "X:\" "\\" "\\foo" "\\foo\bar"
-//
-// FALSE for others including "\\foo\bar\" (!)
-//
-STDAPI_(BOOL) PathIsRootW(LPCWSTR pPath)
-{
- RIPMSG(pPath && IS_VALID_STRING_PTR(pPath, -1), "PathIsRoot: caller passed bad pPath");
-
- if (!pPath || !*pPath)
- {
- return FALSE;
- }
-
- if (!lstrcmpiW(pPath + 1, W(":\\")))
- {
- return TRUE; // "X:\" case
- }
-
- if (IsPathSeparator(*pPath) && (*(pPath + 1) == 0))
- {
- return TRUE; // "/" or "\" case
- }
-
- if (DBL_BSLASH(pPath)) // smells like UNC name
- {
- LPCWSTR p;
- int cBackslashes = 0;
-
- for (p = pPath + 2; *p; p++)
- {
- if (*p == W('\\'))
- {
- //
- // return FALSE for "\\server\share\dir"
- // so just check if there is more than one slash
- //
- // "\\server\" without a share name causes
- // problems for WNet APIs. we should return
- // FALSE for this as well
- //
- if ((++cBackslashes > 1) || !*(p+1))
- return FALSE;
- }
- }
- // end of string with only 1 more backslash
- // must be a bare UNC, which looks like a root dir
- return TRUE;
- }
- return FALSE;
-}
-
-/*
-// rips the last part of the path off including the backslash
-// C:\foo -> C:\
-// C:\foo\bar -> C:\foo
-// C:\foo\ -> C:\foo
-// \\x\y\x -> \\x\y
-// \\x\y -> \\x
-// \\x -> \\ (Just the double slash!)
-// \foo -> \ (Just the slash!)
-//
-// in/out:
-// pFile fully qualified path name
-// returns:
-// TRUE we stripped something
-// FALSE didn't strip anything (root directory case)
-//
-*/
-STDAPI_(BOOL) PathRemoveFileSpecW(LPWSTR pFile)
-{
- RIPMSG(pFile && IS_VALID_STRING_PTR(pFile, -1), "PathRemoveFileSpec: caller passed bad pFile");
-
- if (pFile)
- {
- LPWSTR pT;
- LPWSTR pT2 = pFile;
-
- for (pT = pT2; *pT2; pT2++)
- {
- if (IsPathSeparator(*pT2))
- {
- pT = pT2; // last "\" found, (we will strip here)
- }
- else if (*pT2 == W(':')) // skip ":\" so we don't
- {
- if (IsPathSeparator(pT2[1])) // strip the "\" from "C:\"
- {
- pT2++;
- }
- pT = pT2 + 1;
- }
- }
-
- if (*pT == 0)
- {
- // didn't strip anything
- return FALSE;
- }
- else if (((pT == pFile) && IsPathSeparator(*pT)) || // is it the "\foo" case?
- ((pT == pFile+1) && (*pT == CH_WHACK && *pFile == CH_WHACK))) // or the "\\bar" case?
- {
- // Is it just a '\'?
- if (*(pT+1) != W('\0'))
- {
- // Nope.
- *(pT+1) = W('\0');
- return TRUE; // stripped something
- }
- else
- {
- // Yep.
- return FALSE;
- }
- }
- else
- {
- *pT = 0;
- return TRUE; // stripped something
- }
- }
- return FALSE;
-}
-
-//
-// Return a pointer to the end of the next path component in the string.
-// ie return a pointer to the next backslash or terminating NULL.
-//
-LPCWSTR GetPCEnd(LPCWSTR lpszStart)
-{
- LPCWSTR lpszEnd;
- LPCWSTR lpszSlash;
-
- lpszEnd = StrChr(lpszStart, CH_WHACK);
- lpszSlash = StrChr(lpszStart, CH_SLASH);
- if ((lpszSlash && lpszSlash < lpszEnd) ||
- !lpszEnd)
- {
- lpszEnd = lpszSlash;
- }
- if (!lpszEnd)
- {
- lpszEnd = lpszStart + wcslen(lpszStart);
- }
-
- return lpszEnd;
-}
-
-//
-// Given a pointer to the end of a path component, return a pointer to
-// its beginning.
-// ie return a pointer to the previous backslash (or start of the string).
-//
-LPCWSTR PCStart(LPCWSTR lpszStart, LPCWSTR lpszEnd)
-{
- LPCWSTR lpszBegin = StrRChrW(lpszStart, lpszEnd, CH_WHACK);
- LPCWSTR lpszSlash = StrRChrW(lpszStart, lpszEnd, CH_SLASH);
- if (lpszSlash > lpszBegin)
- {
- lpszBegin = lpszSlash;
- }
- if (!lpszBegin)
- {
- lpszBegin = lpszStart;
- }
- return lpszBegin;
-}
-
-//
-// Fix up a few special cases so that things roughly make sense.
-//
-void NearRootFixups(LPWSTR lpszPath, BOOL fUNC)
-{
- // Check for empty path.
- if (lpszPath[0] == W('\0'))
- {
- // Fix up.
-#ifndef TARGET_UNIX
- lpszPath[0] = CH_WHACK;
-#else
- lpszPath[0] = CH_SLASH;
-#endif
- lpszPath[1] = W('\0');
- }
- // Check for missing slash.
- if (lpszPath[1] == W(':') && lpszPath[2] == W('\0'))
- {
- // Fix up.
- lpszPath[2] = W('\\');
- lpszPath[3] = W('\0');
- }
- // Check for UNC root.
- if (fUNC && lpszPath[0] == W('\\') && lpszPath[1] == W('\0'))
- {
- // Fix up.
- //lpszPath[0] = W('\\'); // already checked in if guard
- lpszPath[1] = W('\\');
- lpszPath[2] = W('\0');
- }
-}
-
-/*----------------------------------------------------------
-Purpose: Canonicalize a path.
-
-Returns:
-Cond: --
-*/
-STDAPI_(BOOL) PathCanonicalizeW(LPWSTR lpszDst, LPCWSTR lpszSrc)
-{
- LPCWSTR lpchSrc;
- LPCWSTR lpchPCEnd; // Pointer to end of path component.
- LPWSTR lpchDst;
- BOOL fUNC;
- int cchPC;
-
- RIPMSG(lpszDst && IS_VALID_WRITE_BUFFER(lpszDst, WCHAR, MAX_PATH), "PathCanonicalize: caller passed bad lpszDst");
- RIPMSG(lpszSrc && IS_VALID_STRING_PTR(lpszSrc, -1), "PathCanonicalize: caller passed bad lpszSrc");
- RIPMSG(lpszDst != lpszSrc, "PathCanonicalize: caller passed the same buffer for lpszDst and lpszSrc");
-
- if (!lpszDst || !lpszSrc)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- *lpszDst = W('\0');
-
- fUNC = PathIsUNCW(lpszSrc); // Check for UNCness.
-
- // Init.
- lpchSrc = lpszSrc;
- lpchDst = lpszDst;
-
- while (*lpchSrc)
- {
- lpchPCEnd = GetPCEnd(lpchSrc);
- cchPC = (int) (lpchPCEnd - lpchSrc)+1;
-
- if (cchPC == 1 && IsPathSeparator(*lpchSrc)) // Check for slashes.
- {
- // Just copy them.
-#ifndef TARGET_UNIX
- *lpchDst = CH_WHACK;
-#else
- *lpchDst = CH_SLASH;
-#endif
- lpchDst++;
- lpchSrc++;
- }
- else if (cchPC == 2 && *lpchSrc == W('.')) // Check for dots.
- {
- // Skip it...
- // Are we at the end?
- if (*(lpchSrc+1) == W('\0'))
- {
- lpchSrc++;
-
- // remove the last slash we copied (if we've copied one), but don't make a mal-formed root
- if ((lpchDst > lpszDst) && !PathIsRootW(lpszDst))
- lpchDst--;
- }
- else
- {
- lpchSrc += 2;
- }
- }
- else if (cchPC == 3 && *lpchSrc == W('.') && *(lpchSrc + 1) == W('.')) // Check for dot dot.
- {
- // make sure we aren't already at the root
- if (!PathIsRootW(lpszDst))
- {
- // Go up... Remove the previous path component.
- lpchDst = (LPWSTR)PCStart(lpszDst, lpchDst - 1);
- }
- else
- {
- // When we can't back up, skip the trailing backslash
- // so we don't copy one again. (C:\..\FOO would otherwise
- // turn into C:\\FOO).
- if (IsPathSeparator(*(lpchSrc + 2)))
- {
- lpchSrc++;
- }
- }
-
- // skip ".."
- lpchSrc += 2;
- }
- else // Everything else
- {
- // Just copy it.
- int cchRemainingBuffer = MAX_PATH - (lpszDst - lpchDst);
- StringCchCopyNW(lpchDst, cchRemainingBuffer, lpchSrc, cchPC);
- lpchDst += cchPC - 1;
- lpchSrc += cchPC - 1;
- }
-
- // Keep everything nice and tidy.
- *lpchDst = W('\0');
- }
-
- // Check for weirdo root directory stuff.
- NearRootFixups(lpszDst, fUNC);
-
- return TRUE;
-}
-
-// Modifies:
-// pszRoot
-//
-// Returns:
-// TRUE if a drive root was found
-// FALSE otherwise
-//
-STDAPI_(BOOL) PathStripToRootW(LPWSTR pszRoot)
-{
- RIPMSG(pszRoot && IS_VALID_STRING_PTR(pszRoot, -1), "PathStripToRoot: caller passed bad pszRoot");
-
- if (pszRoot)
- {
- while (!PathIsRootW(pszRoot))
- {
- if (!PathRemoveFileSpecW(pszRoot))
- {
- // If we didn't strip anything off,
- // must be current drive
- return FALSE;
- }
- }
- return TRUE;
- }
- return FALSE;
-}
-
-
-
-/*----------------------------------------------------------
-Purpose: Concatenate lpszDir and lpszFile into a properly formed
- path and canonicalize any relative path pieces.
-
- lpszDest and lpszFile can be the same buffer
- lpszDest and lpszDir can be the same buffer
-
-Returns: pointer to lpszDest
-*/
-STDAPI_(LPWSTR) PathCombineW(LPWSTR lpszDest, LPCWSTR lpszDir, LPCWSTR lpszFile)
-{
-#ifdef DEBUG
- RIPMSG(lpszDest && IS_VALID_WRITE_BUFFER(lpszDest, TCHAR, MAX_LONGPATH), "PathCombine: caller passed bad lpszDest");
- RIPMSG(!lpszDir || IS_VALID_STRING_PTR(lpszDir, -1), "PathCombine: caller passed bad lpszDir");
- RIPMSG(!lpszFile || IS_VALID_STRING_PTR(lpszFile, -1), "PathCombine: caller passed bad lpszFile");
- RIPMSG(lpszDir || lpszFile, "PathCombine: caller neglected to pass lpszDir or lpszFile");
-#endif // DEBUG
-
-
- if (lpszDest)
- {
- TCHAR szTemp[MAX_LONGPATH];
- LPWSTR pszT;
-
- *szTemp = W('\0');
-
- if (lpszDir && *lpszDir)
- {
- if (!lpszFile || *lpszFile==W('\0'))
- {
- // lpszFile is empty
- StringCchCopyNW(szTemp, ARRAY_SIZE(szTemp), lpszDir, ARRAY_SIZE(szTemp));
- }
- else if (PathIsRelativeW(lpszFile))
- {
- StringCchCopyNW(szTemp, ARRAY_SIZE(szTemp), lpszDir, ARRAY_SIZE(szTemp));
- pszT = PathAddBackslashW(szTemp);
- if (pszT)
- {
- size_t iRemaining = ARRAY_SIZE(szTemp) - (pszT - szTemp);
-
- if (wcslen(lpszFile) < iRemaining)
- {
- StringCchCopyNW(pszT, iRemaining, lpszFile, iRemaining);
- }
- else
- {
- *szTemp = W('\0');
- }
- }
- else
- {
- *szTemp = W('\0');
- }
- }
- else if (IsPathSeparator(*lpszFile) && !PathIsUNCW(lpszFile))
- {
- StringCchCopyNW(szTemp, ARRAY_SIZE(szTemp), lpszDir, ARRAY_SIZE(szTemp));
- // FEATURE: Note that we do not check that an actual root is returned;
- // it is assumed that we are given valid parameters
- PathStripToRootW(szTemp);
-
- pszT = PathAddBackslashW(szTemp);
- if (pszT)
- {
- // Skip the backslash when copying
- // Note: We don't support strings longer than 4GB, but that's
- // okay because we already fail at MAX_PATH
- int iRemaining = (int)(ARRAY_SIZE(szTemp) - (pszT - szTemp));
- StringCchCopyNW(pszT, iRemaining, lpszFile+1, iRemaining);
- }
- else
- {
- *szTemp = W('\0');
- }
- }
- else
- {
- // already fully qualified file part
- StringCchCopyNW(szTemp, ARRAY_SIZE(szTemp), lpszFile, ARRAY_SIZE(szTemp));
- }
- }
- else if (lpszFile && *lpszFile)
- {
- // no dir just use file.
- StringCchCopyNW(szTemp, ARRAY_SIZE(szTemp), lpszFile, ARRAY_SIZE(szTemp));
- }
-
- //
- // if szTemp has something in it we succeeded. Also if szTemp is empty and
- // the input strings are empty we succeed and PathCanonicalize() will
- // return "\"
- //
- if (*szTemp || ((lpszDir || lpszFile) && !((lpszDir && *lpszDir) || (lpszFile && *lpszFile))))
- {
- PathCanonicalizeW(lpszDest, szTemp); // this deals with .. and . stuff
- // returns "\" on empty szTemp
- }
- else
- {
- *lpszDest = W('\0'); // set output buffer to empty string.
- lpszDest = NULL; // return failure.
- }
- }
-
- return lpszDest;
-}
-
-// add a backslash to a qualified path
-//
-// in:
-// lpszPath path (A:, C:\foo, etc)
-//
-// out:
-// lpszPath A:\, C:\foo\ ;
-//
-// returns:
-// pointer to the NULL that terminates the path
-//
-STDAPI_(LPWSTR) PathAddBackslashW(LPWSTR lpszPath)
-{
- LPWSTR lpszRet = NULL;
-
- RIPMSG(lpszPath && IS_VALID_STRING_PTR(lpszPath, -1), "PathAddBackslash: caller passed bad lpszPath");
-
- if (lpszPath)
- {
- size_t ichPath = wcslen(lpszPath);
- LPWSTR lpszEnd = lpszPath + ichPath;
-
- if (ichPath)
- {
-
- // Get the end of the source directory
- switch(*(lpszEnd-1))
- {
- case CH_SLASH:
- case CH_WHACK:
- break;
-
- default:
- // try to keep us from tromping over MAX_PATH in size.
- // if we find these cases, return NULL. Note: We need to
- // check those places that call us to handle their GP fault
- // if they try to use the NULL!
- if (ichPath >= (MAX_PATH - 2)) // -2 because ichPath doesn't include NULL, and we're adding a CH_WHACK.
- {
- return(NULL);
- }
-
- *lpszEnd++ = CH_WHACK;
- *lpszEnd = W('\0');
- }
- }
-
- lpszRet = lpszEnd;
- }
-
- return lpszRet;
-}
-
-
-
-
-//---------------------------------------------------------------------------
-// Returns TRUE if the given string is a UNC path.
-//
-// TRUE
-// "\\foo\bar"
-// "\\foo" <- careful
-// "\\"
-// FALSE
-// "\foo"
-// "foo"
-// "c:\foo"
-//
-//
-STDAPI_(BOOL) PathIsUNCW(LPCWSTR pszPath)
-{
- RIPMSG(pszPath && IS_VALID_STRING_PTR(pszPath, -1), "PathIsUNC: caller passed bad pszPath");
-
- if (pszPath)
- {
- return DBL_BSLASH(pszPath);
- }
- return FALSE;
-}
-
-
-
-
-
-//---------------------------------------------------------------------------
-// Return TRUE if the path isn't absoulte.
-//
-// TRUE
-// "foo.exe"
-// ".\foo.exe"
-// "..\boo\foo.exe"
-//
-// FALSE
-// "\foo"
-// "c:bar" <- be careful
-// "c:\bar"
-// "\\foo\bar"
-//
-STDAPI_(BOOL) PathIsRelativeW(LPCWSTR lpszPath)
-{
- RIPMSG(lpszPath && IS_VALID_STRING_PTR(lpszPath, -1), "PathIsRelative: caller passed bad lpszPath");
-
- if (!lpszPath || *lpszPath == 0)
- {
- // The NULL path is assumed relative
- return TRUE;
- }
-
- if (IsPathSeparator(lpszPath[0]))
- {
- // Does it begin with a slash ?
- return FALSE;
- }
- else if (lpszPath[1] == W(':'))
- {
- // Does it begin with a drive and a colon ?
- return FALSE;
- }
- else
- {
- // Probably relative.
- return TRUE;
- }
-}
-
-// find the next slash or null terminator
-LPWSTR StrSlash(LPCWSTR psz)
-{
- for (; *psz && !IsPathSeparator(*psz); psz++);
-
- // Cast to a non-const string to mimic the behavior
- // of wcschr/StrChr and strchr.
- return (LPWSTR) psz;
-}
-
-
-
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//
-
-//
-// ===========================================================================
-// File: shlwapi.h
-//
-// Header for ported shlwapi stuff
-// ===========================================================================
-
-#ifndef SHLWAPIP_H_INCLUDED
-#define SHLWAPIP_H_INCLUDED
-
-#define SIZEOF(x) sizeof(x)
-#define PRIVATE
-#define PUBLIC
-#ifndef ASSERT
-#define ASSERT _ASSERTE
-#endif
-#define AssertMsg(f,m) _ASSERTE(f)
-#define RIP(f) _ASSERTE(f)
-#define RIPMSG(f,m) _ASSERTE(f)
-
-#define IS_VALID_READ_BUFFER(p, t, n) (p != NULL)
-#define IS_VALID_WRITE_BUFFER(p, t, n) (p != NULL)
-
-#define IS_VALID_READ_PTR(p, t) IS_VALID_READ_BUFFER(p, t, 1)
-#define IS_VALID_WRITE_PTR(p, t) IS_VALID_WRITE_BUFFER(p, t, 1)
-
-#define IS_VALID_STRING_PTR(p, c) (p != NULL)
-#define IS_VALID_STRING_PTRW(p, c) (p != NULL)
-
-#endif // ! SHLWAPIP_H_INCLUDED
--- /dev/null
+#-------------------------
+# Enable C++ EH with SEH
+#-------------------------
+if (MSVC)
+ set_property(DIRECTORY PROPERTY CLR_EH_OPTION /EHa) # enable C++ EH (w/ SEH exceptions)
+endif()
+
+include_directories(${CLR_SRC_NATIVE_DIR})
+include_directories(${CLR_SHARED_DIR}/pal/prebuilt/inc)
+
+# All of the compiler options are specified in file compileoptions.cmake
+# Do not add any new options here. They should be added in compileoptions.cmake
+if(CLR_CMAKE_HOST_WIN32)
+ add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/Zl>) # omit default library name in .OBJ
+endif(CLR_CMAKE_HOST_WIN32)
+
+#--------------------------------
+# Definition directives
+# - all clr specific compile definitions should be included in this file
+# - all clr specific feature variable should also be added in this file
+#----------------------------------
+include(${CLR_SHARED_DIR}/clrdefinitions.cmake)
+
+if (CLR_CMAKE_HOST_UNIX)
+ include_directories("${CLR_SHARED_DIR}/pal/inc")
+ include_directories("${CLR_SHARED_DIR}/pal/inc/rt")
+ include_directories("${CLR_SHARED_DIR}/pal/src/safecrt")
+endif (CLR_CMAKE_HOST_UNIX)
+
+include_directories(${CLR_SHARED_DIR}/minipal)
+include_directories(${CLR_SHARED_DIR}/debug/inc)
+include_directories(${CLR_SHARED_DIR}/debug/inc/dump)
+include_directories(${CLR_SHARED_DIR}/hosts/inc)
+include_directories(${CLR_SHARED_DIR}/inc)
+include_directories(${CLR_SHARED_DIR}/gc)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
-add_definitions(-D_BLD_CLR)
-
set(UTILCODE_COMMON_SOURCES
clrhost_nodependencies.cpp
ex.cpp
namespaceutil.cpp
check.cpp
sstring.cpp
+ util_nodependencies.cpp
safewrap.cpp
debug.cpp
pedecoder.cpp
longfilepathwrappers.cpp
)
-# These source file do not yet compile on Linux.
-# They should be moved out from here into the declaration
-# of UTILCODE_SOURCES above after fixing compiler errors.
-if(CLR_CMAKE_TARGET_WIN32)
- list(APPEND UTILCODE_COMMON_SOURCES
- dlwrap.cpp
- securitywrapper.cpp
- securityutil.cpp
- )
-endif(CLR_CMAKE_TARGET_WIN32)
-
set(UTILCODE_STATICNOHOST_SOURCES
${UTILCODE_COMMON_SOURCES}
hostimpl.cpp
add_library_clr(utilcodestaticnohost STATIC ${UTILCODE_STATICNOHOST_SOURCES})
+target_link_libraries(utilcodestaticnohost PUBLIC coreclrminipal)
+
if(CLR_CMAKE_HOST_WIN32)
target_compile_definitions(utilcodestaticnohost PRIVATE _CRTIMP=) # use static version of crt
endif(CLR_CMAKE_HOST_WIN32)
SPECIALIZED_VIOLATION(ModeViolation);
SPECIALIZED_VIOLATION(FaultViolation);
SPECIALIZED_VIOLATION(FaultNotFatal);
-SPECIALIZED_VIOLATION(HostViolation);
SPECIALIZED_VIOLATION(TakesLockViolation);
SPECIALIZED_VIOLATION(LoadsTypeViolation);
STATIC_CONTRACT_GC_NOTRIGGER;
const char *messageString = NULL;
- NewHolder<StackScratchBuffer> pScratch(NULL);
NewHolder<StackSString> pMessage(NULL);
EX_TRY
{
FAULT_NOT_FATAL();
-
- pScratch = new StackScratchBuffer();
pMessage = new StackSString();
pMessage->AppendASCII(reason);
pMessage->AppendASCII(m_condition);
#endif
- messageString = pMessage->GetANSI(*pScratch);
+ messageString = pMessage->GetUTF8();
}
EX_CATCH
{
#if _DEBUG
DbgAssertDialog((char*)m_file, m_line, (char *)messageString);
#else
- OutputDebugStringA(messageString);
+ OutputDebugStringUtf8(messageString);
DebugBreak();
#endif
// Try to build a stack of condition failures
StackSString context;
- context.Printf("%s\n\t%s%s FAILED: %s\n\t\t%s, line: %d",
+ context.Printf("%s\n\t%s%s FAILED: %s\n\t\t%s:%d",
m_condition,
message && *message ? message : "",
message && *message ? ": " : "",
STATIC_CONTRACT_GC_NOTRIGGER;
// Make a copy of it.
- StackScratchBuffer buffer;
- const char * pMsg = s.GetANSI(buffer);
+ const char * pMsg = s.GetUTF8();
// Must copy that into our own field.
size_t len = strlen(pMsg) + 1;
#include "clrnt.h"
#include "contract.h"
-#if defined __llvm__
-# if defined(__has_feature) && __has_feature(address_sanitizer)
-# define HAS_ADDRESS_SANITIZER
-# endif
-#endif
-
-#ifdef _DEBUG_IMPL
-
-//
-// I'd very much like for this to go away. Its used to disable all THROWS contracts within whatever DLL this
-// function is called from. That's obviously very, very bad, since there's no validation of those macros. But it
-// can be difficult to remove this without actually fixing every violation at the same time.
-//
-// When this flag is finally removed, remove RealCLRThrowsExceptionWorker() too and put CONTRACT_THROWS() in place
-// of it.
-//
-//
-static BOOL dbg_fDisableThrowCheck = FALSE;
-
-void DisableThrowCheck()
-{
- LIMITED_METHOD_CONTRACT;
-
- dbg_fDisableThrowCheck = TRUE;
-}
-
-#ifdef HAS_ADDRESS_SANITIZER
-// use the functionality from address santizier (which does not throw exceptions)
-#else
-
-#define CLRThrowsExceptionWorker() RealCLRThrowsExceptionWorker(__FUNCTION__, __FILE__, __LINE__)
-
-static void RealCLRThrowsExceptionWorker(_In_z_ const char *szFunction,
- _In_z_ const char *szFile,
- int lineNum)
-{
- WRAPPER_NO_CONTRACT;
-
- if (dbg_fDisableThrowCheck)
- {
- return;
- }
-
- CONTRACT_THROWSEX(szFunction, szFile, lineNum);
-}
-
-#endif // HAS_ADDRESS_SANITIZER
-#endif //_DEBUG_IMPL
-
#if defined(_DEBUG_IMPL) && defined(ENABLE_CONTRACTS_IMPL)
thread_local ClrDebugState* t_pClrDebugState;
#endif //defined(_DEBUG_IMPL) && defined(ENABLE_CONTRACTS_IMPL)
-const NoThrow nothrow = { 0 };
-
-#if defined(HAS_ADDRESS_SANITIZER) || defined(DACCESS_COMPILE)
-// use standard heap functions for address santizier
-#else
-
-#ifdef _DEBUG
-#ifdef TARGET_X86
-#define OS_HEAP_ALIGN 8
-#else
-#define OS_HEAP_ALIGN 16
-#endif
-#define CLRALLOC_TAG 0x2ce145f1
-#endif
-
-#ifdef HOST_WINDOWS
-static HANDLE g_hProcessHeap;
-#endif
-
-FORCEINLINE void* ClrMalloc(size_t size)
-{
- STATIC_CONTRACT_NOTHROW;
-
-#ifdef FAILPOINTS_ENABLED
- if (RFS_HashStack())
- return NULL;
-#endif
-
- void* p;
-
-#ifdef _DEBUG
- size += OS_HEAP_ALIGN;
-#endif
-
-#ifdef HOST_WINDOWS
- HANDLE hHeap = g_hProcessHeap;
- if (hHeap == NULL)
- {
- InterlockedCompareExchangeT(&g_hProcessHeap, ::GetProcessHeap(), NULL);
- hHeap = g_hProcessHeap;
- }
-
- p = HeapAlloc(hHeap, 0, size);
-#else
- p = malloc(size);
-#endif
-
-#ifdef _DEBUG
- // Store the tag to detect heap contamination
- if (p != NULL)
- {
- *((DWORD*)p) = CLRALLOC_TAG;
- p = (BYTE*)p + OS_HEAP_ALIGN;
- }
-#endif
-
-#ifndef SELF_NO_HOST
- if (p == NULL
- // If we have not created StressLog ring buffer, we should not try to use it.
- // StressLog is going to do a memory allocation. We may enter an endless loop.
- && StressLog::t_pCurrentThreadLog != NULL)
- {
- STRESS_LOG_OOM_STACK(size);
- }
-#endif
-
- return p;
-}
-
-FORCEINLINE void ClrFree(void* p)
-{
- STATIC_CONTRACT_NOTHROW;
-
-#ifdef _DEBUG
- if (p != NULL)
- {
- // Check the heap handle to detect heap contamination
- p = (BYTE*)p - OS_HEAP_ALIGN;
- if (*((DWORD*)p) != CLRALLOC_TAG)
- _ASSERTE(!"Heap contamination detected! HeapFree was called on a heap other than the one that memory was allocated from.\n"
- "Possible cause: you used new (executable) to allocate the memory, but didn't use DeleteExecutable() to free it.");
- }
-#endif
-
-#ifdef HOST_WINDOWS
- if (p != NULL)
- HeapFree(g_hProcessHeap, 0, p);
-#else
- free(p);
-#endif
-}
-
-void * __cdecl
-operator new(size_t n)
-{
-#ifdef _DEBUG_IMPL
- CLRThrowsExceptionWorker();
-#endif
-
- STATIC_CONTRACT_THROWS;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_FAULT;
- STATIC_CONTRACT_SUPPORTS_DAC_HOST_ONLY;
-
- void* result = ClrMalloc(n);
- if (result == NULL) {
- ThrowOutOfMemory();
- }
- TRASH_LASTERROR;
- return result;
-}
-
-void * __cdecl
-operator new[](size_t n)
-{
-#ifdef _DEBUG_IMPL
- CLRThrowsExceptionWorker();
-#endif
-
- STATIC_CONTRACT_THROWS;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_FAULT;
- STATIC_CONTRACT_SUPPORTS_DAC_HOST_ONLY;
-
- void* result = ClrMalloc(n);
- if (result == NULL) {
- ThrowOutOfMemory();
- }
- TRASH_LASTERROR;
- return result;
-};
-
-#endif // HAS_ADDRESS_SANITIZER || DACCESS_COMPILE
-
-void * __cdecl operator new(size_t n, const NoThrow&) NOEXCEPT
-{
-#if defined(HAS_ADDRESS_SANITIZER) || defined(DACCESS_COMPILE)
- // use standard heap functions for address santizier (which doesn't provide for NoThrow)
- void * result = operator new(n);
-#else
- STATIC_CONTRACT_NOTHROW;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_FAULT;
- STATIC_CONTRACT_SUPPORTS_DAC_HOST_ONLY;
-
- INCONTRACT(_ASSERTE(!ARE_FAULTS_FORBIDDEN()));
- void* result = ClrMalloc(n);
-#endif // HAS_ADDRESS_SANITIZER || DACCESS_COMPILE
- TRASH_LASTERROR;
- return result;
-}
-
-void * __cdecl operator new[](size_t n, const NoThrow&) NOEXCEPT
-{
-#if defined(HAS_ADDRESS_SANITIZER) || defined(DACCESS_COMPILE)
- // use standard heap functions for address santizier (which doesn't provide for NoThrow)
- void * result = operator new[](n);
-#else
- STATIC_CONTRACT_NOTHROW;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_FAULT;
- STATIC_CONTRACT_SUPPORTS_DAC_HOST_ONLY;
-
- INCONTRACT(_ASSERTE(!ARE_FAULTS_FORBIDDEN()));
-
- void* result = ClrMalloc(n);
-#endif // HAS_ADDRESS_SANITIZER || DACCESS_COMPILE
- TRASH_LASTERROR;
- return result;
-}
-
-#if defined(HAS_ADDRESS_SANITIZER) || defined(DACCESS_COMPILE)
-// use standard heap functions for address santizier
-#else
-void __cdecl
-operator delete(void *p) NOEXCEPT
-{
- STATIC_CONTRACT_NOTHROW;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_SUPPORTS_DAC_HOST_ONLY;
-
- ClrFree(p);
-
- TRASH_LASTERROR;
-}
-
-void __cdecl
-operator delete[](void *p) NOEXCEPT
-{
- STATIC_CONTRACT_NOTHROW;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_SUPPORTS_DAC_HOST_ONLY;
-
- ClrFree(p);
- TRASH_LASTERROR;
-}
-
-#endif // HAS_ADDRESS_SANITIZER || DACCESS_COMPILE
-
-/* ------------------------------------------------------------------------ *
- * New operator overloading for the executable heap
- * ------------------------------------------------------------------------ */
-
-#ifdef HOST_WINDOWS
-
-HANDLE ClrGetProcessExecutableHeap()
-{
- // Note: this can be called a little early for real contracts, so we use static contracts instead.
- STATIC_CONTRACT_NOTHROW;
- STATIC_CONTRACT_GC_NOTRIGGER;
-
- static HANDLE g_ExecutableHeapHandle;
-
- //
- // Create the executable heap lazily
- //
- if (g_ExecutableHeapHandle == NULL)
- {
-
- HANDLE ExecutableHeapHandle = HeapCreate(
- HEAP_CREATE_ENABLE_EXECUTE, // heap allocation attributes
- 0, // initial heap size
- 0 // maximum heap size; 0 == growable
- );
-
- if (ExecutableHeapHandle == NULL)
- return NULL;
-
- HANDLE ExistingValue = InterlockedCompareExchangeT(&g_ExecutableHeapHandle, ExecutableHeapHandle, NULL);
- if (ExistingValue != NULL)
- {
- HeapDestroy(ExecutableHeapHandle);
- }
- }
-
- return g_ExecutableHeapHandle;
-}
-
-const CExecutable executable = { 0 };
-
-void * __cdecl operator new(size_t n, const CExecutable&)
-{
-#if defined(_DEBUG_IMPL)
- CLRThrowsExceptionWorker();
-#endif
-
- STATIC_CONTRACT_THROWS;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_FAULT;
-
- HANDLE hExecutableHeap = ClrGetProcessExecutableHeap();
- if (hExecutableHeap == NULL) {
- ThrowOutOfMemory();
- }
-
- void * result = HeapAlloc(hExecutableHeap, 0, n);
- if (result == NULL) {
- ThrowOutOfMemory();
- }
- TRASH_LASTERROR;
- return result;
-}
-
-void * __cdecl operator new[](size_t n, const CExecutable&)
-{
-#if defined(_DEBUG_IMPL)
- CLRThrowsExceptionWorker();
-#endif
-
- STATIC_CONTRACT_THROWS;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_FAULT;
-
- HANDLE hExecutableHeap = ClrGetProcessExecutableHeap();
- if (hExecutableHeap == NULL) {
- ThrowOutOfMemory();
- }
-
- void * result = HeapAlloc(hExecutableHeap, 0, n);
- if (result == NULL) {
- ThrowOutOfMemory();
- }
- TRASH_LASTERROR;
- return result;
-}
-
-void * __cdecl operator new(size_t n, const CExecutable&, const NoThrow&)
-{
- STATIC_CONTRACT_NOTHROW;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_FAULT;
-
- INCONTRACT(_ASSERTE(!ARE_FAULTS_FORBIDDEN()));
-
- HANDLE hExecutableHeap = ClrGetProcessExecutableHeap();
- if (hExecutableHeap == NULL)
- return NULL;
-
- void * result = HeapAlloc(hExecutableHeap, 0, n);
- TRASH_LASTERROR;
- return result;
-}
-
-void * __cdecl operator new[](size_t n, const CExecutable&, const NoThrow&)
-{
- STATIC_CONTRACT_NOTHROW;
- STATIC_CONTRACT_GC_NOTRIGGER;
- STATIC_CONTRACT_FAULT;
-
- INCONTRACT(_ASSERTE(!ARE_FAULTS_FORBIDDEN()));
-
- HANDLE hExecutableHeap = ClrGetProcessExecutableHeap();
- if (hExecutableHeap == NULL)
- return NULL;
-
- void * result = HeapAlloc(hExecutableHeap, 0, n);
- TRASH_LASTERROR;
- return result;
-}
-#endif // HOST_WINDOWS
#include "log.h"
+#ifdef HOST_WINDOWS
extern "C" _CRTIMP int __cdecl _flushall(void);
+#endif
+// Global state counter to implement SUPPRESS_ALLOCATION_ASSERTS_IN_THIS_SCOPE.
Volatile<LONG> g_DbgSuppressAllocationAsserts = 0;
-#ifdef _DEBUG
+static void GetExecutableFileNameUtf8(SString& value)
+{
+ CONTRACTL
+ {
+ THROWS;
+ GC_NOTRIGGER;
+ }
+ CONTRACTL_END;
+
+ SString tmp;
+ WCHAR * pCharBuf = tmp.OpenUnicodeBuffer(_MAX_PATH);
+ DWORD numChars = GetModuleFileNameW(0 /* Get current executable */, pCharBuf, _MAX_PATH);
+ tmp.CloseBuffer(numChars);
+
+ tmp.ConvertToUTF8(value);
+}
+
+static void DECLSPEC_NORETURN FailFastOnAssert()
+{
+ WRAPPER_NO_CONTRACT; // If we're calling this, we're well past caring about contract consistency!
+
+ FlushLogging(); // make certain we get the last part of the log
+#ifdef HOST_WINDOWS
+ _flushall();
+#else
+ fflush(NULL);
+#endif
+
+ ShutdownLogging();
+ RaiseFailFastException(NULL, NULL, 0);
+}
+
VOID LogAssert(
LPCSTR szFile,
// Log asserts to the stress log. Note that we can't include the szExpr b/c that
// may not be a string literal (particularly for formatt-able asserts).
- STRESS_LOG2(LF_ASSERT, LL_ALWAYS, "ASSERT:%s, line:%d\n", szFile, iLine);
+ STRESS_LOG2(LF_ASSERT, LL_ALWAYS, "ASSERT:%s:%d\n", szFile, iLine);
SYSTEMTIME st;
#ifndef TARGET_UNIX
GetSystemTime(&st);
#endif
- PathString exename;
- WszGetModuleFileName(NULL, exename);
+ SString exename;
+ GetExecutableFileNameUtf8(exename);
LOG((LF_ASSERT,
LL_FATALERROR,
szFile,
iLine,
szExpr));
- LOG((LF_ASSERT, LL_FATALERROR, "RUNNING EXE: %ws\n", exename.GetUnicode()));
+ LOG((LF_ASSERT, LL_FATALERROR, "RUNNING EXE: %s\n", exename.GetUTF8()));
}
//*****************************************************************************
// failed hresult. But this code will check what environment you are running
// in and give an assert for running in a debug build environment. Usually
// out of memory on a dev machine is a bogus allocation, and this allows you
-// to catch such errors. But when run in a stress envrionment where you are
+// to catch such errors. But when run in a stress environment where you are
// trying to get out of memory, assert behavior stops the tests.
//*****************************************************************************
HRESULT _OutOfMemory(LPCSTR szFile, int iLine)
STATIC_CONTRACT_NOTHROW;
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_DEBUG_ONLY;
+
+ printf("WARNING: Out of memory condition being issued from: %s, line %d\n", szFile, iLine);
return (E_OUTOFMEMORY);
}
-int _DbgBreakCount = 0;
static const char * szLowMemoryAssertMessage = "Assert failure (unable to format)";
//*****************************************************************************
bool _DbgBreakCheck(
LPCSTR szFile,
int iLine,
- LPCSTR szExpr,
+ LPCUTF8 szExpr,
BOOL fConstrained)
{
STATIC_CONTRACT_THROWS;
CONTRACT_VIOLATION(FaultNotFatal | GCViolation | TakesLockViolation);
- SString debugOutput;
- SString dialogOutput;
+ char formatBuffer[4096];
+
SString modulePath;
- SString dialogTitle;
- SString dialogIgnoreMessage;
BOOL formattedMessages = FALSE;
// If we are low on memory we cannot even format a message. If this happens we want to
{
EX_TRY
{
- ClrGetModuleFileName(0, modulePath);
- debugOutput.Printf(
- W("\nAssert failure(PID %d [0x%08x], Thread: %d [0x%04x]): %hs\n")
- W(" File: %hs Line: %d\n")
- W(" Image: "),
+ GetExecutableFileNameUtf8(modulePath);
+
+ sprintf_s(formatBuffer, sizeof(formatBuffer),
+ "\nAssert failure(PID %d [0x%08x], Thread: %d [0x%04x]): %s\n"
+ " File: %s:%d\n"
+ " Image: %s\n\n",
GetCurrentProcessId(), GetCurrentProcessId(),
GetCurrentThreadId(), GetCurrentThreadId(),
- szExpr, szFile, iLine);
- debugOutput.Append(modulePath);
- debugOutput.Append(W("\n\n"));
-
- // Change format for message box. The extra spaces in the title
- // are there to get around format truncation.
- dialogOutput.Printf(
- W("%hs\n\n%hs, Line: %d\n\nAbort - Kill program\nRetry - Debug\nIgnore - Keep running\n")
- W("\n\nImage:\n"), szExpr, szFile, iLine);
- dialogOutput.Append(modulePath);
- dialogOutput.Append(W("\n"));
- dialogTitle.Printf(W("Assert Failure (PID %d, Thread %d/0x%04x)"),
- GetCurrentProcessId(), GetCurrentThreadId(), GetCurrentThreadId());
-
- dialogIgnoreMessage.Printf(W("Ignore the assert for the rest of this run?\nYes - Assert will never fire again.\nNo - Assert will continue to fire.\n\n%hs\nLine: %d\n"),
- szFile, iLine);
+ szExpr, szFile, iLine, modulePath.GetUTF8());
formattedMessages = TRUE;
}
// Emit assert in debug output and console for easy access.
if (formattedMessages)
{
- WszOutputDebugString(debugOutput);
- fwprintf(stderr, W("%s"), (const WCHAR*)debugOutput);
+ OutputDebugStringUtf8(formatBuffer);
+ fprintf(stderr, "%s", formatBuffer);
}
else
{
// Note: we cannot convert to unicode or concatenate in this situation.
- OutputDebugStringA(szLowMemoryAssertMessage);
- OutputDebugStringA("\n");
- OutputDebugStringA(szFile);
- OutputDebugStringA("\n");
- OutputDebugStringA(szExpr);
- OutputDebugStringA("\n");
- printf(szLowMemoryAssertMessage);
+ OutputDebugStringUtf8(szLowMemoryAssertMessage);
+ OutputDebugStringUtf8("\n");
+ OutputDebugStringUtf8(szFile);
+ OutputDebugStringUtf8("\n");
+ OutputDebugStringUtf8(szExpr);
+ OutputDebugStringUtf8("\n");
+ printf("%s", szLowMemoryAssertMessage);
printf("\n");
- printf(szFile);
+ printf("%s", szFile);
printf("\n");
printf("%s", szExpr);
printf("\n");
}
LogAssert(szFile, iLine, szExpr);
- FlushLogging(); // make certain we get the last part of the log
- _flushall();
+
if (IsDebuggerPresent())
{
return true; // like a retry
}
- TerminateProcess(GetCurrentProcess(), 1);
- return false;
+ FailFastOnAssert();
+ UNREACHABLE();
}
bool _DbgBreakCheckNoThrow(
return result;
}
-// Called from within the IfFail...() macros. Set a breakpoint here to break on
-// errors.
-VOID DebBreak()
-{
- STATIC_CONTRACT_LEAF;
- static int i = 0; // add some code here so that we'll be able to set a BP
- i++;
-}
-
VOID DebBreakHr(HRESULT hr)
{
STATIC_CONTRACT_LEAF;
STATIC_CONTRACT_FORBID_FAULT;
STATIC_CONTRACT_SUPPORTS_DAC_HOST_ONLY;
- DEBUG_ONLY_FUNCTION;
+ //DEBUG_ONLY_FUNCTION;
#ifdef DACCESS_COMPILE
// In the DAC case, asserts can mean one of two things.
SUPPRESS_ALLOCATION_ASSERTS_IN_THIS_SCOPE;
- // Raising the assert dialog can cause us to re-enter the host when allocating
- // memory for the string. Since this is debug-only code, we can safely skip
- // violation asserts here, particularly since they can also cause infinite
- // recursion.
- PERMANENT_CONTRACT_VIOLATION(HostViolation, ReasonDebugOnly);
-
dbgForceToMemory = &szFile; //make certain these args are available in the debugger
dbgForceToMemory = &iLine;
dbgForceToMemory = &szExpr;
g_BufferLock = 0;
}
} // DbgAssertDialog
-
-#endif // _DEBUG
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-
-#include "stdafx.h" // Precompiled header key.
-#include "utilcode.h"
-#include "metadata.h"
-#include "ex.h"
-#include "pedecoder.h"
-
-#include <wininet.h>
-#include <urlmon.h>
-
-DWORD
-GetFileVersionInfoSizeW_NoThrow(
- LPCWSTR lptstrFilename, /* Filename of version stamped file */
- LPDWORD lpdwHandle
- )
-{
- WRAPPER_NO_CONTRACT;
- HRESULT hr=S_OK;
- DWORD dwRet=0;
- EX_TRY
- {
- dwRet=GetFileVersionInfoSize( (LPWSTR)lptstrFilename, lpdwHandle );
- }
- EX_CATCH_HRESULT(hr);
- if (hr!=S_OK)
- SetLastError(hr);
- return dwRet;
-
-}
-
-BOOL
-GetFileVersionInfoW_NoThrow(
- LPCWSTR lptstrFilename, /* Filename of version stamped file */
- DWORD dwHandle, /* Information from GetFileVersionSize */
- DWORD dwLen, /* Length of buffer for info */
- LPVOID lpData
- )
-{
- WRAPPER_NO_CONTRACT;
- HRESULT hr=S_OK;
- BOOL bRet=FALSE;
- EX_TRY
- {
- bRet=GetFileVersionInfo( (LPWSTR)lptstrFilename, dwHandle,dwLen,lpData );
- }
- EX_CATCH_HRESULT(hr);
- if (hr!=S_OK)
- SetLastError(hr);
- return bRet;
-
-}
-
-BOOL
-VerQueryValueW_NoThrow(
- const LPVOID pBlock,
- LPCWSTR lpSubBlock,
- LPVOID * lplpBuffer,
- PUINT puLen
- )
-{
- WRAPPER_NO_CONTRACT;
- HRESULT hr=S_OK;
- BOOL bRet=FALSE;
- EX_TRY
- {
- bRet=VerQueryValueW( pBlock, (LPWSTR)lpSubBlock,lplpBuffer,puLen );
- }
- EX_CATCH_HRESULT(hr);
- if (hr!=S_OK)
- SetLastError(hr);
- return bRet;
-
-}
-
// error codes
#include "corerror.h"
-#include "resource.h"
+#include "../dlls/mscorrc/resource.h"
#include "olectl.h"
return GetOOMException();
}
+#ifdef DACCESS_COMPILE
+
+extern void* AllocDbiMemory(size_t size);
+extern void DeleteDbiMemory(void* p);
+
+void * Exception::operator new(size_t size)
+{
+ return AllocDbiMemory(size);
+}
+
+void Exception::operator delete(void* ptr)
+{
+ DeleteDbiMemory(ptr);
+}
+
+#endif
+
//------------------------------------------------------------------------------
void Exception::Delete(Exception* pvMemory)
{
return;
}
- ::delete((Exception *) pvMemory);
+#ifdef DACCESS_COMPILE
+ delete pvMemory;
+#else
+ ::delete pvMemory;
+#endif
+
}
void Exception::GetMessage(SString &result)
#ifdef _DEBUG // @todo: do we want to burn strings for this in a free build?
- CASE_HRESULT(CEE_E_CVTRES_NOT_FOUND)
CASE_HRESULT(COR_E_APPDOMAINUNLOADED)
CASE_HRESULT(COR_E_CANNOTUNLOADAPPDOMAIN)
CASE_HRESULT(MSEE_E_ASSEMBLYLOADINPROGRESS)
- CASE_HRESULT(COR_E_FIXUPSINEXE)
- CASE_HRESULT(COR_E_MODULE_HASH_CHECK_FAILED)
- CASE_HRESULT(FUSION_E_LOADFROM_BLOCKED)
- CASE_HRESULT(FUSION_E_CACHEFILE_FAILED)
CASE_HRESULT(FUSION_E_REF_DEF_MISMATCH)
- CASE_HRESULT(FUSION_E_INVALID_PRIVATE_ASM_LOCATION)
- CASE_HRESULT(FUSION_E_ASM_MODULE_MISSING)
- CASE_HRESULT(FUSION_E_PRIVATE_ASM_DISALLOWED)
- CASE_HRESULT(FUSION_E_SIGNATURE_CHECK_FAILED)
CASE_HRESULT(FUSION_E_INVALID_NAME)
- CASE_HRESULT(FUSION_E_CODE_DOWNLOAD_DISABLED)
CASE_HRESULT(CLDB_E_FILE_BADREAD)
CASE_HRESULT(CLDB_E_FILE_BADWRITE)
CASE_HRESULT(CLDB_S_TRUNCATION)
CASE_HRESULT(CORPROF_E_NOT_MANAGED_THREAD)
CASE_HRESULT(CORPROF_E_CALL_ONLY_FROM_INIT)
CASE_HRESULT(CORPROF_E_NOT_YET_AVAILABLE)
- CASE_HRESULT(SECURITY_E_INCOMPATIBLE_SHARE)
- CASE_HRESULT(SECURITY_E_UNVERIFIABLE)
- CASE_HRESULT(SECURITY_E_INCOMPATIBLE_EVIDENCE)
CASE_HRESULT(CLDB_E_INTERNALERROR)
CASE_HRESULT(CORSEC_E_POLICY_EXCEPTION)
CASE_HRESULT(CORSEC_E_MIN_GRANT_FAIL)
CASE_HRESULT(CORSEC_E_NO_EXEC_PERM)
CASE_HRESULT(CORSEC_E_XMLSYNTAX)
CASE_HRESULT(CORSEC_E_INVALID_STRONGNAME)
- CASE_HRESULT(CORSEC_E_MISSING_STRONGNAME)
CASE_HRESULT(CORSEC_E_INVALID_IMAGE_FORMAT)
CASE_HRESULT(CORSEC_E_CRYPTO)
CASE_HRESULT(CORSEC_E_CRYPTO_UNEX_OPER)
- CASE_HRESULT(CORSECATTR_E_BAD_ACTION)
CASE_HRESULT(COR_E_APPLICATION)
CASE_HRESULT(COR_E_ARGUMENTOUTOFRANGE)
CASE_HRESULT(COR_E_ARITHMETIC)
return m_exception.ExceptionCode;
}
+#ifdef FEATURE_COMINTEROP
IErrorInfo *SEHException::GetErrorInfo()
{
LIMITED_METHOD_CONTRACT;
return NULL;
}
+#endif // FEATURE_COMINTEROP
void SEHException::GetMessage(SString &string)
{
} // HRESULT DelegatingException::GetHR()
+#ifdef FEATURE_COMINTEROP
//------------------------------------------------------------------------------
IErrorInfo *DelegatingException::GetErrorInfo()
{
return pDelegate ? pDelegate->GetErrorInfo() : NULL;
} // IErrorInfo *DelegatingException::GetErrorInfo()
+#endif // FEATURE_COMINTEROP
//------------------------------------------------------------------------------
void DelegatingException::GetMessage(SString &result)
}
CONTRACTL_END;
- result = W(""); // Make sure this routine isn't an inadvertent data-leak exploit!
-
-
+ result.Set(W("")); // Make sure this routine isn't an inadvertent data-leak exploit!
SString strDescr;
BOOL fHaveDescr = FALSE;
fHaveDescr = strDescr.FormatMessage(dwFlags, 0, hr, 0);
}
- LPCSTR name = Exception::GetHRSymbolicName(hr);
-
// If we can't get a resource string, print the hresult regardless.
if (!fHaveDescr)
{
if (!bNoGeekStuff)
{
+ SString geekStuffUtf8;
if (fHaveDescr)
{
- result.Append(W(" ("));
+ geekStuffUtf8.AppendUTF8(" (");
}
- result.AppendPrintf(W("0x%.8X"), hr);
+ geekStuffUtf8.AppendPrintf("0x%.8X", hr);
+
+ LPCSTR name = Exception::GetHRSymbolicName(hr);
if (name != NULL)
{
- result.AppendPrintf(W(" (%S)"), name);
+ geekStuffUtf8.AppendPrintf(" (%s)", name);
}
if (fHaveDescr)
{
- result.Append(W(")"));
+ geekStuffUtf8.AppendUTF8(")");
}
+
+ result.Append(geekStuffUtf8);
}
}
}
CONTRACTL_END;
- result = W(""); // Make sure this routine isn't an inadvertent data-leak exploit!
+ result.Set(W("")); // Make sure this routine isn't an inadvertent data-leak exploit!
GetHRMsg(hresult, result);
}
}
else // use WideCharToMultiByte to calculate result length
{
- * pLength = WszWideCharToMultiByte(CP_UTF8, 0, pString, -1, NULL, 0, NULL, NULL);
+ * pLength = WideCharToMultiByte(CP_UTF8, 0, pString, -1, NULL, 0, NULL, NULL);
if (*pLength == 0)
{
}
else
{
- length = WszWideCharToMultiByte(CP_UTF8, 0, pString, -1, pBuffer, (int) length + 1, NULL, NULL);
+ length = WideCharToMultiByte(CP_UTF8, 0, pString, -1, pBuffer, (int) length + 1, NULL, NULL);
if (length == 0)
{
}
else
{
- * pLength = WszMultiByteToWideChar(CP_UTF8, 0, pString, -1, NULL, 0);
+ * pLength = MultiByteToWideChar(CP_UTF8, 0, pString, -1, NULL, 0);
if (* pLength == 0)
{
}
else
{
- length = WszMultiByteToWideChar(CP_UTF8, 0, pString, -1, pBuffer, (int) length + 1);
+ length = MultiByteToWideChar(CP_UTF8, 0, pString, -1, pBuffer, (int) length + 1);
if (length == 0)
{
LPVOID ClrVirtualAlloc(LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect)
{
-#ifdef FAILPOINTS_ENABLED
- if (RFS_HashStack ())
- return NULL;
-#endif
return VirtualAlloc(lpAddress, dwSize, flAllocationType, flProtect);
}
#include "sstring.h"
#include "ex.h"
+#ifdef HOST_WINDOWS
class LongFile
{
private:
-#ifdef HOST_WINDOWS
static const WCHAR* ExtendedPrefix;
static const WCHAR* DevicePathPrefix;
static const WCHAR* UNCPathPrefix;
static const WCHAR* UNCExtendedPathPrefix;
static const WCHAR VolumeSeparatorChar;
#define UNCPATHPREFIX W("\\\\")
-#endif //HOST_WINDOWS
- static const WCHAR DirectorySeparatorChar;
static const WCHAR AltDirectorySeparatorChar;
+ static const WCHAR DirectorySeparatorChar;
public:
- static BOOL ContainsDirectorySeparator(SString & path);
static BOOL IsDirectorySeparator(WCHAR c);
static BOOL IsPathNotFullyQualified(const SString & path);
static HRESULT NormalizePath(SString& path);
-#ifdef HOST_WINDOWS
static BOOL IsExtended(const SString & path);
static BOOL IsUNCExtended(const SString & path);
static BOOL IsDevice(const SString & path);
static void NormalizeDirectorySeparators(SString& path);
-#endif
};
-
-HMODULE
-LoadLibraryExWrapper(
- LPCWSTR lpLibFileName,
- HANDLE hFile,
- DWORD dwFlags
- )
-{
- CONTRACTL
- {
- NOTHROW;
- }
- CONTRACTL_END;
-
- HRESULT hr = S_OK;
- HMODULE ret = NULL;
- DWORD lastError = 0;
-
- EX_TRY
- {
-
- LongPathString path(LongPathString::Literal, lpLibFileName);
-
- if (LongFile::IsPathNotFullyQualified(path) || SUCCEEDED(LongFile::NormalizePath(path)))
- {
-#ifdef HOST_WINDOWS
- //Adding the assert to ensure relative paths which are not just filenames are not used for LoadLibrary Calls
- _ASSERTE(!LongFile::IsPathNotFullyQualified(path) || !LongFile::ContainsDirectorySeparator(path));
- LongFile::NormalizeDirectorySeparators(path);
-#endif //HOST_WINDOWS
-
- ret = LoadLibraryExW(path.GetUnicode(), hFile, dwFlags);
- }
-
- lastError = GetLastError();
- }
- EX_CATCH_HRESULT(hr);
-
- if (hr != S_OK)
- {
- SetLastError(hr);
- }
- else if(ret == NULL)
- {
- SetLastError(lastError);
- }
-
- return ret;
-}
-
-HANDLE
-CreateFileWrapper(
- _In_ LPCWSTR lpFileName,
- _In_ DWORD dwDesiredAccess,
- _In_ DWORD dwShareMode,
- _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
- _In_ DWORD dwCreationDisposition,
- _In_ DWORD dwFlagsAndAttributes,
- _In_opt_ HANDLE hTemplateFile
- )
-{
- CONTRACTL
- {
- NOTHROW;
- }
- CONTRACTL_END;
-
- HRESULT hr = S_OK;
- DWORD lastError = 0;
- HANDLE ret = INVALID_HANDLE_VALUE;
-
- EX_TRY
- {
- LongPathString path(LongPathString::Literal, lpFileName);
-
- if (SUCCEEDED(LongFile::NormalizePath(path)))
- {
- ret = CreateFileW(path.GetUnicode(),
- dwDesiredAccess,
- dwShareMode,
- lpSecurityAttributes,
- dwCreationDisposition,
- dwFlagsAndAttributes,
- hTemplateFile);
-
- }
-
- lastError = GetLastError();
- }
- EX_CATCH_HRESULT(hr);
-
- if (hr != S_OK )
- {
- SetLastError(hr);
- }
- else if(ret == INVALID_HANDLE_VALUE)
- {
- SetLastError(lastError);
- }
-
- return ret;
-}
-
-DWORD
-GetFileAttributesWrapper(
- _In_ LPCWSTR lpFileName
- )
-{
- CONTRACTL
- {
- NOTHROW;
- }
- CONTRACTL_END;
-
- HRESULT hr = S_OK;
- DWORD ret = INVALID_FILE_ATTRIBUTES;
- DWORD lastError = 0;
-
- EX_TRY
- {
- LongPathString path(LongPathString::Literal, lpFileName);
-
- if (SUCCEEDED(LongFile::NormalizePath(path)))
- {
- ret = GetFileAttributesW(
- path.GetUnicode()
- );
- }
-
- lastError = GetLastError();
- }
- EX_CATCH_HRESULT(hr);
-
- if (hr != S_OK )
- {
- SetLastError(hr);
- }
- else if(ret == INVALID_FILE_ATTRIBUTES)
- {
- SetLastError(lastError);
- }
-
- return ret;
-}
-
-BOOL
-GetFileAttributesExWrapper(
- _In_ LPCWSTR lpFileName,
- _In_ GET_FILEEX_INFO_LEVELS fInfoLevelId,
- _Out_writes_bytes_(sizeof(WIN32_FILE_ATTRIBUTE_DATA)) LPVOID lpFileInformation
- )
-{
- CONTRACTL
- {
- NOTHROW;
- }
- CONTRACTL_END;
-
- HRESULT hr = S_OK;
- BOOL ret = FALSE;
- DWORD lastError = 0;
-
- EX_TRY
- {
- LongPathString path(LongPathString::Literal, lpFileName);
-
- if (SUCCEEDED(LongFile::NormalizePath(path)))
- {
- ret = GetFileAttributesExW(
- path.GetUnicode(),
- fInfoLevelId,
- lpFileInformation
- );
-
- }
-
- lastError = GetLastError();
- }
- EX_CATCH_HRESULT(hr);
-
- if (hr != S_OK )
- {
- SetLastError(hr);
- }
- else if(ret == FALSE)
- {
- SetLastError(lastError);
- }
-
- return ret;
-}
-
-BOOL
-DeleteFileWrapper(
- _In_ LPCWSTR lpFileName
- )
-{
- CONTRACTL
- {
- NOTHROW;
- }
- CONTRACTL_END;
-
- HRESULT hr = S_OK;
- BOOL ret = FALSE;
- DWORD lastError = 0;
-
- EX_TRY
- {
- LongPathString path(LongPathString::Literal, lpFileName);
-
- if (SUCCEEDED(LongFile::NormalizePath(path)))
- {
- ret = DeleteFileW(
- path.GetUnicode()
- );
- }
-
- lastError = GetLastError();
- }
- EX_CATCH_HRESULT(hr);
-
- if (hr != S_OK )
- {
- SetLastError(hr);
- }
- else if(ret == FALSE)
- {
- SetLastError(lastError);
- }
-
- return ret;
-}
-
-BOOL
-MoveFileExWrapper(
- _In_ LPCWSTR lpExistingFileName,
- _In_opt_ LPCWSTR lpNewFileName,
- _In_ DWORD dwFlags
- )
-{
- CONTRACTL
- {
- NOTHROW;
- }
- CONTRACTL_END;
-
- HRESULT hr = S_OK;
- BOOL ret = FALSE;
- DWORD lastError = 0;
-
- EX_TRY
- {
- LongPathString Existingpath(LongPathString::Literal, lpExistingFileName);
- LongPathString Newpath(LongPathString::Literal, lpNewFileName);
-
- if (SUCCEEDED(LongFile::NormalizePath(Existingpath)) && SUCCEEDED(LongFile::NormalizePath(Newpath)))
- {
- ret = MoveFileExW(
- Existingpath.GetUnicode(),
- Newpath.GetUnicode(),
- dwFlags
- );
- }
-
- lastError = GetLastError();
- }
- EX_CATCH_HRESULT(hr);
-
- if (hr != S_OK )
- {
- SetLastError(hr);
- }
- else if(ret == FALSE)
- {
- SetLastError(lastError);
- }
-
- return ret;
-
-}
+#endif // HOST_WINDOWS
DWORD
SearchPathWrapper(
EX_TRY
{
+#ifdef HOST_WINDOWS
LongPathString Existingpath(LongPathString::Literal, lpPath);
-
if (lpPath != NULL)
{
if (FAILED(LongFile::NormalizePath(Existingpath)))
lpPath = Existingpath.GetUnicode();
}
}
+#endif // HOST_WINDOWS
if (!getPath)
{
return ret;
}
-UINT WINAPI GetTempFileNameWrapper(
- _In_ LPCTSTR lpPathName,
- _In_ LPCTSTR lpPrefixString,
- _In_ UINT uUnique,
- SString& lpTempFileName
+DWORD WINAPI GetEnvironmentVariableWrapper(
+ _In_opt_ LPCTSTR lpName,
+ _Out_opt_ SString& lpBuffer
)
{
CONTRACTL
CONTRACTL_END;
HRESULT hr = S_OK;
- UINT ret = 0;
+ DWORD ret = 0;
DWORD lastError = 0;
EX_TRY
{
- //Change the behaviour in Redstone to retry
- COUNT_T size = MAX_LONGPATH;
- WCHAR* buffer = lpTempFileName.OpenUnicodeBuffer(size - 1);
- ret = GetTempFileNameW(
- lpPathName,
- lpPrefixString,
- uUnique,
- buffer
+
+ COUNT_T size = lpBuffer.GetUnicodeAllocation() + 1;
+
+ ret = GetEnvironmentVariableW(
+ lpName,
+ lpBuffer.OpenUnicodeBuffer(size - 1),
+ size
);
- lastError = GetLastError();
- size = (COUNT_T)wcslen(buffer);
- lpTempFileName.CloseBuffer(size);
+ // We loop round getting the length of the env var and then trying to copy
+ // the value into a the allocated buffer. Usually we'll go through this loop
+ // precisely once, but the caution is necessary in case the variable mutates
+ // beneath us, as the environment variable can be modified by another thread
+ //between two calls to GetEnvironmentVariableW
+ while (ret > size)
+ {
+ size = ret;
+ lpBuffer.CloseBuffer();
+ ret = GetEnvironmentVariableW(
+ lpName,
+ lpBuffer.OpenUnicodeBuffer(size - 1),
+ size);
+ }
+
+ lastError = GetLastError();
+ lpBuffer.CloseBuffer(ret);
}
EX_CATCH_HRESULT(hr);
return ret;
}
-DWORD WINAPI GetTempPathWrapper(
- SString& lpBuffer
- )
+
+#ifdef HOST_WINDOWS
+
+HMODULE
+LoadLibraryExWrapper(
+ LPCWSTR lpLibFileName,
+ HANDLE hFile,
+ DWORD dwFlags
+ )
{
CONTRACTL
{
}
CONTRACTL_END;
- HRESULT hr = S_OK;
- DWORD ret = 0;
+ HRESULT hr = S_OK;
+ HMODULE ret = NULL;
DWORD lastError = 0;
EX_TRY
{
- //Change the behaviour in Redstone to retry
- COUNT_T size = MAX_LONGPATH;
+ LongPathString path(LongPathString::Literal, lpLibFileName);
- ret = GetTempPathW(
- size,
- lpBuffer.OpenUnicodeBuffer(size - 1)
- );
+ if (LongFile::IsPathNotFullyQualified(path) || SUCCEEDED(LongFile::NormalizePath(path)))
+ {
+ LongFile::NormalizeDirectorySeparators(path);
+
+ ret = LoadLibraryExW(path.GetUnicode(), hFile, dwFlags);
+ }
lastError = GetLastError();
- lpBuffer.CloseBuffer(ret);
}
EX_CATCH_HRESULT(hr);
{
SetLastError(hr);
}
- else if (ret == 0)
+ else if(ret == NULL)
{
SetLastError(lastError);
}
return ret;
}
-DWORD WINAPI GetCurrentDirectoryWrapper(
- SString& lpBuffer
- )
+HANDLE
+CreateFileWrapper(
+ _In_ LPCWSTR lpFileName,
+ _In_ DWORD dwDesiredAccess,
+ _In_ DWORD dwShareMode,
+ _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes,
+ _In_ DWORD dwCreationDisposition,
+ _In_ DWORD dwFlagsAndAttributes,
+ _In_opt_ HANDLE hTemplateFile
+ )
{
CONTRACTL
{
CONTRACTL_END;
HRESULT hr = S_OK;
- DWORD ret = 0;
DWORD lastError = 0;
+ HANDLE ret = INVALID_HANDLE_VALUE;
EX_TRY
{
- //Change the behaviour in Redstone to retry
- COUNT_T size = MAX_LONGPATH;
+ LongPathString path(LongPathString::Literal, lpFileName);
- ret = GetCurrentDirectoryW(
- size,
- lpBuffer.OpenUnicodeBuffer(size - 1)
- );
+ if (SUCCEEDED(LongFile::NormalizePath(path)))
+ {
+ ret = CreateFileW(path.GetUnicode(),
+ dwDesiredAccess,
+ dwShareMode,
+ lpSecurityAttributes,
+ dwCreationDisposition,
+ dwFlagsAndAttributes,
+ hTemplateFile);
+
+ }
lastError = GetLastError();
- lpBuffer.CloseBuffer(ret);
}
EX_CATCH_HRESULT(hr);
- if (hr != S_OK)
+ if (hr != S_OK )
{
SetLastError(hr);
}
- else if (ret == 0)
+ else if(ret == INVALID_HANDLE_VALUE)
{
SetLastError(lastError);
}
return ret;
}
-DWORD WINAPI GetEnvironmentVariableWrapper(
- _In_opt_ LPCTSTR lpName,
- _Out_opt_ SString& lpBuffer
- )
+BOOL
+GetFileAttributesExWrapper(
+ _In_ LPCWSTR lpFileName,
+ _In_ GET_FILEEX_INFO_LEVELS fInfoLevelId,
+ _Out_writes_bytes_(sizeof(WIN32_FILE_ATTRIBUTE_DATA)) LPVOID lpFileInformation
+ )
{
CONTRACTL
{
CONTRACTL_END;
HRESULT hr = S_OK;
- DWORD ret = 0;
+ BOOL ret = FALSE;
DWORD lastError = 0;
EX_TRY
{
+ LongPathString path(LongPathString::Literal, lpFileName);
- COUNT_T size = lpBuffer.GetUnicodeAllocation() + 1;
-
- ret = GetEnvironmentVariableW(
- lpName,
- lpBuffer.OpenUnicodeBuffer(size - 1),
- size
- );
-
- // We loop round getting the length of the env var and then trying to copy
- // the value into a the allocated buffer. Usually we'll go through this loop
- // precisely once, but the caution is ncessary in case the variable mutates
- // beneath us, as the environment variable can be modified by another thread
- //between two calls to GetEnvironmentVariableW
-
- while (ret > size)
+ if (SUCCEEDED(LongFile::NormalizePath(path)))
{
- size = ret;
- lpBuffer.CloseBuffer();
- ret = GetEnvironmentVariableW(
- lpName,
- lpBuffer.OpenUnicodeBuffer(size - 1),
- size);
+ ret = GetFileAttributesExW(
+ path.GetUnicode(),
+ fInfoLevelId,
+ lpFileInformation
+ );
+
}
lastError = GetLastError();
- lpBuffer.CloseBuffer(ret);
}
EX_CATCH_HRESULT(hr);
- if (hr != S_OK)
+ if (hr != S_OK )
{
SetLastError(hr);
}
- else if (ret == 0)
+ else if(ret == FALSE)
{
SetLastError(lastError);
}
return ret;
}
-
-#ifdef HOST_WINDOWS
-
BOOL
CopyFileExWrapper(
_In_ LPCWSTR lpExistingFileName,
return ret;
}
-HANDLE
-FindFirstFileExWrapper(
- _In_ LPCWSTR lpFileName,
- _In_ FINDEX_INFO_LEVELS fInfoLevelId,
- _Out_writes_bytes_(sizeof(WIN32_FIND_DATAW)) LPVOID lpFindFileData,
- _In_ FINDEX_SEARCH_OPS fSearchOp,
- _Reserved_ LPVOID lpSearchFilter,
- _In_ DWORD dwAdditionalFlags
- )
-{
- CONTRACTL
- {
- NOTHROW;
- }
- CONTRACTL_END;
-
- HRESULT hr = S_OK;
- HANDLE ret = INVALID_HANDLE_VALUE;
- DWORD lastError = 0;
-
- EX_TRY
- {
- LongPathString path(LongPathString::Literal, lpFileName);
-
- if (SUCCEEDED(LongFile::NormalizePath(path)))
- {
- ret = FindFirstFileExW(
- path.GetUnicode(),
- fInfoLevelId,
- lpFindFileData,
- fSearchOp,
- lpSearchFilter,
- dwAdditionalFlags
- );
- }
-
- lastError = GetLastError();
- }
- EX_CATCH_HRESULT(hr);
-
- if (hr != S_OK )
- {
- SetLastError(hr);
- }
- else if(ret == INVALID_HANDLE_VALUE)
- {
- SetLastError(lastError);
- }
-
- return ret;
-}
-#endif // HOST_WINDOWS
-
//Implementation of LongFile Helpers
const WCHAR LongFile::DirectorySeparatorChar = W('\\');
const WCHAR LongFile::AltDirectorySeparatorChar = W('/');
-#ifdef HOST_WINDOWS
const WCHAR LongFile::VolumeSeparatorChar = W(':');
const WCHAR* LongFile::ExtendedPrefix = W("\\\\?\\");
const WCHAR* LongFile::DevicePathPrefix = W("\\\\.\\");
//In this case if path is \\server the extended syntax should be like \\?\UNC\server
//The below logic populates the path from prefixLen offset from the start. This ensures that first 2 characters are overwritten
//
- prefixLen = prefix.GetCount() - (COUNT_T)wcslen(UNCPATHPREFIX);
+ prefixLen = prefix.GetCount() - (COUNT_T)u16_strlen(UNCPATHPREFIX);
_ASSERTE(prefixLen > 0 );
}
SString fullpath(SString::Literal,buffer + prefixLen);
//Check if the resolved path is a UNC. By default we assume relative path to resolve to disk
- if (fullpath.BeginsWith(SL(UNCPathPrefix)) && prefixLen != prefix.GetCount() - (COUNT_T)wcslen(UNCPATHPREFIX))
+ if (fullpath.BeginsWith(SL(UNCPathPrefix)) && prefixLen != prefix.GetCount() - (COUNT_T)u16_strlen(UNCPATHPREFIX))
{
//Remove the leading '\\' from the UNC path to be replaced with UNCExtendedPathPrefix
- fullpath.Replace(fullpath.Begin(), (COUNT_T)wcslen(UNCPATHPREFIX), UNCExtendedPathPrefix);
+ fullpath.Replace(fullpath.Begin(), (COUNT_T)u16_strlen(UNCPATHPREFIX), SL(UNCExtendedPathPrefix));
path.CloseBuffer();
path.Set(fullpath);
}
return S_OK;
}
-#else
-BOOL LongFile::IsPathNotFullyQualified(const SString & path)
-{
- return TRUE;
-}
-
-//Don't need to do anything For XPlat
-HRESULT LongFile::NormalizePath(SString & path)
-{
- return S_OK;
-}
-#endif //HOST_WINDOWS
-
-BOOL LongFile::ContainsDirectorySeparator(SString & path)
-{
- return path.Find(path.Begin(), DirectorySeparatorChar) || path.Find(path.Begin(), AltDirectorySeparatorChar);
-}
BOOL LongFile::IsDirectorySeparator(WCHAR c)
{
- return c == DirectorySeparatorChar || c == AltDirectorySeparatorChar;
+ return c == DirectorySeparatorChar || c == AltDirectorySeparatorChar;;
}
+
+#endif //HOST_WINDOWS
int iLen = 1; // Null terminator.
if (szNameSpace)
- iLen += (int)wcslen(szNameSpace);
+ iLen += (int)u16_strlen(szNameSpace);
if (szName)
- iLen += (int)wcslen(szName);
+ iLen += (int)u16_strlen(szName);
if (szNameSpace && *szNameSpace && szName && *szName)
++iLen;
return iLen;
STATIC_CONTRACT_FORBID_FAULT;
_ASSERTE(szPath);
- WCHAR *ptr = (WCHAR*)wcsrchr(szPath, NAMESPACE_SEPARATOR_WCHAR);
+ WCHAR *ptr = (WCHAR*)u16_strrchr(szPath, NAMESPACE_SEPARATOR_WCHAR);
if((ptr == NULL) || (ptr == szPath)) return NULL;
if(*(ptr - 1) == NAMESPACE_SEPARATOR_WCHAR) // here ptr is at least szPath+1
--ptr;
++ptr;
else
ptr = szPath;
- iLen = (int)wcslen(ptr);
+ iLen = (int)u16_strlen(ptr);
iCopyMax = min(iCopyMax, iLen);
wcsncpy_s(szName, cchName, ptr, iCopyMax);
szName[iCopyMax] = 0;
int count;
// We use cBuffer - 2 to account for the '.' and at least a 1 character name below.
- count = WszMultiByteToWideChar(CP_UTF8, 0, szNamespace, -1, szOut, cchChars-2);
+ count = MultiByteToWideChar(CP_UTF8, 0, szNamespace, -1, szOut, cchChars-2);
if (count == 0)
return false; // Supply a bigger buffer!
- // buffer access is bounded: WszMultiByteToWideChar returns 0 if access doesn't fit in range
+ // buffer access is bounded: MultiByteToWideChar returns 0 if access doesn't fit in range
#ifdef _PREFAST_
#pragma warning( suppress: 26015 )
#endif
}
if (((cchChars == 0) && (szName != NULL) && (*szName != '\0')) ||
- (WszMultiByteToWideChar(CP_UTF8, 0, szName, -1, szOut, cchChars) == 0))
+ (MultiByteToWideChar(CP_UTF8, 0, szName, -1, szOut, cchChars) == 0))
return false; // supply a bigger buffer!
return true;
} // int ns::MakePath()
int iLen = 2;
if (szNameSpace)
- iLen += (int)wcslen(szNameSpace);
+ iLen += (int)u16_strlen(szNameSpace);
if (szName)
- iLen += (int)wcslen(szName);
+ iLen += (int)u16_strlen(szName);
WCHAR *szOut = (WCHAR *) qb.AllocNoThrow(iLen * sizeof(WCHAR));
if (!szOut)
return false;
int iCopyMax = 0;
_ASSERTE(pBuffer);
- *pBuffer = NULL;
+ *pBuffer = W('\0');
if (szTypeName && *szTypeName != W('\0'))
{
int iTypeName = 0;
int iAssemblyName = 0;
if (szTypeName)
- iTypeName = (int)wcslen(szTypeName);
+ iTypeName = (int)u16_strlen(szTypeName);
if (szAssemblyName)
- iAssemblyName = (int)wcslen(szAssemblyName);
+ iAssemblyName = (int)u16_strlen(szAssemblyName);
int iLen = ASSEMBLY_SEPARATOR_LEN + iTypeName + iAssemblyName + 1; // Space for null terminator
WCHAR *szOut = (WCHAR *) qb.AllocNoThrow(iLen * sizeof(WCHAR));
}
CONTRACT_CHECK_END;
- if (fileOffset == NULL)
+ if (fileOffset == 0)
CHECK_MSG(ok == NULL_OK, "Null pointer illegal");
else
{
CONTRACT_END;
if ((rva == 0)&&(ok == NULL_NOT_OK))
- RETURN NULL;
+ RETURN (TADDR)NULL;
RVA offset;
if (IsMapped())
}
CONTRACT_END;
- if (data == NULL)
+ if (data == (TADDR)NULL)
RETURN 0;
COUNT_T offset = (COUNT_T) (data - m_base);
CONTRACT_END;
if ((fileOffset == 0)&&(ok == NULL_NOT_OK))
- RETURN NULL;
+ RETURN (TADDR)NULL;
RETURN GetRvaData(OffsetToRva(fileOffset));
}
COUNT_T ctMD = (COUNT_T)VAL32(pDirMD->Size);
TADDR pcMD = (TADDR)GetDirectoryData(pDirMD);
- if(pcMD != NULL)
+ if(pcMD != (TADDR)NULL)
{
// Storage signature checks
CHECK(ctMD >= sizeof(STORAGESIGNATURE));
for(namelen=0; (namelen<32)&&(pSS->rcName[namelen]!=0); namelen++);
CHECK((0 < namelen)&&(namelen < 32));
- // Forbid HOT_MODEL_STREAM
- CHECK(strcmp(pSS->rcName, HOT_MODEL_STREAM_A) != 0);
-
pcMD = dac_cast<TADDR>(NextStorageStream(pSS));
ctMD -= (COUNT_T)(pcMD - dac_cast<TADDR>(pSS));
IMAGE_IMPORT_BY_NAME *import = (IMAGE_IMPORT_BY_NAME*) GetRvaData(importRVA);
- CHECK(SString::_stricmp((char *) import->Name, DLL_NAME) == 0 || _stricmp((char *) import->Name, EXE_NAME) == 0);
+ CHECK(SString::_stricmp((char *) import->Name, DLL_NAME) == 0 || SString::_stricmp((char *) import->Name, EXE_NAME) == 0);
CHECK_OK;
}
return 0;
size_t entryNameLen = *(WORD*)pDecoder->GetRvaData(entryNameRva);
- if (wcslen(name) != entryNameLen)
+ if (u16_strlen(name) != entryNameLen)
continue;
if (!pDecoder->CheckRva(entryNameRva, (COUNT_T)(sizeof(WORD) * (1 + entryNameLen))))
if (IS_INTRESOURCE(nameB))
return false;
else
- foundEntry = !wcscmp(nameB, nameA);
+ foundEntry = !u16_strcmp(nameB, nameA);
}
return foundEntry;
CONTRACT_CHECK_END;
//
- // Incrementaly validate that the entire IL method body is within the bounds of the image
+ // Incrementally validate that the entire IL method body is within the bounds of the image
//
// We need to have at least the tiny header
// Optional sections following the code
//
- for (;;)
+ while (true)
{
CHECK(CheckRva(rva, UINT32(pSect - pIL) + sizeof(IMAGE_COR_ILMETHOD_SECT_SMALL)));
// DACized copy of code:COR_ILMETHOD_FAT::GetSect
TADDR pSect = AlignUp(pIL + codeEnd, 4);
- for (;;)
+ while (true)
{
PTR_COR_ILMETHOD_SECT_SMALL pSectSmall = PTR_COR_ILMETHOD_SECT_SMALL(pSect);
RETURN dac_cast<PTR_VOID>(GetDirectoryData(pDir));
}
-// Get the SizeOfStackReserve and SizeOfStackCommit from the PE file that was used to create
-// the calling process (.exe file).
-void PEDecoder::GetEXEStackSizes(SIZE_T *PE_SizeOfStackReserve, SIZE_T *PE_SizeOfStackCommit) const
-{
- CONTRACTL {
- PRECONDITION(!IsDll()); // This routine should only be called for EXE files.
- NOTHROW;
- GC_NOTRIGGER;
- } CONTRACTL_END;
-
- * PE_SizeOfStackReserve = GetSizeOfStackReserve();
- * PE_SizeOfStackCommit = GetSizeOfStackCommit();
-}
-
BOOL PEDecoder::HasNativeEntryPoint() const
{
CONTRACTL {
#include "sstring.h"
#include "ex.h"
-//-----------------------------------------------------------------------------
-// Get the current directory.
-// On success, returns true and sets 'Value' to unicode version of cur dir.
-// Throws on all failures. This should mainly be oom.
-//-----------------------------------------------------------------------------
-void ClrGetCurrentDirectory(SString & value)
-{
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- // Get size needed
- DWORD len = WszGetCurrentDirectory(value);
-
-
- // An actual API failure in GetCurrentDirectory failure should be very rare, so we'll throw on those.
- if (len == 0)
- {
- ThrowLastError();
- }
-}
-
-//-----------------------------------------------------------------------------
-// Reads an environment variable into the given SString.
-// Returns true on success, false on failure (includes if the var does not exist).
-// May throw on oom.
-//-----------------------------------------------------------------------------
-bool ClrGetEnvironmentVariable(LPCSTR szEnvVarName, SString & value)
-{
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
-
- PRECONDITION(szEnvVarName != NULL);
- }
- CONTRACTL_END;
-
- // First read it to get the needed length.
- DWORD lenWithNull = GetEnvironmentVariableA(szEnvVarName, NULL, 0);
- if (lenWithNull == 0)
- {
- return false;
- }
-
- // Now read it for content.
- char * pCharBuf = value.OpenANSIBuffer(lenWithNull);
- DWORD lenWithoutNull = GetEnvironmentVariableA(szEnvVarName, pCharBuf, lenWithNull);
- value.CloseBuffer(lenWithoutNull);
-
- if (lenWithoutNull != (lenWithNull - 1))
- {
- // Env var must have changed underneath us.
- return false;
- }
- return true;
-}
-
-void ClrGetModuleFileName(HMODULE hModule, SString & value)
-{
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- WCHAR * pCharBuf = value.OpenUnicodeBuffer(_MAX_PATH);
- DWORD numChars = GetModuleFileNameW(hModule, pCharBuf, _MAX_PATH);
- value.CloseBuffer(numChars);
-}
-
-ClrDirectoryEnumerator::ClrDirectoryEnumerator(LPCWSTR pBaseDirectory, LPCWSTR pMask /*= W("*")*/)
-{
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- StackSString strMask(pBaseDirectory);
- SString s(SString::Literal, DIRECTORY_SEPARATOR_STR_W);
- if (!strMask.EndsWith(s))
- {
- strMask.Append(s);
- }
- strMask.Append(pMask);
- dirHandle = WszFindFirstFile(strMask, &data);
-
- if (dirHandle == INVALID_HANDLE_VALUE)
- {
- DWORD dwLastError = GetLastError();
-
- // We either ran out of files, or didnt encounter even a single file matching the
- // search mask. If it is neither of these conditions, then convert the error to an exception
- // and raise it.
- if ((dwLastError != ERROR_FILE_NOT_FOUND) && (dwLastError != ERROR_NO_MORE_FILES))
- ThrowLastError();
- }
-
- fFindNext = FALSE;
-}
-
-bool ClrDirectoryEnumerator::Next()
-{
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- if (dirHandle == INVALID_HANDLE_VALUE)
- return FALSE;
-
- for (;;)
- {
- if (fFindNext)
- {
- if (!WszFindNextFile(dirHandle, &data))
- {
- if (GetLastError() != ERROR_NO_MORE_FILES)
- ThrowLastError();
-
- return FALSE;
- }
- }
- else
- {
- fFindNext = TRUE;
- }
-
- // Skip junk
- if (wcscmp(data.cFileName, W(".")) != 0 && wcscmp(data.cFileName, W("..")) != 0)
- return TRUE;
- }
-}
-
DWORD ClrReportEvent(
LPCWSTR pEventSource,
WORD wType,
{
return ClrReportEvent(pEventSource, wType, wCategory, dwEventID, lpUserSid, 1, &pMessage);
}
-
-#ifndef TARGET_UNIX
-// Read a REG_SZ (null-terminated string) value from the registry. Throws.
-//
-// Arguments:
-// hKey - key to registry hive.
-// szValueName - null-terminated string for value name to lookup.
-// If this is empty, this gets the (default) value in the registry hive.
-// value - out parameter to hold registry value string contents.
-//
-// Returns:
-// value is set on success. Throws on any failure, including if the value doesn't exist
-// or if the value exists but is not a REG_SZ.
-//
-// Notes:
-// REG_SZ is a single null-terminated string in the registry.
-// This is only support on Windows because the registry is windows specific.
-void ClrRegReadString(HKEY hKey, const SString & szValueName, SString & value)
-{
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- DWORD type;
- DWORD numBytesData;
-
- // Preemptively clear the string such that it's empty in any failure case.
- value.Clear();
-
- //
- // Step 1: First call to find size of buffer and ensure data type is correct
- //
- LONG ret = WszRegQueryValueEx(
- hKey,
- szValueName.GetUnicode(), // NULL or "\0" represents the (default) key.
- NULL, // reserved
- &type, // should be REG_SZ
- NULL, // not requesting data yet
- &numBytesData
- );
-
- if (ret != ERROR_SUCCESS)
- {
- ThrowWin32(ret);
- }
-
- if (type != REG_SZ)
- {
- // The registry value is not a string.
- ThrowHR(E_INVALIDARG);
- }
-
- // REG_SZ includes the null terminator.
- DWORD numCharsIncludingNull = numBytesData / sizeof(WCHAR);
-
- //
- // Step 2: Allocate buffer to hold final result
- //
- WCHAR * pData = value.OpenUnicodeBuffer(numCharsIncludingNull);
- DWORD numBytesData2 = numBytesData;
-
-
- //
- // Step 3: Requery to get actual contents
- //
- ret = WszRegQueryValueEx(
- hKey,
- szValueName.GetUnicode(),
- NULL, // reserved
- &type, // should still be REG_SZ
- (LPBYTE) pData,
- &numBytesData2
- );
-
- // This check should only fail if the registry was changed inbetween the first query
- // and the second. In practice, that should never actually happen.
- if ((numBytesData2 != numBytesData) || (type != REG_SZ))
- {
- // On error, leave string empty.
- value.CloseBuffer(0);
-
- ThrowHR(E_FAIL);
- }
-
- if (ret != ERROR_SUCCESS)
- {
- // On error, leave string empty.
- value.CloseBuffer(0);
- ThrowWin32(ret);
- }
-
-
- //
- // Step 4: Close the string buffer
- //
- COUNT_T numCharsNoNull = numCharsIncludingNull - 1;
- value.CloseBuffer(numCharsNoNull);
-}
-#endif // TARGET_UNIX
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-
-#include "stdafx.h"
-
-#include "securityutil.h"
-#include "ex.h"
-
-#include "securitywrapper.h"
-
-// These are the right that we will give to the global section and global events used
-// in communicating between debugger and debugee
-//
-// SECTION_ALL_ACCESS is needed for the IPC block. Unfortunately, we DACL our events and
-// IPC block identically. Or this particular right does not need to bleed into here.
-//
-#ifndef CLR_IPC_GENERIC_RIGHT
-#define CLR_IPC_GENERIC_RIGHT (GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | STANDARD_RIGHTS_ALL | SECTION_ALL_ACCESS)
-#endif
-
-
-//*****************************************************************
-// static helper function
-//
-// helper to form ACL that contains AllowedACE of users of current
-// process and target process
-//
-// [IN] pid - target process id
-// [OUT] ppACL - ACL for the process
-//
-// Clean up -
-// Caller remember to call FreeACL() on *ppACL
-//*****************************************************************
-HRESULT SecurityUtil::GetACLOfPid(DWORD pid, PACL *ppACL)
-{
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- HRESULT hr = S_OK;
- _ASSERTE(ppACL);
- *ppACL = NULL;
-
- PSID pCurrentProcessSid = NULL;
- PSID pTargetProcessSid = NULL;
- PSID pTargetProcessAppContainerSid = NULL;
- DWORD cSid = 0;
- DWORD dwAclSize = 0;
-
- LOG((LF_CORDB, LL_INFO10000,
- "SecurityUtil::GetACLOfPid on pid : 0x%08x\n",
- pid));
-
-
- SidBuffer sidCurrentProcess;
- SidBuffer sidTargetProcess;
- SidBuffer sidTargetProcessAppContainer;
-
- // Get sid for current process.
- if (SUCCEEDED(sidCurrentProcess.InitFromProcessNoThrow(GetCurrentProcessId())))
- {
- pCurrentProcessSid = sidCurrentProcess.GetSid().RawSid();
- cSid++;
- }
-
- // Get sid for target process.
- if (SUCCEEDED(sidTargetProcess.InitFromProcessNoThrow(pid)))
- {
- pTargetProcessSid = sidTargetProcess.GetSid().RawSid();
- cSid++;
- }
-
- //FISHY: what is the scenario where only one of the above calls succeeds?
- if (cSid == 0)
- {
- // failed to get any useful sid. Just return.
- // need a better error.
- //
- hr = E_FAIL;
- goto exit;
- }
-
- hr = sidTargetProcessAppContainer.InitFromProcessAppContainerSidNoThrow(pid);
- if (FAILED(hr))
- {
- goto exit;
- }
- else if (hr == S_OK)
- {
- pTargetProcessAppContainerSid = sidTargetProcessAppContainer.GetSid().RawSid();
- cSid++;
- }
- else if(hr == S_FALSE) //not an app container, no sid to add
- {
- hr = S_OK; // don't leak S_FALSE
- }
-
- LOG((LF_CORDB, LL_INFO10000,
- "SecurityUtil::GetACLOfPid number of sid : 0x%08x\n",
- cSid));
-
- // Now allocate space for ACL. First calculate the space is need to hold ACL
- dwAclSize = sizeof(ACL) + (sizeof(ACCESS_ALLOWED_ACE) - sizeof(DWORD)) * cSid;
- if (pCurrentProcessSid)
- {
- dwAclSize += GetLengthSid(pCurrentProcessSid);
- }
- if (pTargetProcessSid)
- {
- dwAclSize += GetLengthSid(pTargetProcessSid);
- }
- if (pTargetProcessAppContainerSid)
- {
- dwAclSize += GetLengthSid(pTargetProcessAppContainerSid);
- }
-
- *ppACL = (PACL) new (nothrow) char[dwAclSize];
- if (*ppACL == NULL)
- {
- hr = E_OUTOFMEMORY;
- goto exit;
- }
-
- // Initialize ACL
- // add each sid to the allowed ace list
- if (!InitializeAcl(*ppACL, dwAclSize, ACL_REVISION))
- {
- hr = HRESULT_FROM_GetLastError();
- goto exit;
- }
-
- if (pCurrentProcessSid)
- {
- // add the current process's sid into ACL if we have it
- if (!AddAccessAllowedAce(*ppACL, ACL_REVISION, CLR_IPC_GENERIC_RIGHT, pCurrentProcessSid))
- {
- hr = HRESULT_FROM_GetLastError();
- goto exit;
- }
- }
-
- if (pTargetProcessSid)
- {
- // add the target process's sid into ACL if we have it
- if (!AddAccessAllowedAce(*ppACL, ACL_REVISION, CLR_IPC_GENERIC_RIGHT, pTargetProcessSid))
- {
- hr = HRESULT_FROM_GetLastError();
- goto exit;
- }
- }
-
- if (pTargetProcessAppContainerSid)
- {
- // add the target process's AppContainer's sid into ACL if we have it
- if (!AddAccessAllowedAce(*ppACL, ACL_REVISION, CLR_IPC_GENERIC_RIGHT, pTargetProcessAppContainerSid))
- {
- hr = HRESULT_FROM_GetLastError();
- goto exit;
- }
- }
-
- // we better to form a valid ACL to return
- _ASSERTE(IsValidAcl(*ppACL));
-exit:
- if (FAILED(hr) && *ppACL)
- {
- delete [] (reinterpret_cast<char*>(ppACL));
- }
- return hr;
-} // SecurityUtil::GetACLOfPid
-
-
-//*****************************************************************
-// static helper function
-//
-// free the ACL allocated by SecurityUtil::GetACLOfPid
-//
-// [IN] pACL - ACL to be freed
-//
-//*****************************************************************
-void SecurityUtil::FreeACL(PACL pACL)
-{
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
- if (pACL)
- {
- delete [] (reinterpret_cast<char*>(pACL));
- }
-} // SecurityUtil::FreeACL
-
-
-//*****************************************************************
-// constructor
-//
-// [IN] pACL - ACL that this instance of SecurityUtil will held on to
-//
-//*****************************************************************
-SecurityUtil::SecurityUtil(PACL pACL)
-{
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
- m_pACL = pACL;
- m_pSacl = NULL;
- m_fInitialized = false;
-}
-
-//*****************************************************************
-// destructor
-//
-// free the ACL that this instance of SecurityUtil helds on to
-//
-//*****************************************************************
-SecurityUtil::~SecurityUtil()
-{
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
- FreeACL(m_pACL);
- FreeACL(m_pSacl);
-}
-
-//*****************************************************************
-// Initialization function
-//
-// form the SecurityDescriptor that will represent the m_pACL
-//
-//*****************************************************************
-HRESULT SecurityUtil::Init()
-{
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- HRESULT hr = S_OK;
-
- if (m_pACL)
- {
- if (!InitializeSecurityDescriptor(&m_SD, SECURITY_DESCRIPTOR_REVISION))
- {
- hr = HRESULT_FROM_GetLastError();
- return hr;
- }
- if (!SetSecurityDescriptorDacl(&m_SD, TRUE, m_pACL, FALSE))
- {
- hr = HRESULT_FROM_GetLastError();
- return hr;
- }
-
- m_SA.nLength = sizeof(SECURITY_ATTRIBUTES);
- m_SA.lpSecurityDescriptor = &m_SD;
- m_SA.bInheritHandle = FALSE;
- m_fInitialized = true;
- }
- return S_OK;
-}
-
-// ***************************************************************************
-// Initialization functions which will call the normal Init and add a
-// mandatory label entry to the sacl
-//
-// Expects hProcess to be a valid handle to the process which has the desired
-// mandatory label
-// ***************************************************************************
-HRESULT SecurityUtil::Init(HANDLE hProcess)
-{
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- HRESULT hr = Init();
- if (FAILED(hr))
- {
- return hr;
- }
-
- NewArrayHolder<BYTE> pLabel;
-
- hr = GetMandatoryLabelFromProcess(hProcess, &pLabel);
- if (FAILED(hr))
- {
- return hr;
- }
-
- TOKEN_MANDATORY_LABEL * ptml = (TOKEN_MANDATORY_LABEL *) pLabel.GetValue();
-
- hr = SetSecurityDescriptorMandatoryLabel(ptml->Label.Sid);
-
- return hr;
-}
-
-
-// ***************************************************************************
-// Given a process, this will put the mandatory label into a buffer and point
-// ppbLabel at the buffer.
-//
-// Caller must free ppbLabel via the array "delete []" operator
-// ***************************************************************************
-HRESULT SecurityUtil::GetMandatoryLabelFromProcess(HANDLE hProcess, LPBYTE * ppbLabel)
-{
- *ppbLabel = NULL;
-
- DWORD dwSize = 0;
- HandleHolder hToken;
- DWORD err = 0;
-
- if(!OpenProcessToken(hProcess, TOKEN_QUERY, &hToken))
- {
- return HRESULT_FROM_GetLastError();
- }
-
- if(!GetTokenInformation(hToken, (TOKEN_INFORMATION_CLASS)TokenIntegrityLevel, NULL, 0, &dwSize))
- {
- err = GetLastError();
- }
-
- // We need to make sure that GetTokenInformation failed in a predictable manner so we know that
- // dwSize has the correct buffer size in it.
- if (err != ERROR_INSUFFICIENT_BUFFER || dwSize == 0)
- {
- return HRESULT_FROM_WIN32(err);
- }
-
- NewArrayHolder<BYTE> pLabel = new (nothrow) BYTE[dwSize];
- if (pLabel == NULL)
- {
- return E_OUTOFMEMORY;
- }
-
- if(!GetTokenInformation(hToken, (TOKEN_INFORMATION_CLASS)TokenIntegrityLevel, pLabel, dwSize, &dwSize))
- {
- return HRESULT_FROM_GetLastError();
- }
-
- // Our caller will be freeing the memory so use Extract
- *ppbLabel = pLabel.Extract();
-
- return S_OK;
-}
-
-//---------------------------------------------------------------------------------------
-//
-// Returns pointer inside the specified mandatory SID to the DWORD representing the
-// integrity level of the process. This DWORD will be one of the
-// SECURITY_MANDATORY_*_RID constants.
-//
-// Arguments:
-// psidIntegrityLevelLabel - [in] PSID in which to find the integrity level.
-//
-// Return Value:
-// Pointer to the RID stored in the specified SID. This RID represents the
-// integrity level of the process
-//
-
-// static
-DWORD * SecurityUtil::GetIntegrityLevelFromMandatorySID(PSID psidIntegrityLevelLabel)
-{
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- return GetSidSubAuthority(psidIntegrityLevelLabel, (*GetSidSubAuthorityCount(psidIntegrityLevelLabel) - 1));
-}
-
-// Creates a mandatory label ace and sets it to be the entry in the
-// security descriptor's sacl. This assumes there are no other entries
-// in the sacl
-HRESULT SecurityUtil::SetSecurityDescriptorMandatoryLabel(PSID psidIntegrityLevelLabel)
-{
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- DWORD cbSid = GetLengthSid(psidIntegrityLevelLabel);
- DWORD cbAceStart = offsetof(SYSTEM_MANDATORY_LABEL_ACE, SidStart);
- // We are about allocate memory for a ACL and an ACE so we need space for:
- // 1) the ACL: sizeof(ACL)
- // 2) the entry: the sid is of variable size, so the SYSTEM_MANDATORY_LABEL_ACE
- // structure has only the first DWORD of the sid in its definition, to get the
- // appropriate size we get size without SidStart and add on the actual size of the sid
- DWORD cbSacl = sizeof(ACL) + cbAceStart + cbSid;
-
- NewArrayHolder<BYTE> sacl = new (nothrow) BYTE[cbSacl];
-
- m_pSacl = NULL;
-
- if (sacl == NULL)
- {
- return E_OUTOFMEMORY;
- }
- ZeroMemory(sacl.GetValue(), cbSacl);
- PACL pSacl = reinterpret_cast<ACL *>(sacl.GetValue());
- SYSTEM_MANDATORY_LABEL_ACE * pLabelAce = reinterpret_cast<SYSTEM_MANDATORY_LABEL_ACE *>(sacl.GetValue() + sizeof(ACL));
- PSID psid = reinterpret_cast<SID *>(&pLabelAce->SidStart);
-
- // Our buffer looks like this now: (not drawn to scale)
- // sacl pSacl pLabelAce psid
- // - -
- // | |
- // | - -
- // | |
- // | | -
- // | - |
- // - -
-
- DWORD dwIntegrityLevel = *(GetIntegrityLevelFromMandatorySID(psidIntegrityLevelLabel));
-
- if (dwIntegrityLevel >= SECURITY_MANDATORY_MEDIUM_RID)
- {
- // No need to set the integrity level unless it's lower than medium
- return S_OK;
- }
-
- if(!InitializeAcl(pSacl, cbSacl, ACL_REVISION))
- {
- return HRESULT_FROM_GetLastError();
- }
-
- pSacl->AceCount = 1;
-
- pLabelAce->Header.AceType = SYSTEM_MANDATORY_LABEL_ACE_TYPE;
- pLabelAce->Header.AceSize = WORD(cbAceStart + cbSid);
- pLabelAce->Mask = SYSTEM_MANDATORY_LABEL_NO_WRITE_UP;
-
- memcpy(psid, psidIntegrityLevelLabel, cbSid);
-
- if(!SetSecurityDescriptorSacl(m_SA.lpSecurityDescriptor, TRUE, pSacl, FALSE))
- {
- return HRESULT_FROM_GetLastError();
- }
-
- // No need to delete the sacl buffer, it will be deleted in the
- // destructor of this class
- m_pSacl = (PACL)sacl.Extract();
- return S_OK;
-}
-
-//*****************************************************************
-// Return SECURITY_ATTRIBUTES that we form in the Init function
-//
-// No clean up is needed after calling this function. The destructor of the
-// instance will do the right thing. Note that this is designed such that
-// we minimize memory allocation, ie the SECURITY_DESCRIPTOR and
-// SECURITY_ATTRIBUTES are embedded in the SecurityUtil instance.
-//
-// Caller should not modify the returned SECURITY_ATTRIBUTES!!!
-//*****************************************************************
-HRESULT SecurityUtil::GetSA(SECURITY_ATTRIBUTES **ppSA)
-{
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- _ASSERTE(ppSA);
-
- if (m_fInitialized == false)
- {
- _ASSERTE(!"Bad code path!");
- *ppSA = NULL;
- return E_FAIL;
- }
-
- *ppSA = &m_SA;
- return S_OK;
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-//*****************************************************************************
-// File: SecurityWrapper.cpp
-//
-
-//
-// Wrapper around Win32 Security functions
-//
-//*****************************************************************************
-
-#include "stdafx.h"
-
-#include "securitywrapper.h"
-#include "ex.h"
-#include "holder.h"
-
-
-// For GetSidFromProcess*
-#include <tlhelp32.h>
-#include "wtsapi32.h"
-
-
-//-----------------------------------------------------------------------------
-// Constructor for Sid wrapper class.
-// pSid - OS sid to wrap
-//-----------------------------------------------------------------------------
-Sid::Sid(PSID pSid)
-{
- _ASSERTE(pSid != NULL);
- m_pSid = pSid;
-}
-
-//-----------------------------------------------------------------------------
-// Aesthetic wrapper for Sid equality
-//-----------------------------------------------------------------------------
-bool Sid::Equals(PSID a, PSID b)
-{
- return EqualSid(a, b) != 0;
-}
-
-//-----------------------------------------------------------------------------
-// Ctor for SidBuffer class
-//-----------------------------------------------------------------------------
-SidBuffer::SidBuffer()
-{
- m_pBuffer = NULL;
-}
-
-//-----------------------------------------------------------------------------
-// Dtor for SidBuffer class.
-//-----------------------------------------------------------------------------
-SidBuffer::~SidBuffer()
-{
- delete [] m_pBuffer;
-}
-
-//-----------------------------------------------------------------------------
-// Get the underlying sid
-// Caller assumes SidBuffer has been initialized.
-//-----------------------------------------------------------------------------
-Sid SidBuffer::GetSid()
-{
- _ASSERTE(m_pBuffer != NULL);
- Sid s((PSID) m_pBuffer);
- return s;
-}
-
-// ----------------------------------------------------------------------------
-// Used by GetSidFromProcessWorker to determine which SID from the
-// process token to use when initializing the SID
-enum SidType
-{
- // Use TokenOwner: the default owner SID used for newly created objects
- kOwnerSid,
-
- // Use TokenUser: the user account from the token
- kUserSid,
-};
-
-// ----------------------------------------------------------------------------
-// GetSidFromProcessWorker
-//
-// Description:
-// Internal helper. Gets the SID for the given process and given sid type
-//
-// Arguments:
-// * dwProcessId - [in] Process to get SID from
-// * sidType - [in] Type of sid to get (owner or user)
-// * ppSid - [out] SID found. Caller responsible for deleting this memory.
-//
-// Return Value:
-// HRESULT indicating success / failure.
-//
-// Notes:
-// * Caller owns deleting (*ppSid) when done with the SID
-//
-
-HRESULT GetSidFromProcessWorker(DWORD dwProcessId, SidType sidType, PSID *ppSid)
-{
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- HRESULT hr = S_OK;
- TOKEN_USER *pTokUser = NULL;
- HANDLE hProc = INVALID_HANDLE_VALUE;
- HANDLE hToken = INVALID_HANDLE_VALUE;
- DWORD dwRetLength = 0;
- LPVOID pvTokenInfo = NULL;
- TOKEN_INFORMATION_CLASS tokenInfoClass;
- PSID pSidFromTokenInfo = NULL;
- DWORD cbSid;
- PSID pSid = NULL;
-
- LOG((LF_CORDB, LL_INFO10000,
- "SecurityUtil::GetSidFromProcess: 0x%08x\n",
- dwProcessId));
-
- _ASSERTE(ppSid);
- *ppSid = NULL;
-
- _ASSERTE((sidType == kOwnerSid) || (sidType == kUserSid));
- tokenInfoClass = (sidType == kOwnerSid) ? TokenOwner : TokenUser;
-
- hProc = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, dwProcessId);
-
- if (hProc == NULL)
- {
- hr = HRESULT_FROM_GetLastError();
- goto exit;
- }
- if (!OpenProcessToken(hProc, TOKEN_QUERY, &hToken))
- {
- hr = HRESULT_FROM_GetLastError();
- goto exit;
- }
-
- // figure out the length
- GetTokenInformation(hToken, tokenInfoClass, NULL, 0, &dwRetLength);
- _ASSERTE(dwRetLength);
-
- pvTokenInfo = new (nothrow) BYTE[dwRetLength];
- if (pvTokenInfo == NULL)
- {
- hr = E_OUTOFMEMORY;
- goto exit;
- }
-
- if (!GetTokenInformation(hToken, tokenInfoClass, pvTokenInfo, dwRetLength, &dwRetLength))
- {
- hr = HRESULT_FROM_GetLastError();
- goto exit;
- }
-
- // Copy over the SID
- pSidFromTokenInfo =
- (sidType == kOwnerSid) ?
- ((TOKEN_OWNER *) pvTokenInfo)->Owner :
- ((TOKEN_USER *) pvTokenInfo)->User.Sid;
- cbSid = GetLengthSid(pSidFromTokenInfo);
- pSid = new (nothrow) BYTE[cbSid];
- if (pSid == NULL)
- {
- hr = E_OUTOFMEMORY;
- }
- else
- {
- if (!CopySid(cbSid, pSid, pSidFromTokenInfo))
- {
- hr = HRESULT_FROM_GetLastError();
- goto exit;
- }
- }
-
- *ppSid = pSid;
- pSid = NULL;
-
-exit:
- if (hToken != INVALID_HANDLE_VALUE)
- {
- CloseHandle(hToken);
- }
- if (hProc != INVALID_HANDLE_VALUE)
- {
- // clean up
- CloseHandle(hProc);
- }
- if (pvTokenInfo)
- {
- delete [] (reinterpret_cast<BYTE*>(pvTokenInfo));
- }
-
- if (pSid)
- {
- delete [] (reinterpret_cast<BYTE*>(pSid));
- }
-
- LOG((LF_CORDB, LL_INFO10000,
- "SecurityUtil::GetSidFromProcess return hr : 0x%08x\n",
- hr));
-
- return hr;
-}
-
-//-----------------------------------------------------------------------------
-// The functions below initialize this SidBuffer instance with a Sid from
-// the token of the specified process. The first pair use the OWNER sid from
-// the process token if possible; else use the term serv API to find the
-// USER sid from the process token. This seems a little inconsistent, but
-// remains this way for backward compatibility. The second pair consistently
-// use the USER sid (never the OWNER).
-//
-// While the USER and OWNER sid are often the same, they are not always the
-// same. For example, running a process on win2k3 server as a member of the
-// local admin group causes the USER sid to be the logged-on user, and the
-// OWNER sid to be the local admins group. At least, that's how it was on
-// Monday. Expect this to change randomly at unexpected times, as most
-// security-related behavior does.
-//-----------------------------------------------------------------------------
-
-
-// ----------------------------------------------------------------------------
-// SidBuffer::InitFromProcessNoThrow
-//
-// Description:
-// Initialize this SidBuffer instance with a Sid from the token of the specified
-// process. Use the OWNER sid from the process token if possible; else use the term
-// serv API to find the USER sid from the process token. This seems a little
-// inconsistent, but remains this way for backward compatibility.
-//
-// Arguments:
-// * pid - Process ID from which to grab the SID
-//
-// Return Value:
-// HRESULT indicating success / failure
-//
-
-HRESULT SidBuffer::InitFromProcessNoThrow(DWORD pid)
-{
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- _ASSERTE(m_pBuffer == NULL);
- HRESULT hr = GetSidFromProcessWorker(pid, kOwnerSid, (PSID *) &m_pBuffer);
- if (FAILED(hr))
- {
- return hr;
- }
-
- _ASSERTE(m_pBuffer != NULL);
- return S_OK;
-}
-
-// See code:SidBuffer::InitFromProcessNoThrow. Throws if there's an error.
-void SidBuffer::InitFromProcess(DWORD pid)
-{
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- HRESULT hr = InitFromProcessNoThrow(pid);
- if (FAILED(hr))
- {
- ThrowHR(hr);
- }
-}
-
-// ----------------------------------------------------------------------------
-// SidBuffer::InitFromProcessAppContainerSidNoThrow
-//
-// Description:
-// Initialize this SidBuffer instance with the TokenAppContainerSid from
-// the process token
-//
-// Arguments:
-// * pid - Process ID from which to grab the SID
-//
-// Return Value:
-// HRESULT indicating success / failure
-// S_FALSE indicates the process isn't in an AppContainer
-//
-HRESULT SidBuffer::InitFromProcessAppContainerSidNoThrow(DWORD pid)
-{
- HRESULT hr = S_OK;
- HANDLE hToken = NULL;
- BOOL fIsLowBox = FALSE;
-
- HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
- if (hProcess == NULL)
- {
- hr = HRESULT_FROM_GetLastError();
- goto exit;
- }
- if (!OpenProcessToken(hProcess, TOKEN_QUERY, &hToken))
- {
- hr = HRESULT_FROM_GetLastError();
- goto exit;
- }
-
- // Define new TOKEN_INFORMATION_CLASS/ TOKEN_APPCONTAINER_INFORMATION members for Win8 since they are not in the DevDiv copy of WinSDK yet
- typedef enum _TOKEN_INFORMATION_CLASS_WIN8 {
- TokenIsAppContainer = TokenLogonSid + 1,
- TokenCapabilities,
- TokenAppContainerSid
- } TOKEN_INFORMATION_CLASS_WIN8;
-
- typedef struct _TOKEN_APPCONTAINER_INFORMATION
- {
- PSID TokenPackage;
- } TOKEN_APPCONTAINER_INFORMATION, *PTOKEN_APPCONTAINER_INFORMATION;
-
- DWORD size;
- if (!GetTokenInformation(hToken, (TOKEN_INFORMATION_CLASS)TokenIsAppContainer, &fIsLowBox, sizeof(fIsLowBox), &size))
- {
- DWORD gle = GetLastError();
- if (gle == ERROR_INVALID_PARAMETER || gle == ERROR_INVALID_FUNCTION)
- {
- hr = S_FALSE; // We are on an OS which doesn't understand LowBox
- }
- else
- {
- hr = HRESULT_FROM_WIN32(gle);
- }
- goto exit;
- }
-
- if (!fIsLowBox)
- {
- hr = S_FALSE;
- goto exit;
- }
-
- UCHAR PackSid[SECURITY_MAX_SID_SIZE + sizeof(TOKEN_APPCONTAINER_INFORMATION)];
- if (!GetTokenInformation(hToken, (TOKEN_INFORMATION_CLASS)TokenAppContainerSid, &PackSid, sizeof(PackSid), &size))
- {
- hr = HRESULT_FROM_GetLastError();
- goto exit;
- }
-
- {
- PTOKEN_APPCONTAINER_INFORMATION pTokPack = (PTOKEN_APPCONTAINER_INFORMATION)&PackSid;
- PSID pLowBoxPackage = pTokPack->TokenPackage;
- DWORD dwSidLen = GetLengthSid(pLowBoxPackage);
- m_pBuffer = new (nothrow) BYTE[dwSidLen];
- if (m_pBuffer == NULL)
- {
- hr = E_OUTOFMEMORY;
- goto exit;
- }
- else
- {
- if (!CopySid(dwSidLen, m_pBuffer, pLowBoxPackage))
- {
- hr = HRESULT_FROM_GetLastError();
- delete m_pBuffer;
- m_pBuffer = NULL;
- goto exit;
- }
- }
- }
-
-exit:
- if (hProcess != NULL)
- {
- CloseHandle(hProcess);
- }
- if (hToken != NULL)
- {
- CloseHandle(hToken);
- }
-
- return hr;
-}
-
-// ----------------------------------------------------------------------------
-// SidBuffer::InitFromProcessUserNoThrow
-//
-// Description:
-// Initialize this SidBuffer instance with a Sid from the token of the specified
-// process. Use the USER sid from the process token if possible; else use the term
-// serv API to find the USER sid from the process token.
-//
-// Arguments:
-// * pid - Process ID from which to grab the SID
-//
-// Return Value:
-// HRESULT indicating success / failure
-//
-
-HRESULT SidBuffer::InitFromProcessUserNoThrow(DWORD pid)
-{
- CONTRACTL
- {
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- _ASSERTE(m_pBuffer == NULL);
- HRESULT hr = GetSidFromProcessWorker(pid, kUserSid, (PSID *) &m_pBuffer);
- if (FAILED(hr))
- {
- return hr;
- }
-
- _ASSERTE(m_pBuffer != NULL);
- return S_OK;
-}
-
-// See code:SidBuffer::InitFromProcessUserNoThrow. Throws if there's an error.
-void SidBuffer::InitFromProcessUser(DWORD pid)
-{
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- HRESULT hr = InitFromProcessUserNoThrow(pid);
- if (FAILED(hr))
- {
- ThrowHR(hr);
- }
-}
-
-//-----------------------------------------------------------------------------
-// Ctor for Dacl class. Wraps a win32 dacl.
-//-----------------------------------------------------------------------------
-Dacl::Dacl(PACL pAcl)
-{
- m_acl = pAcl;
-}
-
-//-----------------------------------------------------------------------------
-// Get number of ACE (Access Control Entries) in this DACL.
-//-----------------------------------------------------------------------------
-SIZE_T Dacl::GetAceCount()
-{
- return (SIZE_T) m_acl->AceCount;
-}
-
-//-----------------------------------------------------------------------------
-// Get Raw a ACE at the given index.
-// Caller assumes index is valid (0 <= dwAceIndex < GetAceCount())
-// Throws on error (which should only be if the index is out of bounds).
-//-----------------------------------------------------------------------------
-ACE_HEADER * Dacl::GetAce(SIZE_T dwAceIndex)
-{
- CONTRACTL {
- THROWS;
- GC_NOTRIGGER;
- } CONTRACTL_END;
-
- ACE_HEADER * pAce = NULL;
- BOOL fOk = ::GetAce(m_acl, (DWORD) dwAceIndex, (LPVOID*) &pAce);
- _ASSERTE(fOk == (pAce != NULL));
- if (!fOk)
- {
- ThrowLastError();
- }
- return pAce;
-}
-
-
-
-//-----------------------------------------------------------------------------
-// Ctor for SecurityDescriptor
-//-----------------------------------------------------------------------------
-Win32SecurityDescriptor::Win32SecurityDescriptor()
-{
- m_pDesc = NULL;
-}
-
-//-----------------------------------------------------------------------------
-// Dtor for security Descriptor.
-//-----------------------------------------------------------------------------
-Win32SecurityDescriptor::~Win32SecurityDescriptor()
-{
- delete [] ((BYTE*) m_pDesc);
-}
-
-
-
-//-----------------------------------------------------------------------------
-// Get the dacl for this security descriptor.
-//-----------------------------------------------------------------------------
-Dacl Win32SecurityDescriptor::GetDacl()
-{
- CONTRACTL {
- THROWS;
- GC_NOTRIGGER;
- } CONTRACTL_END;
-
- _ASSERTE(m_pDesc != NULL);
-
- BOOL bPresent;
- BOOL bDaclDefaulted;
- PACL acl;
-
- if (GetSecurityDescriptorDacl(m_pDesc, &bPresent, &acl, &bDaclDefaulted) == 0)
- {
- ThrowLastError();
- }
- if (!bPresent)
- {
- // No dacl. We consider this an error because all of the objects we expect
- // to see should be dacled. If it's not dacled, then it's a malicious user spoofing it.
- ThrowHR(E_INVALIDARG);
- }
-
- Dacl d(acl);
- return d;
-}
-
-//-----------------------------------------------------------------------------
-// Get the owner from the security descriptor.
-//-----------------------------------------------------------------------------
-HRESULT Win32SecurityDescriptor::GetOwnerNoThrow( PSID* ppSid)
-{
- CONTRACTL {
- NOTHROW;
- GC_NOTRIGGER;
- } CONTRACTL_END;
-
- _ASSERTE(m_pDesc != NULL);
- BOOL bOwnerDefaulted;
-
- if( ppSid == NULL )
- {
- return E_INVALIDARG;
- }
-
- if (GetSecurityDescriptorOwner(m_pDesc, ppSid, &bOwnerDefaulted) == 0)
- {
- DWORD err = GetLastError();
- return HRESULT_FROM_WIN32(err);
- }
-
- return S_OK;
-}
-Sid Win32SecurityDescriptor::GetOwner()
-{
- CONTRACTL {
- THROWS;
- GC_NOTRIGGER;
- } CONTRACTL_END;
-
- PSID pSid;
- HRESULT hr = GetOwnerNoThrow( &pSid );
- if( FAILED(hr) )
- {
- ThrowHR( hr );
- }
-
- Sid s(pSid);
- return s;
-}
-
-//-----------------------------------------------------------------------------
-// Initialize this instance of a SecurityDescriptor with the SD for the handle.
-// The handle must have READ_CONTROL permissions to do this.
-// Throws on error.
-//-----------------------------------------------------------------------------
-HRESULT Win32SecurityDescriptor::InitFromHandleNoThrow(HANDLE h)
-{
- CONTRACTL {
- NOTHROW;
- GC_NOTRIGGER;
- } CONTRACTL_END;
-
- _ASSERTE(m_pDesc == NULL); // only init once.
-
- DWORD cbNeeded = 0;
-
- DWORD flags = OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION;
-
- // Now get the creator's SID. First get the size of the array needed.
- BOOL fOk = GetKernelObjectSecurity(h, flags, NULL, 0, &cbNeeded);
- DWORD err = GetLastError();
-
- // Caller should give us a handle for which this succeeds. First call will
- // fail w/ InsufficientBuffer.
- CONSISTENCY_CHECK_MSGF(fOk || (err == ERROR_INSUFFICIENT_BUFFER), ("Failed to get KernelSecurity for object handle=%p.Err=%d\n", h, err));
-
- PSECURITY_DESCRIPTOR pSD = (PSECURITY_DESCRIPTOR) new(nothrow) BYTE[cbNeeded];
- if( pSD == NULL )
- {
- return E_OUTOFMEMORY;
- }
-
- if (GetKernelObjectSecurity(h, flags, pSD, cbNeeded, &cbNeeded) == 0)
- {
- // get last error and fail out.
- err = GetLastError();
- delete [] ((BYTE*) pSD);
- return HRESULT_FROM_WIN32(err);
- }
-
- m_pDesc = pSD;
- return S_OK;
-}
-void Win32SecurityDescriptor::InitFromHandle(HANDLE h)
-{
- CONTRACTL {
- THROWS;
- GC_NOTRIGGER;
- } CONTRACTL_END;
-
- HRESULT hr = InitFromHandleNoThrow(h);
- if (FAILED(hr))
- {
- ThrowHR(hr);
- }
-}
#include "sstring.h"
#include "ex.h"
#include "holder.h"
-
+#include <minipal/strings.h>
#if defined(_MSC_VER)
#pragma inline_depth (25)
#ifdef SELF_NO_HOST
toupper(wc);
#else
- PAL_ToUpperInvariant(wc);
+ minipal_toupper_invariant(wc);
#endif
}
else
#ifdef SELF_NO_HOST
tolower(wc);
#else
- PAL_ToLowerInvariant(wc);
+ minipal_tolower_invariant(wc);
#endif
}
#endif // !TARGET_UNIX
Clear();
else
{
- Resize((COUNT_T) wcslen(string), REPRESENTATION_UNICODE);
+ Resize((COUNT_T) u16_strlen(string), REPRESENTATION_UNICODE);
wcscpy_s(GetRawUnicode(), GetBufferSizeInCharIncludeNullChar(), string);
}
}
//-----------------------------------------------------------------------------
-// Set this string to a copy of the given ANSI string
+// Set this string to a copy of the given UTF16 string transcoded to UTF8
//-----------------------------------------------------------------------------
-void SString::SetANSI(const ANSI *string)
+void SString::SetAndConvertToUTF8(const WCHAR *string)
{
SS_CONTRACT_VOID
{
+ // !!! Check for illegal UTF8 encoding?
INSTANCE_CHECK;
PRECONDITION(CheckPointer(string, NULL_OK));
THROWS;
GC_NOTRIGGER;
+ SUPPORTS_DAC_HOST_ONLY;
}
SS_CONTRACT_END;
- if (string == NULL || *string == 0)
- Clear();
- else
- {
- Resize((COUNT_T) strlen(string), REPRESENTATION_ANSI);
- strcpy_s(GetRawANSI(), GetBufferSizeInCharIncludeNullChar(), string);
- }
-
- SS_RETURN;
-}
-
-//-----------------------------------------------------------------------------
-// Set this string to a copy of the first count characters of the given
-// ANSI string.
-//-----------------------------------------------------------------------------
-void SString::SetANSI(const ANSI *string, COUNT_T count)
-{
- SS_CONTRACT_VOID
- {
- INSTANCE_CHECK;
- PRECONDITION(CheckPointer(string, NULL_OK));
- PRECONDITION(CheckCount(count));
- THROWS;
- GC_NOTRIGGER;
- }
- SS_CONTRACT_END;
+ SString utf16Str(Literal, string);
- if (count == 0)
- Clear();
- else
- {
- Resize(count, REPRESENTATION_ANSI);
- strncpy_s(GetRawANSI(), GetBufferSizeInCharIncludeNullChar(), string, count);
- GetRawANSI()[count] = 0;
- }
+ utf16Str.ConvertToUTF8(*this);
SS_RETURN;
}
}
//-----------------------------------------------------------------------------
-// Set s to be a copy of this string's contents, but in the unicode format.
+// Convert the internal representation for this String to UTF8.
//-----------------------------------------------------------------------------
-void SString::ConvertToUnicode(SString &s) const
+void SString::ConvertToUTF8() const
{
CONTRACT_VOID
{
- PRECONDITION(s.Check());
- POSTCONDITION(s.IsRepresentation(REPRESENTATION_UNICODE));
- THROWS;
+ POSTCONDITION(IsRepresentation(REPRESENTATION_UTF8));
+ if (IsRepresentation(REPRESENTATION_UTF8)) NOTHROW; else THROWS;
GC_NOTRIGGER;
SUPPORTS_DAC_HOST_ONLY;
}
CONTRACT_END;
- int page = 0;
-
- switch (GetRepresentation())
+ if (!IsRepresentation(REPRESENTATION_UTF8))
{
- case REPRESENTATION_EMPTY:
- s.Clear();
- RETURN;
-
- case REPRESENTATION_UNICODE:
- s.Set(*this);
- RETURN;
-
- case REPRESENTATION_UTF8:
- page = CP_UTF8;
- break;
-
- case REPRESENTATION_ASCII:
- ConvertASCIIToUnicode(s);
- RETURN;
-
- case REPRESENTATION_ANSI:
- page = CP_ACP;
- break;
-
- default:
- UNREACHABLE();
+ if (IsRepresentation(REPRESENTATION_ASCII))
+ {
+ // ASCII is a subset of UTF8, so we can just set the representation.
+ (const_cast<SString*>(this))->SetRepresentation(REPRESENTATION_UTF8);
+ }
+ else
+ {
+ StackSString s;
+ ConvertToUTF8(s);
+ PREFIX_ASSUME(!s.IsImmutable());
+ (const_cast<SString*>(this))->Set(s);
+ }
}
- COUNT_T length = WszMultiByteToWideChar(page, 0, GetRawANSI(), GetRawCount()+1, 0, 0);
- if (length == 0)
- ThrowLastError();
-
- s.Resize(length-1, REPRESENTATION_UNICODE);
-
- length = WszMultiByteToWideChar(page, 0, GetRawANSI(), GetRawCount()+1, s.GetRawUnicode(), length);
- if (length == 0)
- ThrowLastError();
-
RETURN;
}
//-----------------------------------------------------------------------------
-// Set s to be a copy of this string's contents, but in the ANSI format.
+// Set s to be a copy of this string's contents, but in the unicode format.
//-----------------------------------------------------------------------------
-void SString::ConvertToANSI(SString &s) const
+void SString::ConvertToUnicode(SString &s) const
{
CONTRACT_VOID
{
PRECONDITION(s.Check());
- POSTCONDITION(s.IsRepresentation(REPRESENTATION_ANSI));
+ POSTCONDITION(s.IsRepresentation(REPRESENTATION_UNICODE));
THROWS;
GC_NOTRIGGER;
+ SUPPORTS_DAC_HOST_ONLY;
}
CONTRACT_END;
+ int page = 0;
+
switch (GetRepresentation())
{
case REPRESENTATION_EMPTY:
s.Clear();
RETURN;
- case REPRESENTATION_ASCII:
- case REPRESENTATION_ANSI:
+ case REPRESENTATION_UNICODE:
s.Set(*this);
RETURN;
case REPRESENTATION_UTF8:
- // No direct conversion to ANSI
- ConvertToUnicode();
- FALLTHROUGH;
-
- case REPRESENTATION_UNICODE:
+ page = CP_UTF8;
break;
+ case REPRESENTATION_ASCII:
+ ConvertASCIIToUnicode(s);
+ RETURN;
+
default:
UNREACHABLE();
}
- // @todo: use WC_NO_BEST_FIT_CHARS
- COUNT_T length = WszWideCharToMultiByte(CP_ACP, 0, GetRawUnicode(), GetRawCount()+1,
- NULL, 0, NULL, NULL);
+ COUNT_T length = MultiByteToWideChar(page, 0, GetRawANSI(), GetRawCount()+1, 0, 0);
+ if (length == 0)
+ ThrowLastError();
- s.Resize(length-1, REPRESENTATION_ANSI);
+ s.Resize(length-1, REPRESENTATION_UNICODE);
- // @todo: use WC_NO_BEST_FIT_CHARS
- length = WszWideCharToMultiByte(CP_ACP, 0, GetRawUnicode(), GetRawCount()+1,
- s.GetRawANSI(), length, NULL, NULL);
+ length = MultiByteToWideChar(page, 0, GetRawANSI(), GetRawCount()+1, s.GetRawUnicode(), length);
if (length == 0)
ThrowLastError();
s.Set(*this);
RETURN s.GetRawCount()+1;
- case REPRESENTATION_ANSI:
- // No direct conversion from ANSI to UTF8
- ConvertToUnicode();
- FALLTHROUGH;
-
case REPRESENTATION_UNICODE:
break;
const WCHAR *end = GetUnicode() + GetRawCount() - count;
while (start <= end)
{
- if (wcsncmp(start, source.GetRawUnicode(), count) == 0)
+ if (u16_strncmp(start, source.GetRawUnicode(), count) == 0)
{
i.Resync(this, (BYTE*) start);
RETURN TRUE;
}
break;
- case REPRESENTATION_ANSI:
case REPRESENTATION_ASCII:
{
COUNT_T count = source.GetRawCount();
}
break;
- case REPRESENTATION_ANSI:
case REPRESENTATION_ASCII:
{
const CHAR *start = i.GetASCII();
while (start >= end)
{
- if (wcsncmp(start, source.GetRawUnicode(), count) == 0)
+ if (u16_strncmp(start, source.GetRawUnicode(), count) == 0)
{
i.Resync(this, (BYTE*) start);
RETURN TRUE;
}
break;
- case REPRESENTATION_ANSI:
case REPRESENTATION_ASCII:
{
COUNT_T count = source.GetRawCount();
}
break;
- case REPRESENTATION_ANSI:
case REPRESENTATION_ASCII:
{
const CHAR *start = GetRawASCII() + GetRawCount() - 1;
switch (GetRepresentation())
{
case REPRESENTATION_UNICODE:
- result = wcsncmp(GetRawUnicode(), source.GetRawUnicode(), smaller);
+ result = u16_strncmp(GetRawUnicode(), source.GetRawUnicode(), smaller);
break;
case REPRESENTATION_ASCII:
- case REPRESENTATION_ANSI:
result = strncmp(GetRawASCII(), source.GetRawASCII(), smaller);
break;
switch (GetRepresentation())
{
case REPRESENTATION_UNICODE:
- case REPRESENTATION_ANSI:
result = CaseCompareHelper(GetRawUnicode(), source.GetRawUnicode(), smaller, FALSE, TRUE);
break;
switch (GetRepresentation())
{
case REPRESENTATION_UNICODE:
- RETURN (wcsncmp(GetRawUnicode(), source.GetRawUnicode(), count) == 0);
+ RETURN (u16_strncmp(GetRawUnicode(), source.GetRawUnicode(), count) == 0);
case REPRESENTATION_ASCII:
- case REPRESENTATION_ANSI:
RETURN (strncmp(GetRawASCII(), source.GetRawASCII(), count) == 0);
case REPRESENTATION_EMPTY:
switch (GetRepresentation())
{
case REPRESENTATION_UNICODE:
- case REPRESENTATION_ANSI:
RETURN (CaseCompareHelper(GetRawUnicode(), source.GetRawUnicode(), count, FALSE, TRUE) == 0);
case REPRESENTATION_ASCII:
switch (GetRepresentation())
{
case REPRESENTATION_UNICODE:
- RETURN (wcsncmp(i.GetUnicode(), source.GetRawUnicode(), count) == 0);
+ RETURN (u16_strncmp(i.GetUnicode(), source.GetRawUnicode(), count) == 0);
case REPRESENTATION_ASCII:
- case REPRESENTATION_ANSI:
RETURN (strncmp(i.GetASCII(), source.GetRawASCII(), count) == 0);
case REPRESENTATION_EMPTY:
switch (GetRepresentation())
{
case REPRESENTATION_UNICODE:
- case REPRESENTATION_ANSI:
RETURN (CaseCompareHelper(i.GetUnicode(), source.GetRawUnicode(), count, FALSE, TRUE) == 0);
case REPRESENTATION_ASCII:
}
}
-//-----------------------------------------------------------------------------
-// Get a const pointer to the internal buffer as an ANSI string.
-//-----------------------------------------------------------------------------
-const CHAR *SString::GetANSI(AbstractScratchBuffer &scratch) const
-{
- SS_CONTRACT(const CHAR *)
- {
- INSTANCE_CHECK_NULL;
- THROWS;
- GC_NOTRIGGER;
- }
- SS_CONTRACT_END;
-
- if (IsRepresentation(REPRESENTATION_ANSI))
- SS_RETURN GetRawANSI();
-
- ConvertToANSI((SString&)scratch);
- SS_RETURN ((SString&)scratch).GetRawANSI();
-}
-
-//-----------------------------------------------------------------------------
-// Get a const pointer to the internal buffer as a UTF8 string.
-//-----------------------------------------------------------------------------
-const UTF8 *SString::GetUTF8(AbstractScratchBuffer &scratch) const
-{
- CONTRACT(const UTF8 *)
- {
- INSTANCE_CHECK_NULL;
- THROWS;
- GC_NOTRIGGER;
- }
- CONTRACT_END;
-
- if (IsRepresentation(REPRESENTATION_UTF8))
- RETURN GetRawUTF8();
-
- ConvertToUTF8((SString&)scratch);
- RETURN ((SString&)scratch).GetRawUTF8();
-}
-
-const UTF8 *SString::GetUTF8(AbstractScratchBuffer &scratch, COUNT_T *pcbUtf8) const
-{
- CONTRACT(const UTF8 *)
- {
- INSTANCE_CHECK_NULL;
- THROWS;
- GC_NOTRIGGER;
- }
- CONTRACT_END;
-
- if (IsRepresentation(REPRESENTATION_UTF8))
- {
- *pcbUtf8 = GetRawCount() + 1;
- RETURN GetRawUTF8();
- }
-
- *pcbUtf8 = ConvertToUTF8((SString&)scratch);
- RETURN ((SString&)scratch).GetRawUTF8();
-}
-
-//-----------------------------------------------------------------------------
-// Get a const pointer to the internal buffer which must already be a UTF8 string.
-// This avoids the need to create a scratch buffer we know will never be used.
-//-----------------------------------------------------------------------------
-const UTF8 *SString::GetUTF8NoConvert() const
-{
- CONTRACT(const UTF8 *)
- {
- INSTANCE_CHECK_NULL;
- THROWS;
- GC_NOTRIGGER;
- }
- CONTRACT_END;
-
- if (IsRepresentation(REPRESENTATION_UTF8))
- RETURN GetRawUTF8();
-
- ThrowHR(E_INVALIDARG);
-}
-
//-----------------------------------------------------------------------------
// Safe version of sprintf.
// Prints formatted ansi text w/ var args to this buffer.
va_end(args);
}
-#ifdef _DEBUG
-//
-// Check the Printf use for potential globalization bugs. %S formatting
-// specifier does Unicode->Ansi or Ansi->Unicode conversion using current
-// C-locale. This almost always means globalization bug in the CLR codebase.
-//
-// Ideally, we would elimitate %S from all format strings. Unfortunately,
-// %S is too widespread in non-shipping code that such cleanup is not feasible.
-//
-static void CheckForFormatStringGlobalizationIssues(const SString &format, const SString &result)
-{
- CONTRACTL
- {
- THROWS;
- GC_NOTRIGGER;
- DEBUG_ONLY;
- }
- CONTRACTL_END;
-
- BOOL fDangerousFormat = FALSE;
-
- // Check whether the format string contains the %S formatting specifier
- SString::CIterator itrFormat = format.Begin();
- while (*itrFormat)
- {
- if (*itrFormat++ == '%')
- {
- // <TODO>Handle the complex format strings like %blahS</TODO>
- if (*itrFormat++ == 'S')
- {
- fDangerousFormat = TRUE;
- break;
- }
- }
- }
-
- if (fDangerousFormat)
- {
- BOOL fNonAsciiUsed = FALSE;
-
- // Now check whether there are any non-ASCII characters in the output.
-
- // Check whether the result contains non-Ascii characters
- SString::CIterator itrResult = format.Begin();
- while (*itrResult)
- {
- if (*itrResult++ > 127)
- {
- fNonAsciiUsed = TRUE;
- break;
- }
- }
-
- CONSISTENCY_CHECK_MSGF(!fNonAsciiUsed,
- ("Non-ASCII string was produced by %%S format specifier. This is likely globalization bug."
- "To fix this, change the format string to %%s and do the correct encoding at the Printf callsite"));
- }
-}
-#endif
-
#ifndef EBADF
#define EBADF 9
#endif
}
CONTRACT_END;
+ // This method overrides the content of the SString, so it can come in with any format.
+ // We're going to change the representation here.
+
va_list ap;
// sprintf gives us no means to know how many characters are written
// other than guessing and trying
{
// First, try to use the existing buffer
va_copy(ap, args);
- int result = _vsnprintf_s(GetRawANSI(), GetRawCount()+1, _TRUNCATE, format, ap);
+ int result = _vsnprintf_s(GetRawUTF8(), GetRawCount()+1, _TRUNCATE, format, ap);
va_end(ap);
if (result >=0)
{
// Succeeded in writing. Now resize -
- Resize(result, REPRESENTATION_ANSI, PRESERVE);
- SString sss(Ansi, format);
- INDEBUG(CheckForFormatStringGlobalizationIssues(sss, *this));
+ Resize(result, REPRESENTATION_UTF8, PRESERVE);
RETURN;
}
}
{
// Double the previous guess - eventually we will get enough space
guess *= 2;
- Resize(guess, REPRESENTATION_ANSI);
+ Resize(guess, REPRESENTATION_UTF8);
// Clear errno to avoid false alarms
errno = 0;
va_copy(ap, args);
- int result = _vsnprintf_s(GetRawANSI(), GetRawCount()+1, _TRUNCATE, format, ap);
+ int result = _vsnprintf_s(GetRawUTF8(), GetRawCount()+1, _TRUNCATE, format, ap);
va_end(ap);
if (result >= 0)
{
// Succeed in writing. Shrink the buffer to fit exactly.
- Resize(result, REPRESENTATION_ANSI, PRESERVE);
- SString sss(Ansi, format);
- INDEBUG(CheckForFormatStringGlobalizationIssues(sss, *this));
+ Resize(result, REPRESENTATION_UTF8, PRESERVE);
RETURN;
}
RETURN;
}
-void SString::Printf(const WCHAR *format, ...)
-{
- WRAPPER_NO_CONTRACT;
-
- va_list args;
- va_start(args, format);
- VPrintf(format, args);
- va_end(args);
-}
-
-void SString::PPrintf(const WCHAR *format, ...)
-{
- CONTRACT_VOID
- {
- INSTANCE_CHECK;
- PRECONDITION(CheckPointer(format));
- THROWS;
- GC_NOTRIGGER;
- }
- CONTRACT_END;
-
- va_list argItr;
- va_start(argItr, format);
- PVPrintf(format, argItr);
- va_end(argItr);
-
- RETURN;
-}
-
-void SString::VPrintf(const WCHAR *format, va_list args)
-{
- CONTRACT_VOID
- {
- INSTANCE_CHECK;
- PRECONDITION(CheckPointer(format));
- THROWS;
- GC_NOTRIGGER;
- }
- CONTRACT_END;
-
- va_list ap;
- // sprintf gives us no means to know how many characters are written
- // other than guessing and trying
-
- if (GetRawCount() > 0)
- {
- // First, try to use the existing buffer
- va_copy(ap, args);
- int result = _vsnwprintf_s(GetRawUnicode(), GetRawCount()+1, _TRUNCATE, format, ap);
- va_end(ap);
-
- if (result >= 0)
- {
- // succeeded
- Resize(result, REPRESENTATION_UNICODE, PRESERVE);
- SString sss(format);
- INDEBUG(CheckForFormatStringGlobalizationIssues(sss, *this));
- RETURN;
- }
- }
-
- // Make a guess how long the result will be (note this will be doubled)
-
- COUNT_T guess = (COUNT_T) wcslen(format)+1;
- if (guess < GetRawCount())
- guess = GetRawCount();
- if (guess < MINIMUM_GUESS)
- guess = MINIMUM_GUESS;
-
- while (TRUE)
- {
- // Double the previous guess - eventually we will get enough space
- guess *= 2;
- Resize(guess, REPRESENTATION_UNICODE);
-
- // Clear errno to avoid false alarms
- errno = 0;
-
- va_copy(ap, args);
- int result = _vsnwprintf_s(GetRawUnicode(), GetRawCount()+1, _TRUNCATE, format, ap);
- va_end(ap);
-
- if (result >= 0)
- {
- Resize(result, REPRESENTATION_UNICODE, PRESERVE);
- SString sss(format);
- INDEBUG(CheckForFormatStringGlobalizationIssues(sss, *this));
- RETURN;
- }
-
- if (errno==ENOMEM)
- {
- ThrowOutOfMemory();
- }
- else
- if (errno!=0 && errno!=EBADF && errno!=ERANGE)
- {
- CONSISTENCY_CHECK_MSG(FALSE, "_vsnwprintf_s failed. Potential globalization bug.");
- ThrowHR(HRESULT_FROM_WIN32(ERROR_NO_UNICODE_TRANSLATION));
- }
- }
- RETURN;
-}
-
-void SString::PVPrintf(const WCHAR *format, va_list args)
-{
- CONTRACT_VOID
- {
- INSTANCE_CHECK;
- PRECONDITION(CheckPointer(format));
- THROWS;
- GC_NOTRIGGER;
- }
- CONTRACT_END;
-
- va_list ap;
- // sprintf gives us no means to know how many characters are written
- // other than guessing and trying
-
- if (GetRawCount() > 0)
- {
- // First, try to use the existing buffer
- va_copy(ap, args);
- int result = _vsnwprintf_s(GetRawUnicode(), GetRawCount()+1, _TRUNCATE, format, ap);
- va_end(ap);
- if (result >= 0)
- {
- // succeeded
- Resize(result, REPRESENTATION_UNICODE, PRESERVE);
- SString sss(format);
- INDEBUG(CheckForFormatStringGlobalizationIssues(sss, *this));
- RETURN;
- }
- }
-
- // Make a guess how long the result will be (note this will be doubled)
-
- COUNT_T guess = (COUNT_T) wcslen(format)+1;
- if (guess < GetRawCount())
- guess = GetRawCount();
- if (guess < MINIMUM_GUESS)
- guess = MINIMUM_GUESS;
-
- while (TRUE)
- {
- // Double the previous guess - eventually we will get enough space
- guess *= 2;
- Resize(guess, REPRESENTATION_UNICODE, DONT_PRESERVE);
-
- // Clear errno to avoid false alarms
- errno = 0;
-
- va_copy(ap, args);
- int result = _vsnwprintf_s(GetRawUnicode(), GetRawCount()+1, _TRUNCATE, format, ap);
- va_end(ap);
-
- if (result >= 0)
- {
- Resize(result, REPRESENTATION_UNICODE, PRESERVE);
- SString sss(format);
- INDEBUG(CheckForFormatStringGlobalizationIssues(sss, *this));
- RETURN;
- }
-
- if (errno==ENOMEM)
- {
- ThrowOutOfMemory();
- }
- else
- if (errno!=0 && errno!=EBADF && errno!=ERANGE)
- {
- CONSISTENCY_CHECK_MSG(FALSE, "_vsnwprintf_s failed. Potential globalization bug.");
- ThrowHR(HRESULT_FROM_WIN32(ERROR_NO_UNICODE_TRANSLATION));
- }
- }
- RETURN;
-}
-
void SString::AppendPrintf(const CHAR *format, ...)
{
WRAPPER_NO_CONTRACT;
Append(s);
}
-void SString::AppendPrintf(const WCHAR *format, ...)
-{
- WRAPPER_NO_CONTRACT;
-
- va_list args;
- va_start(args, format);
- AppendVPrintf(format, args);
- va_end(args);
-}
-
-void SString::AppendVPrintf(const WCHAR *format, va_list args)
-{
- WRAPPER_NO_CONTRACT;
-
- StackSString s;
- s.VPrintf(format, args);
- Append(s);
-}
-
//----------------------------------------------------------------------------
// LoadResource - moved to sstring_com.cpp
//----------------------------------------------------------------------------
// First, try to use our existing buffer to hold the result.
Resize(GetRawCount(), REPRESENTATION_UNICODE);
- DWORD result = ::WszFormatMessage(dwFlags | FORMAT_MESSAGE_ARGUMENT_ARRAY,
+ DWORD result = ::FormatMessage(dwFlags | FORMAT_MESSAGE_ARGUMENT_ARRAY,
lpSource, dwMessageId, dwLanguageId,
GetRawUnicode(), GetRawCount()+1, (va_list*)args);
// We don't have enough space in our buffer, do dynamic allocation.
LocalAllocHolder<WCHAR> string;
- DWORD result = ::WszFormatMessage(dwFlags | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_ARGUMENT_ARRAY,
+ DWORD result = ::FormatMessage(dwFlags | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_ARGUMENT_ARRAY,
lpSource, dwMessageId, dwLanguageId,
(LPWSTR)(LPWSTR*)&string, 0, (va_list*)args);
return scratch;
case REPRESENTATION_UTF8:
- case REPRESENTATION_ANSI:
// These should all be impossible since we have an CIterator on us.
default:
UNREACHABLE_MSG("Unexpected string representation");
case REPRESENTATION_EMPTY:
return s;
- case REPRESENTATION_ANSI:
- if (s.IsRepresentation(REPRESENTATION_ANSI))
- return s;
-
- s.ConvertToANSI(scratch);
- return scratch;
-
case REPRESENTATION_ASCII:
if (s.IsRepresentation(REPRESENTATION_ASCII))
return s;
case REPRESENTATION_UNICODE:
case REPRESENTATION_UTF8:
case REPRESENTATION_ASCII:
- case REPRESENTATION_ANSI:
// Note: no need to call DacInstantiateString because we know the exact length already.
return SBuffer::DacGetRawContent();
iPage = CP_UTF8;
FALLTHROUGH;
case REPRESENTATION_ASCII:
- case REPRESENTATION_ANSI:
// iPage defaults to CP_ACP.
if (pcNeedChars)
{
- *pcNeedChars = WszMultiByteToWideChar(iPage, 0, reinterpret_cast<PSTR>(pContent), -1, NULL, 0);
+ *pcNeedChars = MultiByteToWideChar(iPage, 0, reinterpret_cast<PSTR>(pContent), -1, NULL, 0);
}
if (pBuffer && cBufChars)
{
- if (!WszMultiByteToWideChar(iPage, 0, reinterpret_cast<PSTR>(pContent), -1, pBuffer, cBufChars))
+ if (!MultiByteToWideChar(iPage, 0, reinterpret_cast<PSTR>(pContent), -1, pBuffer, cBufChars))
{
return false;
}
return false;
}
-#endif //DACCESS_COMPILE
\ No newline at end of file
+#endif //DACCESS_COMPILE
}
HRESULT SString::LoadResourceAndReturnHR(CCompRC::ResourceCategory eCategory, int resourceID)
-{
- WRAPPER_NO_CONTRACT;
- return LoadResourceAndReturnHR(NULL, eCategory,resourceID);
-}
-
-HRESULT SString::LoadResourceAndReturnHR(CCompRC* pResourceDLL, CCompRC::ResourceCategory eCategory, int resourceID)
{
CONTRACT(HRESULT)
{
HRESULT hr = E_FAIL;
#ifndef FEATURE_UTILCODE_NO_DEPENDENCIES
- if (pResourceDLL == NULL)
- {
- pResourceDLL = CCompRC::GetDefaultResourceDll();
- }
-
+ CCompRC* pResourceDLL = CCompRC::GetDefaultResourceDll();
if (pResourceDLL != NULL)
{
if (SUCCEEDED(hr))
{
- Truncate(Begin() + (COUNT_T) wcslen(GetRawUnicode()));
+ Truncate(Begin() + (COUNT_T) u16_strlen(GetRawUnicode()));
}
Normalize();
#include <switches.h>
#include <crtwrap.h>
+#include <dn-u16.h>
+#include <algorithm>
+using std::min;
+using std::max;
#define IN_WINFIX_CPP
#include "volatile.h"
#include "static_assert.h"
-
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+//*****************************************************************************
+// Util_NoDependencies.cpp
+//
+
+//
+// This contains a bunch of C++ utility classes needed also for UtilCode without dependencies
+// (standalone version without CLR/clr.dll/mscoree.dll dependencies).
+//
+//*****************************************************************************
+
+#include "stdafx.h"
+#include "utilcode.h"
+#include "ex.h"
+
+void OutputDebugStringUtf8(LPCUTF8 utf8DebugMsg)
+{
+#ifdef TARGET_UNIX
+ OutputDebugStringA(utf8DebugMsg);
+#else
+ if (utf8DebugMsg == NULL)
+ utf8DebugMsg = "";
+
+ MAKE_WIDEPTR_FROMUTF8_NOTHROW(wideDebugMsg, utf8DebugMsg);
+ OutputDebugStringW(wideDebugMsg);
+#endif // !TARGET_UNIX
+}
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+#ifndef SOS_INCLUDE
+#include "common.h"
+#endif
+
+#include "gcinfodecoder.h"
+
+#ifdef USE_GC_INFO_DECODER
+
+#ifndef CHECK_APP_DOMAIN
+#define CHECK_APP_DOMAIN 0
+#endif
+
+#ifndef GCINFODECODER_CONTRACT
+#define GCINFODECODER_CONTRACT LIMITED_METHOD_CONTRACT
+#endif // !GCINFODECODER_CONTRACT
+
+
+#ifndef GET_CALLER_SP
+#define GET_CALLER_SP(pREGDISPLAY) EECodeManager::GetCallerSp(pREGDISPLAY)
+#endif // !GET_CALLER_SP
+
+#ifndef VALIDATE_OBJECTREF
+#if defined(DACCESS_COMPILE)
+#define VALIDATE_OBJECTREF(objref, fDeep)
+#else // DACCESS_COMPILE
+#define VALIDATE_OBJECTREF(objref, fDeep) \
+ do { \
+ Object* objPtr = OBJECTREF_TO_UNCHECKED_OBJECTREF(objref); \
+ if (objPtr) \
+ { \
+ objPtr->Validate(fDeep); \
+ } \
+ } while(0)
+#endif // DACCESS_COMPILE
+#endif // !VALIDATE_OBJECTREF
+
+#ifndef VALIDATE_ROOT
+#include "gcenv.h"
+#define VALIDATE_ROOT(isInterior, hCallBack, pObjRef) \
+ do { \
+ /* Only call Object::Validate() with bDeep == TRUE if we are in the promote phase. */ \
+ /* We should call Validate() with bDeep == FALSE if we are in the relocation phase. */ \
+ /* Actually with the introduction of the POPO feature, we cannot validate during */ \
+ /* relocate because POPO might have written over the object. It will require non */ \
+ /* trivial amount of work to make this work.*/ \
+ \
+ GCCONTEXT* pGCCtx = (GCCONTEXT*)(hCallBack); \
+ \
+ if (!(isInterior) && !(m_Flags & DECODE_NO_VALIDATION) && (pGCCtx->sc->promotion)) { \
+ VALIDATE_OBJECTREF(*(pObjRef), pGCCtx->sc->promotion == TRUE); \
+ } \
+ } while (0)
+#endif // !VALIDATE_ROOT
+
+#ifndef LOG_PIPTR
+#define LOG_PIPTR(pObjRef, gcFlags, hCallBack) \
+ { \
+ GCCONTEXT* pGCCtx = (GCCONTEXT*)(hCallBack); \
+ if (pGCCtx->sc->promotion) \
+ { \
+ LOG((LF_GCROOTS, LL_INFO1000, /* Part Three */ \
+ LOG_PIPTR_OBJECT_CLASS(OBJECTREF_TO_UNCHECKED_OBJECTREF(*pObjRef), (gcFlags & GC_CALL_PINNED), (gcFlags & GC_CALL_INTERIOR)))); \
+ } \
+ else \
+ { \
+ LOG((LF_GCROOTS, LL_INFO1000, /* Part Three */ \
+ LOG_PIPTR_OBJECT(OBJECTREF_TO_UNCHECKED_OBJECTREF(*pObjRef), (gcFlags & GC_CALL_PINNED), (gcFlags & GC_CALL_INTERIOR)))); \
+ } \
+ }
+#endif // !LOG_PIPTR
+
+bool GcInfoDecoder::SetIsInterruptibleCB (UINT32 startOffset, UINT32 stopOffset, void * hCallback)
+{
+ GcInfoDecoder *pThis = (GcInfoDecoder*)hCallback;
+
+
+ bool fStop = pThis->m_InstructionOffset >= startOffset && pThis->m_InstructionOffset < stopOffset;
+
+ if (fStop)
+ pThis->m_IsInterruptible = true;
+
+ return fStop;
+}
+
+// returns true if we decoded all that was asked;
+bool GcInfoDecoder::PredecodeFatHeader(int remainingFlags)
+{
+ int numFlagBits = (m_Version == 1) ? GC_INFO_FLAGS_BIT_SIZE_VERSION_1 : GC_INFO_FLAGS_BIT_SIZE;
+ m_headerFlags = (GcInfoHeaderFlags)m_Reader.Read(numFlagBits);
+
+ m_ReturnKind = (ReturnKind)((UINT32)m_Reader.Read(SIZE_OF_RETURN_KIND_IN_FAT_HEADER));
+
+ remainingFlags &= ~(DECODE_RETURN_KIND | DECODE_VARARG);
+#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
+ remainingFlags &= ~DECODE_HAS_TAILCALLS;
+#endif
+ if (remainingFlags == 0)
+ {
+ // Bail, if we've decoded enough,
+ return true;
+ }
+
+ m_CodeLength = (UINT32)DENORMALIZE_CODE_LENGTH((UINT32)m_Reader.DecodeVarLengthUnsigned(CODE_LENGTH_ENCBASE));
+ remainingFlags &= ~DECODE_CODE_LENGTH;
+ if (remainingFlags == 0)
+ {
+ // Bail, if we've decoded enough,
+ return true;
+ }
+
+ if (m_headerFlags & GC_INFO_HAS_GS_COOKIE)
+ {
+ // Note that normalization as a code offset can be different than
+ // normalization as code length
+ UINT32 normCodeLength = NORMALIZE_CODE_OFFSET(m_CodeLength);
+
+ // Decode prolog/epilog information
+ UINT32 normPrologSize = (UINT32)m_Reader.DecodeVarLengthUnsigned(NORM_PROLOG_SIZE_ENCBASE) + 1;
+ UINT32 normEpilogSize = (UINT32)m_Reader.DecodeVarLengthUnsigned(NORM_EPILOG_SIZE_ENCBASE);
+
+ m_ValidRangeStart = (UINT32)DENORMALIZE_CODE_OFFSET(normPrologSize);
+ m_ValidRangeEnd = (UINT32)DENORMALIZE_CODE_OFFSET(normCodeLength - normEpilogSize);
+ _ASSERTE(m_ValidRangeStart < m_ValidRangeEnd);
+ }
+ else if ((m_headerFlags & GC_INFO_HAS_GENERICS_INST_CONTEXT_MASK) != GC_INFO_HAS_GENERICS_INST_CONTEXT_NONE)
+ {
+ // Decode prolog information
+ UINT32 normPrologSize = (UINT32)m_Reader.DecodeVarLengthUnsigned(NORM_PROLOG_SIZE_ENCBASE) + 1;
+ m_ValidRangeStart = (UINT32)DENORMALIZE_CODE_OFFSET(normPrologSize);
+ // satisfy asserts that assume m_GSCookieValidRangeStart != 0 ==> m_GSCookieValidRangeStart < m_GSCookieValidRangeEnd
+ m_ValidRangeEnd = m_ValidRangeStart + 1;
+ }
+ else
+ {
+ m_ValidRangeStart = m_ValidRangeEnd = 0;
+ }
+
+ remainingFlags &= ~DECODE_PROLOG_LENGTH;
+ if (remainingFlags == 0)
+ {
+ // Bail, if we've decoded enough,
+ return true;
+ }
+
+ // Decode the offset to the GS cookie.
+ if (m_headerFlags & GC_INFO_HAS_GS_COOKIE)
+ {
+ m_GSCookieStackSlot = (INT32)DENORMALIZE_STACK_SLOT(m_Reader.DecodeVarLengthSigned(GS_COOKIE_STACK_SLOT_ENCBASE));
+ }
+ else
+ {
+ m_GSCookieStackSlot = NO_GS_COOKIE;
+ }
+
+ remainingFlags &= ~DECODE_GS_COOKIE;
+ if (remainingFlags == 0)
+ {
+ // Bail, if we've decoded enough,
+ return true;
+ }
+
+ // Decode the offset to the PSPSym.
+ // The PSPSym is relative to the caller SP on IA64 and the initial stack pointer before any stack allocation on X64 (InitialSP).
+ if (m_headerFlags & GC_INFO_HAS_PSP_SYM)
+ {
+ m_PSPSymStackSlot = (INT32)DENORMALIZE_STACK_SLOT(m_Reader.DecodeVarLengthSigned(PSP_SYM_STACK_SLOT_ENCBASE));
+ }
+ else
+ {
+ m_PSPSymStackSlot = NO_PSP_SYM;
+ }
+
+ remainingFlags &= ~DECODE_PSP_SYM;
+ if (remainingFlags == 0)
+ {
+ // Bail, if we've decoded enough,
+ return true;
+ }
+
+ // Decode the offset to the generics type context.
+ if ((m_headerFlags & GC_INFO_HAS_GENERICS_INST_CONTEXT_MASK) != GC_INFO_HAS_GENERICS_INST_CONTEXT_NONE)
+ {
+ m_GenericsInstContextStackSlot = (INT32)DENORMALIZE_STACK_SLOT(m_Reader.DecodeVarLengthSigned(GENERICS_INST_CONTEXT_STACK_SLOT_ENCBASE));
+ }
+ else
+ {
+ m_GenericsInstContextStackSlot = NO_GENERICS_INST_CONTEXT;
+ }
+
+ remainingFlags &= ~DECODE_GENERICS_INST_CONTEXT;
+ if (remainingFlags == 0)
+ {
+ // Bail, if we've decoded enough,
+ return true;
+ }
+
+ if (m_headerFlags & GC_INFO_HAS_STACK_BASE_REGISTER)
+ {
+ m_StackBaseRegister = (UINT32)DENORMALIZE_STACK_BASE_REGISTER(m_Reader.DecodeVarLengthUnsigned(STACK_BASE_REGISTER_ENCBASE));
+ }
+ else
+ {
+ m_StackBaseRegister = NO_STACK_BASE_REGISTER;
+ }
+
+ if (m_headerFlags & GC_INFO_HAS_EDIT_AND_CONTINUE_INFO)
+ {
+ m_SizeOfEditAndContinuePreservedArea = (UINT32)m_Reader.DecodeVarLengthUnsigned(SIZE_OF_EDIT_AND_CONTINUE_PRESERVED_AREA_ENCBASE);
+#ifdef TARGET_ARM64
+ m_SizeOfEditAndContinueFixedStackFrame = (UINT32)m_Reader.DecodeVarLengthUnsigned(SIZE_OF_EDIT_AND_CONTINUE_FIXED_STACK_FRAME_ENCBASE);
+#endif
+ }
+ else
+ {
+ m_SizeOfEditAndContinuePreservedArea = NO_SIZE_OF_EDIT_AND_CONTINUE_PRESERVED_AREA;
+#ifdef TARGET_ARM64
+ m_SizeOfEditAndContinueFixedStackFrame = 0;
+#endif
+ }
+
+ remainingFlags &= ~DECODE_EDIT_AND_CONTINUE;
+ if (remainingFlags == 0)
+ {
+ // Bail, if we've decoded enough,
+ return true;
+ }
+
+ if (m_headerFlags & GC_INFO_REVERSE_PINVOKE_FRAME)
+ {
+ m_ReversePInvokeFrameStackSlot = (INT32)DENORMALIZE_STACK_SLOT(m_Reader.DecodeVarLengthSigned(REVERSE_PINVOKE_FRAME_ENCBASE));
+ }
+ else
+ {
+ m_ReversePInvokeFrameStackSlot = NO_REVERSE_PINVOKE_FRAME;
+ }
+
+ remainingFlags &= ~DECODE_REVERSE_PINVOKE_VAR;
+ if (remainingFlags == 0)
+ {
+ // Bail, if we've decoded enough,
+ return true;
+ }
+
+#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
+ m_SizeOfStackOutgoingAndScratchArea = (UINT32)DENORMALIZE_SIZE_OF_STACK_AREA(m_Reader.DecodeVarLengthUnsigned(SIZE_OF_STACK_AREA_ENCBASE));
+#endif // FIXED_STACK_PARAMETER_SCRATCH_AREA
+
+ return false;
+}
+
+GcInfoDecoder::GcInfoDecoder(
+ GCInfoToken gcInfoToken,
+ GcInfoDecoderFlags flags,
+ UINT32 breakOffset
+ )
+ : m_Reader(dac_cast<PTR_CBYTE>(gcInfoToken.Info))
+ , m_InstructionOffset(breakOffset)
+ , m_IsInterruptible(false)
+ , m_ReturnKind(RT_Illegal)
+#ifdef _DEBUG
+ , m_Flags( flags )
+ , m_GcInfoAddress(dac_cast<PTR_CBYTE>(gcInfoToken.Info))
+#endif
+ , m_Version(gcInfoToken.Version)
+{
+ _ASSERTE( (flags & (DECODE_INTERRUPTIBILITY | DECODE_GC_LIFETIMES)) || (0 == breakOffset) );
+
+ // The current implementation doesn't support the two flags together
+ _ASSERTE(
+ ((flags & (DECODE_INTERRUPTIBILITY | DECODE_GC_LIFETIMES)) != (DECODE_INTERRUPTIBILITY | DECODE_GC_LIFETIMES))
+ );
+
+ //--------------------------------------------
+ // Pre-decode information
+ //--------------------------------------------
+
+ bool slimHeader = (m_Reader.ReadOneFast() == 0);
+ // Use flag mask to bail out early if we already decoded all the pieces that caller requested
+ int remainingFlags = flags == DECODE_EVERYTHING ? ~0 : flags;
+
+ if (!slimHeader)
+ {
+ if (PredecodeFatHeader(remainingFlags))
+ return;
+ }
+ else
+ {
+ if (m_Reader.ReadOneFast())
+ {
+ m_headerFlags = GC_INFO_HAS_STACK_BASE_REGISTER;
+ m_StackBaseRegister = (UINT32)DENORMALIZE_STACK_BASE_REGISTER(0);
+ }
+ else
+ {
+ m_headerFlags = (GcInfoHeaderFlags)0;
+ m_StackBaseRegister = NO_STACK_BASE_REGISTER;
+ }
+
+ m_ReturnKind = (ReturnKind)((UINT32)m_Reader.Read(SIZE_OF_RETURN_KIND_IN_SLIM_HEADER));
+
+ remainingFlags &= ~(DECODE_RETURN_KIND | DECODE_VARARG);
+#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
+ remainingFlags &= ~DECODE_HAS_TAILCALLS;
+#endif
+
+ if (remainingFlags == 0)
+ {
+ // Bail, if we've decoded enough,
+ return;
+ }
+
+ m_CodeLength = (UINT32)DENORMALIZE_CODE_LENGTH((UINT32)m_Reader.DecodeVarLengthUnsigned(CODE_LENGTH_ENCBASE));
+
+ //
+ // predecoding the rest of slim header does not require any reading.
+ //
+
+ m_ValidRangeStart = m_ValidRangeEnd = 0;
+ m_GSCookieStackSlot = NO_GS_COOKIE;
+ m_PSPSymStackSlot = NO_PSP_SYM;
+ m_GenericsInstContextStackSlot = NO_GENERICS_INST_CONTEXT;
+ m_SizeOfEditAndContinuePreservedArea = NO_SIZE_OF_EDIT_AND_CONTINUE_PRESERVED_AREA;
+
+#ifdef TARGET_ARM64
+ m_SizeOfEditAndContinueFixedStackFrame = 0;
+#endif
+
+ m_ReversePInvokeFrameStackSlot = NO_REVERSE_PINVOKE_FRAME;
+
+#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
+ m_SizeOfStackOutgoingAndScratchArea = 0;
+#endif // FIXED_STACK_PARAMETER_SCRATCH_AREA
+
+ remainingFlags &= ~(DECODE_CODE_LENGTH
+ | DECODE_PROLOG_LENGTH
+ | DECODE_GS_COOKIE
+ | DECODE_PSP_SYM
+ | DECODE_GENERICS_INST_CONTEXT
+ | DECODE_EDIT_AND_CONTINUE
+ | DECODE_REVERSE_PINVOKE_VAR
+ );
+
+ if (remainingFlags == 0)
+ {
+ // Bail, if we've decoded enough,
+ return;
+ }
+ }
+
+#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
+ m_NumSafePoints = (UINT32) DENORMALIZE_NUM_SAFE_POINTS(m_Reader.DecodeVarLengthUnsigned(NUM_SAFE_POINTS_ENCBASE));
+ m_SafePointIndex = m_NumSafePoints;
+#endif
+
+ if (slimHeader)
+ {
+ m_NumInterruptibleRanges = 0;
+ }
+ else
+ {
+ m_NumInterruptibleRanges = (UINT32) DENORMALIZE_NUM_INTERRUPTIBLE_RANGES(m_Reader.DecodeVarLengthUnsigned(NUM_INTERRUPTIBLE_RANGES_ENCBASE));
+ }
+
+#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
+ if(flags & (DECODE_GC_LIFETIMES | DECODE_INTERRUPTIBILITY))
+ {
+ if(m_NumSafePoints)
+ {
+ // Safepoints are encoded with a -1 adjustment
+ // DECODE_GC_LIFETIMES adjusts the offset accordingly, but DECODE_INTERRUPTIBILITY does not
+ // adjust here
+ UINT32 offset = flags & DECODE_INTERRUPTIBILITY ? m_InstructionOffset - 1 : m_InstructionOffset;
+ m_SafePointIndex = FindSafePoint(offset);
+ }
+ }
+ else if(flags & DECODE_FOR_RANGES_CALLBACK)
+ {
+ // Note that normalization as a code offset can be different than
+ // normalization as code length
+ UINT32 normCodeLength = NORMALIZE_CODE_OFFSET(m_CodeLength);
+
+ UINT32 numBitsPerOffset = CeilOfLog2(normCodeLength);
+ m_Reader.Skip(m_NumSafePoints * numBitsPerOffset);
+ }
+#endif
+
+ // we do not support both DECODE_INTERRUPTIBILITY and DECODE_FOR_RANGES_CALLBACK at the same time
+ // as both will enumerate and consume interruptible ranges.
+ _ASSERTE((flags & (DECODE_INTERRUPTIBILITY | DECODE_FOR_RANGES_CALLBACK)) !=
+ (DECODE_INTERRUPTIBILITY | DECODE_FOR_RANGES_CALLBACK));
+
+ _ASSERTE(!m_IsInterruptible);
+ if(flags & DECODE_INTERRUPTIBILITY)
+ {
+ EnumerateInterruptibleRanges(&SetIsInterruptibleCB, this);
+ }
+}
+
+bool GcInfoDecoder::IsInterruptible()
+{
+ _ASSERTE( m_Flags & DECODE_INTERRUPTIBILITY );
+ return m_IsInterruptible;
+}
+
+bool GcInfoDecoder::HasInterruptibleRanges()
+{
+ _ASSERTE(m_Flags & (DECODE_INTERRUPTIBILITY | DECODE_GC_LIFETIMES));
+ return m_NumInterruptibleRanges > 0;
+}
+
+bool GcInfoDecoder::IsSafePoint()
+{
+ _ASSERTE(m_Flags & (DECODE_INTERRUPTIBILITY | DECODE_GC_LIFETIMES));
+ return m_SafePointIndex != m_NumSafePoints;
+}
+
+bool GcInfoDecoder::AreSafePointsInterruptible()
+{
+ return m_Version >= 3;
+}
+
+bool GcInfoDecoder::IsInterruptibleSafePoint()
+{
+ return IsSafePoint() && AreSafePointsInterruptible();
+}
+
+bool GcInfoDecoder::CouldBeInterruptibleSafePoint()
+{
+ // This is used in asserts. Ideally it would return false
+ // if current location canot possibly be a safepoint.
+ // However in some cases we optimize away "boring" callsites when no variables are tracked.
+ // So there is no way to tell precisely that a point is indeed not a safe point.
+ // Thus we do what we can here, but this could be better if we could have more data
+ return AreSafePointsInterruptible() && m_NumInterruptibleRanges == 0;
+}
+
+bool GcInfoDecoder::HasMethodDescGenericsInstContext()
+{
+ _ASSERTE( m_Flags & DECODE_GENERICS_INST_CONTEXT );
+ return (m_headerFlags & GC_INFO_HAS_GENERICS_INST_CONTEXT_MASK) == GC_INFO_HAS_GENERICS_INST_CONTEXT_MD;
+}
+
+bool GcInfoDecoder::HasMethodTableGenericsInstContext()
+{
+ _ASSERTE( m_Flags & DECODE_GENERICS_INST_CONTEXT );
+ return (m_headerFlags & GC_INFO_HAS_GENERICS_INST_CONTEXT_MASK) == GC_INFO_HAS_GENERICS_INST_CONTEXT_MT;
+}
+
+#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
+
+// This is used for gccoverage: is the given offset
+// a call-return offset with partially-interruptible GC info?
+bool GcInfoDecoder::IsSafePoint(UINT32 codeOffset)
+{
+ _ASSERTE(m_Flags == DECODE_EVERYTHING && m_InstructionOffset == 0);
+ if(m_NumSafePoints == 0)
+ return false;
+
+#if defined(TARGET_AMD64) || defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
+ // Safepoints are encoded with a -1 adjustment
+ codeOffset--;
+#endif
+ size_t savedPos = m_Reader.GetCurrentPos();
+ UINT32 safePointIndex = FindSafePoint(codeOffset);
+ m_Reader.SetCurrentPos(savedPos);
+ return (bool) (safePointIndex != m_NumSafePoints);
+
+}
+
+// Repositioning within a bit stream is an involved operation, compared to sequential read,
+// so we prefer linear search unless the number of safepoints is too high.
+// The limit is not very significant as most methods will have just a few safe points.
+// At 32, even if a single point is 16bit encoded (64K method length),
+// the whole run will be under 64 bytes, so likely we will stay in the same cache line.
+#define MAX_LINEAR_SEARCH 32
+
+NOINLINE
+UINT32 GcInfoDecoder::NarrowSafePointSearch(size_t savedPos, UINT32 breakOffset, UINT32* searchEnd)
+{
+ INT32 low = 0;
+ INT32 high = (INT32)m_NumSafePoints;
+
+ const UINT32 numBitsPerOffset = CeilOfLog2(NORMALIZE_CODE_OFFSET(m_CodeLength));
+ while (high - low > MAX_LINEAR_SEARCH)
+ {
+ const INT32 mid = (low + high) / 2;
+ _ASSERTE(mid >= 0 && mid < (INT32)m_NumSafePoints);
+ m_Reader.SetCurrentPos(savedPos + (UINT32)mid * numBitsPerOffset);
+ UINT32 midSpOffset = (UINT32)m_Reader.Read(numBitsPerOffset);
+
+ if (breakOffset < midSpOffset)
+ high = mid;
+ else
+ low = mid;
+ }
+
+ m_Reader.SetCurrentPos(savedPos +(UINT32)low * numBitsPerOffset);
+ *searchEnd = high;
+ return low;
+}
+
+UINT32 GcInfoDecoder::FindSafePoint(UINT32 breakOffset)
+{
+ _ASSERTE(m_NumSafePoints > 0);
+ UINT32 result = m_NumSafePoints;
+ const size_t savedPos = m_Reader.GetCurrentPos();
+ const UINT32 numBitsPerOffset = CeilOfLog2(NORMALIZE_CODE_OFFSET(m_CodeLength));
+
+#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
+ // Safepoints are encoded with a -1 adjustment
+ if ((breakOffset & 1) != 0)
+#endif
+ {
+ const UINT32 normBreakOffset = NORMALIZE_CODE_OFFSET(breakOffset);
+ UINT32 linearSearchStart = 0;
+ UINT32 linearSearchEnd = m_NumSafePoints;
+ if (linearSearchEnd - linearSearchStart > MAX_LINEAR_SEARCH)
+ {
+ linearSearchStart = NarrowSafePointSearch(savedPos, normBreakOffset, &linearSearchEnd);
+ }
+
+ for (UINT32 i = linearSearchStart; i < linearSearchEnd; i++)
+ {
+ UINT32 spOffset = (UINT32)m_Reader.Read(numBitsPerOffset);
+ if (spOffset == normBreakOffset)
+ {
+ result = i;
+ break;
+ }
+
+ if (spOffset > normBreakOffset)
+ {
+ break;
+ }
+ }
+ }
+
+ // Cannot just set the "savedPos + m_NumSafePoints * numBitsPerOffset" as
+ // there could be no more data if method tracks no variables of any kind.
+ // Must use Skip, which handles potential stream end.
+ m_Reader.Skip(savedPos + m_NumSafePoints * numBitsPerOffset - m_Reader.GetCurrentPos());
+ return result;
+}
+
+void GcInfoDecoder::EnumerateSafePoints(EnumerateSafePointsCallback *pCallback, void * hCallback)
+{
+ if(m_NumSafePoints == 0)
+ return;
+
+ const UINT32 numBitsPerOffset = CeilOfLog2(NORMALIZE_CODE_OFFSET(m_CodeLength));
+
+ for(UINT32 i = 0; i < m_NumSafePoints; i++)
+ {
+ UINT32 normOffset = (UINT32)m_Reader.Read(numBitsPerOffset);
+ UINT32 offset = DENORMALIZE_CODE_OFFSET(normOffset) + 2;
+
+#if defined(TARGET_AMD64) || defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
+ // Safepoints are encoded with a -1 adjustment
+ offset--;
+#endif
+
+ pCallback(this, offset, hCallback);
+ }
+}
+#endif
+
+void GcInfoDecoder::EnumerateInterruptibleRanges (
+ EnumerateInterruptibleRangesCallback *pCallback,
+ void * hCallback)
+{
+ // If no info is found for the call site, we default to fully-interruptible
+ LOG((LF_GCROOTS, LL_INFO1000000, "No GC info found for call site at offset %x. Defaulting to fully-interruptible information.\n", (int) m_InstructionOffset));
+
+ UINT32 lastInterruptibleRangeStopOffsetNormalized = 0;
+
+ for(UINT32 i=0; i<m_NumInterruptibleRanges; i++)
+ {
+ UINT32 normStartDelta = (UINT32) m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA1_ENCBASE );
+ UINT32 normStopDelta = (UINT32) m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA2_ENCBASE ) + 1;
+
+ UINT32 rangeStartOffsetNormalized = lastInterruptibleRangeStopOffsetNormalized + normStartDelta;
+ UINT32 rangeStopOffsetNormalized = rangeStartOffsetNormalized + normStopDelta;
+
+ UINT32 rangeStartOffset = DENORMALIZE_CODE_OFFSET(rangeStartOffsetNormalized);
+ UINT32 rangeStopOffset = DENORMALIZE_CODE_OFFSET(rangeStopOffsetNormalized);
+
+ bool fStop = pCallback(rangeStartOffset, rangeStopOffset, hCallback);
+ if (fStop)
+ return;
+
+ lastInterruptibleRangeStopOffsetNormalized = rangeStopOffsetNormalized;
+ }
+}
+
+INT32 GcInfoDecoder::GetGSCookieStackSlot()
+{
+ _ASSERTE( m_Flags & DECODE_GS_COOKIE );
+ return m_GSCookieStackSlot;
+}
+
+INT32 GcInfoDecoder::GetReversePInvokeFrameStackSlot()
+{
+ _ASSERTE(m_Flags & DECODE_REVERSE_PINVOKE_VAR);
+ return m_ReversePInvokeFrameStackSlot;
+}
+
+UINT32 GcInfoDecoder::GetGSCookieValidRangeStart()
+{
+ _ASSERTE( m_Flags & DECODE_GS_COOKIE );
+ return m_ValidRangeStart;
+}
+UINT32 GcInfoDecoder::GetGSCookieValidRangeEnd()
+{
+ _ASSERTE( m_Flags & DECODE_GS_COOKIE );
+ return m_ValidRangeEnd;
+}
+
+UINT32 GcInfoDecoder::GetPrologSize()
+{
+ _ASSERTE( m_Flags & DECODE_PROLOG_LENGTH );
+
+ return m_ValidRangeStart;
+}
+
+INT32 GcInfoDecoder::GetGenericsInstContextStackSlot()
+{
+ _ASSERTE( m_Flags & DECODE_GENERICS_INST_CONTEXT );
+ return m_GenericsInstContextStackSlot;
+}
+
+INT32 GcInfoDecoder::GetPSPSymStackSlot()
+{
+ _ASSERTE( m_Flags & DECODE_PSP_SYM );
+ return m_PSPSymStackSlot;
+}
+
+bool GcInfoDecoder::GetIsVarArg()
+{
+ _ASSERTE( m_Flags & DECODE_VARARG );
+ return m_headerFlags & GC_INFO_IS_VARARG;
+}
+
+#if defined(TARGET_ARM) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
+bool GcInfoDecoder::HasTailCalls()
+{
+ _ASSERTE( m_Flags & DECODE_HAS_TAILCALLS );
+ return ((m_headerFlags & GC_INFO_HAS_TAILCALLS) != 0);
+}
+#endif // TARGET_ARM || TARGET_ARM64 || TARGET_LOONGARCH64 || TARGET_RISCV64
+
+bool GcInfoDecoder::WantsReportOnlyLeaf()
+{
+ // Only AMD64 with JIT64 can return false here.
+#ifdef TARGET_AMD64
+ return ((m_headerFlags & GC_INFO_WANTS_REPORT_ONLY_LEAF) != 0);
+#else
+ return true;
+#endif
+}
+
+UINT32 GcInfoDecoder::GetCodeLength()
+{
+// SUPPORTS_DAC;
+ _ASSERTE( m_Flags & DECODE_CODE_LENGTH );
+ return m_CodeLength;
+}
+
+ReturnKind GcInfoDecoder::GetReturnKind()
+{
+ // SUPPORTS_DAC;
+ _ASSERTE( m_Flags & DECODE_RETURN_KIND );
+ return m_ReturnKind;
+}
+
+UINT32 GcInfoDecoder::GetStackBaseRegister()
+{
+ return m_StackBaseRegister;
+}
+
+UINT32 GcInfoDecoder::GetSizeOfEditAndContinuePreservedArea()
+{
+ _ASSERTE( m_Flags & DECODE_EDIT_AND_CONTINUE );
+ return m_SizeOfEditAndContinuePreservedArea;
+}
+
+#ifdef TARGET_ARM64
+UINT32 GcInfoDecoder::GetSizeOfEditAndContinueFixedStackFrame()
+{
+ _ASSERTE( m_Flags & DECODE_EDIT_AND_CONTINUE );
+ return m_SizeOfEditAndContinueFixedStackFrame;
+}
+#endif
+
+size_t GcInfoDecoder::GetNumBytesRead()
+{
+ return (m_Reader.GetCurrentPos() + 7) / 8;
+}
+
+
+#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
+
+UINT32 GcInfoDecoder::GetSizeOfStackParameterArea()
+{
+ return m_SizeOfStackOutgoingAndScratchArea;
+}
+
+#endif // FIXED_STACK_PARAMETER_SCRATCH_AREA
+
+
+bool GcInfoDecoder::EnumerateLiveSlots(
+ PREGDISPLAY pRD,
+ bool reportScratchSlots,
+ unsigned inputFlags,
+ GCEnumCallback pCallBack,
+ void * hCallBack
+ )
+{
+
+ unsigned executionAborted = (inputFlags & ExecutionAborted);
+
+ // In order to make ARM more x86-like we only ever report the leaf frame
+ // of any given function. We accomplish this by having the stackwalker
+ // pass a flag whenever walking the frame of a method where it has
+ // previously visited a child funclet
+ if (WantsReportOnlyLeaf() && (inputFlags & ParentOfFuncletStackFrame))
+ {
+ LOG((LF_GCROOTS, LL_INFO100000, "Not reporting this frame because it was already reported via another funclet.\n"));
+ return true;
+ }
+
+ //
+ // If this is a non-leaf frame and we are executing a call, the unwinder has given us the PC
+ // of the call instruction. We should adjust it to the PC of the instruction after the call in order to
+ // obtain transition information for scratch slots. However, we always assume scratch slots to be
+ // dead for non-leaf frames (except for ResumableFrames), so we don't need to adjust the PC.
+ // If this is a non-leaf frame and we are not executing a call (i.e.: a fault occurred in the function),
+ // then it would be incorrect to adjust the PC
+ //
+
+ _ASSERTE(GC_SLOT_INTERIOR == GC_CALL_INTERIOR);
+ _ASSERTE(GC_SLOT_PINNED == GC_CALL_PINNED);
+
+ _ASSERTE( m_Flags & DECODE_GC_LIFETIMES );
+
+ GcSlotDecoder slotDecoder;
+
+ UINT32 normBreakOffset = NORMALIZE_CODE_OFFSET(m_InstructionOffset);
+
+ // Normalized break offset
+ // Relative to interruptible ranges #if PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
+#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
+ UINT32 pseudoBreakOffset = 0;
+ UINT32 numInterruptibleLength = 0;
+#else
+ UINT32 pseudoBreakOffset = normBreakOffset;
+ UINT32 numInterruptibleLength = NORMALIZE_CODE_OFFSET(m_CodeLength);
+#endif
+
+
+#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
+ bool noTrackedRefs = false;
+
+ if(m_SafePointIndex < m_NumSafePoints && !executionAborted)
+ {
+ // Skip interruptibility information
+ for(UINT32 i=0; i<m_NumInterruptibleRanges; i++)
+ {
+ m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA1_ENCBASE );
+ m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA2_ENCBASE );
+ }
+ }
+ else
+ {
+ //
+ // We didn't find the break offset in the list of call sites
+ // or we are in an executionAborted frame
+ // So either we have fully-interruptible information,
+ // or execution will not resume at the current method
+ // and nothing should be reported
+ //
+ if(!executionAborted)
+ {
+ if(m_NumInterruptibleRanges == 0)
+ {
+ // No ranges and no explicit safepoint - must be MinOpts with untracked refs.
+ noTrackedRefs = true;
+ }
+ }
+
+ if(m_NumInterruptibleRanges != 0)
+ {
+ int countIntersections = 0;
+ UINT32 lastNormStop = 0;
+ for(UINT32 i=0; i<m_NumInterruptibleRanges; i++)
+ {
+ UINT32 normStartDelta = (UINT32) m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA1_ENCBASE );
+ UINT32 normStopDelta = (UINT32) m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA2_ENCBASE ) + 1;
+
+ UINT32 normStart = lastNormStop + normStartDelta;
+ UINT32 normStop = normStart + normStopDelta;
+ if(normBreakOffset >= normStart && normBreakOffset < normStop)
+ {
+ _ASSERTE(pseudoBreakOffset == 0);
+ countIntersections++;
+ pseudoBreakOffset = numInterruptibleLength + normBreakOffset - normStart;
+ }
+ numInterruptibleLength += normStopDelta;
+ lastNormStop = normStop;
+ }
+ _ASSERTE(countIntersections <= 1);
+ if(countIntersections == 0)
+ {
+ _ASSERTE(executionAborted);
+ LOG((LF_GCROOTS, LL_INFO100000, "Not reporting this frame because it is aborted and not fully interruptible.\n"));
+ goto ExitSuccess;
+ }
+ }
+ }
+#else // !PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
+
+ // Skip interruptibility information
+ for(UINT32 i=0; i<m_NumInterruptibleRanges; i++)
+ {
+ m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA1_ENCBASE );
+ m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA2_ENCBASE );
+ }
+#endif
+
+
+ //------------------------------------------------------------------------------
+ // Read the slot table
+ //------------------------------------------------------------------------------
+
+
+ slotDecoder.DecodeSlotTable(m_Reader);
+
+ {
+ UINT32 numSlots = slotDecoder.GetNumTracked();
+
+ if(!numSlots)
+ goto ReportUntracked;
+
+#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
+
+ UINT32 numBitsPerOffset = 0;
+ // Duplicate the encoder's heuristic to determine if we have indirect live
+ // slot table (similar to the chunk pointers)
+ if ((m_NumSafePoints > 0) && m_Reader.ReadOneFast())
+ {
+ numBitsPerOffset = (UINT32) m_Reader.DecodeVarLengthUnsigned(POINTER_SIZE_ENCBASE) + 1;
+ _ASSERTE(numBitsPerOffset != 0);
+ }
+
+ //------------------------------------------------------------------------------
+ // Try partially interruptible first
+ //------------------------------------------------------------------------------
+
+ if( !executionAborted && m_SafePointIndex != m_NumSafePoints )
+ {
+ if (numBitsPerOffset)
+ {
+ const size_t offsetTablePos = m_Reader.GetCurrentPos();
+ m_Reader.Skip(m_SafePointIndex * numBitsPerOffset);
+ const size_t liveStatesOffset = m_Reader.Read(numBitsPerOffset);
+ const size_t liveStatesStart = ((offsetTablePos + m_NumSafePoints * numBitsPerOffset + 7) & (~7));
+ m_Reader.SetCurrentPos(liveStatesStart + liveStatesOffset);
+ if (m_Reader.ReadOneFast()) {
+ // RLE encoded
+ bool fSkip = (m_Reader.ReadOneFast() == 0);
+ bool fReport = true;
+ UINT32 readSlots = (UINT32)m_Reader.DecodeVarLengthUnsigned( fSkip ? LIVESTATE_RLE_SKIP_ENCBASE : LIVESTATE_RLE_RUN_ENCBASE );
+ fSkip = !fSkip;
+ while (readSlots < numSlots)
+ {
+ UINT32 cnt = (UINT32)m_Reader.DecodeVarLengthUnsigned( fSkip ? LIVESTATE_RLE_SKIP_ENCBASE : LIVESTATE_RLE_RUN_ENCBASE ) + 1;
+ if (fReport)
+ {
+ for(UINT32 slotIndex = readSlots; slotIndex < readSlots + cnt; slotIndex++)
+ {
+ ReportSlotToGC(slotDecoder,
+ slotIndex,
+ pRD,
+ reportScratchSlots,
+ inputFlags,
+ pCallBack,
+ hCallBack
+ );
+ }
+ }
+ readSlots += cnt;
+ fSkip = !fSkip;
+ fReport = !fReport;
+ }
+ _ASSERTE(readSlots == numSlots);
+ goto ReportUntracked;
+ }
+ // Just a normal live state (1 bit per slot), so use the normal decoding loop
+ }
+ else
+ {
+ m_Reader.Skip(m_SafePointIndex * numSlots);
+ }
+
+ for(UINT32 slotIndex = 0; slotIndex < numSlots; slotIndex++)
+ {
+ if(m_Reader.ReadOneFast())
+ {
+ ReportSlotToGC(
+ slotDecoder,
+ slotIndex,
+ pRD,
+ reportScratchSlots,
+ inputFlags,
+ pCallBack,
+ hCallBack
+ );
+ }
+ }
+ goto ReportUntracked;
+ }
+ else
+ {
+ m_Reader.Skip(m_NumSafePoints * numSlots);
+ if(m_NumInterruptibleRanges == 0)
+ goto ReportUntracked;
+ }
+#endif // PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
+
+ _ASSERTE(m_NumInterruptibleRanges);
+ _ASSERTE(numInterruptibleLength);
+
+ // If no info is found for the call site, we default to fully-interruptible
+ LOG((LF_GCROOTS, LL_INFO1000000, "No GC info found for call site at offset %x. Defaulting to fully-interruptible information.\n", (int) m_InstructionOffset));
+
+ UINT32 numChunks = (numInterruptibleLength + NUM_NORM_CODE_OFFSETS_PER_CHUNK - 1) / NUM_NORM_CODE_OFFSETS_PER_CHUNK;
+ UINT32 breakChunk = pseudoBreakOffset / NUM_NORM_CODE_OFFSETS_PER_CHUNK;
+ _ASSERTE(breakChunk < numChunks);
+
+ UINT32 numBitsPerPointer = (UINT32) m_Reader.DecodeVarLengthUnsigned(POINTER_SIZE_ENCBASE);
+
+ if(!numBitsPerPointer)
+ goto ReportUntracked;
+
+ size_t pointerTablePos = m_Reader.GetCurrentPos();
+
+ size_t chunkPointer;
+ UINT32 chunk = breakChunk;
+ for(;;)
+ {
+ m_Reader.SetCurrentPos(pointerTablePos + chunk * numBitsPerPointer);
+ chunkPointer = m_Reader.Read(numBitsPerPointer);
+ if(chunkPointer)
+ break;
+
+ if(chunk-- == 0)
+ goto ReportUntracked;
+ }
+
+ size_t chunksStartPos = ((pointerTablePos + numChunks * numBitsPerPointer + 7) & (~7));
+ size_t chunkPos = chunksStartPos + chunkPointer - 1;
+ m_Reader.SetCurrentPos(chunkPos);
+
+ {
+ BitStreamReader couldBeLiveReader(m_Reader);
+
+ UINT32 numCouldBeLiveSlots = 0;
+ // A potentially compressed bit vector of which slots have any lifetimes
+ if (m_Reader.ReadOneFast())
+ {
+ // RLE encoded
+ bool fSkip = (m_Reader.ReadOneFast() == 0);
+ bool fReport = true;
+ UINT32 readSlots = (UINT32)m_Reader.DecodeVarLengthUnsigned( fSkip ? LIVESTATE_RLE_SKIP_ENCBASE : LIVESTATE_RLE_RUN_ENCBASE );
+ fSkip = !fSkip;
+ while (readSlots < numSlots)
+ {
+ UINT32 cnt = (UINT32)m_Reader.DecodeVarLengthUnsigned( fSkip ? LIVESTATE_RLE_SKIP_ENCBASE : LIVESTATE_RLE_RUN_ENCBASE ) + 1;
+ if (fReport)
+ {
+ numCouldBeLiveSlots += cnt;
+ }
+ readSlots += cnt;
+ fSkip = !fSkip;
+ fReport = !fReport;
+ }
+ _ASSERTE(readSlots == numSlots);
+
+ }
+ else
+ {
+ for(UINT32 i = 0; i < numSlots; i++)
+ {
+ if(m_Reader.ReadOneFast())
+ numCouldBeLiveSlots++;
+ }
+ }
+ _ASSERTE(numCouldBeLiveSlots > 0);
+
+ BitStreamReader finalStateReader(m_Reader);
+
+ m_Reader.Skip(numCouldBeLiveSlots);
+
+ int lifetimeTransitionsCount = 0;
+
+ UINT32 slotIndex = 0;
+ bool fSimple = (couldBeLiveReader.ReadOneFast() == 0);
+ bool fSkipFirst = false; // silence the warning
+ UINT32 cnt = 0;
+ if (!fSimple)
+ {
+ fSkipFirst = (couldBeLiveReader.ReadOneFast() == 0);
+ slotIndex = -1;
+ }
+ for(UINT32 i = 0; i < numCouldBeLiveSlots; i++)
+ {
+ if (fSimple)
+ {
+ while(!couldBeLiveReader.ReadOneFast())
+ slotIndex++;
+ }
+ else if (cnt > 0)
+ {
+ // We have more from the last run to report
+ cnt--;
+ }
+ // We need to find a new run
+ else if (fSkipFirst)
+ {
+ UINT32 tmp = (UINT32)couldBeLiveReader.DecodeVarLengthUnsigned( LIVESTATE_RLE_SKIP_ENCBASE ) + 1;
+ slotIndex += tmp;
+ cnt = (UINT32)couldBeLiveReader.DecodeVarLengthUnsigned( LIVESTATE_RLE_RUN_ENCBASE );
+ }
+ else
+ {
+ UINT32 tmp = (UINT32)couldBeLiveReader.DecodeVarLengthUnsigned( LIVESTATE_RLE_RUN_ENCBASE ) + 1;
+ slotIndex += tmp;
+ cnt = (UINT32)couldBeLiveReader.DecodeVarLengthUnsigned( LIVESTATE_RLE_SKIP_ENCBASE );
+ }
+
+ UINT32 isLive = (UINT32) finalStateReader.Read(1);
+
+ if(chunk == breakChunk)
+ {
+ // Read transitions
+ UINT32 normBreakOffsetDelta = pseudoBreakOffset % NUM_NORM_CODE_OFFSETS_PER_CHUNK;
+ for(;;)
+ {
+ if(!m_Reader.ReadOneFast())
+ break;
+
+ UINT32 transitionOffset = (UINT32) m_Reader.Read(NUM_NORM_CODE_OFFSETS_PER_CHUNK_LOG2);
+
+ lifetimeTransitionsCount++;
+ _ASSERTE(transitionOffset && transitionOffset < NUM_NORM_CODE_OFFSETS_PER_CHUNK);
+ if(transitionOffset > normBreakOffsetDelta)
+ {
+ isLive ^= 1;
+ }
+ }
+ }
+
+ if(isLive)
+ {
+ ReportSlotToGC(
+ slotDecoder,
+ slotIndex,
+ pRD,
+ reportScratchSlots,
+ inputFlags,
+ pCallBack,
+ hCallBack
+ );
+ }
+
+ slotIndex++;
+ }
+
+ LOG((LF_GCROOTS, LL_INFO1000000, "Decoded %d lifetime transitions.\n", (int) lifetimeTransitionsCount ));
+ }
+ }
+
+ReportUntracked:
+
+ //------------------------------------------------------------------------------
+ // Last report anything untracked
+ // But only for the leaf funclet/frame
+ // Turned on in the VM for regular GC reporting and the DAC for !CLRStack -gc
+ // But turned off in the #includes for nidump and sos's !u -gcinfo and !gcinfo
+ //------------------------------------------------------------------------------
+
+ if (slotDecoder.GetNumUntracked() && !(inputFlags & (ParentOfFuncletStackFrame | NoReportUntracked)))
+ {
+ ReportUntrackedSlots(slotDecoder, pRD, inputFlags, pCallBack, hCallBack);
+ }
+
+ExitSuccess:
+
+ return true;
+}
+
+void GcInfoDecoder::EnumerateUntrackedSlots(
+ PREGDISPLAY pRD,
+ unsigned inputFlags,
+ GCEnumCallback pCallBack,
+ void * hCallBack
+ )
+{
+ _ASSERTE(GC_SLOT_INTERIOR == GC_CALL_INTERIOR);
+ _ASSERTE(GC_SLOT_PINNED == GC_CALL_PINNED);
+
+ _ASSERTE( m_Flags & DECODE_GC_LIFETIMES );
+
+ GcSlotDecoder slotDecoder;
+
+ // Skip interruptibility information
+ for(UINT32 i=0; i<m_NumInterruptibleRanges; i++)
+ {
+ m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA1_ENCBASE );
+ m_Reader.DecodeVarLengthUnsigned( INTERRUPTIBLE_RANGE_DELTA2_ENCBASE );
+ }
+
+ //------------------------------------------------------------------------------
+ // Read the slot table
+ //------------------------------------------------------------------------------
+
+ slotDecoder.DecodeSlotTable(m_Reader);
+
+ if (slotDecoder.GetNumUntracked())
+ {
+ ReportUntrackedSlots(slotDecoder, pRD, inputFlags, pCallBack, hCallBack);
+ }
+}
+
+void GcInfoDecoder::ReportUntrackedSlots(
+ GcSlotDecoder& slotDecoder,
+ PREGDISPLAY pRD,
+ unsigned inputFlags,
+ GCEnumCallback pCallBack,
+ void * hCallBack
+ )
+{
+ for(UINT32 slotIndex = slotDecoder.GetNumTracked(); slotIndex < slotDecoder.GetNumSlots(); slotIndex++)
+ {
+ ReportSlotToGC(slotDecoder,
+ slotIndex,
+ pRD,
+ true, // Report everything (although there should *never* be any scratch slots that are untracked)
+ inputFlags,
+ pCallBack,
+ hCallBack
+ );
+ }
+}
+
+void GcSlotDecoder::DecodeSlotTable(BitStreamReader& reader)
+{
+ if (reader.ReadOneFast())
+ {
+ m_NumRegisters = (UINT32) reader.DecodeVarLengthUnsigned(NUM_REGISTERS_ENCBASE);
+ }
+ else
+ {
+ m_NumRegisters = 0;
+ }
+ UINT32 numStackSlots;
+ if (reader.ReadOneFast())
+ {
+ numStackSlots = (UINT32) reader.DecodeVarLengthUnsigned(NUM_STACK_SLOTS_ENCBASE);
+ m_NumUntracked = (UINT32) reader.DecodeVarLengthUnsigned(NUM_UNTRACKED_SLOTS_ENCBASE);
+ }
+ else
+ {
+ numStackSlots = 0;
+ m_NumUntracked = 0;
+ }
+ m_NumSlots = m_NumRegisters + numStackSlots + m_NumUntracked;
+
+ UINT32 i = 0;
+
+ if(m_NumRegisters > 0)
+ {
+ // We certainly predecode the first register
+
+ _ASSERTE(i < MAX_PREDECODED_SLOTS);
+
+ UINT32 normRegNum = (UINT32) reader.DecodeVarLengthUnsigned(REGISTER_ENCBASE);
+ UINT32 regNum = DENORMALIZE_REGISTER(normRegNum);
+ GcSlotFlags flags = (GcSlotFlags) reader.Read(2);
+
+ m_SlotArray[0].Slot.RegisterNumber = regNum;
+ m_SlotArray[0].Flags = flags;
+
+ UINT32 loopEnd = _min(m_NumRegisters, MAX_PREDECODED_SLOTS);
+ for(i++; i < loopEnd; i++)
+ {
+ if(flags)
+ {
+ normRegNum = (UINT32) reader.DecodeVarLengthUnsigned(REGISTER_ENCBASE);
+ regNum = DENORMALIZE_REGISTER(normRegNum);
+ flags = (GcSlotFlags) reader.Read(2);
+ }
+ else
+ {
+ UINT32 normRegDelta = (UINT32) reader.DecodeVarLengthUnsigned(REGISTER_DELTA_ENCBASE) + 1;
+ normRegNum += normRegDelta;
+ regNum = DENORMALIZE_REGISTER(normRegNum);
+ }
+
+ m_SlotArray[i].Slot.RegisterNumber = regNum;
+ m_SlotArray[i].Flags = flags;
+ }
+ }
+
+ if((numStackSlots > 0) && (i < MAX_PREDECODED_SLOTS))
+ {
+ // We have stack slots left and more room to predecode
+
+ GcStackSlotBase spBase = (GcStackSlotBase) reader.Read(2);
+ UINT32 normSpOffset = (INT32) reader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
+ INT32 spOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
+ GcSlotFlags flags = (GcSlotFlags) reader.Read(2);
+
+ m_SlotArray[i].Slot.Stack.SpOffset = spOffset;
+ m_SlotArray[i].Slot.Stack.Base = spBase;
+ m_SlotArray[i].Flags = flags;
+
+ UINT32 loopEnd = _min(m_NumRegisters + numStackSlots, MAX_PREDECODED_SLOTS);
+ for(i++; i < loopEnd; i++)
+ {
+ spBase = (GcStackSlotBase) reader.Read(2);
+
+ if(flags)
+ {
+ normSpOffset = (INT32) reader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
+ spOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
+ flags = (GcSlotFlags) reader.Read(2);
+ }
+ else
+ {
+ INT32 normSpOffsetDelta = (INT32) reader.DecodeVarLengthUnsigned(STACK_SLOT_DELTA_ENCBASE);
+ normSpOffset += normSpOffsetDelta;
+ spOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
+ }
+
+ m_SlotArray[i].Slot.Stack.SpOffset = spOffset;
+ m_SlotArray[i].Slot.Stack.Base = spBase;
+ m_SlotArray[i].Flags = flags;
+ }
+ }
+
+ if((m_NumUntracked > 0) && (i < MAX_PREDECODED_SLOTS))
+ {
+ // We have untracked stack slots left and more room to predecode
+
+ GcStackSlotBase spBase = (GcStackSlotBase) reader.Read(2);
+ UINT32 normSpOffset = (INT32) reader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
+ INT32 spOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
+ GcSlotFlags flags = (GcSlotFlags) reader.Read(2);
+
+ m_SlotArray[i].Slot.Stack.SpOffset = spOffset;
+ m_SlotArray[i].Slot.Stack.Base = spBase;
+ m_SlotArray[i].Flags = flags;
+
+ UINT32 loopEnd = _min(m_NumSlots, MAX_PREDECODED_SLOTS);
+ for(i++; i < loopEnd; i++)
+ {
+ spBase = (GcStackSlotBase) reader.Read(2);
+
+ if(flags)
+ {
+ normSpOffset = (INT32) reader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
+ spOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
+ flags = (GcSlotFlags) reader.Read(2);
+ }
+ else
+ {
+ INT32 normSpOffsetDelta = (INT32) reader.DecodeVarLengthUnsigned(STACK_SLOT_DELTA_ENCBASE);
+ normSpOffset += normSpOffsetDelta;
+ spOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
+ }
+
+ m_SlotArray[i].Slot.Stack.SpOffset = spOffset;
+ m_SlotArray[i].Slot.Stack.Base = spBase;
+ m_SlotArray[i].Flags = flags;
+ }
+ }
+
+ // Done pre-decoding
+
+ if(i < m_NumSlots)
+ {
+ // Prepare for lazy decoding
+
+ _ASSERTE(i == MAX_PREDECODED_SLOTS);
+ m_NumDecodedSlots = i;
+ m_pLastSlot = &m_SlotArray[MAX_PREDECODED_SLOTS - 1];
+
+ m_SlotReader = reader;
+
+ // Move the argument reader past the end of the table
+
+ GcSlotFlags flags = m_pLastSlot->Flags;
+
+ // Skip any remaining registers
+
+ for(; i < m_NumRegisters; i++)
+ {
+ if(flags)
+ {
+ reader.DecodeVarLengthUnsigned(REGISTER_ENCBASE);
+ flags = (GcSlotFlags) reader.Read(2);
+ }
+ else
+ {
+ reader.DecodeVarLengthUnsigned(REGISTER_DELTA_ENCBASE);
+ }
+ }
+
+ if(numStackSlots > 0)
+ {
+ if(i == m_NumRegisters)
+ {
+ // Skip the first stack slot
+
+ reader.Read(2);
+ reader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
+ flags = (GcSlotFlags) reader.Read(2);
+ i++;
+ }
+
+ // Skip any remaining stack slots
+
+ const UINT32 loopEnd = m_NumRegisters + numStackSlots;
+ for(; i < loopEnd; i++)
+ {
+ reader.Read(2);
+
+ if(flags)
+ {
+ reader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
+ flags = (GcSlotFlags) reader.Read(2);
+ }
+ else
+ {
+ reader.DecodeVarLengthUnsigned(STACK_SLOT_DELTA_ENCBASE);
+ }
+ }
+ }
+
+ if(m_NumUntracked > 0)
+ {
+ if(i == m_NumRegisters + numStackSlots)
+ {
+ // Skip the first untracked slot
+
+ reader.Read(2);
+ reader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
+ flags = (GcSlotFlags) reader.Read(2);
+ i++;
+ }
+
+ // Skip any remaining untracked slots
+
+ for(; i < m_NumSlots; i++)
+ {
+ reader.Read(2);
+
+ if(flags)
+ {
+ reader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
+ flags = (GcSlotFlags) reader.Read(2);
+ }
+ else
+ {
+ reader.DecodeVarLengthUnsigned(STACK_SLOT_DELTA_ENCBASE);
+ }
+ }
+ }
+ }
+}
+
+const GcSlotDesc* GcSlotDecoder::GetSlotDesc(UINT32 slotIndex)
+{
+ _ASSERTE(slotIndex < m_NumSlots);
+
+ if(slotIndex < MAX_PREDECODED_SLOTS)
+ {
+ return &m_SlotArray[slotIndex];
+ }
+
+ _ASSERTE(m_NumDecodedSlots >= MAX_PREDECODED_SLOTS && m_NumDecodedSlots < m_NumSlots);
+ _ASSERTE(m_NumDecodedSlots <= slotIndex);
+
+ while(m_NumDecodedSlots <= slotIndex)
+ {
+ if(m_NumDecodedSlots < m_NumRegisters)
+ {
+ //
+ // Decode a register
+ //
+
+ if(m_NumDecodedSlots == 0)
+ {
+ // Decode the first register
+ UINT32 normRegNum = (UINT32) m_SlotReader.DecodeVarLengthUnsigned(REGISTER_ENCBASE);
+ m_pLastSlot->Slot.RegisterNumber = DENORMALIZE_REGISTER(normRegNum);
+ m_pLastSlot->Flags = (GcSlotFlags) m_SlotReader.Read(2);
+ }
+ else
+ {
+ if(m_pLastSlot->Flags)
+ {
+ UINT32 normRegNum = (UINT32) m_SlotReader.DecodeVarLengthUnsigned(REGISTER_ENCBASE);
+ m_pLastSlot->Slot.RegisterNumber = DENORMALIZE_REGISTER(normRegNum);
+ m_pLastSlot->Flags = (GcSlotFlags) m_SlotReader.Read(2);
+ }
+ else
+ {
+ UINT32 normRegDelta = (UINT32) m_SlotReader.DecodeVarLengthUnsigned(REGISTER_DELTA_ENCBASE) + 1;
+ UINT32 normRegNum = normRegDelta + NORMALIZE_REGISTER(m_pLastSlot->Slot.RegisterNumber);
+ m_pLastSlot->Slot.RegisterNumber = DENORMALIZE_REGISTER(normRegNum);
+ }
+ }
+ }
+ else
+ {
+ //
+ // Decode a stack slot
+ //
+
+ if((m_NumDecodedSlots == m_NumRegisters) || (m_NumDecodedSlots == GetNumTracked()))
+ {
+ // Decode the first stack slot or first untracked slot
+ m_pLastSlot->Slot.Stack.Base = (GcStackSlotBase) m_SlotReader.Read(2);
+ UINT32 normSpOffset = (INT32) m_SlotReader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
+ m_pLastSlot->Slot.Stack.SpOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
+ m_pLastSlot->Flags = (GcSlotFlags) m_SlotReader.Read(2);
+ }
+ else
+ {
+ m_pLastSlot->Slot.Stack.Base = (GcStackSlotBase) m_SlotReader.Read(2);
+
+ if(m_pLastSlot->Flags)
+ {
+ INT32 normSpOffset = (INT32) m_SlotReader.DecodeVarLengthSigned(STACK_SLOT_ENCBASE);
+ m_pLastSlot->Slot.Stack.SpOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
+ m_pLastSlot->Flags = (GcSlotFlags) m_SlotReader.Read(2);
+ }
+ else
+ {
+ INT32 normSpOffsetDelta = (INT32) m_SlotReader.DecodeVarLengthUnsigned(STACK_SLOT_DELTA_ENCBASE);
+ INT32 normSpOffset = normSpOffsetDelta + NORMALIZE_STACK_SLOT(m_pLastSlot->Slot.Stack.SpOffset);
+ m_pLastSlot->Slot.Stack.SpOffset = DENORMALIZE_STACK_SLOT(normSpOffset);
+ }
+ }
+ }
+
+ m_NumDecodedSlots++;
+ }
+
+ return m_pLastSlot;
+}
+
+
+//-----------------------------------------------------------------------------
+// Platform-specific methods
+//-----------------------------------------------------------------------------
+
+#if defined(TARGET_AMD64)
+
+
+OBJECTREF* GcInfoDecoder::GetRegisterSlot(
+ int regNum,
+ PREGDISPLAY pRD
+ )
+{
+ _ASSERTE(regNum >= 0 && regNum <= 16);
+ _ASSERTE(regNum != 4); // rsp
+
+#ifdef FEATURE_NATIVEAOT
+ PTR_uintptr_t* ppRax = &pRD->pRax;
+ if (regNum > 4) regNum--; // rsp is skipped in NativeAOT RegDisplay
+#else
+ // The fields of KNONVOLATILE_CONTEXT_POINTERS are in the same order as
+ // the processor encoding numbers.
+
+ ULONGLONG **ppRax = &pRD->pCurrentContextPointers->Rax;
+#endif
+
+ return (OBJECTREF*)*(ppRax + regNum);
+}
+
+#if defined(TARGET_UNIX) && !defined(FEATURE_NATIVEAOT)
+OBJECTREF* GcInfoDecoder::GetCapturedRegister(
+ int regNum,
+ PREGDISPLAY pRD
+ )
+{
+ _ASSERTE(regNum >= 0 && regNum <= 16);
+ _ASSERTE(regNum != 4); // rsp
+
+ // The fields of CONTEXT are in the same order as
+ // the processor encoding numbers.
+
+ ULONGLONG *pRax = &pRD->pCurrentContext->Rax;
+
+ return (OBJECTREF*)(pRax + regNum);
+}
+#endif // TARGET_UNIX && !FEATURE_NATIVEAOT
+
+bool GcInfoDecoder::IsScratchRegister(int regNum, PREGDISPLAY pRD)
+{
+ _ASSERTE(regNum >= 0 && regNum <= 16);
+ _ASSERTE(regNum != 4); // rsp
+
+ UINT16 PreservedRegMask =
+ (1 << 3) // rbx
+ | (1 << 5) // rbp
+#ifndef UNIX_AMD64_ABI
+ | (1 << 6) // rsi
+ | (1 << 7) // rdi
+#endif // UNIX_AMD64_ABI
+ | (1 << 12) // r12
+ | (1 << 13) // r13
+ | (1 << 14) // r14
+ | (1 << 15); // r15
+
+ return !(PreservedRegMask & (1 << regNum));
+}
+
+
+bool GcInfoDecoder::IsScratchStackSlot(INT32 spOffset, GcStackSlotBase spBase, PREGDISPLAY pRD)
+{
+#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
+ _ASSERTE( m_Flags & DECODE_GC_LIFETIMES );
+
+ TADDR pSlot = (TADDR) GetStackSlot(spOffset, spBase, pRD);
+ _ASSERTE(pSlot >= pRD->SP);
+
+ return (pSlot < pRD->SP + m_SizeOfStackOutgoingAndScratchArea);
+#else
+ return FALSE;
+#endif
+}
+
+
+void GcInfoDecoder::ReportRegisterToGC( // AMD64
+ int regNum,
+ unsigned gcFlags,
+ PREGDISPLAY pRD,
+ unsigned flags,
+ GCEnumCallback pCallBack,
+ void * hCallBack)
+{
+ GCINFODECODER_CONTRACT;
+
+ _ASSERTE(regNum >= 0 && regNum <= 16);
+ _ASSERTE(regNum != 4); // rsp
+
+ LOG((LF_GCROOTS, LL_INFO1000, "Reporting " FMT_REG, regNum ));
+
+ OBJECTREF* pObjRef = GetRegisterSlot( regNum, pRD );
+#if defined(TARGET_UNIX) && !defined(FEATURE_NATIVEAOT) && !defined(SOS_TARGET_AMD64)
+ // On PAL, we don't always have the context pointers available due to
+ // a limitation of an unwinding library. In such case, the context
+ // pointers for some nonvolatile registers are NULL.
+ // In such case, we let the pObjRef point to the captured register
+ // value in the context and pin the object itself.
+ if (pObjRef == NULL)
+ {
+ // Report a pinned object to GC only in the promotion phase when the
+ // GC is scanning roots.
+ GCCONTEXT* pGCCtx = (GCCONTEXT*)(hCallBack);
+ if (!pGCCtx->sc->promotion)
+ {
+ return;
+ }
+
+ pObjRef = GetCapturedRegister(regNum, pRD);
+
+ gcFlags |= GC_CALL_PINNED;
+ }
+#endif // TARGET_UNIX && !FEATURE_NATIVEAOT && !SOS_TARGET_AMD64
+
+#ifdef _DEBUG
+ if(IsScratchRegister(regNum, pRD))
+ {
+ // Scratch registers cannot be reported for non-leaf frames
+ _ASSERTE(flags & ActiveStackFrame);
+ }
+
+ LOG((LF_GCROOTS, LL_INFO1000, /* Part Two */
+ "at" FMT_ADDR "as ", DBG_ADDR(pObjRef) ));
+
+ VALIDATE_ROOT((gcFlags & GC_CALL_INTERIOR), hCallBack, pObjRef);
+
+ LOG_PIPTR(pObjRef, gcFlags, hCallBack);
+#endif //_DEBUG
+
+ gcFlags |= CHECK_APP_DOMAIN;
+
+ pCallBack(hCallBack, pObjRef, gcFlags DAC_ARG(DacSlotLocation(regNum, 0, false)));
+}
+
+#elif defined(TARGET_ARM)
+
+OBJECTREF* GcInfoDecoder::GetRegisterSlot(
+ int regNum,
+ PREGDISPLAY pRD
+ )
+{
+ _ASSERTE(regNum >= 0 && regNum <= 14);
+ _ASSERTE(regNum != 13); // sp
+
+#ifdef FEATURE_NATIVEAOT
+ if(regNum < 14)
+ {
+ PTR_uintptr_t* ppReg = &pRD->pR0;
+ return (OBJECTREF*)*(ppReg + regNum);
+ }
+ else
+ {
+ return (OBJECTREF*) pRD->pLR;
+ }
+#else
+ DWORD **ppReg;
+
+ if(regNum <= 3)
+ {
+ ppReg = &pRD->volatileCurrContextPointers.R0;
+ return (OBJECTREF*)*(ppReg + regNum);
+ }
+ else if(regNum == 12)
+ {
+ return (OBJECTREF*) pRD->volatileCurrContextPointers.R12;
+ }
+ else if(regNum == 14)
+ {
+ return (OBJECTREF*) pRD->pCurrentContextPointers->Lr;
+ }
+
+ ppReg = &pRD->pCurrentContextPointers->R4;
+
+ return (OBJECTREF*)*(ppReg + regNum-4);
+#endif
+}
+
+#if defined(TARGET_UNIX) && !defined(FEATURE_NATIVEAOT)
+OBJECTREF* GcInfoDecoder::GetCapturedRegister(
+ int regNum,
+ PREGDISPLAY pRD
+ )
+{
+ _ASSERTE(regNum >= 0 && regNum <= 14);
+ _ASSERTE(regNum != 13); // sp
+
+ // The fields of CONTEXT are in the same order as
+ // the processor encoding numbers.
+
+ ULONG *pR0 = &pRD->pCurrentContext->R0;
+
+ return (OBJECTREF*)(pR0 + regNum);
+}
+#endif // TARGET_UNIX && !FEATURE_NATIVEAOT
+
+
+bool GcInfoDecoder::IsScratchRegister(int regNum, PREGDISPLAY pRD)
+{
+ _ASSERTE(regNum >= 0 && regNum <= 14);
+ _ASSERTE(regNum != 13); // sp
+
+ return regNum <= 3 || regNum >= 12; // R12 and R14/LR are both scratch registers
+}
+
+
+bool GcInfoDecoder::IsScratchStackSlot(INT32 spOffset, GcStackSlotBase spBase, PREGDISPLAY pRD)
+{
+#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
+ _ASSERTE( m_Flags & DECODE_GC_LIFETIMES );
+
+ TADDR pSlot = (TADDR) GetStackSlot(spOffset, spBase, pRD);
+ _ASSERTE(pSlot >= pRD->SP);
+
+ return (pSlot < pRD->SP + m_SizeOfStackOutgoingAndScratchArea);
+#else
+ return FALSE;
+#endif
+}
+
+
+void GcInfoDecoder::ReportRegisterToGC( // ARM
+ int regNum,
+ unsigned gcFlags,
+ PREGDISPLAY pRD,
+ unsigned flags,
+ GCEnumCallback pCallBack,
+ void * hCallBack)
+{
+ GCINFODECODER_CONTRACT;
+
+ _ASSERTE(regNum >= 0 && regNum <= 14);
+ _ASSERTE(regNum != 13); // sp
+
+ LOG((LF_GCROOTS, LL_INFO1000, "Reporting " FMT_REG, regNum ));
+
+ OBJECTREF* pObjRef = GetRegisterSlot( regNum, pRD );
+
+#ifdef _DEBUG
+ if(IsScratchRegister(regNum, pRD))
+ {
+ // Scratch registers cannot be reported for non-leaf frames
+ _ASSERTE(flags & ActiveStackFrame);
+ }
+
+ LOG((LF_GCROOTS, LL_INFO1000, /* Part Two */
+ "at" FMT_ADDR "as ", DBG_ADDR(pObjRef) ));
+
+ VALIDATE_ROOT((gcFlags & GC_CALL_INTERIOR), hCallBack, pObjRef);
+
+ LOG_PIPTR(pObjRef, gcFlags, hCallBack);
+#endif //_DEBUG
+
+ gcFlags |= CHECK_APP_DOMAIN;
+
+ pCallBack(hCallBack, pObjRef, gcFlags DAC_ARG(DacSlotLocation(regNum, 0, false)));
+}
+
+#elif defined(TARGET_ARM64)
+
+OBJECTREF* GcInfoDecoder::GetRegisterSlot(
+ int regNum,
+ PREGDISPLAY pRD
+ )
+{
+ _ASSERTE(regNum >= 0 && regNum <= 30);
+ _ASSERTE(regNum != 18); // TEB
+
+#ifdef FEATURE_NATIVEAOT
+ PTR_uintptr_t* ppReg = &pRD->pX0;
+
+ return (OBJECTREF*)*(ppReg + regNum);
+#else
+ DWORD64 **ppReg;
+
+ if(regNum <= 17)
+ {
+ ppReg = &pRD->volatileCurrContextPointers.X0;
+ return (OBJECTREF*)*(ppReg + regNum);
+ }
+ else if(regNum == 29)
+ {
+ return (OBJECTREF*) pRD->pCurrentContextPointers->Fp;
+ }
+ else if(regNum == 30)
+ {
+ return (OBJECTREF*) pRD->pCurrentContextPointers->Lr;
+ }
+
+ ppReg = &pRD->pCurrentContextPointers->X19;
+
+ return (OBJECTREF*)*(ppReg + regNum-19);
+#endif
+}
+
+bool GcInfoDecoder::IsScratchRegister(int regNum, PREGDISPLAY pRD)
+{
+ _ASSERTE(regNum >= 0 && regNum <= 30);
+ _ASSERTE(regNum != 18);
+
+ return regNum <= 17 || regNum >= 29; // R12 and R14/LR are both scratch registers
+}
+
+bool GcInfoDecoder::IsScratchStackSlot(INT32 spOffset, GcStackSlotBase spBase, PREGDISPLAY pRD)
+{
+#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
+ _ASSERTE( m_Flags & DECODE_GC_LIFETIMES );
+
+ TADDR pSlot = (TADDR) GetStackSlot(spOffset, spBase, pRD);
+ _ASSERTE(pSlot >= pRD->SP);
+
+ return (pSlot < pRD->SP + m_SizeOfStackOutgoingAndScratchArea);
+#else
+ return FALSE;
+#endif
+
+}
+
+void GcInfoDecoder::ReportRegisterToGC( // ARM64
+ int regNum,
+ unsigned gcFlags,
+ PREGDISPLAY pRD,
+ unsigned flags,
+ GCEnumCallback pCallBack,
+ void * hCallBack)
+{
+ GCINFODECODER_CONTRACT;
+
+ _ASSERTE(regNum >= 0 && regNum <= 30);
+ _ASSERTE(regNum != 18);
+
+ LOG((LF_GCROOTS, LL_INFO1000, "Reporting " FMT_REG, regNum ));
+
+ OBJECTREF* pObjRef = GetRegisterSlot( regNum, pRD );
+#if defined(TARGET_UNIX) && !defined(FEATURE_NATIVEAOT) && !defined(SOS_TARGET_ARM64)
+ // On PAL, we don't always have the context pointers available due to
+ // a limitation of an unwinding library. In such case, the context
+ // pointers for some nonvolatile registers are NULL.
+ // In such case, we let the pObjRef point to the captured register
+ // value in the context and pin the object itself.
+ if (pObjRef == NULL)
+ {
+ // Report a pinned object to GC only in the promotion phase when the
+ // GC is scanning roots.
+ GCCONTEXT* pGCCtx = (GCCONTEXT*)(hCallBack);
+ if (!pGCCtx->sc->promotion)
+ {
+ return;
+ }
+
+ pObjRef = GetCapturedRegister(regNum, pRD);
+
+ gcFlags |= GC_CALL_PINNED;
+ }
+#endif // TARGET_UNIX && !SOS_TARGET_ARM64
+
+#ifdef _DEBUG
+ if(IsScratchRegister(regNum, pRD))
+ {
+ // Scratch registers cannot be reported for non-leaf frames
+ _ASSERTE(flags & ActiveStackFrame);
+ }
+
+ LOG((LF_GCROOTS, LL_INFO1000, /* Part Two */
+ "at" FMT_ADDR "as ", DBG_ADDR(pObjRef) ));
+
+ VALIDATE_ROOT((gcFlags & GC_CALL_INTERIOR), hCallBack, pObjRef);
+
+ LOG_PIPTR(pObjRef, gcFlags, hCallBack);
+#endif //_DEBUG
+
+ gcFlags |= CHECK_APP_DOMAIN;
+
+ pCallBack(hCallBack, pObjRef, gcFlags DAC_ARG(DacSlotLocation(regNum, 0, false)));
+}
+
+#if defined(TARGET_UNIX) && !defined(FEATURE_NATIVEAOT)
+OBJECTREF* GcInfoDecoder::GetCapturedRegister(
+ int regNum,
+ PREGDISPLAY pRD
+ )
+{
+ _ASSERTE(regNum >= 0 && regNum <= 30);
+ _ASSERTE(regNum != 18);
+
+ if (regNum == 29)
+ {
+ return (OBJECTREF*) &pRD->pCurrentContext->Fp;
+ }
+ else if (regNum == 30)
+ {
+ return (OBJECTREF*) &pRD->pCurrentContext->Lr;
+ }
+
+ // The fields of CONTEXT are in the same order as
+ // the processor encoding numbers.
+
+ DWORD64 *pX0 = &pRD->pCurrentContext->X0;
+
+ return (OBJECTREF*)(pX0 + regNum);
+}
+#endif // TARGET_UNIX && !FEATURE_NATIVEAOT
+
+#elif defined(TARGET_LOONGARCH64)
+
+#if defined(TARGET_UNIX) && !defined(FEATURE_NATIVEAOT)
+OBJECTREF* GcInfoDecoder::GetCapturedRegister(
+ int regNum,
+ PREGDISPLAY pRD
+ )
+{
+ _ASSERTE(regNum >= 1 && regNum <= 31);
+
+ // The fields of CONTEXT are in the same order as
+ // the processor encoding numbers.
+
+ DWORD64 *pR0 = &pRD->pCurrentContext->R0;
+
+ return (OBJECTREF*)(pR0 + regNum);
+}
+#endif // TARGET_UNIX && !FEATURE_NATIVEAOT
+
+OBJECTREF* GcInfoDecoder::GetRegisterSlot(
+ int regNum,
+ PREGDISPLAY pRD
+ )
+{
+ _ASSERTE((regNum == 1) || (regNum >= 4 && regNum <= 31));
+
+#ifdef FEATURE_NATIVEAOT
+ PTR_uintptr_t* ppReg = &pRD->pR0;
+
+ return (OBJECTREF*)*(ppReg + regNum);
+#else
+ if(regNum == 1)
+ {
+ return (OBJECTREF*) pRD->pCurrentContextPointers->Ra;
+ }
+ else if(regNum == 22)
+ {
+ return (OBJECTREF*) pRD->pCurrentContextPointers->Fp;
+ }
+ else if (regNum < 22)
+ {
+ return (OBJECTREF*)*(DWORD64**)(&pRD->volatileCurrContextPointers.A0 + (regNum - 4));//A0=4.
+ }
+
+ return (OBJECTREF*)*(DWORD64**)(&pRD->pCurrentContextPointers->S0 + (regNum-23));
+#endif
+}
+
+bool GcInfoDecoder::IsScratchRegister(int regNum, PREGDISPLAY pRD)
+{
+ _ASSERTE(regNum >= 0 && regNum <= 31);
+
+ return (regNum <= 21 && ((regNum >= 4) || (regNum == 1)));
+}
+
+bool GcInfoDecoder::IsScratchStackSlot(INT32 spOffset, GcStackSlotBase spBase, PREGDISPLAY pRD)
+{
+#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
+ _ASSERTE( m_Flags & DECODE_GC_LIFETIMES );
+
+ TADDR pSlot = (TADDR) GetStackSlot(spOffset, spBase, pRD);
+ _ASSERTE(pSlot >= pRD->SP);
+
+ return (pSlot < pRD->SP + m_SizeOfStackOutgoingAndScratchArea);
+#else
+ return FALSE;
+#endif
+}
+
+void GcInfoDecoder::ReportRegisterToGC(
+ int regNum,
+ unsigned gcFlags,
+ PREGDISPLAY pRD,
+ unsigned flags,
+ GCEnumCallback pCallBack,
+ void * hCallBack)
+{
+ GCINFODECODER_CONTRACT;
+
+ _ASSERTE(regNum > 0 && regNum <= 31);
+
+ LOG((LF_GCROOTS, LL_INFO1000, "Reporting " FMT_REG, regNum ));
+
+ OBJECTREF* pObjRef = GetRegisterSlot( regNum, pRD );
+#if defined(TARGET_UNIX) && !defined(FEATURE_NATIVEAOT) && !defined(SOS_TARGET_LOONGARCH64)
+
+ // On PAL, we don't always have the context pointers available due to
+ // a limitation of an unwinding library. In such case, the context
+ // pointers for some nonvolatile registers are NULL.
+ // In such case, we let the pObjRef point to the captured register
+ // value in the context and pin the object itself.
+ if (pObjRef == NULL)
+ {
+ // Report a pinned object to GC only in the promotion phase when the
+ // GC is scanning roots.
+ GCCONTEXT* pGCCtx = (GCCONTEXT*)(hCallBack);
+ if (!pGCCtx->sc->promotion)
+ {
+ return;
+ }
+
+ pObjRef = GetCapturedRegister(regNum, pRD);
+
+ gcFlags |= GC_CALL_PINNED;
+ }
+#endif // TARGET_UNIX && !SOS_TARGET_LOONGARCH64
+
+#ifdef _DEBUG
+ if(IsScratchRegister(regNum, pRD))
+ {
+ // Scratch registers cannot be reported for non-leaf frames
+ _ASSERTE(flags & ActiveStackFrame);
+ }
+
+ LOG((LF_GCROOTS, LL_INFO1000, /* Part Two */
+ "at" FMT_ADDR "as ", DBG_ADDR(pObjRef) ));
+
+ VALIDATE_ROOT((gcFlags & GC_CALL_INTERIOR), hCallBack, pObjRef);
+
+ LOG_PIPTR(pObjRef, gcFlags, hCallBack);
+#endif //_DEBUG
+
+ gcFlags |= CHECK_APP_DOMAIN;
+
+ pCallBack(hCallBack, pObjRef, gcFlags DAC_ARG(DacSlotLocation(regNum, 0, false)));
+}
+
+#elif defined(TARGET_RISCV64)
+
+#if defined(TARGET_UNIX) && !defined(FEATURE_NATIVEAOT)
+OBJECTREF* GcInfoDecoder::GetCapturedRegister(
+ int regNum,
+ PREGDISPLAY pRD
+ )
+{
+ _ASSERTE(regNum >= 1 && regNum <= 31);
+
+ // The fields of CONTEXT are in the same order as
+ // the processor encoding numbers.
+
+ DWORD64 *pR0 = &pRD->pCurrentContext->R0;
+
+ return (OBJECTREF*)(pR0 + regNum);
+}
+#endif // TARGET_UNIX && !FEATURE_NATIVEAOT
+
+OBJECTREF* GcInfoDecoder::GetRegisterSlot(
+ int regNum,
+ PREGDISPLAY pRD
+ )
+{
+ _ASSERTE((regNum == 1) || (regNum >= 5 && regNum <= 31));
+
+#ifdef FEATURE_NATIVEAOT
+ PTR_uintptr_t* ppReg = &pRD->pR0;
+
+ return (OBJECTREF*)*(ppReg + regNum);
+#else
+ if(regNum == 1)
+ {
+ return (OBJECTREF*) pRD->pCurrentContextPointers->Ra;
+ }
+ else if (regNum < 8)
+ {
+ return (OBJECTREF*)*(DWORD64**)(&pRD->volatileCurrContextPointers.T0 + (regNum - 5));
+ }
+ else if(regNum == 8)
+ {
+ return (OBJECTREF*) pRD->pCurrentContextPointers->Fp;
+ }
+ else if (regNum == 9)
+ {
+ return (OBJECTREF*) pRD->pCurrentContextPointers->S1;
+ }
+ else if (regNum < 18)
+ {
+ return (OBJECTREF*)*(DWORD64**)(&pRD->volatileCurrContextPointers.A0 + (regNum - 10));
+ }
+ else if (regNum < 28)
+ {
+ return (OBJECTREF*)*(DWORD64**)(&pRD->pCurrentContextPointers->S2 + (regNum-18));
+ }
+ return (OBJECTREF*)*(DWORD64**)(&pRD->volatileCurrContextPointers.T3 + (regNum-28));
+#endif
+}
+
+bool GcInfoDecoder::IsScratchRegister(int regNum, PREGDISPLAY pRD)
+{
+ _ASSERTE(regNum >= 0 && regNum <= 31);
+
+ return (regNum >= 5 && regNum <= 7) || (regNum >= 10 and regNum <= 17) || regNum >= 28 || regNum == 1;
+}
+
+bool GcInfoDecoder::IsScratchStackSlot(INT32 spOffset, GcStackSlotBase spBase, PREGDISPLAY pRD)
+{
+#ifdef FIXED_STACK_PARAMETER_SCRATCH_AREA
+ _ASSERTE( m_Flags & DECODE_GC_LIFETIMES );
+
+ TADDR pSlot = (TADDR) GetStackSlot(spOffset, spBase, pRD);
+ _ASSERTE(pSlot >= pRD->SP);
+
+ return (pSlot < pRD->SP + m_SizeOfStackOutgoingAndScratchArea);
+#else
+ return FALSE;
+#endif
+}
+
+void GcInfoDecoder::ReportRegisterToGC(
+ int regNum,
+ unsigned gcFlags,
+ PREGDISPLAY pRD,
+ unsigned flags,
+ GCEnumCallback pCallBack,
+ void * hCallBack)
+{
+ GCINFODECODER_CONTRACT;
+
+ _ASSERTE(regNum > 0 && regNum <= 31);
+
+ LOG((LF_GCROOTS, LL_INFO1000, "Reporting " FMT_REG, regNum ));
+
+ OBJECTREF* pObjRef = GetRegisterSlot( regNum, pRD );
+#if defined(TARGET_UNIX) && !defined(FEATURE_NATIVEAOT) && !defined(SOS_TARGET_RISCV64)
+
+ // On PAL, we don't always have the context pointers available due to
+ // a limitation of an unwinding library. In such case, the context
+ // pointers for some nonvolatile registers are NULL.
+ // In such case, we let the pObjRef point to the captured register
+ // value in the context and pin the object itself.
+ if (pObjRef == NULL)
+ {
+ // Report a pinned object to GC only in the promotion phase when the
+ // GC is scanning roots.
+ GCCONTEXT* pGCCtx = (GCCONTEXT*)(hCallBack);
+ if (!pGCCtx->sc->promotion)
+ {
+ return;
+ }
+
+ pObjRef = GetCapturedRegister(regNum, pRD);
+
+ gcFlags |= GC_CALL_PINNED;
+ }
+#endif // TARGET_UNIX && !SOS_TARGET_RISCV64
+
+#ifdef _DEBUG
+ if(IsScratchRegister(regNum, pRD))
+ {
+ // Scratch registers cannot be reported for non-leaf frames
+ _ASSERTE(flags & ActiveStackFrame);
+ }
+
+ LOG((LF_GCROOTS, LL_INFO1000, /* Part Two */
+ "at" FMT_ADDR "as ", DBG_ADDR(pObjRef) ));
+
+ VALIDATE_ROOT((gcFlags & GC_CALL_INTERIOR), hCallBack, pObjRef);
+
+ LOG_PIPTR(pObjRef, gcFlags, hCallBack);
+#endif //_DEBUG
+
+ gcFlags |= CHECK_APP_DOMAIN;
+
+ pCallBack(hCallBack, pObjRef, gcFlags DAC_ARG(DacSlotLocation(regNum, 0, false)));
+}
+
+#else // Unknown platform
+
+OBJECTREF* GcInfoDecoder::GetRegisterSlot(
+ int regNum,
+ PREGDISPLAY pRD
+ )
+{
+ PORTABILITY_ASSERT("GcInfoDecoder::GetRegisterSlot");
+ return NULL;
+}
+
+bool GcInfoDecoder::IsScratchRegister(int regNum, PREGDISPLAY pRD)
+{
+ PORTABILITY_ASSERT("GcInfoDecoder::IsScratchRegister");
+ return false;
+}
+
+bool GcInfoDecoder::IsScratchStackSlot(INT32 spOffset, GcStackSlotBase spBase, PREGDISPLAY pRD)
+{
+ _ASSERTE( !"NYI" );
+ return false;
+}
+
+void GcInfoDecoder::ReportRegisterToGC(
+ int regNum,
+ unsigned gcFlags,
+ PREGDISPLAY pRD,
+ unsigned flags,
+ GCEnumCallback pCallBack,
+ void * hCallBack)
+{
+ _ASSERTE( !"NYI" );
+}
+
+#endif // Unknown platform
+
+
+OBJECTREF* GcInfoDecoder::GetStackSlot(
+ INT32 spOffset,
+ GcStackSlotBase spBase,
+ PREGDISPLAY pRD
+ )
+{
+ OBJECTREF* pObjRef;
+
+ if( GC_SP_REL == spBase )
+ {
+ pObjRef = (OBJECTREF*) ((SIZE_T)pRD->SP + spOffset);
+ }
+ else if( GC_CALLER_SP_REL == spBase )
+ {
+ pObjRef = (OBJECTREF*) (GET_CALLER_SP(pRD) + spOffset);
+ }
+ else
+ {
+ _ASSERTE( GC_FRAMEREG_REL == spBase );
+ _ASSERTE( NO_STACK_BASE_REGISTER != m_StackBaseRegister );
+
+ SIZE_T * pFrameReg = (SIZE_T*) GetRegisterSlot(m_StackBaseRegister, pRD);
+
+#if defined(TARGET_UNIX) && !defined(FEATURE_NATIVEAOT)
+ // On PAL, we don't always have the context pointers available due to
+ // a limitation of an unwinding library. In such case, the context
+ // pointers for some nonvolatile registers are NULL.
+ if (pFrameReg == NULL)
+ {
+ pFrameReg = (SIZE_T*) GetCapturedRegister(m_StackBaseRegister, pRD);
+ }
+#endif // TARGET_UNIX && !FEATURE_NATIVEAOT
+
+ pObjRef = (OBJECTREF*)(*pFrameReg + spOffset);
+ }
+
+ return pObjRef;
+}
+
+#ifdef DACCESS_COMPILE
+int GcInfoDecoder::GetStackReg(int spBase)
+{
+#if defined(TARGET_AMD64)
+ int esp = 4;
+#elif defined(TARGET_ARM)
+ int esp = 13;
+#elif defined(TARGET_ARM64)
+ int esp = 31;
+#elif defined(TARGET_LOONGARCH64)
+ int esp = 3;
+#elif defined(TARGET_RISCV64)
+ int esp = 2;
+#endif
+
+ if( GC_SP_REL == spBase )
+ return esp;
+ else if ( GC_CALLER_SP_REL == spBase )
+ return -(esp+1);
+ else
+ return m_StackBaseRegister;
+}
+#endif // DACCESS_COMPILE
+
+void GcInfoDecoder::ReportStackSlotToGC(
+ INT32 spOffset,
+ GcStackSlotBase spBase,
+ unsigned gcFlags,
+ PREGDISPLAY pRD,
+ unsigned flags,
+ GCEnumCallback pCallBack,
+ void * hCallBack)
+{
+ GCINFODECODER_CONTRACT;
+
+ OBJECTREF* pObjRef = GetStackSlot(spOffset, spBase, pRD);
+ _ASSERTE(IS_ALIGNED(pObjRef, sizeof(OBJECTREF*)));
+
+#ifdef _DEBUG
+ LOG((LF_GCROOTS, LL_INFO1000, /* Part One */
+ "Reporting %s" FMT_STK,
+ ( (GC_SP_REL == spBase) ? "" :
+ ((GC_CALLER_SP_REL == spBase) ? "caller's " :
+ ((GC_FRAMEREG_REL == spBase) ? "frame " : "<unrecognized GcStackSlotBase> "))),
+ DBG_STK(spOffset) ));
+
+ LOG((LF_GCROOTS, LL_INFO1000, /* Part Two */
+ "at" FMT_ADDR "as ", DBG_ADDR(pObjRef) ));
+
+ VALIDATE_ROOT((gcFlags & GC_CALL_INTERIOR), hCallBack, pObjRef);
+
+ LOG_PIPTR(pObjRef, gcFlags, hCallBack);
+#endif
+
+ gcFlags |= CHECK_APP_DOMAIN;
+
+ pCallBack(hCallBack, pObjRef, gcFlags DAC_ARG(DacSlotLocation(GetStackReg(spBase), spOffset, true)));
+}
+
+
+#endif // USE_GC_INFO_DECODER
+