Removing `g_hmodCoreCLR` and `g_hThisInst` (#43735)
authorVladimir Sadov <vsadov@microsoft.com>
Tue, 10 Nov 2020 00:19:44 +0000 (16:19 -0800)
committerGitHub <noreply@github.com>
Tue, 10 Nov 2020 00:19:44 +0000 (00:19 +0000)
commit1c1757c040e1735f8e608bc383bb73b3f5f98a38
tree78b409eb31be971b48e136c0c1d20d728c2eb84a
parentfd3ae616fdf46a333902979b8679e5131106cc4c
Removing `g_hmodCoreCLR` and `g_hThisInst`  (#43735)

* g_hmodCoreCLR is Windows-only

* Use 42 in MarkAsThrownByUsWorker()

* replaced GetCLRModule with GetClrModulePathName

* Addded PAL_GetPalHostModule to mscordac_unixexports

* replaced a few cases of g_hThisInst where used to get module path. We can uise `GetClrModulePathName` instead.

* more cases where used to get module path

* unused `GetModuleInst()`

* not using HMODULE in StressLog

* removed mscoree GetModuleInst

* Deleted both  `g_hThisInst` and `g_hmodCoreCLR`

* fix Linux build

* rename `GetModuleBase` ->` GetClrModuleBase`,  it was confusing with other `GetClrModuleBase`

* Fix Linux build

* PR feedback

* Removed hMod variables in Debugger areas

* standalone GC

* cache GetClrModuleBase

* Prevent double-read of `pImageBase`

* fix linker issue

* couple more link order fixes.

* Remove `g_thisModule` in daccess.cpp. Fix typos.
58 files changed:
src/coreclr/src/debug/daccess/daccess.cpp
src/coreclr/src/debug/daccess/dacimpl.h
src/coreclr/src/debug/daccess/request.cpp
src/coreclr/src/debug/di/cordb.cpp
src/coreclr/src/debug/di/module.cpp
src/coreclr/src/debug/di/rsmain.cpp
src/coreclr/src/debug/di/rspriv.h
src/coreclr/src/debug/di/shimprocess.cpp
src/coreclr/src/debug/ee/debugger.cpp
src/coreclr/src/dlls/mscordac/mscordac_unixexports.src
src/coreclr/src/dlls/mscoree/mscoree.cpp
src/coreclr/src/dlls/mscoree/stdafx.h
src/coreclr/src/inc/clrhost.h
src/coreclr/src/inc/corcompile.h
src/coreclr/src/inc/corpriv.h
src/coreclr/src/inc/longfilepathwrappers.h
src/coreclr/src/inc/stresslog.h
src/coreclr/src/inc/utilcode.h
src/coreclr/src/jit/dllmain.cpp
src/coreclr/src/md/compiler/classfactory.cpp
src/coreclr/src/md/staticmd/stdafx.h
src/coreclr/src/pal/inc/pal.h
src/coreclr/src/pal/src/include/pal/stackstring.hpp
src/coreclr/src/pal/src/init/pal.cpp
src/coreclr/src/pal/src/misc/miscpalapi.cpp
src/coreclr/src/pal/tests/palsuite/CMakeLists.txt
src/coreclr/src/pal/tests/palsuite/compilableTests.txt
src/coreclr/src/pal/tests/palsuite/pal_specific/PAL_GetPALDirectoryW/test1/PAL_GetPALDirectoryW.cpp [deleted file]
src/coreclr/src/pal/tests/palsuite/paltestlist_to_be_reviewed.txt
src/coreclr/src/tools/crossgen/CMakeLists.txt
src/coreclr/src/tools/crossgen/crossgen.cpp
src/coreclr/src/utilcode/ccomprc.cpp
src/coreclr/src/utilcode/clrhost.cpp
src/coreclr/src/utilcode/ex.cpp
src/coreclr/src/utilcode/longfilepathwrappers.cpp
src/coreclr/src/utilcode/makepath.cpp
src/coreclr/src/utilcode/stresslog.cpp
src/coreclr/src/utilcode/util.cpp
src/coreclr/src/vm/ceeload.cpp
src/coreclr/src/vm/ceemain.cpp
src/coreclr/src/vm/codeman.cpp
src/coreclr/src/vm/common.h
src/coreclr/src/vm/dwreport.cpp
src/coreclr/src/vm/eepolicy.cpp
src/coreclr/src/vm/eventtrace.cpp
src/coreclr/src/vm/excep.cpp
src/coreclr/src/vm/exceptionhandling.cpp
src/coreclr/src/vm/gcheaputilities.cpp
src/coreclr/src/vm/gcheaputilities.h
src/coreclr/src/vm/hosting.cpp
src/coreclr/src/vm/jithelpers.cpp
src/coreclr/src/vm/pefile.cpp
src/coreclr/src/vm/proftoeeinterfaceimpl.cpp
src/coreclr/src/vm/threads.cpp
src/coreclr/src/vm/vars.cpp
src/coreclr/src/vm/vars.hpp
src/coreclr/src/zap/zapper.cpp
src/installer/corehost/cli/apphost/static/CMakeLists.txt