summaryrefslogtreecommitdiff
path: root/src/dlls
diff options
context:
space:
mode:
authorAdeel Mujahid <adeelbm@outlook.com>2019-02-09 03:24:59 +0200
committerJan Vorlicek <janvorli@microsoft.com>2019-02-09 02:24:59 +0100
commit5bb7eb68035e98e356aba68115e28ed22d3d34aa (patch)
tree6a2ce545da5c8c32591910ffcb2fe86186894c22 /src/dlls
parent8e79024b436f348ea9f96487a6d54067e750f596 (diff)
downloadcoreclr-5bb7eb68035e98e356aba68115e28ed22d3d34aa.tar.gz
coreclr-5bb7eb68035e98e356aba68115e28ed22d3d34aa.tar.bz2
coreclr-5bb7eb68035e98e356aba68115e28ed22d3d34aa.zip
Set visibility option to hidden (#21924)
Diffstat (limited to 'src/dlls')
-rw-r--r--src/dlls/dbgshim/dbgshim.cpp20
-rw-r--r--src/dlls/dbgshim/dbgshim.h16
-rw-r--r--src/dlls/mscordbi/mscordbi.cpp2
-rw-r--r--src/dlls/mscoree/coreclr/CMakeLists.txt7
-rw-r--r--src/dlls/mscoree/mscoree.cpp14
-rw-r--r--src/dlls/mscoree/unixinterface.cpp5
6 files changed, 45 insertions, 19 deletions
diff --git a/src/dlls/dbgshim/dbgshim.cpp b/src/dlls/dbgshim/dbgshim.cpp
index 020dbdc564..c3f321a5ba 100644
--- a/src/dlls/dbgshim/dbgshim.cpp
+++ b/src/dlls/dbgshim/dbgshim.cpp
@@ -77,6 +77,7 @@ Notes:
// that can be supported cross-platform.
//
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
CreateProcessForLaunch(
__in LPWSTR lpCommandLine,
@@ -137,6 +138,7 @@ CreateProcessForLaunch(
// ResumeProcess - to be used with the CreateProcessForLaunch resume handle
//
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
ResumeProcess(
__in HANDLE hResumeHandle)
@@ -155,6 +157,7 @@ ResumeProcess(
// CloseResumeHandle - to be used with the CreateProcessForLaunch resume handle
//
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
CloseResumeHandle(
__in HANDLE hResumeHandle)
@@ -692,6 +695,7 @@ StartupHelperThread(LPVOID p)
// ppUnregisterToken -- pointer to put the UnregisterForRuntimeStartup token.
//
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
RegisterForRuntimeStartup(
__in DWORD dwProcessId,
@@ -732,6 +736,7 @@ RegisterForRuntimeStartup(
// ppUnregisterToken -- pointer to put the UnregisterForRuntimeStartup token.
//
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
RegisterForRuntimeStartupEx(
__in DWORD dwProcessId,
@@ -780,6 +785,7 @@ RegisterForRuntimeStartupEx(
//
// pUnregisterToken -- unregister token from RegisterForRuntimeStartup or NULL.
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
UnregisterForRuntimeStartup(
__in PVOID pUnregisterToken)
@@ -815,8 +821,9 @@ const int cchEventNameBufferSize = (sizeof(StartupNotifyEventNamePrefix) + sizeo
+ 8 // + hex process id DWORD
+ 10 // + decimal session id DWORD
+ 1; // '\' after session id
-
-HRESULT
+
+DLLEXPORT
+HRESULT
GetStartupNotificationEvent(
__in DWORD debuggeePID,
__out HANDLE* phStartupEvent)
@@ -1210,6 +1217,7 @@ EnumProcessModulesInternal(
// Notes:
// Callers use code:CloseCLREnumeration to free the returned arrays.
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
EnumerateCLRs(
DWORD debuggeePID,
@@ -1347,6 +1355,7 @@ EnumerateCLRs(
// dwArrayLength -- array length originally returned by EnumerateCLRs
//
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
CloseCLREnumeration(
__in HANDLE* pHandleArray,
@@ -1473,6 +1482,7 @@ const WCHAR *c_versionStrFormat = W("%08x;%08x;%p");
// The version string is an opaque string that can only be passed back to other
// DbgShim APIs.
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
CreateVersionStringFromModule(
__in DWORD pidDebuggee,
@@ -1707,6 +1717,7 @@ CheckDbiAndRuntimeVersion(
// the right debug pack is not installed.
// else Error. (*ppCordb will be null)
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
CreateDebuggingInterfaceFromVersionEx(
__in int iDebuggerVersion,
@@ -1735,7 +1746,8 @@ CreateDebuggingInterfaceFromVersionEx(
// the right debug pack is not installed.
// else Error. (*ppCordb will be null)
//-----------------------------------------------------------------------------
-HRESULT
+DLLEXPORT
+HRESULT
CreateDebuggingInterfaceFromVersion2(
__in int iDebuggerVersion,
__in LPCWSTR szDebuggeeVersion,
@@ -1867,6 +1879,7 @@ Exit:
// the right debug pack is not installed.
// else Error. (*ppCordb will be null)
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
CreateDebuggingInterfaceFromVersion(
__in LPCWSTR szDebuggeeVersion,
@@ -1960,6 +1973,7 @@ GetContinueStartupEvent(
// Return:
// S_OK on success.
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
CLRCreateInstance(
REFCLSID clsid,
diff --git a/src/dlls/dbgshim/dbgshim.h b/src/dlls/dbgshim/dbgshim.h
index 018058bbe0..e3e7186da9 100644
--- a/src/dlls/dbgshim/dbgshim.h
+++ b/src/dlls/dbgshim/dbgshim.h
@@ -46,24 +46,24 @@ EXTERN_C HRESULT
UnregisterForRuntimeStartup(
__in PVOID pUnregisterToken);
-EXTERN_C HRESULT
+EXTERN_C HRESULT
GetStartupNotificationEvent(
__in DWORD debuggeePID,
__out HANDLE* phStartupEvent);
-EXTERN_C HRESULT
+EXTERN_C HRESULT
EnumerateCLRs(DWORD debuggeePID,
__out HANDLE** ppHandleArrayOut,
__out LPWSTR** ppStringArrayOut,
__out DWORD* pdwArrayLengthOut);
-EXTERN_C HRESULT
+EXTERN_C HRESULT
CloseCLREnumeration(
__in HANDLE* pHandleArray,
__in LPWSTR* pStringArray,
__in DWORD dwArrayLength);
-EXTERN_C HRESULT
+EXTERN_C HRESULT
CreateVersionStringFromModule(
__in DWORD pidDebuggee,
__in LPCWSTR szModuleName,
@@ -71,20 +71,22 @@ CreateVersionStringFromModule(
__in DWORD cchBuffer,
__out DWORD* pdwLength);
-EXTERN_C HRESULT
+EXTERN_C HRESULT
CreateDebuggingInterfaceFromVersionEx(
__in int iDebuggerVersion,
__in LPCWSTR szDebuggeeVersion,
__out IUnknown ** ppCordb);
-EXTERN_C HRESULT
+EXTERN_C
+DLLEXPORT
+HRESULT
CreateDebuggingInterfaceFromVersion2(
__in int iDebuggerVersion,
__in LPCWSTR szDebuggeeVersion,
__in LPCWSTR szApplicationGroupId,
__out IUnknown ** ppCordb);
-EXTERN_C HRESULT
+EXTERN_C HRESULT
CreateDebuggingInterfaceFromVersion(
__in LPCWSTR szDebuggeeVersion,
__out IUnknown ** ppCordb);
diff --git a/src/dlls/mscordbi/mscordbi.cpp b/src/dlls/mscordbi/mscordbi.cpp
index 94b4dc473d..cb50b9c67c 100644
--- a/src/dlls/mscordbi/mscordbi.cpp
+++ b/src/dlls/mscordbi/mscordbi.cpp
@@ -18,7 +18,7 @@ extern BOOL WINAPI DbgDllMain(HINSTANCE hInstance, DWORD dwReason,
// The main dll entry point for this module. This routine is called by the
// OS when the dll gets loaded. Control is simply deferred to the main code.
//*****************************************************************************
-extern "C"
+DLLEXPORT extern "C"
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
// Defer to the main debugging code.
diff --git a/src/dlls/mscoree/coreclr/CMakeLists.txt b/src/dlls/mscoree/coreclr/CMakeLists.txt
index 2619cba6cc..072965250a 100644
--- a/src/dlls/mscoree/coreclr/CMakeLists.txt
+++ b/src/dlls/mscoree/coreclr/CMakeLists.txt
@@ -120,13 +120,18 @@ else()
list(APPEND CORECLR_LIBRARIES
${START_WHOLE_ARCHIVE} # force all PAL objects to be included so all exports are available
coreclrpal
- tracepointprovider
${END_WHOLE_ARCHIVE}
mscorrc_debug
palrt
)
endif(WIN32)
+if(CMAKE_SYSTEM_NAME STREQUAL Linux)
+ list(APPEND CORECLR_LIBRARIES
+ tracepointprovider
+ )
+endif(CMAKE_SYSTEM_NAME STREQUAL Linux)
+
if(FEATURE_PERFTRACING)
list(APPEND CORECLR_LIBRARIES
eventpipe
diff --git a/src/dlls/mscoree/mscoree.cpp b/src/dlls/mscoree/mscoree.cpp
index 40cc04f098..7701035fb4 100644
--- a/src/dlls/mscoree/mscoree.cpp
+++ b/src/dlls/mscoree/mscoree.cpp
@@ -56,13 +56,13 @@ extern "C" IExecutionEngine* IEE();
extern "C" BOOL WINAPI _CRT_INIT(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved);
#endif
-extern "C" BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved);
+extern "C" DLLEXPORT BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved);
// For the CoreClr, this is the real DLL entrypoint. We make ourselves the first entrypoint as
// we need to capture coreclr's hInstance before the C runtime initializes. This function
// will capture hInstance, let the C runtime initialize and then invoke the "classic"
// DllMain that initializes everything else.
-extern "C" BOOL WINAPI CoreDllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved)
+extern "C" DLLEXPORT BOOL WINAPI CoreDllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved)
{
STATIC_CONTRACT_NOTHROW;
@@ -116,7 +116,7 @@ extern "C" BOOL WINAPI CoreDllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpRe
}
extern "C"
-BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved)
+DLLEXPORT BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved)
{
STATIC_CONTRACT_NOTHROW;
@@ -221,7 +221,7 @@ HINSTANCE GetModuleInst()
// %%Function: MetaDataGetDispenser
// This function gets the Dispenser interface given the CLSID and REFIID.
// ---------------------------------------------------------------------------
-STDAPI MetaDataGetDispenser( // Return HRESULT
+DLLEXPORT STDAPI MetaDataGetDispenser( // Return HRESULT
REFCLSID rclsid, // The class to desired.
REFIID riid, // Interface wanted on class factory.
LPVOID FAR *ppv) // Return interface pointer here.
@@ -251,7 +251,7 @@ ErrExit:
// %%Function: GetMetaDataInternalInterface
// This function gets the IMDInternalImport given the metadata on memory.
// ---------------------------------------------------------------------------
-STDAPI GetMetaDataInternalInterface(
+DLLEXPORT STDAPI GetMetaDataInternalInterface(
LPVOID pData, // [IN] in memory metadata section
ULONG cbData, // [IN] size of the metadata section
DWORD flags, // [IN] MDInternal_OpenForRead or MDInternal_OpenForENC
@@ -280,7 +280,7 @@ STDAPI GetMetaDataInternalInterface(
// This function gets the internal scopeless interface given the public
// scopeless interface.
// ---------------------------------------------------------------------------
-STDAPI GetMetaDataInternalInterfaceFromPublic(
+DLLEXPORT STDAPI GetMetaDataInternalInterfaceFromPublic(
IUnknown *pv, // [IN] Given interface.
REFIID riid, // [IN] desired interface
void **ppv) // [OUT] returned interface
@@ -307,7 +307,7 @@ STDAPI GetMetaDataInternalInterfaceFromPublic(
// This function gets the public scopeless interface given the internal
// scopeless interface.
// ---------------------------------------------------------------------------
-STDAPI GetMetaDataPublicInterfaceFromInternal(
+DLLEXPORT STDAPI GetMetaDataPublicInterfaceFromInternal(
void *pv, // [IN] Given interface.
REFIID riid, // [IN] desired interface.
void **ppv) // [OUT] returned interface
diff --git a/src/dlls/mscoree/unixinterface.cpp b/src/dlls/mscoree/unixinterface.cpp
index cf9bbc5c72..0769ea464c 100644
--- a/src/dlls/mscoree/unixinterface.cpp
+++ b/src/dlls/mscoree/unixinterface.cpp
@@ -161,6 +161,7 @@ extern "C" int coreclr_create_delegate(void*, unsigned int, const char*, const c
// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
//
extern "C"
+DLLEXPORT
int coreclr_initialize(
const char* exePath,
const char* appDomainFriendlyName,
@@ -280,6 +281,7 @@ int coreclr_initialize(
// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
//
extern "C"
+DLLEXPORT
int coreclr_shutdown(
void* hostHandle,
unsigned int domainId)
@@ -310,6 +312,7 @@ int coreclr_shutdown(
// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
//
extern "C"
+DLLEXPORT
int coreclr_shutdown_2(
void* hostHandle,
unsigned int domainId,
@@ -344,6 +347,7 @@ int coreclr_shutdown_2(
// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
//
extern "C"
+DLLEXPORT
int coreclr_create_delegate(
void* hostHandle,
unsigned int domainId,
@@ -383,6 +387,7 @@ int coreclr_create_delegate(
// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
//
extern "C"
+DLLEXPORT
int coreclr_execute_assembly(
void* hostHandle,
unsigned int domainId,